OpenWalnut
1.5.0dev
|
Advanced QDockWidget. More...
#include <WQtDockWidget.h>
Public Slots | |
void | showHelp () |
Show help. More... | |
Public Member Functions | |
WQtDockWidget (const QString &title, QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags()) | |
Construct dock widget with title. More... | |
WQtDockWidget (QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags()) | |
Construct dock widget. More... | |
virtual | ~WQtDockWidget () |
Destructor. More... | |
virtual void | addTitleProperty (WPropTrigger prop, WGEImage::SPtr icon=WGEImage::SPtr()) |
Add a property to the title of this dock. More... | |
virtual void | addTitleProperty (WPropBool prop, WGEImage::SPtr icon=WGEImage::SPtr()) |
Add a property to the title of this dock. More... | |
virtual void | addTitleProperty (WPropGroup prop, WGEImage::SPtr icon=WGEImage::SPtr()) |
Add a property to the title of this dock. More... | |
virtual void | addTitleAction (QAction *action, bool instantPopup=false) |
Add the given action to the titlebar. More... | |
virtual void | addTitleButton (QToolButton *button) |
Add the given tool button to the titlebar. More... | |
virtual void | removeTitleAction (QAction *action) |
Remove the given action from the list. More... | |
virtual void | addTitleSeperator () |
Add a separator. More... | |
virtual void | addTitleWidget (QWidget *widget) |
Add an arbitrary widget. More... | |
virtual void | removeTitleWidget (QWidget *widget) |
Remove the specified widget from the title bar. More... | |
virtual void | setHelpContext (const QString &id) |
Set a string which identifies help material for this dock. More... | |
virtual const QString & | getHelpContext () |
Return the help context id. More... | |
virtual void | saveSettings () |
Save settings. More... | |
virtual void | restoreSettings () |
Restore settings. More... | |
void | disableCloseButton (bool disable=true) |
Disable close button? Might come in handy when embedding these widgets into others. More... | |
Protected Member Functions | |
virtual void | closeEvent (QCloseEvent *event) |
Called whenever a close event is received. More... | |
Private Attributes | |
WQtDockTitleWidget * | m_titleBar |
Title widget. More... | |
QString | m_helpContextId |
The ID for the help context associated with this dock. More... | |
Advanced QDockWidget.
This class allows you to add actions to the titlebar of the dock widget
Definition at line 49 of file WQtDockWidget.h.
WQtDockWidget::WQtDockWidget | ( | const QString & | title, |
QWidget * | parent = 0 , |
||
Qt::WindowFlags | flags = Qt::WindowFlags() |
||
) |
Construct dock widget with title.
title | the title of the widget |
parent | the parent widget |
flags | optional window flags |
Definition at line 44 of file WQtDockWidget.cpp.
References m_titleBar, and WQtDockTitleWidget::updateHelp().
Referenced by WQtControlPanel::WQtControlPanel().
WQtDockWidget::WQtDockWidget | ( | QWidget * | parent = 0 , |
Qt::WindowFlags | flags = Qt::WindowFlags() |
||
) |
Construct dock widget.
parent | the parent widget |
flags | optional window flags |
Definition at line 59 of file WQtDockWidget.cpp.
References m_titleBar, and WQtDockTitleWidget::updateHelp().
|
virtual |
Destructor.
Definition at line 72 of file WQtDockWidget.cpp.
|
virtual |
Add the given action to the titlebar.
It gets added after the previously added ones.
action | the action to add. |
instantPopup | if true, the button does not trigger an action. Instead, it directly opens the menu. |
Definition at line 77 of file WQtDockWidget.cpp.
References WQtDockTitleWidget::addTitleAction(), and m_titleBar.
Referenced by addTitleProperty(), WMainWindow::setupGUI(), WQtColormapper::WQtColormapper(), WQtControlPanel::WQtControlPanel(), and WQtMessageDock::WQtMessageDock().
|
virtual |
Add the given tool button to the titlebar.
It gets added after the previously added ones.
button | the action to add. |
Definition at line 82 of file WQtDockWidget.cpp.
References WQtDockTitleWidget::addTitleButton(), and m_titleBar.
Referenced by addTitleProperty(), and WQtGLDockWidget::WQtGLDockWidget().
|
virtual |
Add a property to the title of this dock.
Image should be specified but is optional.
prop | the property |
icon | the icon to use. |
Definition at line 160 of file WQtDockWidget.cpp.
References addTitleAction(), WIconManager::convertToIcon(), and WQtGui::getMainWindow().
|
virtual |
Add a property to the title of this dock.
Image should be specified but is optional.
prop | the property |
icon | the icon to use. |
Definition at line 175 of file WQtDockWidget.cpp.
References addTitleButton(), WIconManager::convertToIcon(), WQtPropertyGroupWidget::createPropertyGroupBox(), WQtPropertyGroupWidget::createPropertyGroupWidget(), and WQtGui::getMainWindow().
|
virtual |
Add a property to the title of this dock.
Image should be specified but is optional.
prop | the property |
icon | the icon to use. |
Definition at line 145 of file WQtDockWidget.cpp.
References addTitleAction(), WIconManager::convertToIcon(), and WQtGui::getMainWindow().
Referenced by WUIQtWidgetBase::addActionBoolGT(), WUIQtWidgetBase::addActionGroupGT(), WUIQtWidgetBase::addActionTriggerGT(), and WQtGLDockWidget::WQtGLDockWidget().
|
virtual |
Add a separator.
Definition at line 92 of file WQtDockWidget.cpp.
References WQtDockTitleWidget::addTitleSeperator(), and m_titleBar.
Referenced by WMainWindow::setupGUI(), and WQtControlPanel::WQtControlPanel().
|
virtual |
Add an arbitrary widget.
Please take care of its size! This method sets a size policy and a fixed height.
widget | the widget to add |
Definition at line 97 of file WQtDockWidget.cpp.
References WQtDockTitleWidget::addTitleWidget(), and m_titleBar.
Referenced by WQtMessageDock::WQtMessageDock().
|
protectedvirtual |
Called whenever a close event is received.
event | the event. |
Reimplemented in WQtGLDockWidget.
Definition at line 134 of file WQtDockWidget.cpp.
References saveSettings().
Referenced by WQtGLDockWidget::closeEvent().
void WQtDockWidget::disableCloseButton | ( | bool | disable = true | ) |
Disable close button? Might come in handy when embedding these widgets into others.
disable | true to disable |
Definition at line 140 of file WQtDockWidget.cpp.
References WQtDockTitleWidget::disableCloseButton(), and m_titleBar.
Referenced by WUIQtViewWidget::realizeImpl().
|
virtual |
Return the help context id.
Definition at line 113 of file WQtDockWidget.cpp.
References m_helpContextId.
Referenced by WQtDockTitleWidget::updateHelp().
|
virtual |
Remove the given action from the list.
action | the action to add |
Definition at line 87 of file WQtDockWidget.cpp.
References m_titleBar, and WQtDockTitleWidget::removeTitleAction().
|
virtual |
Remove the specified widget from the title bar.
widget | the widget to remove |
Definition at line 102 of file WQtDockWidget.cpp.
References m_titleBar, and WQtDockTitleWidget::removeTitleWidget().
|
virtual |
Restore settings.
Reimplemented in WQtGLDockWidget.
Definition at line 128 of file WQtDockWidget.cpp.
References WQtGui::getSettings().
Referenced by WQtGLDockWidget::restoreSettings().
|
virtual |
Save settings.
Reimplemented in WQtMessageDock, and WQtGLDockWidget.
Definition at line 123 of file WQtDockWidget.cpp.
References WQtGui::getSettings().
Referenced by closeEvent(), and WQtGLDockWidget::saveSettings().
|
virtual |
Set a string which identifies help material for this dock.
If you specify a help ID which then leads to multiple help documents, a help menu is shown instead of a simple help button. If no help context id was specified, the help button is not show.
id | the help context id for this dock |
Definition at line 107 of file WQtDockWidget.cpp.
References m_helpContextId, m_titleBar, and WQtDockTitleWidget::updateHelp().
|
slot |
Show help.
Definition at line 118 of file WQtDockWidget.cpp.
|
private |
The ID for the help context associated with this dock.
Definition at line 195 of file WQtDockWidget.h.
Referenced by getHelpContext(), and setHelpContext().
|
private |
Title widget.
Definition at line 190 of file WQtDockWidget.h.
Referenced by addTitleAction(), addTitleButton(), addTitleSeperator(), addTitleWidget(), disableCloseButton(), removeTitleAction(), removeTitleWidget(), setHelpContext(), and WQtDockWidget().