Base class for all window title bars (EditorPartTitleBar, ViewPartTitleBar).
More...
#include <rcp/TitleBar.h>
Base class for all window title bars (EditorPartTitleBar, ViewPartTitleBar).
This class provides painting of the title bar, and adds several default buttons to the title:
- left: Dock, Undock
- right: Menu, Minimize, Maximize, Restore, Close
◆ TitleBar()
◆ ~TitleBar()
◆ setHighlight()
void setHighlight |
( |
bool |
on | ) |
|
enables/disables highlighted title bar
◆ update()
updates the TitleBar (e.g. necessary after the title was changed)
◆ takeRightButtons()
QWidget* takeRightButtons |
( |
| ) |
|
Returns a widget containing all buttons of the title bars right side.
The widget can be placed somewhere else and later put back using putBackRightButtons(). This is useful, when the icons should be placed into a different widget than this title bar, e.g. when the window is maximized and the title bar is hidden.
◆ putBackRightButtons()
void putBackRightButtons |
( |
| ) |
|
Puts back the right buttons, that were taken using the above method.
◆ takeLeftButtons()
QWidget* takeLeftButtons |
( |
| ) |
|
Returns a widget containing all buttons of the title bars left side.
The widget can be placed somewhere else and late put back using putBackLeftButtons(). This is useful, when the icons should be placed into a different widget than this title bar, e.g. when the window is maximized and the title bar is hidden.
◆ putBackLeftButtons()
void putBackLeftButtons |
( |
| ) |
|
Puts back the left buttons, that were taken using the above method.
◆ insertRightButton()
void insertRightButton |
( |
QToolButton * |
button, |
|
|
int |
index = 0 |
|
) |
| |
Inserts the specified button within the right button group at the given index.
The default index is 0 which will add the button on the left side. Note that the parent of the button will be changed to the right button group widget.
◆ insertLeftButton()
void insertLeftButton |
( |
QToolButton * |
button, |
|
|
int |
index = -1 |
|
) |
| |
Inserts the specified button within the left button group at the given index.
The default index is -1 which will add the button on the right side. Note that the parent of the button will be changed to the left button group widget.
◆ getMenu()
Returns the menu of the menu button in order to add new items to the menu.
Calling this method also makes the menu button visible.
◆ eventFilter()
bool eventFilter |
( |
QObject * |
obj, |
|
|
QEvent * |
event |
|
) |
| |
|
protected |
◆ paintEvent()
void paintEvent |
( |
QPaintEvent * |
| ) |
|
|
protected |
◆ resizeEvent()
void resizeEvent |
( |
QResizeEvent * |
| ) |
|
|
protected |
◆ updateBackground()
void updateBackground |
( |
| ) |
|
|
protected |
◆ mLayout
◆ mLeftLayout
◆ mRightLayout
QHBoxLayout* mRightLayout |
|
protected |
◆ mMenuBtn
◆ mClose
◆ mDock
◆ mUndock
◆ mMaximize
◆ mMinimize
◆ mRestore
◆ mLeftButtons
◆ mRightButtons
◆ mMenu
◆ mParent
◆ mBackground
◆ mIsHighlighted
The documentation for this class was generated from the following file: