Utility view class.
More...
#include <synthclone/view.h>
|
| virtual void | setCloseEnabled (bool enabled) |
| | Enables/disables closing for this view.
|
| virtual void | setVisible (bool visible) |
| | Sets the visibility of the root widget.
|
|
| void | closeEnabledChanged (bool enabled) |
| | Emitted when closing is enabled/disabled.
|
| void | closeRequest () |
| | Emitted when a root widget's close button is pressed.
|
| void | visibilityChanged (bool visible) |
| | Emitted when the visibility flag for the view changes.
|
|
| bool | isCloseEnabled () const |
| | Gets a boolean indicating whether or not closing of this view is enabled.
|
| bool | isVisible () const |
| | Gets a boolean indicating whether or not the view is visible.
|
|
| | View (QWidget *rootWidget, QObject *parent=0) |
| | Constructs a new View.
|
| virtual | ~View () |
| | Destroys the View object.
|
| const QWidget * | getRootWidget () const |
| | Gets the root widget for this view.
|
| QWidget * | getRootWidget () |
| | Gets the root widget for this view.
|
Utility view class.
Captures any close event and emits a signal instead of requiring the subclassing of a widget.
Views based on this class attempt to build on the 'passive view' design pattern, meaning that the view knows nothing about the model, and is subject to the will of the controller.
◆ View()
| synthclone::View::View |
( |
QWidget * | rootWidget, |
|
|
QObject * | parent = 0 ) |
|
explicitprotected |
Constructs a new View.
This class is not meant to be called directly; instead, subclass constructors should call this constructor.
- Parameters
-
| rootWidget | The root widget for this View. |
| parent | The parent object of this View. |
◆ ~View()
| virtual synthclone::View::~View |
( |
| ) |
|
|
protectedvirtual |
Destroys the View object.
◆ closeEnabledChanged
| void synthclone::View::closeEnabledChanged |
( |
bool | enabled | ) |
|
|
signal |
Emitted when closing is enabled/disabled.
- Parameters
-
| enabled | Whether or not closing is enabled. |
◆ closeRequest
| void synthclone::View::closeRequest |
( |
| ) |
|
|
signal |
Emitted when a root widget's close button is pressed.
◆ getRootWidget() [1/2]
| QWidget * synthclone::View::getRootWidget |
( |
| ) |
|
|
protected |
Gets the root widget for this view.
- Returns
- The root widget.
◆ getRootWidget() [2/2]
| const QWidget * synthclone::View::getRootWidget |
( |
| ) |
const |
|
protected |
Gets the root widget for this view.
- Returns
- The root widget.
◆ isCloseEnabled()
| bool synthclone::View::isCloseEnabled |
( |
| ) |
const |
Gets a boolean indicating whether or not closing of this view is enabled.
- Returns
- The boolean.
◆ isVisible()
| bool synthclone::View::isVisible |
( |
| ) |
const |
Gets a boolean indicating whether or not the view is visible.
- Returns
- The boolean.
◆ setCloseEnabled
| virtual void synthclone::View::setCloseEnabled |
( |
bool | enabled | ) |
|
|
virtualslot |
Enables/disables closing for this view.
If closing is disabled, closeRequest() signals will not be raised when a user presses the close button in the taskbar. Closing is enabled by default.
- Parameters
-
| enabled | Whether or not closing is enabled. |
◆ setVisible
| virtual void synthclone::View::setVisible |
( |
bool | visible | ) |
|
|
virtualslot |
Sets the visibility of the root widget.
- Parameters
-
| visible | Whether or not the root widget should be visible. |
◆ visibilityChanged
| void synthclone::View::visibilityChanged |
( |
bool | visible | ) |
|
|
signal |
Emitted when the visibility flag for the view changes.
- Parameters
-
| visible | The updated visibility flag. |
The documentation for this class was generated from the following file: