X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiChanges.h;h=344f5e56070d313ab251e528305f4c7e5074643d;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=9df8b9f715526e03851f423d2a031cf15b7b03bc;hpb=a1cec91afaca91968b46e695533c10ad2a3f73d3;p=lyx.git diff --git a/src/frontends/qt4/GuiChanges.h b/src/frontends/qt4/GuiChanges.h index 9df8b9f715..344f5e5607 100644 --- a/src/frontends/qt4/GuiChanges.h +++ b/src/frontends/qt4/GuiChanges.h @@ -5,68 +5,61 @@ * Licence details can be found in the file COPYING. * * \author John Levon + * \author Michael Gerz * * Full author contact details are available in file CREDITS. */ -#ifndef QCHANGES_H -#define QCHANGES_H +#ifndef GUICHANGES_H +#define GUICHANGES_H -#include "GuiDialogView.h" +#include "GuiDialog.h" #include "ui_ChangesUi.h" -#include -#include +#include "support/docstring.h" + namespace lyx { namespace frontend { -class GuiChanges; - -class GuiChangesDialog : public QDialog, public Ui::ChangesUi { +class GuiChanges : public GuiDialog, public Ui::ChangesUi +{ Q_OBJECT -public: - - GuiChangesDialog(GuiChanges * form); - -protected Q_SLOTS: - - virtual void nextPressed(); - virtual void acceptPressed(); - virtual void rejectPressed(); - -protected: - virtual void closeEvent(QCloseEvent * e); -private: - GuiChanges * form_; -}; - -class ControlChanges; - -class GuiChanges - : public QController > -{ public: - friend class GuiChangesDialog; + GuiChanges(GuiView & lv); - GuiChanges(Dialog &); - - void accept(); - - void reject(); - - void next(); +protected Q_SLOTS: + /// accept the current change + void acceptChange(); + /// reject the current change + void rejectChange(); + /// find the next change and highlight it + void nextChange(); + /// find the previous change and highlight it + void previousChange(); private: - /// Apply changes - virtual void apply() {}; - /// update - virtual void update_contents(); - /// build the dialog - virtual void build_dialog(); + /// + void updateContents(); + + /// Nothing to initialise in this case. + bool initialiseParams(std::string const &) { return true; } + /// + void clearParams() {} + /// + void dispatchParams() {} + /// + bool isBufferDependent() const { return true; } + /// always true since dispatchParams() is empty + bool canApply() const { return true; } + + /// return date of change + docstring changeDate() const; + /// return author of change + docstring changeAuthor() const; }; } // namespace frontend } // namespace lyx -#endif // QCHANGES_H +#endif // GUICHANGES_H