1/*
2 SPDX-FileCopyrightText: 2003 Joseph Wenninger <jowenn@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef K_MULTI_TAB_BAR_P_H
8#define K_MULTI_TAB_BAR_P_H
9#include <QScrollArea>
10#include <QVBoxLayout>
11#include <kmultitabbar.h>
12
13class KMultiTabBarInternal : public QFrame
14{
15 Q_OBJECT
16public:
17 KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos);
18 ~KMultiTabBarInternal() override;
19 int appendTab(const QIcon &, int = -1, const QString & = QString());
20 int appendTab(const QPixmap &, int = -1, const QString & = QString());
21 KMultiTabBarTab *tab(int) const;
22 void removeTab(int);
23 void setPosition(enum KMultiTabBar::KMultiTabBarPosition pos);
24 void setStyle(enum KMultiTabBar::KMultiTabBarStyle style);
25 void showActiveTabTexts(bool show);
26 QList<KMultiTabBarTab *> *tabs()
27 {
28 return &m_tabs;
29 }
30
31private:
32 friend class KMultiTabBar;
33 QBoxLayout *mainLayout;
34 QList<KMultiTabBarTab *> m_tabs;
35 enum KMultiTabBar::KMultiTabBarPosition m_position;
36 enum KMultiTabBar::KMultiTabBarStyle m_style;
37
38protected:
39 /**
40 * [contentsM|m]ousePressEvent are reimplemented from QScrollView
41 * in order to ignore all mouseEvents on the viewport, so that the
42 * parent can handle them.
43 */
44 virtual void contentsMousePressEvent(QMouseEvent *);
45 void mousePressEvent(QMouseEvent *) override;
46};
47
48#endif
49

source code of kwidgetsaddons/src/kmultitabbar_p.h