#include "ButtonControllerBase.h"
#include "ViewBase.h"
+ControlButtons::ControlButtons()
+ : is_closing_(false)
+{}
+
+
void ControlButtons::ApplyButton()
{
apply();
void ControlButtons::OKButton()
{
+ is_closing_ = true;
apply();
+ is_closing_ = false;
hide();
bc().ok();
}
*/
class ControlButtons : public DialogBase
{
-public: // methods
+public:
///
- ControlButtons() {}
+ ControlButtons();
///
virtual ~ControlButtons() {}
virtual ButtonControllerBase & bc() = 0;
protected:
+ /** When Applying it's useful to know whether the dialog is about
+ to close or not (no point refreshing the display for example). */
+ bool isClosing() const { return is_closing_; }
+
/// Get changed parameters and Dispatch them to the kernel.
virtual void apply() = 0;
/// Disconnect signals and hide View.
instantiated in a daughter class that creates the actual instance
of the View. */
virtual ViewBase & view() = 0;
+
+private:
+ ///
+ bool is_closing_;
+
};
#endif // CONTROLBUTTONS_H