This class is used to manage a QMainWindow It provides several functions to create and manipulate the UI Also it will connect all created objects to the messaging system and will manage the UIDs of those objects. More...
#include "aWindowManager.h"
Signals | |
void | tabToolBarTabChanged (int _index) |
Public Member Functions | |
aWindowManager (aMessenger *_messenger, aUidManager *_uidManager) | |
Constructor. | |
virtual | ~aWindowManager () |
Deconstructor. | |
virtual void | removeChildObject (aObject *_child) override |
Will remove the child from this object (not destroy it) This function should be called from the deconstructor of a child. | |
void | SetObjectName (const QString &_alias) |
Will set the alias for this object. | |
void | setCentralWidget (QWidget *_centralWidget) |
void | setStatusLabelText (const QString &_status) |
Will set the text of the status label. | |
void | setStatusLabelVisible (bool _visible=true, bool _hideDelayed=true) |
Will set the visible state of the status label If the show delayed option is active the delay timer will start and set the visible state of the status label on timeout. | |
void | setStatusBarProgress (int _progress) |
Will set the progress of the status bar. | |
void | setStatusBarVisible (bool _visible, bool _showDelayed=true) |
Will set the visible state of the progress bar If the show delayed option is active the delay timer will start and set the visible state of the progress bar on timeout. | |
void | setStatusBarContinuous (bool _continuos=true) |
Will set the status bar to an continuous stage. | |
bool | getStatusBarVisible (void) const |
bool | getStatusLabelVisible (void) const |
QString | getStatusLabelText (void) const |
int | getStatusBarProgress (void) const |
bool | getStatusBarContinuous (void) const |
void | setShowStatusObjectDelayTimerInterval (int _interval) |
Will set the interval for the status label and progress bar show timer. | |
void | setHideStatusObjectDelayTimerInterval (int _interval) |
Will set the interval for the status label and progress bar hide timer. | |
int | getShowStatusObjectDelayTimerInterval (void) const |
Will return the currently set interval for the status label and progress bar show timer. | |
int | getHideStatusObjectDelayTimerInterval (void) const |
Will return the currently set interval for the status label and progress bar hide timer. | |
void | setWaitingAnimationVisible (bool _visible) |
void | setWaitingAnimation (QMovie *_movie) |
void | setTabToolBarVisible (bool _vis=true) |
Will set the visible status of the tabToolbar. | |
void | setTabToolbarDoubleClickEnabled (bool _isEnabled) |
Will set the enabled state of the double click event for the tab toolbar tabs. | |
aTtbPage * | createTabToolbarSubContainer (const QString &_text=QString("")) |
Will add a new sub container to the tab toolbar container. | |
aTtbContainer * | getTabToolBarSubContainer (const QString &_text) |
Will return the sub container with the specified text Returns nullptr if no sub container with the specified text exists. | |
QString | getTabToolBarTabText (ak::ID _tabId) |
void | addTabToolbarWidget (UID _parentUid, UID _objectUid) |
Will add the object with the provided uid to the specified parent object The object must have been creted by the objectManager used in this tab toolbar manager. Valid objects are actions or any object derived from aWidget. | |
ID | currentTabToolbarTab (void) const |
Will return the current selected tab toolbar tab. | |
int | tabToolbarTabCount (void) const |
Will return the ammount of tabs in the tabToolbar. | |
void | enableTabToolbar (bool flag) const |
Will enable or disable the tabToolbar. | |
void | setCurrentTabToolBarTab (ID _tabID) |
Will set the specified tab toolbar tab as current. | |
void | setCurrentTabToolBarTab (const QString &_tabName) |
void | setCentralWidgetMinimumSize (const QSize &_size) |
Will set the minimum size of the central widget. | |
aWindow * | window (void) const |
Returns a pointer to the QMainWindow this UI Manager is managing. | |
void | setWindowTitle (const QString &_title) |
Will est the window title to the title provided. | |
void | setWindowIcon (const QIcon &_tcon) |
Will set the window icon to the icon provided. | |
QString | windowTitle (void) const |
Will return the currently set window title. | |
void | addEventHandler (aWindowEventHandler *_eventHandler) |
Will add the provided event handler to this window. | |
void | removeEventHandler (aWindowEventHandler *_eventHandler) |
Will remove the provided event handler from this window. | |
void | showMaximized (void) |
Will set the window state to maximized. | |
void | showMinimized (void) |
Will set the window state to minimized. | |
void | showNormal (void) |
Will set the window state to normal. | |
void | close (void) |
Will close the window. | |
void | resize (int _width, int _height) |
std::string | saveState (std::string currentState) |
Will return the state of the window so it can be restored. | |
bool | restoreState (const std::string &_state, bool _setPositionAndSize=true) |
void | setTabToolBarTabOrder (const QStringList &_list) |
Public Member Functions inherited from ak::aObject | |
aObject (objectType _type=otNone, UID _UID=ak::invalidUID) | |
Constructor. | |
aObject (const aObject &_other) | |
Copy constructor. | |
aObject & | operator= (const aObject &_other) |
Assignment operator. | |
virtual | ~aObject () |
Deconstructor. | |
virtual void | addChildObject (aObject *_child) |
Will add the child to this object. | |
void | setUniqueName (const QString &_name) |
Will set this objects unique name. | |
virtual void | setParentObject (aObject *_parentObject) |
Will set the parent object of this object. | |
QString | uniqueName (void) const |
Will return the unique name of this object. | |
aObject * | parentObject (void) const |
Will return a pointer to the parent object. | |
int | childObjectCount (void) const |
Will return the count of sub objects. | |
aObject * | childObject (UID _childUID) |
Will return the child with the specified UID. | |
void | setOwner (aObject *_object) |
Will set the owner of this object. | |
aObject * | owner (void) const |
Will return the owner of this object. | |
void | setUid (UID _UID) |
Will set the objects UID. | |
UID | uid (void) const |
Returns the objects UID. | |
objectType | type (void) const |
Returns the objects type. | |
virtual bool | isWidgetType (void) const |
Returns true if the object is an object derived from aWidget. | |
Additional Inherited Members | |
Protected Attributes inherited from ak::aObject | |
UID | m_uid |
int | m_references |
The objects UID. | |
objectType | m_objectType |
The objects references. | |
QString | m_uniqueName |
The object type of this object. | |
aObject * | m_parentObject |
aObject * | m_owner |
std::map< UID, aObject * > | m_childObjects |
This class is used to manage a QMainWindow It provides several functions to create and manipulate the UI Also it will connect all created objects to the messaging system and will manage the UIDs of those objects.
ak::aWindowManager::aWindowManager | ( | aMessenger * | _messenger, |
aUidManager * | _uidManager ) |
Constructor.
_messenger | The global messenger used in this object |
_uidManager | The global UID manager used in this object |
|
virtual |
Deconstructor.
void ak::aWindowManager::addEventHandler | ( | aWindowEventHandler * | _eventHandler | ) |
Will add the provided event handler to this window.
_eventHandler | The event handler to add |
Will add the object with the provided uid to the specified parent object The object must have been creted by the objectManager used in this tab toolbar manager. Valid objects are actions or any object derived from aWidget.
_objectUid | The UID of the object to be added |
_parentUid | The UID of the parent object where to add the Object to |
void ak::aWindowManager::close | ( | void | ) |
Will close the window.
ak::aTtbPage * ak::aWindowManager::createTabToolbarSubContainer | ( | const QString & | _text = QString("") | ) |
Will add a new sub container to the tab toolbar container.
_text | The initial text of the container |
ak::ID ak::aWindowManager::currentTabToolbarTab | ( | void | ) | const |
Will return the current selected tab toolbar tab.
void ak::aWindowManager::enableTabToolbar | ( | bool | flag | ) | const |
Will enable or disable the tabToolbar.
int ak::aWindowManager::getHideStatusObjectDelayTimerInterval | ( | void | ) | const |
Will return the currently set interval for the status label and progress bar hide timer.
int ak::aWindowManager::getShowStatusObjectDelayTimerInterval | ( | void | ) | const |
Will return the currently set interval for the status label and progress bar show timer.
bool ak::aWindowManager::getStatusBarContinuous | ( | void | ) | const |
int ak::aWindowManager::getStatusBarProgress | ( | void | ) | const |
bool ak::aWindowManager::getStatusBarVisible | ( | void | ) | const |
QString ak::aWindowManager::getStatusLabelText | ( | void | ) | const |
bool ak::aWindowManager::getStatusLabelVisible | ( | void | ) | const |
ak::aTtbContainer * ak::aWindowManager::getTabToolBarSubContainer | ( | const QString & | _text | ) |
Will return the sub container with the specified text Returns nullptr if no sub container with the specified text exists.
_text | The text of the sub container to find |
QString ak::aWindowManager::getTabToolBarTabText | ( | ak::ID | _tabId | ) |
|
overridevirtual |
Will remove the child from this object (not destroy it) This function should be called from the deconstructor of a child.
Reimplemented from ak::aObject.
void ak::aWindowManager::removeEventHandler | ( | aWindowEventHandler * | _eventHandler | ) |
Will remove the provided event handler from this window.
_eventHandler | The event handler to remove |
void ak::aWindowManager::resize | ( | int | _width, |
int | _height ) |
bool ak::aWindowManager::restoreState | ( | const std::string & | _state, |
bool | _setPositionAndSize = true ) |
std::string ak::aWindowManager::saveState | ( | std::string | currentState | ) |
Will return the state of the window so it can be restored.
void ak::aWindowManager::setCentralWidget | ( | QWidget * | _centralWidget | ) |
void ak::aWindowManager::setCentralWidgetMinimumSize | ( | const QSize & | _size | ) |
Will set the minimum size of the central widget.
_size | The size to set as minimum size |
void ak::aWindowManager::setCurrentTabToolBarTab | ( | const QString & | _tabName | ) |
void ak::aWindowManager::setCurrentTabToolBarTab | ( | ak::ID | _tabID | ) |
Will set the specified tab toolbar tab as current.
_tabID | The tab to set as current |
void ak::aWindowManager::setHideStatusObjectDelayTimerInterval | ( | int | _interval | ) |
Will set the interval for the status label and progress bar hide timer.
_interval | The interval to be set |
void ak::aWindowManager::SetObjectName | ( | const QString & | _alias | ) |
Will set the alias for this object.
_alias | The alias to set |
void ak::aWindowManager::setShowStatusObjectDelayTimerInterval | ( | int | _interval | ) |
Will set the interval for the status label and progress bar show timer.
_interval | The interval to be set |
void ak::aWindowManager::setStatusBarContinuous | ( | bool | _continuos = true | ) |
Will set the status bar to an continuous stage.
void ak::aWindowManager::setStatusBarProgress | ( | int | _progress | ) |
Will set the progress of the status bar.
_progress | The progress to set the status bar (0 - 100) |
void ak::aWindowManager::setStatusBarVisible | ( | bool | _visible, |
bool | _showDelayed = true ) |
Will set the visible state of the progress bar If the show delayed option is active the delay timer will start and set the visible state of the progress bar on timeout.
_visible | If true, the progress bar will be set to visible, otherwise to hidden |
_resetOnHide | If true, the progress bar progress will be set to 0 if it is hidden |
_showDelayed | If true, the progress bar will be shown/hidden by the delay timer |
void ak::aWindowManager::setStatusLabelText | ( | const QString & | _status | ) |
Will set the text of the status label.
_status | The text to be set |
void ak::aWindowManager::setStatusLabelVisible | ( | bool | _visible = true, |
bool | _hideDelayed = true ) |
Will set the visible state of the status label If the show delayed option is active the delay timer will start and set the visible state of the status label on timeout.
_visible | If true, the status label will be set to visible, otherwise to hidden |
_hideDelayed | If true, the status label will be hidden by the delay timer |
void ak::aWindowManager::setTabToolbarDoubleClickEnabled | ( | bool | _isEnabled | ) |
Will set the enabled state of the double click event for the tab toolbar tabs.
void ak::aWindowManager::setTabToolBarTabOrder | ( | const QStringList & | _list | ) |
void ak::aWindowManager::setTabToolBarVisible | ( | bool | _vis = true | ) |
Will set the visible status of the tabToolbar.
_vis | If true, the tab toolBar will be visible |
void ak::aWindowManager::setWaitingAnimation | ( | QMovie * | _movie | ) |
void ak::aWindowManager::setWaitingAnimationVisible | ( | bool | _visible | ) |
void ak::aWindowManager::setWindowIcon | ( | const QIcon & | _tcon | ) |
Will set the window icon to the icon provided.
_icon | The icon to set |
void ak::aWindowManager::setWindowTitle | ( | const QString & | _title | ) |
Will est the window title to the title provided.
_title | The title to set |
void ak::aWindowManager::showMaximized | ( | void | ) |
Will set the window state to maximized.
void ak::aWindowManager::showMinimized | ( | void | ) |
Will set the window state to minimized.
void ak::aWindowManager::showNormal | ( | void | ) |
Will set the window state to normal.
|
signal |
int ak::aWindowManager::tabToolbarTabCount | ( | void | ) | const |
Will return the ammount of tabs in the tabToolbar.
ak::aWindow * ak::aWindowManager::window | ( | void | ) | const |
Returns a pointer to the QMainWindow this UI Manager is managing.
QString ak::aWindowManager::windowTitle | ( | void | ) | const |
Will return the currently set window title.