digiKam
|
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 ¬_used_yet=QString()) |
void | appendTab (const QPixmap &pic, int id=-1, const QString &text=QString()) |
DMultiTabBarButton * | button (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) |
DMultiTabBarTab * | tab (int id) const |
TextStyle | tabStyle () const |
~DMultiTabBar () override | |
Protected Member Functions | |
virtual void | fontChange (const QFont &) |
void | updateSeparator () |
Friends | |
class | DMultiTabBarButton |
A Widget for horizontal and vertical tabs.
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. |
|
explicit |
|
override |
References Digikam::DMultiTabBar::Private::buttons.
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
pic | a pixmap 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 |
References Digikam::DMultiTabBar::Private::btnTabSep, Digikam::DMultiTabBar::Private::buttons, DMultiTabBarButton, and Digikam::DMultiTabBar::Private::layout.
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);
pic | a bitmap 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 |
References Digikam::DMultiTabBarFrame::appendTab(), and Digikam::DMultiTabBar::Private::internal.
Referenced by Digikam::Sidebar::appendTab().
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().
|
protectedvirtual |
bool Digikam::DMultiTabBar::isTabRaised | ( | int | id | ) | const |
return the state of a tab, identified by its ID
References tab().
Qt::Edge Digikam::DMultiTabBar::position | ( | ) | const |
void Digikam::DMultiTabBar::removeButton | ( | int | id | ) |
remove a button with the given ID
References Digikam::DMultiTabBar::Private::btnTabSep, and Digikam::DMultiTabBar::Private::buttons.
void Digikam::DMultiTabBar::removeTab | ( | int | id | ) |
remove a tab with a given ID
References Digikam::DMultiTabBar::Private::internal, and Digikam::DMultiTabBarFrame::removeTab().
Referenced by Digikam::Sidebar::deleteTab().
void Digikam::DMultiTabBar::setPosition | ( | Qt::Edge | pos | ) |
set the real position of the widget.
pos | if 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().
void Digikam::DMultiTabBar::setStyle | ( | TextStyle | style | ) |
set the display style of the tabs
References Digikam::DMultiTabBar::Private::internal, and Digikam::DMultiTabBarFrame::setStyle().
Referenced by DMultiTabBar(), Digikam::Sidebar::Sidebar(), Digikam::LightTableWindow::slotApplicationSettingsChanged(), and Digikam::ImageWindow::slotSetupChanged().
void Digikam::DMultiTabBar::setTab | ( | int | id, |
bool | state | ||
) |
set a tab to "raised"
id | The ID of the tab to manipulate |
state | true == activated/raised, false == not active |
References Digikam::DMultiTabBarTab::setState(), and tab().
Referenced by Digikam::Sidebar::deleteTab(), and Digikam::Sidebar::doLoadState().
DMultiTabBarTab * Digikam::DMultiTabBar::tab | ( | int | id | ) | const |
get a pointer to a tab within the tab area, identified by its ID
References Digikam::DMultiTabBar::Private::internal, and Digikam::DMultiTabBarFrame::tab().
Referenced by Digikam::Sidebar::activeNextTab(), Digikam::Sidebar::activePreviousTab(), Digikam::Sidebar::appendTab(), Digikam::Sidebar::deleteTab(), Digikam::Sidebar::doLoadState(), isTabRaised(), Digikam::Sidebar::setActiveTab(), setTab(), and Digikam::ItemPropertiesSideBar::slotChangedTab().
DMultiTabBar::TextStyle Digikam::DMultiTabBar::tabStyle | ( | ) | const |
get the display style of the tabs
References Digikam::DMultiTabBar::Private::internal.
|
protected |
References Digikam::DMultiTabBar::Private::btnTabSep, and Digikam::DMultiTabBar::Private::buttons.
Referenced by Digikam::DMultiTabBarButton::hideEvent(), and Digikam::DMultiTabBarButton::showEvent().
|
friend |
Referenced by appendButton().