27 #ifndef DIGIKAM_SIDE_BAR_H
28 #define DIGIKAM_SIDE_BAR_H
34 #include <QPushButton>
37 #include <QStyleOptionToolButton>
50 class DMultiTabBarButton;
51 class DMultiTabBarTab;
73 explicit DMultiTabBar(Qt::Edge pos, QWidget*
const parent =
nullptr);
85 void appendButton(
const QPixmap& pic,
87 QMenu*
const popup =
nullptr,
88 const QString& not_used_yet = QString());
93 void removeButton(
int id);
101 void appendTab(
const QPixmap& pic,
103 const QString& text = QString());
108 void removeTab(
int id);
115 void setTab(
int id,
bool state);
120 bool isTabRaised(
int id)
const;
136 void setPosition(Qt::Edge pos);
147 void setStyle(TextStyle style);
153 TextStyle tabStyle()
const;
157 void updateSeparator();
159 virtual void fontChange(
const QFont&);
183 void setText(
const QString& text);
195 virtual void slotClicked();
202 QWidget*
const parent);
204 void hideEvent(QHideEvent*)
override;
205 void showEvent(QShowEvent*)
override;
206 void paintEvent(QPaintEvent*)
override;
225 QSize sizeHint()
const override;
226 QSize minimumSizeHint()
const override;
234 void setPosition(Qt::Edge);
246 void setState(
bool state);
248 void setIcon(
const QString&);
249 void setIcon(
const QPixmap&);
253 void computeMargins (
int* hMargin,
int* vMargin)
const;
254 QSize computeSizeHint(
bool withText)
const;
255 bool shouldDrawText()
const;
256 bool isVertical()
const;
257 QPixmap iconPixmap()
const;
258 void initButtonStyleOption(QStyleOptionToolButton* opt)
const;
268 QWidget*
const parent,
272 void paintEvent(QPaintEvent*)
override;
291 void appendTab(
const QPixmap&,
int = -1,
const QString& = QString());
348 explicit Sidebar(QWidget*
const parent,
350 Qt::Edge side = Qt::LeftEdge,
351 bool minimizedDefault =
false);
363 void appendTab(QWidget*
const w,
const QIcon& pic,
const QString& title);
368 void deleteTab(QWidget*
const w);
373 void setActiveTab(QWidget*
const w);
378 void activeNextTab();
383 void activePreviousTab();
388 QWidget* getActiveTab()
const;
426 bool isExpanded()
const;
433 void doLoadState()
override;
438 void doSaveState()
override;
442 bool eventFilter(QObject* o, QEvent* e)
override;
443 void switchTabAndStackToTab(
int tab);
450 void slotClicked(
int tab);
452 void slotExpandTimer();
453 void slotDragSwitchTimer();
455 void slotSplitterBtnClicked();
500 void saveState(KConfigGroup& group);
506 void saveState(KConfigGroup& group,
const QString& key);
512 void restoreState(KConfigGroup& group);
518 void restoreState(KConfigGroup& group,
const QString& key);
523 int size(
Sidebar*
const bar)
const;
524 int size(QWidget*
const widget)
const;
530 void setSize(
Sidebar*
const bar,
int size);
531 void setSize(QWidget*
const widget,
int size);
537 void slotSplitterMoved(
int pos,
int index);
Definition: sidebar_p.h:62
Definition: sidebar.h:283
void mousePressEvent(QMouseEvent *) override
Definition: sidebar_dmultitabbarframe.cpp:78
DMultiTabBarFrame(QWidget *const parent, Qt::Edge pos)
Definition: sidebar_dmultitabbarframe.cpp:32
void showActiveTabTexts(bool show)
void appendTab(const QPixmap &, int=-1, const QString &=QString())
Definition: sidebar_dmultitabbarframe.cpp:100
void removeTab(int)
Definition: sidebar_dmultitabbarframe.cpp:111
DMultiTabBarTab * tab(int) const
Definition: sidebar_dmultitabbarframe.cpp:83
~DMultiTabBarFrame() override
Definition: sidebar_dmultitabbarframe.cpp:54
QList< DMultiTabBarTab * > * tabs()
Definition: sidebar_dmultitabbarframe.cpp:137
virtual void contentsMousePressEvent(QMouseEvent *)
Definition: sidebar_dmultitabbarframe.cpp:73
void setPosition(Qt::Edge pos)
Definition: sidebar_dmultitabbarframe.cpp:125
void setStyle(DMultiTabBar::TextStyle style)
Definition: sidebar_dmultitabbarframe.cpp:61
Definition: sidebar_p.h:76
Definition: sidebar.h:218
Definition: sidebar_p.h:88
TextStyle
Definition: sidebar.h:66
Definition: statesavingobject.h:76
Definition: piwigotalker.h:48
@ Orientation
Definition: coredbfields.h:86
Definition: datefolderview.cpp:43