digiKam Developer Documentation: Digikam::DMultiTabBar Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
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
| return the state of a tab, identified by its ID
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

enum Digikam::DMultiTabBar::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

  pic | a icon for the button
  id | an 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.
  popup | A popup menu which should be displayed if the button is clicked
  not_used_yet | will 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

  pic | a icon for the tab
  id | an arbitrary ID which can be used later on to identify the tab
  text | if a mode with text is used it will be the tab text, otherwise a mouse over hint

## ◆ position()

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

Returns
  position

## ◆ setPosition()

void Digikam::DMultiTabBar::setPosition | ( | Qt::Edge | pos | ) |

Parameters

  pos | if 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

  id | The ID of the tab to manipulate
  state | true == activated/raised, false == not active

## ◆ tabStyle()

DMultiTabBar::TextStyle Digikam::DMultiTabBar::tabStyle | ( |  | ) | const

Returns
  display style