digiKam
Digikam::DMultiTabBar Class Reference
+ Inheritance diagram for Digikam::DMultiTabBar:

Classes

class  Private
 

Public Types

enum  TextStyle { ActiveIconText = 0 , AllIconsText = 2 }
 

Public Member Functions

void appendButton (const QPixmap &pic, int id=-1, QMenu *const popup=nullptr, const QString &not_used_yet=QString())
 
void appendTab (const QPixmap &pic, int id=-1, const QString &text=QString())
 
DMultiTabBarButtonbutton (int id) const
 
 DMultiTabBar (Qt::Edge pos, QWidget *const parent=nullptr)
 
bool isTabRaised (int id) const
 
Qt::Edge position () const
 
void removeButton (int id)
 
void removeTab (int id)
 
void setPosition (Qt::Edge pos)
 
void setStyle (TextStyle style)
 
void setTab (int id, bool state)
 
DMultiTabBarTabtab (int id) const
 
TextStyle tabStyle () const
 
 ~DMultiTabBar () override
 

Protected Member Functions

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

Friends

class DMultiTabBarButton
 

Detailed Description

A Widget for horizontal and vertical tabs.

Member Enumeration Documentation

◆ TextStyle

The list of available styles for DMultiTabBar

Enumerator
ActiveIconText 

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

AllIconsText 

Always shows the text and icons.

Constructor & Destructor Documentation

◆ DMultiTabBar()

Digikam::DMultiTabBar::DMultiTabBar ( Qt::Edge  pos,
QWidget *const  parent = nullptr 
)
explicit

◆ ~DMultiTabBar()

Digikam::DMultiTabBar::~DMultiTabBar ( )
override

Member Function Documentation

◆ appendButton()

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

append a new button to the button area. The button can later on be accessed with button(ID) eg for connecting signals to it

Parameters
pica pixmap 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

References Digikam::DMultiTabBar::Private::btnTabSep, Digikam::DMultiTabBar::Private::buttons, DMultiTabBarButton, and Digikam::DMultiTabBar::Private::layout.

◆ appendTab()

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

append a new tab to the tab area. It can be accessed later on with tabb(id);

Parameters
pica bitmap 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

References Digikam::DMultiTabBarFrame::appendTab(), and Digikam::DMultiTabBar::Private::internal.

Referenced by Digikam::Sidebar::appendTab().

◆ button()

DMultiTabBarButton * Digikam::DMultiTabBar::button ( int  id) const

get a pointer to a button within the button area identified by its ID

References Digikam::DMultiTabBar::Private::buttons, and Digikam::DMultiTabBarButton::id().

◆ fontChange()

void Digikam::DMultiTabBar::fontChange ( const QFont &  )
protectedvirtual

◆ isTabRaised()

bool Digikam::DMultiTabBar::isTabRaised ( int  id) const

return the state of a tab, identified by its ID

References tab().

◆ position()

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

get the tabbar position.

Returns
position

References Digikam::DMultiTabBar::Private::position.

◆ removeButton()

void Digikam::DMultiTabBar::removeButton ( int  id)

remove a button with the given ID

References Digikam::DMultiTabBar::Private::btnTabSep, and Digikam::DMultiTabBar::Private::buttons.

◆ removeTab()

void Digikam::DMultiTabBar::removeTab ( int  id)

◆ setPosition()

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

set the real position of the widget.

Parameters
posif the mode is horizontal, only use top, bottom, if it is vertical use left or right

References Digikam::DMultiTabBar::Private::internal, Digikam::DMultiTabBar::Private::position, and Digikam::DMultiTabBarFrame::setPosition().

Referenced by DMultiTabBar().

◆ setStyle()

◆ setTab()

void Digikam::DMultiTabBar::setTab ( int  id,
bool  state 
)

set a tab to "raised"

Parameters
idThe ID of the tab to manipulate
statetrue == activated/raised, false == not active

References Digikam::DMultiTabBarTab::setState(), and tab().

Referenced by Digikam::Sidebar::deleteTab(), and Digikam::Sidebar::doLoadState().

◆ tab()

◆ tabStyle()

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

get the display style of the tabs

Returns
display style

References Digikam::DMultiTabBar::Private::internal.

◆ updateSeparator()

Friends And Related Function Documentation

◆ DMultiTabBarButton

friend class DMultiTabBarButton
friend

Referenced by appendButton().


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