MIRA
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TitleBar Class Reference

Base class for all window title bars (EditorPartTitleBar, ViewPartTitleBar). More...

#include <rcp/TitleBar.h>

Inheritance diagram for TitleBar:
Inheritance graph
[legend]

Public Member Functions

 TitleBar (QWidget *parent=0)
 
virtual ~TitleBar ()
 
void setHighlight (bool on)
 enables/disables highlighted title bar More...
 
void update ()
 updates the TitleBar (e.g. necessary after the title was changed) More...
 
QWidget * takeRightButtons ()
 Returns a widget containing all buttons of the title bars right side. More...
 
void putBackRightButtons ()
 Puts back the right buttons, that were taken using the above method. More...
 
QWidget * takeLeftButtons ()
 Returns a widget containing all buttons of the title bars left side. More...
 
void putBackLeftButtons ()
 Puts back the left buttons, that were taken using the above method. More...
 
void insertRightButton (QToolButton *button, int index=0)
 Inserts the specified button within the right button group at the given index. More...
 
void insertLeftButton (QToolButton *button, int index=-1)
 Inserts the specified button within the left button group at the given index. More...
 
QMenu * getMenu ()
 Returns the menu of the menu button in order to add new items to the menu. More...
 

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event)
 
void paintEvent (QPaintEvent *)
 
void resizeEvent (QResizeEvent *)
 
void updateBackground ()
 

Protected Attributes

QHBoxLayout * mLayout
 
QHBoxLayout * mLeftLayout
 
QHBoxLayout * mRightLayout
 
QToolButton * mMenuBtn
 
QToolButton * mClose
 
QToolButton * mDock
 
QToolButton * mUndock
 
QToolButton * mMaximize
 
QToolButton * mMinimize
 
QToolButton * mRestore
 
QWidget * mLeftButtons
 
QWidget * mRightButtons
 
QMenu * mMenu
 
QWidget * mParent
 
QPixmap * mBackground
 
bool mIsHighlighted
 

Detailed Description

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:

Constructor & Destructor Documentation

◆ TitleBar()

TitleBar ( QWidget *  parent = 0)

◆ ~TitleBar()

virtual ~TitleBar ( )
virtual

Member Function Documentation

◆ setHighlight()

void setHighlight ( bool  on)

enables/disables highlighted title bar

◆ update()

void 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()

QMenu* 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

Member Data Documentation

◆ mLayout

QHBoxLayout* mLayout
protected

◆ mLeftLayout

QHBoxLayout* mLeftLayout
protected

◆ mRightLayout

QHBoxLayout* mRightLayout
protected

◆ mMenuBtn

QToolButton* mMenuBtn
protected

◆ mClose

QToolButton* mClose
protected

◆ mDock

QToolButton* mDock
protected

◆ mUndock

QToolButton* mUndock
protected

◆ mMaximize

QToolButton* mMaximize
protected

◆ mMinimize

QToolButton* mMinimize
protected

◆ mRestore

QToolButton* mRestore
protected

◆ mLeftButtons

QWidget* mLeftButtons
protected

◆ mRightButtons

QWidget* mRightButtons
protected

◆ mMenu

QMenu* mMenu
protected

◆ mParent

QWidget* mParent
protected

◆ mBackground

QPixmap* mBackground
protected

◆ mIsHighlighted

bool mIsHighlighted
protected

The documentation for this class was generated from the following file: