• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • sources
  • kde-4.12
  • kdelibs
  • kdeui
  • widgets
ktabbar.h
Go to the documentation of this file.
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  Copyright (C) 2009 Urs Wolfer <uwolfer @ kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KTABBAR_H
23 #define KTABBAR_H
24 
25 #include <kdeui_export.h>
26 
27 #include <QtGui/QTabBar>
28 
34 class KDEUI_EXPORT KTabBar: public QTabBar //krazy:exclude=qclasses
35 {
36  Q_OBJECT
37 
38  public:
44  explicit KTabBar( QWidget* parent = 0 );
45 
49  virtual ~KTabBar();
50 
62 #ifndef KDE_NO_DEPRECATED
63  KDE_DEPRECATED void setTabReorderingEnabled( bool enable );
64 #endif
65 
71 #ifndef KDE_NO_DEPRECATED
72  KDE_DEPRECATED bool isTabReorderingEnabled() const;
73 #endif
74 
83 #ifndef KDE_NO_DEPRECATED
84  KDE_DEPRECATED void setHoverCloseButton( bool );
85 #endif
86 
88 #ifndef KDE_NO_DEPRECATED
89  KDE_DEPRECATED bool hoverCloseButton() const;
90 #endif
91 
99 #ifndef KDE_NO_DEPRECATED
100  KDE_DEPRECATED void setHoverCloseButtonDelayed( bool );
101 #endif
102 
104 #ifndef KDE_NO_DEPRECATED
105  KDE_DEPRECATED bool hoverCloseButtonDelayed() const;
106 #endif
107 
117 #ifndef KDE_NO_DEPRECATED
118  KDE_DEPRECATED void setCloseButtonEnabled( bool );
119 #endif
120 
128 #ifndef KDE_NO_DEPRECATED
129  KDE_DEPRECATED bool isCloseButtonEnabled() const;
130 #endif
131 
139 #ifndef KDE_NO_DEPRECATED
140  KDE_DEPRECATED void setTabCloseActivatePrevious( bool );
141 #endif
142 
149 #ifndef KDE_NO_DEPRECATED
150  KDE_DEPRECATED bool tabCloseActivatePrevious() const;
151 #endif
152 
159  int selectTab( const QPoint &position ) const;
160 
161  Q_SIGNALS:
166  void contextMenu( int index, const QPoint& globalPos );
171  void emptyAreaContextMenu( const QPoint& globalPos );
173 #ifndef KDE_NO_DEPRECATED
174  QT_MOC_COMPAT void mouseDoubleClick( int );
175 #endif
176 
180  void tabDoubleClicked( int index );
185  void newTabRequest();
190  void mouseMiddleClick( int index );
191  void initiateDrag( int );
192  void testCanDecode( const QDragMoveEvent*, bool& );
193  void receivedDropEvent( int, QDropEvent* );
198  void moveTab( int, int );
200 #ifndef KDE_NO_DEPRECATED
201  QT_MOC_COMPAT void closeRequest( int );
202 #endif
203 #ifndef QT_NO_WHEELEVENT
204  void wheelDelta( int );
205 #endif
206 
207  protected:
208  virtual void mouseDoubleClickEvent( QMouseEvent *event );
209  virtual void mousePressEvent( QMouseEvent *event );
210  virtual void mouseMoveEvent( QMouseEvent *event );
211  virtual void mouseReleaseEvent( QMouseEvent *event );
212 #ifndef QT_NO_WHEELEVENT
213  virtual void wheelEvent( QWheelEvent *event );
214 #endif
215 
216  virtual void dragEnterEvent( QDragEnterEvent *event );
217  virtual void dragMoveEvent( QDragMoveEvent *event );
218  virtual void dropEvent( QDropEvent *event );
219 
220  virtual void paintEvent( QPaintEvent *event );
221  virtual void leaveEvent( QEvent *event );
222  virtual QSize tabSizeHint( int index ) const;
223 
224  protected Q_SLOTS:
226 #ifndef KDE_NO_DEPRECATED
227  QT_MOC_COMPAT void closeButtonClicked();
228 #endif
229 
230 #ifndef KDE_NO_DEPRECATED
231  QT_MOC_COMPAT void enableCloseButton();
232 #endif
233  virtual void activateDragSwitchTab();
234 
235  protected:
236  virtual void tabLayoutChange();
237 
238  private:
239  QPoint closeButtonPos( int tabIndex ) const;
240  QRect closeButtonRect( int tabIndex ) const;
241 
242  private:
243  class Private;
244  Private* const d;
245 };
246 
247 #endif
QWidget
QTabBar
KTabBar
A QTabBar with extended features.
Definition: ktabbar.h:34
QPoint
QRect
kdeui_export.h
QSize
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal