4 * This file is part of LyX, the document processor.
\r
5 * Licence details can be found in the file COPYING.
\r
7 * \author Vincent van Ravesteijn
\r
9 * Full author contact details are available in file CREDITS.
\r
12 #ifndef GUICOMPARE_H
\r
13 #define GUICOMPARE_H
\r
15 #include "GuiDialog.h"
\r
16 #include "ui_CompareUi.h"
\r
17 #include "qt_helpers.h"
\r
19 #include "Compare.h"
\r
22 namespace frontend {
\r
25 class GuiCompare : public GuiDialog, public Ui::CompareUi
\r
31 GuiCompare(GuiView & lv);
\r
34 void closeEvent(QCloseEvent *);
\r
42 void change_adaptor();
\r
44 void select_newfile();
\r
46 void select_oldfile();
\r
49 void finished(bool aborted);
\r
53 void progress_max(int) const;
\r
57 void updateContents();
\r
61 bool initialiseParams(std::string const &) { return true; }
\r
63 bool isBufferDependent() const { return false; }
\r
65 void clearParams() {}
\r
67 void dispatchParams() {}
\r
72 /// enable or disable all controls and rename the Close/Cancel button
\r
73 void enableControls(bool enable) const;
\r
75 /// browse for a file
\r
76 QString browse(QString const & in_name) const;
\r
77 /// retrieve the buffer from the specified filename
\r
78 Buffer const * bufferFromFileName(std::string const & file) const;
\r
80 /// create the compare object and run the comparison
\r
84 /// the object that will do the comparison
\r
87 /// the buffer that will contain the result
\r
88 Buffer * dest_buffer_;
\r
89 /// the buffer that will contain the result
\r
90 Buffer const * old_buffer_;
\r
91 /// the buffer that will contain the result
\r
92 Buffer const * new_buffer_;
\r
94 /// the window title
\r
95 mutable QString window_title_;
\r
100 } // namespace frontend
\r
103 #endif // GUICOMPARE_H
\r