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

tdeui

  • tdeui
ktabwidget.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 KTABWIDGET_H
22 #define KTABWIDGET_H
23 
24 #include <tqtabwidget.h>
25 #include <tqstringlist.h>
26 
27 #include <tdelibs_export.h>
28 
29 class KTabWidgetPrivate;
30 
36 class TDEUI_EXPORT KTabWidget : public TQTabWidget
37 {
38  Q_OBJECT
39  TQ_PROPERTY( bool tabReorderingEnabled READ isTabReorderingEnabled WRITE setTabReorderingEnabled )
40  TQ_PROPERTY( bool hoverCloseButton READ hoverCloseButton WRITE setHoverCloseButton )
41  TQ_PROPERTY( bool hoverCloseButtonDelayed READ hoverCloseButtonDelayed WRITE setHoverCloseButtonDelayed )
42  TQ_PROPERTY( bool tabCloseActivatePrevious READ tabCloseActivatePrevious WRITE setTabCloseActivatePrevious )
43  TQ_PROPERTY( bool automaticResizeTabs READ automaticResizeTabs WRITE setAutomaticResizeTabs )
44 
45 public:
46  KTabWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
47 
51  virtual ~KTabWidget();
52 
56  void setTabColor( TQWidget *, const TQColor& color );
57 
61  TQColor tabColor( TQWidget * ) const;
62 
67  bool isTabReorderingEnabled() const;
68 
73  bool hoverCloseButton() const;
74 
79  bool hoverCloseButtonDelayed() const;
80 
86  bool tabCloseActivatePrevious() const;
87 
93  bool automaticResizeTabs() const;
94 
100  void setTabBarHidden( bool hide );
101 
106  bool isTabBarHidden() const;
107 
113  void setMouseWheelScroll(bool mouseWheelScroll);
114 
118  virtual void insertTab( TQWidget *, const TQString &, int index = -1 );
119 
123  virtual void insertTab( TQWidget *child, const TQIconSet& iconset,
124  const TQString &label, int index = -1 );
128  virtual void insertTab( TQWidget *, TQTab *, int index = -1 );
129 
133  void changeTab( TQWidget *, const TQString & );
134 
138  void changeTab( TQWidget *child, const TQIconSet& iconset, const TQString &label );
139 
143  TQString label( int ) const;
144 
148  TQString tabLabel( TQWidget * ) const;
149 
153  void setTabLabel( TQWidget *, const TQString & );
154 
155 public slots:
160  virtual void moveTab( int, int );
161 
166  virtual void removePage ( TQWidget * w );
167 
177  void setTabReorderingEnabled( bool enable );
178 
184  void setHoverCloseButton( bool enable );
185 
190  void setHoverCloseButtonDelayed( bool delayed );
191 
197  void setTabCloseActivatePrevious( bool previous );
198 
206  void setAutomaticResizeTabs( bool enable );
207 
208 signals:
212  void testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */);
213 
218  void receivedDropEvent( TQDropEvent * );
219 
224  void receivedDropEvent( TQWidget *, TQDropEvent * );
225 
229  void initiateDrag( TQWidget * );
230 
234  void contextMenu( const TQPoint & );
235 
239  void contextMenu( TQWidget *, const TQPoint & );
240 
245  void movedTab( int, int );
246 
251  void mouseDoubleClick();
252 
256  void mouseDoubleClick( TQWidget * );
257 
261  void mouseMiddleClick();
262 
266  void mouseMiddleClick( TQWidget * );
267 
272  void closeRequest( TQWidget * );
273 
274 protected:
275  virtual void mouseDoubleClickEvent( TQMouseEvent *e );
276  virtual void mousePressEvent( TQMouseEvent * );
277  virtual void dragMoveEvent( TQDragMoveEvent * );
278  virtual void dropEvent( TQDropEvent * );
279  unsigned int tabBarWidthForMaxChars( uint maxLength );
280 #ifndef QT_NO_WHEELEVENT
281  virtual void wheelEvent( TQWheelEvent *e );
282 #endif
283  virtual void resizeEvent( TQResizeEvent * );
284 
285 protected slots:
286  virtual void receivedDropEvent( int, TQDropEvent * );
287  virtual void initiateDrag( int );
288  virtual void contextMenu( int, const TQPoint & );
289  virtual void mouseDoubleClick( int );
290  virtual void mouseMiddleClick( int );
291  virtual void closeRequest( int );
292 #ifndef QT_NO_WHEELEVENT
293  virtual void wheelDelta( int );
294 #endif
295 
296 private:
297  bool isEmptyTabbarSpace( const TQPoint & ) const;
298  void resizeTabs( int changedTabIndex = -1 );
299  void updateTab( int index );
300 
301  KTabWidgetPrivate *d;
302 };
303 
304 #endif
KTabWidget
A widget containing multiple tabs.
Definition: ktabwidget.h:36

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.