X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiCompare.h;h=47f70a12abc9153ff2ebc0441e19a4d041a975d0;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=4b4c7e494c6778524a6513c7162eb23a36b95a19;hpb=d4be6cf24c89f25786625b2f4ca8129524115818;p=lyx.git diff --git a/src/frontends/qt4/GuiCompare.h b/src/frontends/qt4/GuiCompare.h index 4b4c7e494c..47f70a12ab 100644 --- a/src/frontends/qt4/GuiCompare.h +++ b/src/frontends/qt4/GuiCompare.h @@ -1,103 +1,104 @@ -// -*- C++ -*- -/** - * \file GuiCompare.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Vincent van Ravesteijn - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef GUICOMPARE_H -#define GUICOMPARE_H - -#include "GuiDialog.h" -#include "ui_CompareUi.h" -#include "qt_helpers.h" - -#include "Compare.h" - -namespace lyx { -namespace frontend { - - -class GuiCompare : public GuiDialog, public Ui::CompareUi -{ - Q_OBJECT - -public: - /// - GuiCompare(GuiView & lv); - ~GuiCompare(); - - void closeEvent(QCloseEvent *); - -private Q_SLOTS: - /// - void slotOK(); - /// - void slotCancel(); - /// - void change_adaptor(); - /// - void select_newfile(); - /// - void select_oldfile(); - - /// - void finished(bool aborted); - /// - void nextIt(int); - /// - void progress_max(int) const; - -private: - /// - void updateContents(); - /// - bool isValid(); - /// - bool initialiseParams(std::string const &) { return true; } - /// - bool isBufferDependent() const { return false; } - /// - void clearParams() {} - /// - void dispatchParams() {} - /// - void apply() {} - - - /// enable or disable all controls and rename the Close/Cancel button - void enableControls(bool enable) const; - - /// browse for a file - QString browse(QString const & in_name) const; - /// retrieve the buffer from the specified filename - Buffer const * bufferFromFileName(std::string const & file) const; - - /// create the compare object and run the comparison - int run(); - -private: - /// the object that will do the comparison - Compare * compare_; - - /// the buffer that will contain the result - Buffer * dest_buffer_; - /// the buffer that will contain the result - Buffer const * old_buffer_; - /// the buffer that will contain the result - Buffer const * new_buffer_; - - /// the window title - mutable QString window_title_; -}; - - - -} // namespace frontend -} // namespace lyx - -#endif // GUICOMPARE_H +// -*- C++ -*- +/** + * \file GuiCompare.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Vincent van Ravesteijn + * + * Full author contact details are available in file CREDITS. + */ + +#ifndef GUICOMPARE_H +#define GUICOMPARE_H + +#include "GuiDialog.h" +#include "ui_CompareUi.h" +#include "qt_helpers.h" + +#include "Compare.h" + +namespace lyx { +namespace frontend { + + +class GuiCompare : public GuiDialog, public Ui::CompareUi +{ + Q_OBJECT + +public: + /// + GuiCompare(GuiView & lv); + ~GuiCompare(); + + void closeEvent(QCloseEvent *); + +private Q_SLOTS: + /// + void slotOK(); + /// + void slotCancel(); + /// + void changeAdaptor(); + /// + void selectNewFile(); + /// + void selectOldFile(); + + /// + void error(); + /// + void finished(bool aborted); + /// + void progress(int); + /// + void progressMax(int) const; + /// + void setStatusMessage(QString); + +private: + /// + void updateContents(); + /// + bool isValid(); + /// + bool initialiseParams(std::string const &) { return true; } + /// + bool isBufferDependent() const { return false; } + /// + void clearParams() {} + /// + void dispatchParams() {} + /// + void apply() {} + + + /// enable or disable all controls and rename the Close/Cancel button + void enableControls(bool enable); + + /// browse for a file + QString browse(QString const & in_name) const; + /// retrieve the buffer from the specified filename + Buffer const * bufferFromFileName(std::string const & file) const; + + /// create the compare object and run the comparison + int run(); + +private: + /// the object that will do the comparison + Compare * compare_; + + /// the buffer that will contain the result + Buffer * dest_buffer_; + /// the buffer that will contain the result + Buffer const * old_buffer_; + /// the buffer that will contain the result + Buffer const * new_buffer_; +}; + + + +} // namespace frontend +} // namespace lyx + +#endif // GUICOMPARE_H