4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Vincent van Ravesteijn
9 * Full author contact details are available in file CREDITS.
15 #include "GuiDialog.h"
17 #include "ui_CompareUi.h"
26 class GuiCompare : public GuiDialog, public Ui::CompareUi
32 GuiCompare(GuiView & lv);
35 void closeEvent(QCloseEvent *) override;
43 void slotButtonBox(QAbstractButton *);
54 void finished(bool aborted);
58 void progressMax(int) const;
60 void setStatusMessage(QString const &);
64 void updateContents() override;
66 bool isValid() override;
68 bool initialiseParams(std::string const &) override;
70 bool isBufferDependent() const override { return false; }
72 void clearParams() override {}
74 void dispatchParams() override {}
76 void apply() override {}
79 /// enable or disable all controls and rename the Close/Cancel button
80 void enableControls(bool enable);
83 QString browse(QString const & in_name) const;
84 /// retrieve the buffer from the specified filename
85 Buffer const * bufferFromFileName(std::string const & file) const;
87 /// create the compare object and run the comparison
88 /// if blocking_mode is true, run should execute so that the caller can block to wait for the results
89 int run(bool blocking_mode = false);
92 /// the object that will do the comparison
95 /// the buffer that will contain the result
96 Buffer * dest_buffer_;
97 /// the buffer that will contain the result
98 Buffer const * old_buffer_;
99 /// the buffer that will contain the result
100 Buffer const * new_buffer_;
105 } // namespace frontend
108 #endif // GUICOMPARE_H