• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
ktabbar.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2003 Stephan Binner <binner@kde.org>
3  Copyright (C) 2003 Zack Rusin <zack@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KTABBAR_H
22 #define KTABBAR_H
23 
24 #include <tqtabbar.h>
25 
26 #include <tdelibs_export.h>
27 
28 class TQTimer;
29 class TQPushButton;
30 class KTabBarPrivate;
31 
35 class TDEUI_EXPORT KTabBar: public TQTabBar
36 {
37  Q_OBJECT
38 
39 public:
40  KTabBar( TQWidget* parent=0, const char* name=0 );
41  virtual ~KTabBar();
42 
43  virtual void setTabEnabled( int, bool );
44 
45  const TQColor &tabColor( int ) const;
46  void setTabColor( int, const TQColor& );
47 
48  virtual int insertTab( TQTab *, int index = -1 );
49  virtual void removeTab( TQTab * );
50 
51  void setTabReorderingEnabled( bool enable );
52  bool isTabReorderingEnabled() const;
53 
54  void setHoverCloseButton( bool );
55  bool hoverCloseButton() const;
56 
57  void setHoverCloseButtonDelayed( bool );
58  bool hoverCloseButtonDelayed() const;
59 
60  void setTabCloseActivatePrevious( bool );
61  bool tabCloseActivatePrevious() const;
62 
63 signals:
64  void contextMenu( int, const TQPoint & );
65  void mouseDoubleClick( int );
66  void mouseMiddleClick( int );
67  void initiateDrag( int );
68  void testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */);
69  void receivedDropEvent( int, TQDropEvent * );
70  void moveTab( int, int );
71  void closeRequest( int );
72 #ifndef QT_NO_WHEELEVENT
73  void wheelDelta( int );
74 #endif
75 
76 protected:
77  virtual void mouseDoubleClickEvent( TQMouseEvent *e );
78  virtual void mousePressEvent( TQMouseEvent *e );
79  virtual void mouseMoveEvent( TQMouseEvent *e );
80  virtual void mouseReleaseEvent( TQMouseEvent *e );
81 #ifndef QT_NO_WHEELEVENT
82  virtual void wheelEvent( TQWheelEvent *e );
83 #endif
84 
85  virtual void dragMoveEvent( TQDragMoveEvent *e );
86  virtual void dropEvent( TQDropEvent *e );
87 
88  virtual void paintLabel( TQPainter*, const TQRect&, TQTab*, bool ) const;
89 
90 protected slots:
91  virtual void closeButtonClicked();
92  virtual void onLayoutChange();
93  virtual void enableCloseButton();
94  virtual void activateDragSwitchTab();
95 
96 private:
97  TQPoint mDragStart;
98  int mReorderStartTab;
99  int mReorderPreviousTab;
100  TQMap<int, TQColor> mTabColors;
101  TQTab *mHoverCloseButtonTab, *mDragSwitchTab;
102  TQPushButton *mHoverCloseButton;
103  TQTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
104 
105  bool mHoverCloseButtonEnabled;
106  bool mHoverCloseButtonDelayed;
107  bool mTabReorderingEnabled;
108  bool mTabCloseActivatePrevious;
109 
110  KTabBarPrivate * d;
111 };
112 
113 #endif
KTabBar
Definition: ktabbar.h:35

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.8.8
This website is maintained by Timothy Pearson.