Warning, file /office/kmymoney/kmymoney/widgets/tabbar.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2006-2018 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-FileCopyrightText: 2017-2018 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef TABBAR_H 0008 #define TABBAR_H 0009 0010 // ---------------------------------------------------------------------------- 0011 // QT Includes 0012 0013 #include <QTabBar> 0014 0015 // ---------------------------------------------------------------------------- 0016 // KDE Includes 0017 0018 // ---------------------------------------------------------------------------- 0019 // Project Includes 0020 0021 namespace eWidgets { 0022 namespace eTabBar { 0023 enum class SignalEmission; 0024 } 0025 } 0026 0027 namespace KMyMoneyTransactionForm 0028 { 0029 /** 0030 * @author Thomas Baumgart 0031 */ 0032 class TabBarPrivate; 0033 class TabBar : public QTabBar 0034 { 0035 Q_OBJECT 0036 Q_DISABLE_COPY(TabBar) 0037 0038 public: 0039 explicit TabBar(QWidget* parent = nullptr); 0040 ~TabBar(); 0041 0042 eWidgets::eTabBar::SignalEmission setSignalEmission(eWidgets::eTabBar::SignalEmission type); 0043 0044 void copyTabs(const TabBar* otabbar); 0045 0046 void insertTab(int id, const QString& title); 0047 void insertTab(int id); 0048 0049 void setIdentifier(QWidget* tab, int newId); 0050 0051 void setTabEnabled(int id, bool enabled); 0052 0053 int currentIndex() const; 0054 0055 public Q_SLOTS: 0056 0057 /** 0058 * overridden for internal reasons, API not changed 0059 */ 0060 virtual void setCurrentIndex(int id); 0061 0062 /** 0063 * overridden for internal reasons, API not changed 0064 */ 0065 void showEvent(QShowEvent* event) override; 0066 0067 protected: 0068 void mousePressEvent(QMouseEvent* event) override; 0069 0070 protected Q_SLOTS: 0071 void slotTabCurrentChanged(int id); 0072 0073 Q_SIGNALS: 0074 void tabCurrentChanged(int id); 0075 0076 private: 0077 /** 0078 * returns the Qt index of tab at pos @a p or -1 0079 * Derived from QTabBarPrivate 0080 */ 0081 int indexAtPos(const QPoint& p) const; 0082 0083 private: 0084 TabBarPrivate * const d_ptr; 0085 Q_DECLARE_PRIVATE(TabBar) 0086 }; 0087 0088 } // namespace 0089 0090 #endif