ATLAS Offline Software
Loading...
Searching...
No Matches
graphics
VP1
VP1Base
VP1Base
VP1TabWidget.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 VP1TABWIDGET_H
37
#define VP1TABWIDGET_H
38
39
#include <QTabWidget>
40
41
class
QTab;
42
class
VP1TabBar
;
43
44
class
VP1TabWidget
:
public
QTabWidget
45
{
46
Q_OBJECT
47
Q_PROPERTY(
bool
tabReorderingEnabled
READ
isTabReorderingEnabled
WRITE
setTabReorderingEnabled
)
48
Q_PROPERTY(
bool
tabCloseActivatePrevious
READ
tabCloseActivatePrevious
WRITE
setTabCloseActivatePrevious
)
49
Q_PROPERTY(
bool
automaticResizeTabs
READ
automaticResizeTabs
WRITE
setAutomaticResizeTabs
)
50
51
public:
52
53
VP1TabBar
*
getVP1TabBar
();
//Added by TK.
54
55
explicit
VP1TabWidget
( QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags() );
56
57
virtual ~
VP1TabWidget
();
58
59
void
setTabTextColor
(
int
index
,
const
QColor&
color
);
60
61
QColor
tabTextColor
(
int
index
)
const
;
62
63
bool
isTabReorderingEnabled
()
const
;
64
65
bool
tabCloseActivatePrevious
()
const
;
66
67
bool
automaticResizeTabs
()
const
;
68
69
void
setTabBarHidden
(
bool
hide );
70
71
bool
isTabBarHidden
()
const
;
72
73
QString
tabText
(
int
)
const
;
// but it's not virtual...
74
75
void
setTabText
(
int
,
const
QString & );
76
77
public Q_SLOTS:
78
virtual
void
moveTab
(
int
,
int
);
79
80
virtual QT_MOC_COMPAT
void
removePage
( QWidget * w );
81
82
virtual
void
removeTab
(
int
index
);
83
84
void
setTabReorderingEnabled
(
bool
enable );
85
86
void
setTabCloseActivatePrevious
(
bool
previous );
87
88
void
setAutomaticResizeTabs
(
bool
enable );
89
90
Q_SIGNALS:
91
void
testCanDecode
(
const
QDragMoveEvent *e,
bool
&accept
/* result */
);
92
93
void
receivedDropEvent
( QDropEvent * );
94
95
void
receivedDropEvent
( QWidget *, QDropEvent * );
96
97
void
initiateDrag
( QWidget * );
98
99
void
contextMenu
(
const
QPoint & );
100
101
void
contextMenu
( QWidget *,
const
QPoint & );
102
103
void
movedTab
(
int
,
int
);
104
105
void
mouseDoubleClick
();
106
107
void
mouseDoubleClick
( QWidget * );
108
109
void
mouseMiddleClick
();
110
111
void
mouseMiddleClick
( QWidget * );
112
113
void
closeRequest
( QWidget * );
114
115
protected
:
116
virtual
void
mouseDoubleClickEvent
( QMouseEvent* );
117
virtual
void
mousePressEvent
( QMouseEvent* );
118
virtual
void
dragEnterEvent
( QDragEnterEvent* );
119
virtual
void
dragMoveEvent
( QDragMoveEvent* );
120
virtual
void
dropEvent
( QDropEvent* );
121
int
tabBarWidthForMaxChars
(
int
);
122
#ifndef QT_NO_WHEELEVENT
123
virtual
void
wheelEvent
( QWheelEvent* );
124
#endif
125
virtual
void
resizeEvent
( QResizeEvent* );
126
virtual
void
tabInserted
(
int
);
127
virtual
void
tabRemoved
(
int
);
128
129
130
protected
Q_SLOTS:
131
virtual
void
receivedDropEvent
(
int
, QDropEvent* );
132
virtual
void
initiateDrag
(
int
);
133
virtual
void
contextMenu
(
int
,
const
QPoint& );
134
virtual
void
mouseDoubleClick
(
int
);
135
virtual
void
mouseMiddleClick
(
int
);
136
virtual
void
closeRequest
(
int
);
137
#ifndef QT_NO_WHEELEVENT
138
virtual
void
wheelDelta
(
int
);
139
#endif
140
141
private
:
142
class
Private
;
143
Private
*
const
m_d
;
144
};
145
146
#endif
protected
#define protected
Definition
GenEventCnv_p1.h:26
VP1TabBar
Definition
VP1TabBar.h:42
VP1TabWidget::Private
Definition
VP1TabWidget.cxx:49
VP1TabWidget::receivedDropEvent
void receivedDropEvent(QDropEvent *)
VP1TabWidget::setTabReorderingEnabled
void setTabReorderingEnabled(bool enable)
Definition
VP1TabWidget.cxx:245
VP1TabWidget::tabRemoved
virtual void tabRemoved(int)
Definition
VP1TabWidget.cxx:518
VP1TabWidget::setTabTextColor
void setTabTextColor(int index, const QColor &color)
Definition
VP1TabWidget.cxx:235
VP1TabWidget::mouseDoubleClick
void mouseDoubleClick()
VP1TabWidget::removePage
virtual QT_MOC_COMPAT void removePage(QWidget *w)
Definition
VP1TabWidget.cxx:466
VP1TabWidget::testCanDecode
void testCanDecode(const QDragMoveEvent *e, bool &accept)
VP1TabWidget::isTabBarHidden
bool isTabBarHidden() const
Definition
VP1TabWidget.cxx:230
VP1TabWidget::closeRequest
void closeRequest(QWidget *)
VP1TabWidget::mouseMiddleClick
void mouseMiddleClick()
VP1TabWidget::tabInserted
virtual void tabInserted(int)
Definition
VP1TabWidget.cxx:513
VP1TabWidget::wheelEvent
virtual void wheelEvent(QWheelEvent *)
Definition
VP1TabWidget.cxx:348
VP1TabWidget::tabBarWidthForMaxChars
int tabBarWidthForMaxChars(int)
Definition
VP1TabWidget.cxx:265
VP1TabWidget::initiateDrag
void initiateDrag(QWidget *)
VP1TabWidget::removeTab
virtual void removeTab(int index)
Definition
VP1TabWidget.cxx:473
VP1TabWidget::tabReorderingEnabled
bool tabReorderingEnabled
Definition
VP1TabWidget.h:47
VP1TabWidget::automaticResizeTabs
bool automaticResizeTabs
Definition
VP1TabWidget.h:49
VP1TabWidget::VP1TabWidget
VP1TabWidget(QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags())
Definition
VP1TabWidget.cxx:162
VP1TabWidget::m_d
Private *const m_d
Definition
VP1TabWidget.h:143
VP1TabWidget::getVP1TabBar
VP1TabBar * getVP1TabBar()
Definition
VP1TabWidget.cxx:75
VP1TabWidget::tabCloseActivatePrevious
bool tabCloseActivatePrevious
Definition
VP1TabWidget.h:48
VP1TabWidget::movedTab
void movedTab(int, int)
VP1TabWidget::contextMenu
void contextMenu(const QPoint &)
VP1TabWidget::setTabBarHidden
void setTabBarHidden(bool hide)
Definition
VP1TabWidget.cxx:214
VP1TabWidget::dragEnterEvent
virtual void dragEnterEvent(QDragEnterEvent *)
Definition
VP1TabWidget.cxx:315
VP1TabWidget::isTabReorderingEnabled
bool isTabReorderingEnabled() const
Definition
VP1TabWidget.cxx:250
VP1TabWidget::setTabText
void setTabText(int, const QString &)
Definition
VP1TabWidget.cxx:303
VP1TabWidget::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QMouseEvent *)
Definition
VP1TabWidget.cxx:377
VP1TabWidget::wheelDelta
virtual void wheelDelta(int)
Definition
VP1TabWidget.cxx:360
VP1TabWidget::setAutomaticResizeTabs
void setAutomaticResizeTabs(bool enable)
Definition
VP1TabWidget.cxx:480
VP1TabWidget::tabTextColor
QColor tabTextColor(int index) const
Definition
VP1TabWidget.cxx:240
VP1TabWidget::resizeEvent
virtual void resizeEvent(QResizeEvent *)
Definition
VP1TabWidget.cxx:507
VP1TabWidget::mousePressEvent
virtual void mousePressEvent(QMouseEvent *)
Definition
VP1TabWidget.cxx:390
VP1TabWidget::dropEvent
virtual void dropEvent(QDropEvent *)
Definition
VP1TabWidget.cxx:337
VP1TabWidget::setTabCloseActivatePrevious
void setTabCloseActivatePrevious(bool previous)
Definition
VP1TabWidget.cxx:255
VP1TabWidget::moveTab
virtual void moveTab(int, int)
Definition
VP1TabWidget.cxx:432
VP1TabWidget::tabText
QString tabText(int) const
Definition
VP1TabWidget.cxx:291
VP1TabWidget::dragMoveEvent
virtual void dragMoveEvent(QDragMoveEvent *)
Definition
VP1TabWidget.cxx:321
const
index
Definition
index.py:1
color
Definition
jFexInputByteStreamTool.cxx:25
Generated on
for ATLAS Offline Software by
1.14.0