kdeui Library API Documentation

ktabwidget.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2003 Stephan Binner <binner@kde.org> 00003 Copyright (C) 2003 Zack Rusin <zack@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 00019 */ 00020 00021 #ifndef KTABWIDGET_H 00022 #define KTABWIDGET_H 00023 00024 #include <qtabwidget.h> 00025 00026 class KTabWidgetPrivate; 00027 00031 class KTabWidget : public QTabWidget 00032 { 00033 Q_OBJECT 00034 Q_PROPERTY( bool tabReorderingEnabled READ isTabReorderingEnabled WRITE setTabReorderingEnabled ) 00035 Q_PROPERTY( bool hoverCloseButton READ hoverCloseButton WRITE setHoverCloseButton ) 00036 Q_PROPERTY( bool hoverCloseButtonDelayed READ hoverCloseButtonDelayed WRITE setHoverCloseButtonDelayed ) 00037 Q_PROPERTY( bool tabCloseActivatePrevious READ tabCloseActivatePrevious WRITE setTabCloseActivatePrevious ) 00038 00039 public: 00040 KTabWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 00044 virtual ~KTabWidget(); 00048 void setTabColor( QWidget *, const QColor& color ); 00049 QColor tabColor( QWidget * ) const; 00050 00055 bool isTabReorderingEnabled() const; 00056 00061 bool hoverCloseButton() const; 00062 00067 bool hoverCloseButtonDelayed() const; 00068 00074 bool tabCloseActivatePrevious() const; 00075 00076 public slots: 00081 virtual void moveTab( int, int ); 00082 00092 void setTabReorderingEnabled( bool enable ); 00093 00099 void setHoverCloseButton( bool enable ); 00100 00105 void setHoverCloseButtonDelayed( bool delayed ); 00106 00112 void setTabCloseActivatePrevious( bool previous ); 00113 00114 signals: 00118 void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */); 00119 00124 void receivedDropEvent( QDropEvent * ); 00125 00130 void receivedDropEvent( QWidget *, QDropEvent * ); 00131 00135 void initiateDrag( QWidget * ); 00136 00140 void contextMenu( const QPoint & ); 00141 00145 void contextMenu( QWidget *, const QPoint & ); 00146 00151 void movedTab( int, int ); 00152 00157 void mouseDoubleClick(); 00158 00162 void mouseDoubleClick( QWidget * ); 00163 00167 void mouseMiddleClick(); 00168 00172 void mouseMiddleClick( QWidget * ); 00173 00178 void closeRequest( QWidget * ); 00179 00180 protected: 00181 virtual void mouseDoubleClickEvent( QMouseEvent *e ); 00182 virtual void mousePressEvent( QMouseEvent * ); 00183 virtual void dragMoveEvent( QDragMoveEvent * ); 00184 virtual void dropEvent( QDropEvent * ); 00185 #ifndef QT_NO_WHEELEVENT 00186 virtual void wheelEvent( QWheelEvent *e ); 00187 #endif 00188 00189 protected slots: 00190 virtual void receivedDropEvent( int, QDropEvent * ); 00191 virtual void initiateDrag( int ); 00192 virtual void contextMenu( int, const QPoint & ); 00193 virtual void mouseDoubleClick( int ); 00194 virtual void mouseMiddleClick( int ); 00195 virtual void closeRequest( int ); 00196 #ifndef QT_NO_WHEELEVENT 00197 virtual void wheelDelta( int ); 00198 #endif 00199 00200 private: 00201 bool isEmptyTabbarSpace( const QPoint & ) const; 00202 00203 KTabWidgetPrivate *d; 00204 }; 00205 00206 #endif
KDE Logo
This file is part of the documentation for kdeui Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:40:35 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003