/usr/include/ktabbar.h is in kdelibs5-dev 4:4.14.2-5+deb8u2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | /* This file is part of the KDE libraries
Copyright (C) 2003 Stephan Binner <binner@kde.org>
Copyright (C) 2003 Zack Rusin <zack@kde.org>
Copyright (C) 2009 Urs Wolfer <uwolfer @ kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KTABBAR_H
#define KTABBAR_H
#include <kdeui_export.h>
#include <QtGui/QTabBar>
/**
* A QTabBar with extended features.
*
* \image html ktabbar.png "KDE Tab Bar"
*/
class KDEUI_EXPORT KTabBar: public QTabBar //krazy:exclude=qclasses
{
Q_OBJECT
public:
/**
* Creates a new tab bar.
*
* @param parent The parent widget.
*/
explicit KTabBar( QWidget* parent = 0 );
/**
* Destroys the tab bar.
*/
virtual ~KTabBar();
/**
* Sets the tab reordering enabled or disabled. If enabled,
* the user can reorder the tabs by drag and drop the tab
* headers with the middle mouse button.
*
* @deprecated Use QTabBar::setMovable() instead.
*
* Note, however, that QTabBar::setMovable(true) disables
* dragging tabs out of the KTabBar (e.g., dragging the tab
* URL from Konqueror to another application)!
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void setTabReorderingEnabled( bool enable );
#endif
/**
* Returns whether tab reordering is enabled.
*
* @deprecated Use QTabBar::isMovable() instead.
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED bool isTabReorderingEnabled() const;
#endif
/**
* If enabled, a close button is shown above the tab icon.
* The signal KTabBar::closeRequest() is emitted, if the
* close button has been clicked. Note that the tab must have
* an icon to use this feature.
*
* @deprecated Use QTabBar::setTabsClosable() instead.
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void setHoverCloseButton( bool );
#endif
/** @deprecated Use QTabBar::tabsClosable() instead. */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED bool hoverCloseButton() const;
#endif
/**
* If enabled, the close button cannot get clicked until a
* minor delay has been passed. This prevents that user
* accidentally closes a tab.
*
* @deprecated Use QTabBar::setTabsClosable() instead.
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void setHoverCloseButtonDelayed( bool );
#endif
/** @deprecated Use QTabBar::tabsClosable() instead. */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED bool hoverCloseButtonDelayed() const;
#endif
/**
* If enabled, a close button is available for each tab. The
* signal KTabBar::closeRequest() is emitted, if the close button
* has been clicked.
*
* @since 4.1
*
* @deprecated Use QTabBar::setTabsClosable() instead.
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void setCloseButtonEnabled( bool );
#endif
/**
* Returns true if the close button is shown on tabs.
*
* @since 4.1
*
* @deprecated Use QTabBar::tabsClosable() instead.
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED bool isCloseButtonEnabled() const;
#endif
/**
* Sets the 'activate previous tab on close' feature enabled
* or disabled. If enabled, as soon as you close a tab, the
* previously selected tab is activated again.
*
* @deprecated Use QTabBar::setSelectionBehaviorOnRemove() instead.
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void setTabCloseActivatePrevious( bool );
#endif
/**
* Returns whether the 'activate previous tab on close' feature
* is enabled.
*
* @deprecated Use QTabBar::selectionBehaviorOnRemove() instead.
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED bool tabCloseActivatePrevious() const;
#endif
/**
* Selects the tab which has a tab header at
* given @param position.
*
* @param position the coordinates of the tab
*/
int selectTab( const QPoint &position ) const;
Q_SIGNALS:
/**
* A right mouse button click was performed over the tab with the @param index.
* The signal is emitted on the press of the mouse button.
*/
void contextMenu( int index, const QPoint& globalPos );
/**
* A right mouse button click was performed over the empty area on the tab bar.
* The signal is emitted on the press of the mouse button.
*/
void emptyAreaContextMenu( const QPoint& globalPos );
/** @deprecated use tabDoubleClicked(int) and newTabRequest() instead. */
#ifndef KDE_NO_DEPRECATED
QT_MOC_COMPAT void mouseDoubleClick( int );
#endif
/**
* A double left mouse button click was performed over the tab with the @param index.
* The signal is emitted on the second press of the mouse button, before the release.
*/
void tabDoubleClicked( int index );
/**
* A double left mouse button click was performed over the empty area on the tab bar.
* The signal is emitted on the second press of the mouse button, before the release.
*/
void newTabRequest();
/**
* A double middle mouse button click was performed over the tab with the @param index.
* The signal is emitted on the release of the mouse button.
*/
void mouseMiddleClick( int index );
void initiateDrag( int );
void testCanDecode( const QDragMoveEvent*, bool& );
void receivedDropEvent( int, QDropEvent* );
/**
* Used internally by KTabBar's/KTabWidget's middle-click tab moving mechanism.
* Tells the KTabWidget which owns the KTabBar to move a tab.
*/
void moveTab( int, int );
/** @deprecated Use QTabBar::tabCloseRequested(int) instead. */
#ifndef KDE_NO_DEPRECATED
QT_MOC_COMPAT void closeRequest( int );
#endif
#ifndef QT_NO_WHEELEVENT
void wheelDelta( int );
#endif
protected:
virtual void mouseDoubleClickEvent( QMouseEvent *event );
virtual void mousePressEvent( QMouseEvent *event );
virtual void mouseMoveEvent( QMouseEvent *event );
virtual void mouseReleaseEvent( QMouseEvent *event );
#ifndef QT_NO_WHEELEVENT
virtual void wheelEvent( QWheelEvent *event );
#endif
virtual void dragEnterEvent( QDragEnterEvent *event );
virtual void dragMoveEvent( QDragMoveEvent *event );
virtual void dropEvent( QDropEvent *event );
virtual void paintEvent( QPaintEvent *event );
virtual void leaveEvent( QEvent *event );
virtual QSize tabSizeHint( int index ) const;
protected Q_SLOTS:
/** @deprecated */
#ifndef KDE_NO_DEPRECATED
QT_MOC_COMPAT void closeButtonClicked();
#endif
/** @deprecated */
#ifndef KDE_NO_DEPRECATED
QT_MOC_COMPAT void enableCloseButton();
#endif
virtual void activateDragSwitchTab();
protected:
virtual void tabLayoutChange();
private:
QPoint closeButtonPos( int tabIndex ) const;
QRect closeButtonRect( int tabIndex ) const;
private:
class Private;
Private* const d;
};
#endif
|