#ifndef BUTTONCONTROLLER_H
#define BUTTONCONTROLLER_H
-#include <list>
#include "ButtonPolicy.h"
+
#include "gettext.h"
#include <list>
virtual void hide() {}
- // Override in GuiDialog
- virtual void slotOK() {}
- virtual void slotApply() {}
- virtual void slotRestore() {}
- virtual void slotClose() {}
-
- /** This function is called, for example, if the GUI colours
- * have been changed.
- */
- virtual void redraw() {}
//@}
/** Check whether we may apply our data.
/// Hide the dialog from sight
virtual void hideView() = 0;
- /// Redraw the dialog (e.g. if the colors have been remapped).
- virtual void redrawView() = 0;
-
/// Create the dialog if necessary, update it and display it.
virtual void showView() = 0;
virtual bool isVisibleView() const = 0;
//@}
- /** Defaults to nothing. Can be used by the Controller, however, to
- * indicate to the View that something has changed and that the
- * dialog therefore needs updating.
- * \param id identifies what should be updated.
- */
- virtual void partialUpdateView(int /*id*/) = 0;
-
///
virtual std::string name() const = 0;
}
bool isVisibleView() const { return QDialog::isVisible(); }
void checkStatus() { updateView(); }
- void redraw() { redrawView(); }
- void redrawView() {}
void updateData(std::string const & data)
{
initialiseParams(data);
{
widget_->updateView();
}
- void partialUpdateView(int /*id*/) {}
std::string name() const { return name_; }
//@}
private:
}
bool isVisibleView() const { return QDockWidget::isVisible(); }
void checkStatus() { updateView(); }
- void redraw() { redrawView(); }
- void redrawView() {}
void updateData(std::string const & data)
{
initialiseParams(data);
updateView();
}
bool isClosing() const { return false; }
- void partialUpdateView(int /*id*/) {}
std::string name() const { return name_; }
//@}
private:
void applyView();
/// Hide the dialog from sight
void hideView();
- /// Redraw the dialog (e.g. if the colors have been remapped).
- void redrawView() {}
/// Create the dialog if necessary, update it and display it.
void showView();
/// \return true if the dialog is visible.
void hide();
- /** This function is called, for example, if the GUI colours
- * have been changed.
- */
- void redraw() { redrawView(); }
//@}
/** When applying, it's useful to know whether the dialog is about
*/
bool isClosing() const { return is_closing_; }
- /** Defaults to nothing. Can be used by the Controller, however, to
- * indicate to the View that something has changed and that the
- * dialog therefore needs updating.
- * \param id identifies what should be updated.
- */
- virtual void partialUpdateView(int /*id*/) {}
-
///
std::string name() const { return name_; }
void apply();
- void redrawView() {}
/// Update the display of the dialog whilst it is still visible.
virtual void updateView();
}
bool isVisibleView() const { return QDialog::isVisible(); }
void checkStatus() { updateView(); }
- void redraw() { redrawView(); }
- void redrawView() {}
void updateData(std::string const & data)
{
initialiseParams(data);
updateView();
}
- void partialUpdateView(int /*id*/) {}
std::string name() const { return "paragraph"; }
private: