The SideViewerWidgetFactory class is intended to act as a factory for side viewer widgets. More...
#include <SideViewerWidgetFactory.h>
Signals | |
void | newWidgetCreated (QWidget *widget, const QString &widget_label) |
Signal which is emitted when a new widget was manufactured. |
Public Member Functions | |
IActionProvider * | actionProvider () const |
Provides an action provider interface to provide actions to be shown in the SideWidgetWrapper class. | |
QList< int > | destinationModes () const |
Indication of the modes (which have dynamic side viewer widgets) in which the side viewer may appear. | |
bool | isExclusive () const |
Indicates if the widget is exclusive. | |
bool | manageWidgets () const |
When true, the dynamic side viewer widget will manage the lifetime of widgets returned through produceWidget(). | |
QObject * | objectBase () |
Returns the QObject* base of the interface. | |
const QObject * | objectBase () const |
Returns a const QObject* base of the interface. | |
QWidget * | produceWidget () |
Function which returns the side viewer widget. | |
SideViewerWidgetFactory (FactoryInterface< QWidget > *factory_interface, const QString &widget_id, QList< int > modes, QList< int > startup_modes, bool is_exclusive=false) | |
Constructs a side viewer widget helper. | |
QList< int > | startupModes () const |
Indicates if the widget should be shown on startup. | |
QString | widgetLabel () const |
The text used to represent the widget. |
The SideViewerWidgetFactory class is intended to act as a factory for side viewer widgets.
The SideViewerWidgetFactory class allows you to add any widget which implements Qtilities::Core::Interfaces::IFactoryInterface to a Qtilities::CoreGui::DynamicSideWidgetViewer without needing to implement Qtilities::Core::ISideViewerWidget yourself.
Every time the dyanmic side widget viewer request a new widget of your type, the factory will produce such a widget and manage its lifetime for you. For example:
Qtilities::CoreGui::SideViewerWidgetFactory::SideViewerWidgetFactory | ( | FactoryInterface< QWidget > * | factory_interface, |
const QString & | widget_id, | ||
QList< int > | modes, | ||
QList< int > | startup_modes, | ||
bool | is_exclusive = false |
||
) |
Constructs a side viewer widget helper.
interface | The factory interface to the widget which must be produced. |
widget_id | The string used to represent the widget. |
modes | The modes in which this widget must be present. |
startup_modes | The modes in which this widget must be visible when the application starts. |
|
virtual |
Indicates if the widget is exclusive.
When true, this widget can only appear once inside a dynamic side widget viewer.
Implements Qtilities::CoreGui::Interfaces::ISideViewerWidget.
|
inlinevirtual |
Returns a const QObject* base of the interface.
This function can be used in const methods, but make sure that you don't modify things that should stay const. An example where this is used is when we want to get a property on an object in a const method. This is a const operation.
Implements Qtilities::Core::Interfaces::IObjectBase.
|
virtual |
Function which returns the side viewer widget.
Widget() must be able to produce a new widget every time it is called. The Qtilities::CoreGui::SideViewerWidgetFactory class was designed to help with this process.
The dynamic side viewer widget will manage the lifetime of widgets returned.
Implements Qtilities::CoreGui::Interfaces::ISideViewerWidget.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|