digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::DMultiTabBar Class Reference

a Widget for horizontal and vertical tabs.

Inheritance diagram for Digikam::DMultiTabBar:

Public Types

enum  TextStyle { ActiveIconText = 0 , AllIconsText = 2 }
 The list of available styles for DMultiTabBar. More...

Public Member Functions

 DMultiTabBar (Qt::Edge pos, QWidget *const parent=nullptr)
void appendButton (const QIcon &pic, int id=-1, QMenu *const popup=nullptr, const QString &not_used_yet=QString())
 append a new button to the button area.
void appendTab (const QIcon &pic, int id=-1, const QString &text=QString())
 append a new tab to the tab area.
DMultiTabBarButton * button (int id) const
 get a pointer to a button within the button area identified by its ID
bool isTabRaised (int id) const
Qt::Edge position () const
 get the tabbar position.
void removeButton (int id)
 remove a button with the given ID
void removeTab (int id)
 remove a tab with a given ID
void setPosition (Qt::Edge pos)
 set the real position of the widget.
void setStyle (TextStyle style)
 set the display style of the tabs
void setTab (int id, bool state)
 set a tab to "raised"
DMultiTabBarTab * tab (int id) const
 get a pointer to a tab within the tab area, identified by its ID
TextStyle tabStyle () const
 get the display style of the tabs

Protected Member Functions

virtual void fontChange (const QFont &)
void updateSeparator ()

Friends

class DMultiTabBarButton

Member Enumeration Documentation

◆ TextStyle

Enumerator
ActiveIconText 

Always shows icon, only show the text of active tabs.

AllIconsText 

Always shows the text and icons.

Member Function Documentation

◆ appendButton()

void Digikam::DMultiTabBar::appendButton ( const QIcon & pic,
int id = -1,
QMenu *const popup = nullptr,
const QString & not_used_yet = QString() )

The button can later on be accessed with button(ID) eg for connecting signals to it

Parameters
pica icon for the button
idan arbitrary ID value. It will be emitted in the clicked signal for identifying the button if more than one button is connected to a signals.
popupA popup menu which should be displayed if the button is clicked
not_used_yetwill be used for a popup text in the future

◆ appendTab()

void Digikam::DMultiTabBar::appendTab ( const QIcon & pic,
int id = -1,
const QString & text = QString() )

It can be accessed later on with tabb(id);

Parameters
pica icon for the tab
idan arbitrary ID which can be used later on to identify the tab
textif a mode with text is used it will be the tab text, otherwise a mouse over hint

◆ isTabRaised()

bool Digikam::DMultiTabBar::isTabRaised ( int id) const
Returns
the state of a tab, identified by its ID

◆ position()

Qt::Edge Digikam::DMultiTabBar::position ( ) const
Returns
position

◆ setPosition()

void Digikam::DMultiTabBar::setPosition ( Qt::Edge pos)
Parameters
posif the mode is horizontal, only use top, bottom, if it is vertical use left or right

◆ setTab()

void Digikam::DMultiTabBar::setTab ( int id,
bool state )
Parameters
idThe ID of the tab to manipulate
statetrue == activated/raised, false == not active

◆ tabStyle()

DMultiTabBar::TextStyle Digikam::DMultiTabBar::tabStyle ( ) const
Returns
display style