]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiChanges.h
Support for command argument placement after the workarea argument
[lyx.git] / src / frontends / qt4 / GuiChanges.h
index 0bb2937da678c4bf9eab699479842b588f788883..344f5e56070d313ab251e528305f4c7e5074643d 100644 (file)
@@ -5,6 +5,7 @@
  * 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 GUICHANGES_H
 #define GUICHANGES_H
 
-#include "GuiDialogView.h"
-#include "ControlChanges.h"
+#include "GuiDialog.h"
 #include "ui_ChangesUi.h"
+#include "support/docstring.h"
 
-#include <QDialog>
 
 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);
+public:
+       GuiChanges(GuiView & lv);
 
 protected Q_SLOTS:
-
-       virtual void nextPressed();
-       virtual void acceptPressed();
-       virtual void rejectPressed();
-
-protected:
-       virtual void closeEvent(QCloseEvent * e);
+       /// 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:
-       GuiChanges * form_;
-};
-
-
-class GuiChanges : public GuiView<GuiChangesDialog>
-{
-public:
        ///
-       GuiChanges(Dialog &);
-       /// parent controller
-       ControlChanges & controller()
-       { return static_cast<ControlChanges &>(this->getController()); }
-       /// parent controller
-       ControlChanges const & controller() const
-       { return static_cast<ControlChanges const &>(this->getController()); }
-
-       void accept();
-
-       void reject();
-
-       void next();
+       void updateContents();
 
-private:
-       friend class GuiChangesDialog;
-       /// Apply changes
-       virtual void apply() {};
-       /// update
-       virtual void update_contents();
-       /// build the dialog
-       virtual void build_dialog();
+       /// 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