lyx_mirror/src/frontends/qt/GuiCompare.h
Jean-Marc Lasgouttes c293be56bd Rename frontend qt4 to qt
In particular, the directory frontends/qt4 is renamed to frontends/qt.

Many configurations file have to be updated. All mentions of qt4 in
the source have been audited, and changed to qt if necessary.

The only part that has not been updated is the CMake build system.
2019-07-20 23:39:40 +02:00

108 lines
1.8 KiB
C++

// -*- 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"
namespace lyx {
class Compare;
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 slotButtonBox(QAbstractButton *);
///
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 &);
///
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