File indexing completed on 2024-04-21 14:56:13
0001 #ifndef KTABWIDGETTEST_H 0002 #define KTABWIDGETTEST_H 0003 0004 #include <QWidget> 0005 #include <ktabwidget.h> 0006 #include <QLabel> 0007 #include <QPushButton> 0008 #include <stdlib.h> 0009 #include <time.h> 0010 #include <QCheckBox> 0011 #include <QToolButton> 0012 0013 class Test : public QWidget 0014 { 0015 Q_OBJECT 0016 public: 0017 Test(QWidget *parent = nullptr); 0018 0019 private Q_SLOTS: 0020 void addTab(); 0021 void removeCurrentTab(); 0022 void toggleLeftButton(bool); 0023 void toggleRightButton(bool); 0024 void toggleLeftPopup(bool); 0025 void toggleRightPopup(bool); 0026 void toggleTabPosition(bool); 0027 void toggleTabShape(bool); 0028 void toggleCloseButtons(bool); 0029 void toggleLabels(bool); 0030 void toggleScrollButtons(bool); 0031 void toggleEliding(bool); 0032 0033 void currentChanged(QWidget *); 0034 void contextMenu(QWidget *, const QPoint &); 0035 void tabbarContextMenu(const QPoint &); 0036 void testCanDecode(const QDragMoveEvent *, bool & /* result */); 0037 void receivedDropEvent(QDropEvent *); 0038 void initiateDrag(QWidget *); 0039 void receivedDropEvent(QWidget *, QDropEvent *); 0040 void mouseDoubleClick(QWidget *); 0041 void mouseMiddleClick(QWidget *); 0042 void movedTab(int, int); 0043 0044 void leftPopupActivated(QAction *); 0045 void rightPopupActivated(QAction *); 0046 void contextMenuActivated(QAction *); 0047 void tabbarContextMenuActivated(QAction *); 0048 0049 private: 0050 KTabWidget *mWidget; 0051 int mChange; 0052 0053 QCheckBox *mLeftButton; 0054 QCheckBox *mRightButton; 0055 QCheckBox *mTabsBottom; 0056 0057 QToolButton *mLeftWidget; 0058 QToolButton *mRightWidget; 0059 0060 QMenu *mLeftPopup; 0061 QMenu *mRightPopup; 0062 QMenu *mTabbarContextPopup; 0063 QMenu *mContextPopup; 0064 int mContextWidgetIndex; 0065 }; 0066 0067 #endif