• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kdeui

ktabbar.h

Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KTABBAR_H
00022 #define KTABBAR_H
00023 
00024 #include <qtabbar.h>
00025 
00026 #include <kdelibs_export.h>
00027 
00028 class QTimer;
00029 class QPushButton;
00030 class KTabBarPrivate;
00031 
00035 class KDEUI_EXPORT KTabBar: public QTabBar
00036 {
00037     Q_OBJECT
00038 
00039 public:
00040     KTabBar( QWidget* parent=0, const char* name=0 );
00041     virtual ~KTabBar();
00042 
00043     virtual void setTabEnabled( int, bool );
00044 
00045     const QColor &tabColor( int ) const;
00046     void setTabColor( int, const QColor& );
00047 
00048     virtual int insertTab( QTab *, int index = -1 );
00049     virtual void removeTab( QTab * );
00050 
00051     void setTabReorderingEnabled( bool enable );
00052     bool isTabReorderingEnabled() const;
00053 
00054     void setHoverCloseButton( bool );
00055     bool hoverCloseButton() const;
00056 
00057     void setHoverCloseButtonDelayed( bool );
00058     bool hoverCloseButtonDelayed() const;
00059 
00060     void setTabCloseActivatePrevious( bool );
00061     bool tabCloseActivatePrevious() const;
00062 
00063 signals:
00064     void contextMenu( int, const QPoint & );
00065     void mouseDoubleClick( int );
00066     void mouseMiddleClick( int );
00067     void initiateDrag( int );
00068     void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
00069     void receivedDropEvent( int, QDropEvent * );
00070     void moveTab( int, int );
00071     void closeRequest( int );
00072 #ifndef QT_NO_WHEELEVENT
00073     void wheelDelta( int );
00074 #endif
00075 
00076 protected:
00077     virtual void mouseDoubleClickEvent( QMouseEvent *e );
00078     virtual void mousePressEvent( QMouseEvent *e );
00079     virtual void mouseMoveEvent( QMouseEvent *e );
00080     virtual void mouseReleaseEvent( QMouseEvent *e );
00081 #ifndef QT_NO_WHEELEVENT
00082     virtual void wheelEvent( QWheelEvent *e );
00083 #endif
00084 
00085     virtual void dragMoveEvent( QDragMoveEvent *e );
00086     virtual void dropEvent( QDropEvent *e );
00087 
00088     virtual void paintLabel( QPainter*, const QRect&, QTab*, bool ) const;
00089 
00090 protected slots:
00091     virtual void closeButtonClicked();
00092     virtual void onLayoutChange();
00093     virtual void enableCloseButton();
00094     virtual void activateDragSwitchTab();
00095 
00096 private:
00097     QPoint mDragStart;
00098     int mReorderStartTab;
00099     int mReorderPreviousTab;
00100     QMap<int, QColor> mTabColors;
00101     QTab *mHoverCloseButtonTab, *mDragSwitchTab;
00102     QPushButton *mHoverCloseButton;
00103     QTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
00104 
00105     bool mHoverCloseButtonEnabled;
00106     bool mHoverCloseButtonDelayed;
00107     bool mTabReorderingEnabled;
00108     bool mTabCloseActivatePrevious;
00109 
00110     KTabBarPrivate * d;
00111 };
00112 
00113 #endif

kdeui

Skip menu "kdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal