KDEUI
ktabbar.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KTABBAR_H
00022 #define KTABBAR_H
00023
00024 #include <kdeui_export.h>
00025
00026 #include <QtGui/QTabBar>
00027
00031 class KDEUI_EXPORT KTabBar: public QTabBar
00032 {
00033 Q_OBJECT
00034
00035 public:
00041 explicit KTabBar( QWidget* parent = 0 );
00042
00046 virtual ~KTabBar();
00047
00053 void setTabReorderingEnabled( bool enable );
00054
00058 bool isTabReorderingEnabled() const;
00059
00068 KDE_DEPRECATED void setHoverCloseButton( bool );
00069
00071 KDE_DEPRECATED bool hoverCloseButton() const;
00072
00080 KDE_DEPRECATED void setHoverCloseButtonDelayed( bool );
00081
00083 KDE_DEPRECATED bool hoverCloseButtonDelayed() const;
00084
00092 void setCloseButtonEnabled( bool );
00093
00099 bool isCloseButtonEnabled() const;
00100
00106 void setTabCloseActivatePrevious( bool );
00107
00112 bool tabCloseActivatePrevious() const;
00113
00120 int selectTab( const QPoint &position ) const;
00121
00122 Q_SIGNALS:
00124 void contextMenu( int, const QPoint& );
00126 void emptyAreaContextMenu( const QPoint& );
00128 QT_MOC_COMPAT void mouseDoubleClick( int );
00130 void tabDoubleClicked( int );
00132 void newTabRequest();
00134 void mouseMiddleClick( int );
00135 void initiateDrag( int );
00136 void testCanDecode( const QDragMoveEvent*, bool& );
00137 void receivedDropEvent( int, QDropEvent* );
00138 void moveTab( int, int );
00139 void closeRequest( int );
00140 #ifndef QT_NO_WHEELEVENT
00141 void wheelDelta( int );
00142 #endif
00143
00144 protected:
00145 virtual void mouseDoubleClickEvent( QMouseEvent *event );
00146 virtual void mousePressEvent( QMouseEvent *event );
00147 virtual void mouseMoveEvent( QMouseEvent *event );
00148 virtual void mouseReleaseEvent( QMouseEvent *event );
00149 #ifndef QT_NO_WHEELEVENT
00150 virtual void wheelEvent( QWheelEvent *event );
00151 #endif
00152
00153 virtual void dragEnterEvent( QDragEnterEvent *event );
00154 virtual void dragMoveEvent( QDragMoveEvent *event );
00155 virtual void dropEvent( QDropEvent *event );
00156
00157 virtual void paintEvent( QPaintEvent *event );
00158 virtual void leaveEvent( QEvent *event );
00159 virtual QSize tabSizeHint( int index ) const;
00160
00161 protected Q_SLOTS:
00163 QT_MOC_COMPAT void closeButtonClicked();
00165 QT_MOC_COMPAT void enableCloseButton();
00166 virtual void activateDragSwitchTab();
00167
00168 protected:
00169 virtual void tabLayoutChange();
00170
00171 private:
00172 QPoint closeButtonPos( int tabIndex ) const;
00173 QRect closeButtonRect( int tabIndex ) const;
00174
00175 private:
00176 class Private;
00177 Private* const d;
00178 };
00179
00180 #endif