ATLAS Offline Software
Loading...
Searching...
No Matches
VP1TabBar.h
Go to the documentation of this file.
1
2// //
3// File adopted from KDE4 libraries by //
4// T. Kittelmann <Thomas.Kittelmann@cern.ch>, March 2007. //
5// //
6// Main thing is to remove dependence on KDE for length of title text //
7// settings, delay on drag settings and title eliding. Also, //
8// hoverbuttons were removed (since these had not been properly //
9// implemented in KDE4 at the time the code was copied). //
10// //
11// Notice about Copyrights and GPL license from the orignal file is //
12// left untouched below. //
13// //
15
16/* This file is part of the KDE libraries
17 Copyright (C) 2003 Stephan Binner <binner@kde.org>
18 Copyright (C) 2003 Zack Rusin <zack@kde.org>
19
20 This library is free software; you can redistribute it and/or
21 modify it under the terms of the GNU Library General Public
22 License as published by the Free Software Foundation; either
23 version 2 of the License, or (at your option) any later version.
24
25 This library is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 Library General Public License for more details.
29
30 You should have received a copy of the GNU Library General Public License
31 along with this library; see the file COPYING.LIB. If not, write to
32 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
33 Boston, MA 02110-1301, USA.
34*/
35
36#ifndef VP1TABBAR_H
37#define VP1TABBAR_H
38
39#include <QTabBar>
40
41class VP1TabBar: public QTabBar
42{
43 Q_OBJECT
44
45 public:
46 explicit VP1TabBar( QWidget* parent = 0 );
47
48 virtual ~VP1TabBar();
49
50 void setTabReorderingEnabled( bool enable );
51
52 bool isTabReorderingEnabled() const;
53
54 void setTabCloseActivatePrevious( bool );
55
56 bool tabCloseActivatePrevious() const;
57
58 int selectTab( const QPoint &position ) const;
59
60 Q_SIGNALS:
61 void contextMenu( int, const QPoint& );
62 void mouseDoubleClick( int );
63 void mouseMiddleClick( int );
64 void initiateDrag( int );
65 void testCanDecode( const QDragMoveEvent*, bool& );
66 void receivedDropEvent( int, QDropEvent* );
67 void moveTab( int, int );
68 void closeRequest( int );
69#ifndef QT_NO_WHEELEVENT
70 void wheelDelta( int );
71#endif
72
73 protected:
74 virtual void mouseDoubleClickEvent( QMouseEvent *event );
75 virtual void mousePressEvent( QMouseEvent *event );
76 virtual void mouseMoveEvent( QMouseEvent *event );
77 virtual void mouseReleaseEvent( QMouseEvent *event );
78#ifndef QT_NO_WHEELEVENT
79 virtual void wheelEvent( QWheelEvent *event );
80#endif
81
82 virtual void dragEnterEvent( QDragEnterEvent *event );
83 virtual void dragMoveEvent( QDragMoveEvent *event );
84 virtual void dropEvent( QDropEvent *event );
85
86 protected Q_SLOTS:
87 virtual void activateDragSwitchTab();
88
89 protected:
90 virtual void tabLayoutChange();
91
92 private:
93 class Private;
94 Private* const m_d;
95};
96
97#endif
void mouseMiddleClick(int)
virtual void tabLayoutChange()
virtual void dragMoveEvent(QDragMoveEvent *event)
bool isTabReorderingEnabled() const
void mouseDoubleClick(int)
virtual void mouseReleaseEvent(QMouseEvent *event)
virtual void dropEvent(QDropEvent *event)
virtual void mouseMoveEvent(QMouseEvent *event)
void testCanDecode(const QDragMoveEvent *, bool &)
void setTabCloseActivatePrevious(bool)
virtual void mousePressEvent(QMouseEvent *event)
virtual void activateDragSwitchTab()
Private *const m_d
Definition VP1TabBar.h:94
virtual void dragEnterEvent(QDragEnterEvent *event)
virtual ~VP1TabBar()
Definition VP1TabBar.cxx:83
void moveTab(int, int)
bool tabCloseActivatePrevious() const
virtual void mouseDoubleClickEvent(QMouseEvent *event)
Definition VP1TabBar.cxx:88
virtual void wheelEvent(QWheelEvent *event)
void wheelDelta(int)
void contextMenu(int, const QPoint &)
void closeRequest(int)
void initiateDrag(int)
void receivedDropEvent(int, QDropEvent *)
VP1TabBar(QWidget *parent=0)
Definition VP1TabBar.cxx:66
void setTabReorderingEnabled(bool enable)
int selectTab(const QPoint &position) const