Debian Codegraph @

src/fancytabwidget.cpp

raw symbols SCIP
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Nokia Corporation ([email protected])
8 **
9 ** Commercial Usage
10 **
11 ** Licensees holding valid Qt Commercial licenses may use this file in
12 ** accordance with the Qt Commercial License Agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and Nokia.
15 **
16 ** GNU Lesser General Public License Usage
17 **
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** If you are unsure which license is appropriate for your use, please
26 ** contact the sales department at http://qt.nokia.com/contact.
27 **
28 **************************************************************************/
29
30 #include "fancytabwidget.h"cxx . . $ `<file>/src/fancytabwidget.h`/
31 #include "stylehelper.h"cxx . . $ `<file>/src/stylehelper.h`/
32
33 #include <QDebug>
34
35 #include <QAnimationGroup>
36 #include <QColorDialog>
37 #include <QHBoxLayout>
38 #include <QMenu>
39 #include <QMouseEvent>
40 #include <QPainter>
41 #include <QPropertyAnimation>
42 #include <QSignalMapper>
43 #include <QSplitter>
44 #include <QStackedLayout>
45 #include <QStyleOptionTabV3>
46 #include <QToolButton>
47 #include <QToolTip>
48 #include <QVBoxLayout>
49 #include <QCommonStyle>
50
51 using namespace Core;
52 using namespace Internal;
53
54 const int FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::m_roundingcxx . . $ Core/Internal/FancyTabBar#m_rounding. = 22;
55 const int FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::m_textPaddingcxx . . $ Core/Internal/FancyTabBar#m_textPadding. = 4;
56
57 void FancyTabProxyStylecxx . . $ Core/Internal/FancyTabProxyStyle#::drawControlcxx . . $ Core/Internal/FancyTabProxyStyle#drawControl(474ae36165ae066e).(
58 ControlElementcxx . . $ QStyle#ControlElement# element, const QStyleOptioncxx . . $ QStyleOption#* option,
59 QPaintercxx . . $ QPainter#* p, const QWidgetcxx . . $ QWidget#* widget) const {
60
61 const QStyleOptionTabV3cxx . . $ QStyleOptionTabV3#* v_opt = qstyleoption_castcxx . . $ qstyleoption_cast(2e11f5cf8b0612bc).<const QStyleOptionTabV3cxx . . $ QStyleOptionTabV3#*>(option);
62
63 if (element != CE_TabBarTabcxx . . $ QStyle#CE_TabBarTab. || !v_opt) {
64 QProxyStylecxx . . $ QProxyStyle#::drawControlcxx . . $ QProxyStyle#drawControl(474ae36165ae066e).(element, option, p, widget);
65 return;
66 }
67
68 const QRectcxx . . $ QRect# rect = v_opt->rectcxx . . $ QStyleOption#rect.;
69 const bool selected = v_opt->statecxx . . $ QStyleOption#state. &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). State_Selectedcxx . . $ QStyle#State_Selected.;
70 const bool vertical_tabs = v_opt->shapecxx . . $ QStyleOptionTab#shape. == QTabBarcxx . . $ QTabBar#::RoundedWestcxx . . $ QTabBar#RoundedWest.;
71 const QStringcxx . . $ QString# text = v_optcxx . . $ QString#QString(132dd6869045752b).->textcxx . . $ QStyleOptionTab#text.;
72
73 if (selected) {
74 //background
75 p->savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).();
76 QLinearGradientcxx . . $ QLinearGradient# gradcxx . . $ QLinearGradient#QLinearGradient(3628e2b324c1bb0).(rectcxx . . $ QPointF#QPointF(4f9e9534be445c03)..topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(), rectcxx . . $ QPointF#QPointF(4f9e9534be445c03)..topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).());
77 grad.setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(0, QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, 140));
78 grad.setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(1, QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, 210));
79 p->fillRectcxx . . $ QPainter#fillRect(a493e38a50e0b286).(rect.adjustedcxx . . $ QRect#adjusted(951e984c0912901).(0, 0, 0, -1), gradcxx . . $ QBrush#QBrush(cbd511d3bf8d464c).);
80 p->restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).();
81
82 //shadows
83 p->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0, 0, 0, 110));
84 p->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(1,-1), rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).() -cxx . . $ operator-(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,1));
85 p->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).(), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).());
86 p->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0, 0, 0, 40));
87 p->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(), rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).());
88
89 //highlights
90 p->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, 50));
91 p->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -2), rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).() -cxx . . $ operator-(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,2));
92 p->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 1), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,1));
93 p->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, 40));
94 p->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 0), rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).());
95 p->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 1), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).() -cxx . . $ operator-(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 1));
96 p->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,-1), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).()-cxx . . $ operator-(e1fd31f94663a124).QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,1));
97 }
98
99 QTransformcxx . . $ QTransform# mcxx . . $ QTransform#QTransform(49f6e7a06ebc5aa8).;
100 if (vertical_tabs) {
101 m =cxx . . $ QTransform#`operator=`(7387f4beddc5c2ea). QTransformcxx . . $ QTransform#::fromTranslatecxx . . $ QTransform#fromTranslate(629332b795b8c64e).(rect.leftcxx . . $ QRect#left(ea6fe5115c70a13f).(), rect.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).());
102 m.rotatecxx . . $ QTransform#rotate(f4b4d34e4e6c7696).(-90);
103 } else {
104 m =cxx . . $ QTransform#`operator=`(7387f4beddc5c2ea). QTransformcxx . . $ QTransform#::fromTranslatecxx . . $ QTransform#fromTranslate(629332b795b8c64e).(rect.leftcxx . . $ QRect#left(ea6fe5115c70a13f).(), rect.topcxx . . $ QRect#top(ea6fe5115c70a13f).());
105 }
106
107 const QRectcxx . . $ QRect# draw_rectcxx . . $ QRect#QRect(250dfd8bdd830e67).(QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 0), m.mapRectcxx . . $ QTransform#mapRect(a74d2a1e09b26a6c).(rect).sizecxx . . $ QRect#size(31eef80d4686a819).());
108
109 p->savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).();
110 p->setTransformcxx . . $ QPainter#setTransform(6027f8f6db98365c).(m);
111
112 QRectcxx . . $ QRect# icon_rectcxx . . $ QRect#QRect(250dfd8bdd830e67).(QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(8, 0), v_opt->iconSizecxx . . $ QStyleOptionTab#iconSize.);
113 QRectcxx . . $ QRect# text_rectcxx . . $ QRect#QRect(250dfd8bdd830e67).(icon_rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(4, 0), draw_rect.sizecxx . . $ QRect#size(31eef80d4686a819).());
114 text_rect.setRightcxx . . $ QRect#setRight(f349c77f591a7878).(draw_rect.widthcxx . . $ QRect#width(ea6fe5115c70a13f).());
115 icon_rect.translatecxx . . $ QRect#translate(c0d38f4800714fae).(0, (draw_rect.heightcxx . . $ QRect#height(ea6fe5115c70a13f).() - icon_rect.heightcxx . . $ QRect#height(ea6fe5115c70a13f).()) / 2);
116
117 QFontcxx . . $ QFont# boldFontcxx . . $ QFont#QFont(d0a4bd0c8524b912).(p->fontcxx . . $ QPainter#font(c5040538afc47120).());
118 boldFont.setPointSizeFcxx . . $ QFont#setPointSizeF(ba8836b59fb42830).(Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::sidebarFontSizecxx . . $ Utils/StyleHelper#sidebarFontSize(31fa7155c10fdd13).());
119 boldFont.setBoldcxx . . $ QFont#setBold(b45ddcbc8423892c).(true);
120 p->setFontcxx . . $ QPainter#setFont(d0a4bd0c8524b912).(boldFont);
121 p->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(selected ? QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, 160) : QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0, 0, 0, 110));
122 int textFlags = Qtcxx . . $ Qt/::AlignHCentercxx . . $ Qt/AlignHCenter. |cxx . . $ Qt/`operator|`(6ff00bf3a2570bcb). Qtcxx . . $ Qt/::AlignVCentercxx . . $ Qt/AlignVCenter.;
123 p->drawTextcxx . . $ QPainter#drawText(5e6899f7fbe08e9d).(text_rect, textFlags, text);
124 p->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(selected ? QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(60, 60, 60) : Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::panelTextColorcxx . . $ Utils/StyleHelper#panelTextColor(9d1fd1d8b71bb60d).());
125 #ifndef Q_WS_MAC
126 if (widget) {
127 const QStringcxx . . $ QString# fader_key = "tab_" +cxx . . $ operator+(c75c3ae4eb9af1a8). text +cxx . . $ operator+(3d22f08efddf8107). "_fader";
128 const QStringcxx . . $ QString# animation_key = "tab_" +cxx . . $ operator+(c75c3ae4eb9af1a8). text +cxx . . $ operator+(3d22f08efddf8107). "_animation";
129
130 const QStringcxx . . $ QString# tab_hover = widget->propertycxx . . $ QObject#property(950ff6813be46b58).("tab_hover").toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).();
131 int fader = widget->propertycxx . . $ QObject#property(950ff6813be46b58).(fader_key.toUtf8cxx . . $ QString#toUtf8(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).()).toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).();
132 QPropertyAnimationcxx . . $ QPropertyAnimation#* animation = widget->propertycxx . . $ QObject#property(950ff6813be46b58).(animation_key.toUtf8cxx . . $ QString#toUtf8(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).()).valuecxx . . $ QVariant#value(8f5363d873dd4781).<QPropertyAnimationcxx . . $ QPropertyAnimation#*>();
133
134 if (!animation) {
135 QWidgetcxx . . $ QWidget#* mut_widget = const_cast<QWidgetcxx . . $ QWidget#*>(widget);
136 fader = 0;
137 mut_widget->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).(fader_key.toUtf8cxx . . $ QString#toUtf8(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).(), fadercxx . . $ QVariant#QVariant(d4f767463ce0a6b3).);
138 animation = new QPropertyAnimationcxx . . $ QPropertyAnimation#(mut_widget, fader_key.toUtf8cxx . . $ QString#toUtf8(ef52b713090bc85a).(), mut_widget);
139 connectcxx . . $ QObject#connect(158df1d9a01a3410).(animation, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(valueChanged(QVariant)), mut_widget, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(update()));
140 mut_widget->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).(animation_key.toUtf8cxx . . $ QString#toUtf8(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).(), QVariantcxx . . $ QVariant#::fromValuecxx . . $ QVariant#fromValue(28ec88ac519b76da).(animation));
141 }
142
143 if (text ==cxx . . $ `operator==`(5bc2975d2d751687). tab_hover) {
144 if (animation->statecxx . . $ QAbstractAnimation#state(bd053dc81b8b8c58).() != QAbstractAnimationcxx . . $ QAbstractAnimation#::Runningcxx . . $ QAbstractAnimation#Running. && fader != 40) {
145 animation->stopcxx . . $ QAbstractAnimation#stop(49f6e7a06ebc5aa8).();
146 animation->setDurationcxx . . $ QVariantAnimation#setDuration(d4f767463ce0a6b3).(80);
147 animation->setEndValuecxx . . $ QVariantAnimation#setEndValue(244511558b20107a).(40cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).);
148 animation->startcxx . . $ QAbstractAnimation#start(64d3ffc9cc98549b).();
149 }
150 } else {
151 if (animation->statecxx . . $ QAbstractAnimation#state(bd053dc81b8b8c58).() != QAbstractAnimationcxx . . $ QAbstractAnimation#::Runningcxx . . $ QAbstractAnimation#Running. && fader != 0) {
152 animation->stopcxx . . $ QAbstractAnimation#stop(49f6e7a06ebc5aa8).();
153 animation->setDurationcxx . . $ QVariantAnimation#setDuration(d4f767463ce0a6b3).(160);
154 animation->setEndValuecxx . . $ QVariantAnimation#setEndValue(244511558b20107a).(0cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).);
155 animation->startcxx . . $ QAbstractAnimation#start(64d3ffc9cc98549b).();
156 }
157 }
158
159 if (!selected) {
160 p->savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).();
161 QLinearGradientcxx . . $ QLinearGradient# gradcxx . . $ QLinearGradient#QLinearGradient(3628e2b324c1bb0).(draw_rectcxx . . $ QPointF#QPointF(4f9e9534be445c03)..topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(), vertical_tabscxx . . $ QPointF#QPointF(4f9e9534be445c03). ? draw_rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).() : draw_rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).());
162 grad.setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(0, Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::transparentcxx . . $ Qt/transparent.);
163 grad.setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(0.5, QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, fader));
164 grad.setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(1, Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::transparentcxx . . $ Qt/transparent.);
165 p->fillRectcxx . . $ QPainter#fillRect(a493e38a50e0b286).(draw_rect, gradcxx . . $ QBrush#QBrush(cbd511d3bf8d464c).);
166 p->setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(QPencxx . . $ QPen#QPen(c1f9b1cc0228302b).(gradcxx . . $ QBrush#QBrush(cbd511d3bf8d464c)., 1.0));
167 p->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(draw_rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(), vertical_tabs ? draw_rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).() : draw_rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).());
168 p->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(draw_rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).(), vertical_tabs ? draw_rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).() : draw_rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).());
169 p->restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).();
170 }
171 }
172 #endif
173
174 Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::drawIconWithShadowcxx . . $ Utils/StyleHelper#drawIconWithShadow(4cbb369097595e05).(v_opt->iconcxx . . $ QStyleOptionTab#icon., icon_rect, p, QIconcxx . . $ QIcon#::Normalcxx . . $ QIcon#Normal.);
175
176 p->drawTextcxx . . $ QPainter#drawText(5e6899f7fbe08e9d).(text_rect.translatedcxx . . $ QRect#translated(e1d852fc5299357a).(0, -1), textFlags, text);
177
178 p->restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).();
179 }
180
181 void FancyTabProxyStylecxx . . $ Core/Internal/FancyTabProxyStyle#::polishcxx . . $ Core/Internal/FancyTabProxyStyle#polish(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* widget) {
182 if (QStringcxx . . $ QString#QString(85c52e162fed56f9).(widget->metaObjectcxx . . $ QWidget#metaObject(216d4151dd9c9333).()->classNamecxx . . $ QMetaObject#className(a9f41ea0e82d88cf).()) ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "QTabBar") {
183 widget->setMouseTrackingcxx . . $ QWidget#setMouseTracking(b45ddcbc8423892c).(true);
184 widget->installEventFiltercxx . . $ QObject#installEventFilter(749de1b6ae65bddd).(this);
185 }
186 QProxyStylecxx . . $ QProxyStyle#::polishcxx . . $ QProxyStyle#polish(108f35f7aa7f3cf9).(widget);
187 }
188
189 void FancyTabProxyStylecxx . . $ Core/Internal/FancyTabProxyStyle#::polishcxx . . $ Core/Internal/FancyTabProxyStyle#polish(d92ad49948ef73c2).(QApplicationcxx . . $ QApplication#* app) {
190 QProxyStylecxx . . $ QProxyStyle#::polishcxx . . $ QProxyStyle#polish(d92ad49948ef73c2).(app);
191 }
192
193 void FancyTabProxyStylecxx . . $ Core/Internal/FancyTabProxyStyle#::polishcxx . . $ Core/Internal/FancyTabProxyStyle#polish(a135350238a55bc8).(QPalettecxx . . $ QPalette#& palette) {
194 QProxyStylecxx . . $ QProxyStyle#::polishcxx . . $ QProxyStyle#polish(a135350238a55bc8).(palette);
195 }
196
197 bool FancyTabProxyStylecxx . . $ Core/Internal/FancyTabProxyStyle#::eventFiltercxx . . $ Core/Internal/FancyTabProxyStyle#eventFilter(978aa4af1d030efa).(QObjectcxx . . $ QObject#* o, QEventcxx . . $ QEvent#* e) {
198 QTabBarcxx . . $ QTabBar#* bar = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<QTabBarcxx . . $ QTabBar#*>(o);
199 if (bar && (e->typecxx . . $ QEvent#type(916a8de57f4d422b).() == QEventcxx . . $ QEvent#::MouseMovecxx . . $ QEvent#MouseMove. || e->typecxx . . $ QEvent#type(916a8de57f4d422b).() == QEventcxx . . $ QEvent#::Leavecxx . . $ QEvent#Leave.)) {
200 QMouseEventcxx . . $ QMouseEvent#* event = static_cast<QMouseEventcxx . . $ QMouseEvent#*>(e);
201 const QStringcxx . . $ QString# old_hovered_tab = bar->propertycxx . . $ QObject#property(950ff6813be46b58).("tab_hover").toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).();
202 const QStringcxx . . $ QString# hovered_tab = e->typecxx . . $ QEvent#type(916a8de57f4d422b).() == QEventcxx . . $ QEvent#::Leavecxx . . $ QEvent#Leave. ? QStringcxx . . $ QString#QString(ced63f7c635d850d).() : bar->tabTextcxx . . $ QTabBar#tabText(3f3c3d0e9c0eb37f).(bar->tabAtcxx . . $ QTabBar#tabAt(708179cdcbf2817c).(event->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).()));
203 bar->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).("tab_hover", hovered_tabcxx . . $ QVariant#QVariant(3520e46b33348bf6).);
204
205 if (old_hovered_tab !=cxx . . $ `operator!=`(5bc2975d2d751687). hovered_tab)
206 bar->updatecxx . . $ QWidget#update(49f6e7a06ebc5aa8).();
207 }
208
209 return false;
210 }
211
212 FancyTabcxx . . $ Core/Internal/FancyTab#::FancyTabcxx . . $ Core/Internal/FancyTab#FancyTab(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* tabbar)
213 : QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).(tabbar), tabbarcxx . . $ Core/Internal/FancyTab#tabbar.(tabbar), m_fadercxx . . $ Core/Internal/FancyTab#m_fader.(0)
214 {
215 animatorcxx . . $ Core/Internal/FancyTab#animator..setPropertyNamecxx . . $ QPropertyAnimation#setPropertyName(45672f3c6961a244).("fader"cxx . . $ QByteArray#QByteArray(34d26762b42c433a).);
216 animatorcxx . . $ Core/Internal/FancyTab#animator..setTargetObjectcxx . . $ QPropertyAnimation#setTargetObject(749de1b6ae65bddd).(this);
217 setSizePolicycxx . . $ QWidget#setSizePolicy(457db7fe1842b3dc).(QSizePolicycxx . . $ QSizePolicy#::Expandingcxx . . $ QSizePolicy#Expanding., QSizePolicycxx . . $ QSizePolicy#::Maximumcxx . . $ QSizePolicy#Maximum.);
218 }
219
220 void FancyTabcxx . . $ Core/Internal/FancyTab#::fadeIncxx . . $ Core/Internal/FancyTab#fadeIn(49f6e7a06ebc5aa8).()
221 {
222 animatorcxx . . $ Core/Internal/FancyTab#animator..stopcxx . . $ QAbstractAnimation#stop(49f6e7a06ebc5aa8).();
223 animatorcxx . . $ Core/Internal/FancyTab#animator..setDurationcxx . . $ QVariantAnimation#setDuration(d4f767463ce0a6b3).(80);
224 animatorcxx . . $ Core/Internal/FancyTab#animator..setEndValuecxx . . $ QVariantAnimation#setEndValue(244511558b20107a).(40cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).);
225 animatorcxx . . $ Core/Internal/FancyTab#animator..startcxx . . $ QAbstractAnimation#start(64d3ffc9cc98549b).();
226 }
227
228 void FancyTabcxx . . $ Core/Internal/FancyTab#::fadeOutcxx . . $ Core/Internal/FancyTab#fadeOut(49f6e7a06ebc5aa8).()
229 {
230 animatorcxx . . $ Core/Internal/FancyTab#animator..stopcxx . . $ QAbstractAnimation#stop(49f6e7a06ebc5aa8).();
231 animatorcxx . . $ Core/Internal/FancyTab#animator..setDurationcxx . . $ QVariantAnimation#setDuration(d4f767463ce0a6b3).(160);
232 animatorcxx . . $ Core/Internal/FancyTab#animator..setEndValuecxx . . $ QVariantAnimation#setEndValue(244511558b20107a).(0cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).);
233 animatorcxx . . $ Core/Internal/FancyTab#animator..startcxx . . $ QAbstractAnimation#start(64d3ffc9cc98549b).();
234 }
235
236 void FancyTabcxx . . $ Core/Internal/FancyTab#::setFadercxx . . $ Core/Internal/FancyTab#setFader(9364e6e7bff7660).(float value)
237 {
238 m_fadercxx . . $ Core/Internal/FancyTab#m_fader. = value;
239 tabbarcxx . . $ Core/Internal/FancyTab#tabbar.->updatecxx . . $ QWidget#update(49f6e7a06ebc5aa8).();
240 }
241
242 FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::FancyTabBarcxx . . $ Core/Internal/FancyTabBar#FancyTabBar(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# *parent)
243 : QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).(parent)
244 {
245 setSizePolicycxx . . $ QWidget#setSizePolicy(457db7fe1842b3dc).(QSizePolicycxx . . $ QSizePolicy#::Preferredcxx . . $ QSizePolicy#Preferred., QSizePolicycxx . . $ QSizePolicy#::Expandingcxx . . $ QSizePolicy#Expanding.);
246 setStylecxx . . $ QWidget#setStyle(bcd10a9b314ff202).(new QCommonStylecxx . . $ QCommonStyle#);
247 setMinimumWidthcxx . . $ QWidget#setMinimumWidth(d4f767463ce0a6b3).(qMaxcxx . . $ qMax(2a338fce5842aa6a).(2 * m_roundingcxx . . $ Core/Internal/FancyTabBar#m_rounding., 40));
248 setAttributecxx . . $ QWidget#setAttribute(52fc7bf162518f7f).(Qtcxx . . $ Qt/::WA_Hovercxx . . $ Qt/WA_Hover., true);
249 setFocusPolicycxx . . $ QWidget#setFocusPolicy(84f385f4ea7c1696).(Qtcxx . . $ Qt/::NoFocuscxx . . $ Qt/NoFocus.);
250 setMouseTrackingcxx . . $ QWidget#setMouseTracking(b45ddcbc8423892c).(true); // Needed for hover events
251 m_triggerTimercxx . . $ Core/Internal/FancyTabBar#m_triggerTimer..setSingleShotcxx . . $ QTimer#setSingleShot(b45ddcbc8423892c).(true);
252
253 QVBoxLayoutcxx . . $ QVBoxLayout#* layout = new QVBoxLayoutcxx . . $ QVBoxLayout#QVBoxLayout(49f6e7a06ebc5aa8).;
254 layout->addSpacerItemcxx . . $ QBoxLayout#addSpacerItem(a5ccb5246ece79a7).(new QSpacerItemcxx . . $ QSpacerItem#QSpacerItem(bce5685a9a3bd999).(0, 0, QSizePolicycxx . . $ QSizePolicy#::Fixedcxx . . $ QSizePolicy#Fixed., QSizePolicycxx . . $ QSizePolicy#::Expandingcxx . . $ QSizePolicy#Expanding.));
255 layout->setSpacingcxx . . $ QBoxLayout#setSpacing(d4f767463ce0a6b3).(0);
256 layout->setContentsMarginscxx . . $ QLayout#setContentsMargins(748afa4755bc9595).(0, 0, 0, 0);
257 setLayoutcxx . . $ QWidget#setLayout(23396b1058755fec).(layout);
258
259 // We use a zerotimer to keep the sidebar responsive
260 connectcxx . . $ QObject#connect(158df1d9a01a3410).(&m_triggerTimercxx . . $ Core/Internal/FancyTabBar#m_triggerTimer., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(timeout()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(emitCurrentIndex()));
261 }
262
263 FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::~cxx . . $ Core/Internal/FancyTabBar#`~FancyTabBar`(ced63f7c635d850d).FancyTabBarcxx . . $ Core/Internal/FancyTabBar#()
264 {
265 delete stylecxx . . $ QWidget#style(5bbb00d3017c281f).();
266 }
267
268 QSizecxx . . $ QSize# FancyTabcxx . . $ Core/Internal/FancyTab#::sizeHintcxx . . $ Core/Internal/FancyTab#sizeHint(4b3b776e5ee2b367).() const {
269 QFontcxx . . $ QFont# boldFontcxx . . $ QFont#QFont(d0a4bd0c8524b912).(fontcxx . . $ QWidget#font(c5040538afc47120).());
270 boldFont.setPointSizeFcxx . . $ QFont#setPointSizeF(ba8836b59fb42830).(Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::sidebarFontSizecxx . . $ Utils/StyleHelper#sidebarFontSize(31fa7155c10fdd13).());
271 boldFont.setBoldcxx . . $ QFont#setBold(b45ddcbc8423892c).(true);
272 QFontMetricscxx . . $ QFontMetrics# fmcxx . . $ QFontMetrics#QFontMetrics(d0a4bd0c8524b912).(boldFont);
273 int spacing = 8;
274 int width = 60 + spacing + 2;
275 int iconHeight = 32;
276 QSizecxx . . $ QSize# retcxx . . $ QSize#QSize(c0d38f4800714fae).(width, iconHeight + spacing + fm.heightcxx . . $ QFontMetrics#height(455f465bc33b4cdf).());
277 return ret;
278 }
279
280 QSizecxx . . $ QSize# FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::tabSizeHintcxx . . $ Core/Internal/FancyTabBar#tabSizeHint(482fa2bd80a86457).(bool minimum) const
281 {
282 QFontcxx . . $ QFont# boldFontcxx . . $ QFont#QFont(d0a4bd0c8524b912).(fontcxx . . $ QWidget#font(c5040538afc47120).());
283 boldFont.setPointSizeFcxx . . $ QFont#setPointSizeF(ba8836b59fb42830).(Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::sidebarFontSizecxx . . $ Utils/StyleHelper#sidebarFontSize(31fa7155c10fdd13).());
284 boldFont.setBoldcxx . . $ QFont#setBold(b45ddcbc8423892c).(true);
285 QFontMetricscxx . . $ QFontMetrics# fmcxx . . $ QFontMetrics#QFontMetrics(d0a4bd0c8524b912).(boldFont);
286 int spacing = 8;
287 int width = 60 + spacing + 2;
288 int iconHeight = minimum ? 0 : 32;
289 return QSizecxx . . $ QSize#QSize(c0d38f4800714fae).(width, iconHeight + spacing + fm.heightcxx . . $ QFontMetrics#height(455f465bc33b4cdf).());
290 }
291
292 void FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::paintEventcxx . . $ Core/Internal/FancyTabBar#paintEvent(f239c9e85d61a220).(QPaintEventcxx . . $ QPaintEvent# *event)
293 {
294 Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(event)
295 QPaintercxx . . $ QPainter# pcxx . . $ QPainter#QPainter(dd2eedc069b0ab5f).(this);
296
297 for (int i = 0; i < countcxx . . $ Core/Internal/FancyTabBar#count(455f465bc33b4cdf).(); ++i)
298 if (i != currentIndexcxx . . $ Core/Internal/FancyTabBar#currentIndex(455f465bc33b4cdf).())
299 paintTabcxx . . $ Core/Internal/FancyTabBar#paintTab(d955e0f0b944201a).(&p, i);
300
301 // paint active tab last, since it overlaps the neighbors
302 if (currentIndexcxx . . $ Core/Internal/FancyTabBar#currentIndex(455f465bc33b4cdf).() != -1)
303 paintTabcxx . . $ Core/Internal/FancyTabBar#paintTab(d955e0f0b944201a).(&p, currentIndexcxx . . $ Core/Internal/FancyTabBar#currentIndex(455f465bc33b4cdf).());
304 }
305
306 void FancyTabcxx . . $ Core/Internal/FancyTab#::enterEventcxx . . $ Core/Internal/FancyTab#enterEvent(c2473e2e70986fd7).(QEventcxx . . $ QEvent#*)
307 {
308 fadeIncxx . . $ Core/Internal/FancyTab#fadeIn(49f6e7a06ebc5aa8).();
309 }
310
311 void FancyTabcxx . . $ Core/Internal/FancyTab#::leaveEventcxx . . $ Core/Internal/FancyTab#leaveEvent(c2473e2e70986fd7).(QEventcxx . . $ QEvent#*)
312 {
313 fadeOutcxx . . $ Core/Internal/FancyTab#fadeOut(49f6e7a06ebc5aa8).();
314 }
315
316 QSizecxx . . $ QSize# FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::sizeHintcxx . . $ Core/Internal/FancyTabBar#sizeHint(4b3b776e5ee2b367).() const
317 {
318 QSizecxx . . $ QSize# sh = tabSizeHintcxx . . $ Core/Internal/FancyTabBar#tabSizeHint(482fa2bd80a86457).();
319 return QSizecxx . . $ QSize#QSize(c0d38f4800714fae).(sh.widthcxx . . $ QSize#width(ea6fe5115c70a13f).(), sh.heightcxx . . $ QSize#height(ea6fe5115c70a13f).() * m_tabscxx . . $ Core/Internal/FancyTabBar#m_tabs..countcxx . . $ QList#count(455f465bc33b4cdf).());
320 }
321
322 QSizecxx . . $ QSize# FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::minimumSizeHintcxx . . $ Core/Internal/FancyTabBar#minimumSizeHint(4b3b776e5ee2b367).() const
323 {
324 QSizecxx . . $ QSize# sh = tabSizeHintcxx . . $ Core/Internal/FancyTabBar#tabSizeHint(482fa2bd80a86457).(true);
325 return QSizecxx . . $ QSize#QSize(c0d38f4800714fae).(sh.widthcxx . . $ QSize#width(ea6fe5115c70a13f).(), sh.heightcxx . . $ QSize#height(ea6fe5115c70a13f).() * m_tabscxx . . $ Core/Internal/FancyTabBar#m_tabs..countcxx . . $ QList#count(455f465bc33b4cdf).());
326 }
327
328 QRectcxx . . $ QRect# FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::tabRectcxx . . $ Core/Internal/FancyTabBar#tabRect(aeb380d106682fa3).(int index) const
329 {
330 return m_tabscxx . . $ Core/Internal/FancyTabBar#m_tabs.[cxx . . $ QList#`operator[]`(e2681f9bb6b2f357).index]->geometrycxx . . $ QWidget#geometry(f4023511c62cad66).();
331 }
332
333 QStringcxx . . $ QString# FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::tabToolTipcxx . . $ Core/Internal/FancyTabBar#tabToolTip(3f3c3d0e9c0eb37f).(int index) const {
334 return m_tabscxx . . $ Core/Internal/FancyTabBar#m_tabs.[cxx . . $ QList#`operator[]`(e2681f9bb6b2f357).index]->toolTipcxx . . $ QWidget#toolTip(6ef7b6c27b00b43d).();
335 }
336
337 void FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::setTabToolTipcxx . . $ Core/Internal/FancyTabBar#setTabToolTip(4b11a7293b4ed91c).(int index, const QStringcxx . . $ QString#& toolTip) {
338 m_tabscxx . . $ Core/Internal/FancyTabBar#m_tabs.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).index]->setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(toolTip);
339 }
340
341 // This keeps the sidebar responsive since
342 // we get a repaint before loading the
343 // mode itself
344 void FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::emitCurrentIndexcxx . . $ Core/Internal/FancyTabBar#emitCurrentIndex(49f6e7a06ebc5aa8).()
345 {
346 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! currentChangedcxx . . $ Core/Internal/FancyTabBar#currentChanged(d4f767463ce0a6b3).(m_currentIndexcxx . . $ Core/Internal/FancyTabBar#m_currentIndex.);
347 }
348
349 void FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::mousePressEventcxx . . $ Core/Internal/FancyTabBar#mousePressEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent# *e)
350 {
351 e->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).();
352 for (int index = 0; index < m_tabscxx . . $ Core/Internal/FancyTabBar#m_tabs..countcxx . . $ QList#count(455f465bc33b4cdf).(); ++index) {
353 if (tabRectcxx . . $ Core/Internal/FancyTabBar#tabRect(aeb380d106682fa3).(index).containscxx . . $ QRect#contains(eaee943b37977784).(e->poscxx . . $ QMouseEvent#pos(75d69cfbd3c4b2dd).())) {
354 m_currentIndexcxx . . $ Core/Internal/FancyTabBar#m_currentIndex. = index;
355 updatecxx . . $ QWidget#update(49f6e7a06ebc5aa8).();
356 m_triggerTimercxx . . $ Core/Internal/FancyTabBar#m_triggerTimer..startcxx . . $ QTimer#start(d4f767463ce0a6b3).(0);
357 break;
358 }
359 }
360 }
361
362 void FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::addTabcxx . . $ Core/Internal/FancyTabBar#addTab(8d594714bb74b0ab).(const QIconcxx . . $ QIcon#& icon, const QStringcxx . . $ QString#& label) {
363 FancyTabcxx . . $ Core/Internal/FancyTab# *tab = new FancyTabcxx . . $ Core/Internal/FancyTab#(this);
364 tab->iconcxx . . $ Core/Internal/FancyTab#icon. =cxx . . $ QIcon#`operator=`(68c32cb828cec48). icon;
365 tab->textcxx . . $ Core/Internal/FancyTab#text. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). label;
366 m_tabscxx . . $ Core/Internal/FancyTabBar#m_tabs..appendcxx . . $ QList#append(77d9f17553126ecb).(tab);
367 qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<QVBoxLayoutcxx . . $ QVBoxLayout#*>(layoutcxx . . $ QWidget#layout(5761b17781c20cfb).())->insertWidgetcxx . . $ QBoxLayout#insertWidget(7be466a1409c23e).(layoutcxx . . $ QWidget#layout(5761b17781c20cfb).()->countcxx . . $ QLayout#count(455f465bc33b4cdf).()-1, tab);
368 }
369
370 void FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::addSpacercxx . . $ Core/Internal/FancyTabBar#addSpacer(d4f767463ce0a6b3).(int size) {
371 qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<QVBoxLayoutcxx . . $ QVBoxLayout#*>(layoutcxx . . $ QWidget#layout(5761b17781c20cfb).())->insertSpacerItemcxx . . $ QBoxLayout#insertSpacerItem(5178e0ea3f9cb912).(layoutcxx . . $ QWidget#layout(5761b17781c20cfb).()->countcxx . . $ QLayout#count(455f465bc33b4cdf).()-1,
372 new QSpacerItemcxx . . $ QSpacerItem#QSpacerItem(bce5685a9a3bd999).(0, size, QSizePolicycxx . . $ QSizePolicy#::Fixedcxx . . $ QSizePolicy#Fixed., QSizePolicycxx . . $ QSizePolicy#::Maximumcxx . . $ QSizePolicy#Maximum.));
373 }
374
375 void FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::paintTabcxx . . $ Core/Internal/FancyTabBar#paintTab(d955e0f0b944201a).(QPaintercxx . . $ QPainter# *painter, int tabIndex) const
376 {
377 if (!validIndexcxx . . $ Core/Internal/FancyTabBar#validIndex(4a668f6de69bf818).(tabIndex)) {
378 qWarningcxx . . $ `<external>/10450329605257866924/qlogging.h:166:9`!("invalid index");
379 return;
380 }
381 painter->savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).();
382
383 QRectcxx . . $ QRect# rect = tabRectcxx . . $ Core/Internal/FancyTabBar#tabRect(aeb380d106682fa3).(tabIndex);
384 bool selected = (tabIndex == m_currentIndexcxx . . $ Core/Internal/FancyTabBar#m_currentIndex.);
385
386 if (selected) {
387 //background
388 painter->savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).();
389 QLinearGradientcxx . . $ QLinearGradient# gradcxx . . $ QLinearGradient#QLinearGradient(3628e2b324c1bb0).(rectcxx . . $ QPointF#QPointF(4f9e9534be445c03)..topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(), rectcxx . . $ QPointF#QPointF(4f9e9534be445c03)..topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).());
390 grad.setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(0, QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, 140));
391 grad.setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(1, QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, 210));
392 painter->fillRectcxx . . $ QPainter#fillRect(a493e38a50e0b286).(rect.adjustedcxx . . $ QRect#adjusted(951e984c0912901).(0, 0, 0, -1), gradcxx . . $ QBrush#QBrush(cbd511d3bf8d464c).);
393 painter->restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).();
394
395 //shadows
396 painter->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0, 0, 0, 110));
397 painter->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(1,-1), rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).() -cxx . . $ operator-(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,1));
398 painter->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).(), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).());
399 painter->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0, 0, 0, 40));
400 painter->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(), rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).());
401
402 //highlights
403 painter->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, 50));
404 painter->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, -2), rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).() -cxx . . $ operator-(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,2));
405 painter->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 1), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,1));
406 painter->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, 40));
407 painter->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 0), rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).());
408 painter->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 1), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).() -cxx . . $ operator-(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0, 1));
409 painter->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).() +cxx . . $ operator+(e1fd31f94663a124). QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,-1), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).()-cxx . . $ operator-(e1fd31f94663a124).QPointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(0,1));
410 }
411
412 QStringcxx . . $ QString# tabText(painter->fontMetricscxx . . $ QPainter#fontMetrics(ee264e9e8967f9a7).().elidedTextcxx . . $ QFontMetrics#elidedText(8e070a2bf8360a7c).(this->tabTextcxx . . $ Core/Internal/FancyTabBar#tabText(3f3c3d0e9c0eb37f).(tabIndex), Qtcxx . . $ Qt/::ElideRightcxx . . $ Qt/ElideRight., widthcxx . . $ QWidget#width(455f465bc33b4cdf).()));
413 QRectcxx . . $ QRect# tabTextRect(tabRectcxx . . $ Core/Internal/FancyTabBar#tabRect(aeb380d106682fa3).(tabIndex));
414 QRectcxx . . $ QRect# tabIconRect(tabTextRect);
415 tabIconRect.adjustcxx . . $ QRect#adjust(2261ffe5112eab06).(+4, +4, -4, -4);
416 tabTextRect.translatecxx . . $ QRect#translate(c0d38f4800714fae).(0, -2);
417 QFontcxx . . $ QFont# boldFontcxx . . $ QFont#QFont(d0a4bd0c8524b912).(painter->fontcxx . . $ QPainter#font(c5040538afc47120).());
418 boldFont.setPointSizeFcxx . . $ QFont#setPointSizeF(ba8836b59fb42830).(Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::sidebarFontSizecxx . . $ Utils/StyleHelper#sidebarFontSize(31fa7155c10fdd13).());
419 boldFont.setBoldcxx . . $ QFont#setBold(b45ddcbc8423892c).(true);
420 painter->setFontcxx . . $ QPainter#setFont(d0a4bd0c8524b912).(boldFont);
421 painter->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(selected ? QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, 160) : QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0, 0, 0, 110));
422 int textFlags = Qtcxx . . $ Qt/::AlignCentercxx . . $ Qt/AlignCenter. |cxx . . $ Qt/`operator|`(6ff00bf3a2570bcb). Qtcxx . . $ Qt/::AlignBottomcxx . . $ Qt/AlignBottom.;
423 painter->drawTextcxx . . $ QPainter#drawText(5e6899f7fbe08e9d).(tabTextRect, textFlags, tabText);
424 painter->setPencxx . . $ QPainter#setPen(129a55e114526ad3).(selected ? QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(60, 60, 60) : Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::panelTextColorcxx . . $ Utils/StyleHelper#panelTextColor(9d1fd1d8b71bb60d).());
425 #ifndef Q_WS_MAC
426 if (!selected) {
427 painter->savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).();
428 int fader = int(m_tabscxx . . $ Core/Internal/FancyTabBar#m_tabs.[cxx . . $ QList#`operator[]`(e2681f9bb6b2f357).tabIndex]->fadercxx . . $ Core/Internal/FancyTab#fader(9b8c9e39889c762c).());
429 QLinearGradientcxx . . $ QLinearGradient# gradcxx . . $ QLinearGradient#QLinearGradient(3628e2b324c1bb0).(rectcxx . . $ QPointF#QPointF(4f9e9534be445c03)..topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(), rectcxx . . $ QPointF#QPointF(4f9e9534be445c03)..topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).());
430 grad.setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(0, Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::transparentcxx . . $ Qt/transparent.);
431 grad.setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(0.5, QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(255, 255, 255, fader));
432 grad.setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(1, Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::transparentcxx . . $ Qt/transparent.);
433 painter->fillRectcxx . . $ QPainter#fillRect(a493e38a50e0b286).(rect, gradcxx . . $ QBrush#QBrush(cbd511d3bf8d464c).);
434 painter->setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(QPencxx . . $ QPen#QPen(c1f9b1cc0228302b).(gradcxx . . $ QBrush#QBrush(cbd511d3bf8d464c)., 1.0));
435 painter->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(), rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).());
436 painter->drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).(), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).());
437 painter->restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).();
438 }
439 #endif
440
441 const int textHeight = painter->fontMetricscxx . . $ QPainter#fontMetrics(ee264e9e8967f9a7).().heightcxx . . $ QFontMetrics#height(455f465bc33b4cdf).();
442 tabIconRect.adjustcxx . . $ QRect#adjust(2261ffe5112eab06).(0, 4, 0, -textHeight);
443 Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::drawIconWithShadowcxx . . $ Utils/StyleHelper#drawIconWithShadow(4cbb369097595e05).(tabIconcxx . . $ Core/Internal/FancyTabBar#tabIcon(32078549dd1fc3ac).(tabIndex), tabIconRect, painter, QIconcxx . . $ QIcon#::Normalcxx . . $ QIcon#Normal.);
444
445 painter->translatecxx . . $ QPainter#translate(bc12c9ec15586e6a).(0, -1);
446 painter->drawTextcxx . . $ QPainter#drawText(5e6899f7fbe08e9d).(tabTextRect, textFlags, tabText);
447 painter->restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).();
448 }
449
450 void FancyTabBarcxx . . $ Core/Internal/FancyTabBar#::setCurrentIndexcxx . . $ Core/Internal/FancyTabBar#setCurrentIndex(d4f767463ce0a6b3).(int index) {
451 m_currentIndexcxx . . $ Core/Internal/FancyTabBar#m_currentIndex. = index;
452 updatecxx . . $ QWidget#update(49f6e7a06ebc5aa8).();
453 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! currentChangedcxx . . $ Core/Internal/FancyTabBar#currentChanged(d4f767463ce0a6b3).(m_currentIndexcxx . . $ Core/Internal/FancyTabBar#m_currentIndex.);
454 }
455
456
457 //////
458 // FancyColorButton
459 //////
460
461 class FancyColorButtoncxx . . $ FancyColorButton# : public QWidgetcxx . . $ QWidget#
462 {
463 public:
464 FancyColorButtoncxx . . $ FancyColorButton#FancyColorButton(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# *parent)
465 : m_parentcxx . . $ FancyColorButton#m_parent.(parent)
466 {
467 setSizePolicycxx . . $ QWidget#setSizePolicy(457db7fe1842b3dc).(QSizePolicycxx . . $ QSizePolicy#::MinimumExpandingcxx . . $ QSizePolicy#MinimumExpanding., QSizePolicycxx . . $ QSizePolicy#::Preferredcxx . . $ QSizePolicy#Preferred.);
468 }
469
470 void mousePressEventcxx . . $ FancyColorButton#mousePressEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent# *ev)
471 {
472 if (ev->modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() &cxx . . $ QFlags#`operator&`(2cc1994e0be6f18e). Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.)
473 Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::setBaseColorcxx . . $ Utils/StyleHelper#setBaseColor(129a55e114526ad3).(QColorDialogcxx . . $ QColorDialog#::getColorcxx . . $ QColorDialog#getColor(c67741e1a73445a5).(Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::requestedBaseColorcxx . . $ Utils/StyleHelper#requestedBaseColor(f5857e16334315e5).(), m_parentcxx . . $ FancyColorButton#m_parent.));
474 }
475 private:
476 QWidgetcxx . . $ QWidget# *m_parentcxx . . $ FancyColorButton#m_parent.;
477 };
478
479 //////
480 // FancyTabWidget
481 //////
482
483 FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#FancyTabWidget(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent)
484 : QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).(parent),
485 mode_cxx . . $ Core/Internal/FancyTabWidget#mode_.(Mode_Nonecxx . . $ Core/Internal/FancyTabWidget#Mode_None.),
486 tab_bar_cxx . . $ Core/Internal/FancyTabWidget#tab_bar_.(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!),
487 stack_cxx . . $ Core/Internal/FancyTabWidget#stack_.(new QStackedLayoutcxx . . $ QStackedLayout#QStackedLayout(49f6e7a06ebc5aa8).),
488 side_widget_cxx . . $ Core/Internal/FancyTabWidget#side_widget_.(new QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).),
489 side_layout_cxx . . $ Core/Internal/FancyTabWidget#side_layout_.(new QVBoxLayoutcxx . . $ QVBoxLayout#QVBoxLayout(49f6e7a06ebc5aa8).),
490 top_layout_cxx . . $ Core/Internal/FancyTabWidget#top_layout_.(new QVBoxLayoutcxx . . $ QVBoxLayout#QVBoxLayout(49f6e7a06ebc5aa8).),
491 use_background_cxx . . $ Core/Internal/FancyTabWidget#use_background_.(false),
492 menu_cxx . . $ Core/Internal/FancyTabWidget#menu_.(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!),
493 proxy_style_cxx . . $ Core/Internal/FancyTabWidget#proxy_style_.(new FancyTabProxyStylecxx . . $ Core/Internal/FancyTabProxyStyle#)
494 {
495 side_layout_cxx . . $ Core/Internal/FancyTabWidget#side_layout_.->setSpacingcxx . . $ QBoxLayout#setSpacing(d4f767463ce0a6b3).(0);
496 side_layout_cxx . . $ Core/Internal/FancyTabWidget#side_layout_.->setMargincxx . . $ QLayout#setMargin(d4f767463ce0a6b3).(0);
497 side_layout_cxx . . $ Core/Internal/FancyTabWidget#side_layout_.->addSpacerItemcxx . . $ QBoxLayout#addSpacerItem(a5ccb5246ece79a7).(new QSpacerItemcxx . . $ QSpacerItem#QSpacerItem(bce5685a9a3bd999).(0, 0, QSizePolicycxx . . $ QSizePolicy#::Fixedcxx . . $ QSizePolicy#Fixed., QSizePolicycxx . . $ QSizePolicy#::Expandingcxx . . $ QSizePolicy#Expanding.));
498
499 side_widget_cxx . . $ Core/Internal/FancyTabWidget#side_widget_.->setLayoutcxx . . $ QWidget#setLayout(23396b1058755fec).(side_layout_cxx . . $ Core/Internal/FancyTabWidget#side_layout_.);
500 side_widget_cxx . . $ Core/Internal/FancyTabWidget#side_widget_.->setSizePolicycxx . . $ QWidget#setSizePolicy(457db7fe1842b3dc).(QSizePolicycxx . . $ QSizePolicy#::Fixedcxx . . $ QSizePolicy#Fixed., QSizePolicycxx . . $ QSizePolicy#::Expandingcxx . . $ QSizePolicy#Expanding.);
501
502 top_layout_cxx . . $ Core/Internal/FancyTabWidget#top_layout_.->setMargincxx . . $ QLayout#setMargin(d4f767463ce0a6b3).(0);
503 top_layout_cxx . . $ Core/Internal/FancyTabWidget#top_layout_.->setSpacingcxx . . $ QBoxLayout#setSpacing(d4f767463ce0a6b3).(0);
504 top_layout_cxx . . $ Core/Internal/FancyTabWidget#top_layout_.->addLayoutcxx . . $ QBoxLayout#addLayout(ecefce2409e37794).(stack_cxx . . $ Core/Internal/FancyTabWidget#stack_.);
505
506 QHBoxLayoutcxx . . $ QHBoxLayout#* main_layout = new QHBoxLayoutcxx . . $ QHBoxLayout#;
507 main_layout->setMargincxx . . $ QLayout#setMargin(d4f767463ce0a6b3).(0);
508 main_layout->setSpacingcxx . . $ QBoxLayout#setSpacing(d4f767463ce0a6b3).(1);
509 main_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(side_widget_cxx . . $ Core/Internal/FancyTabWidget#side_widget_.);
510 main_layout->addLayoutcxx . . $ QBoxLayout#addLayout(ecefce2409e37794).(top_layout_cxx . . $ Core/Internal/FancyTabWidget#top_layout_.);
511 setLayoutcxx . . $ QWidget#setLayout(23396b1058755fec).(main_layout);
512 }
513
514 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::AddTabcxx . . $ Core/Internal/FancyTabWidget#AddTab(bc0b2a0f8cc7469d).(QWidgetcxx . . $ QWidget#* tab, const QIconcxx . . $ QIcon#& icon, const QStringcxx . . $ QString#& label) {
515 stack_cxx . . $ Core/Internal/FancyTabWidget#stack_.->addWidgetcxx . . $ QStackedLayout#addWidget(a4495bcf7b921e4e).(tab);
516 items_cxx . . $ Core/Internal/FancyTabWidget#items_. <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). Itemcxx . . $ Core/Internal/FancyTabWidget#Item#Item(8d594714bb74b0ab).(icon, label);
517 }
518
519 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::AddSpacercxx . . $ Core/Internal/FancyTabWidget#AddSpacer(d4f767463ce0a6b3).(int size) {
520 items_cxx . . $ Core/Internal/FancyTabWidget#items_. <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). Itemcxx . . $ Core/Internal/FancyTabWidget#Item#(size);
521 }
522
523 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::SetBackgroundPixmapcxx . . $ Core/Internal/FancyTabWidget#SetBackgroundPixmap(8887f7d25b86c3f4).(const QPixmapcxx . . $ QPixmap#& pixmap) {
524 background_pixmap_cxx . . $ Core/Internal/FancyTabWidget#background_pixmap_. =cxx . . $ QPixmap#`operator=`(49583b444411494d). pixmap;
525 updatecxx . . $ QWidget#update(49f6e7a06ebc5aa8).();
526 }
527
528 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::paintEventcxx . . $ Core/Internal/FancyTabWidget#paintEvent(f239c9e85d61a220).(QPaintEventcxx . . $ QPaintEvent#*) {
529 if (!use_background_cxx . . $ Core/Internal/FancyTabWidget#use_background_.)
530 return;
531
532 QPaintercxx . . $ QPainter# paintercxx . . $ QPainter#QPainter(dd2eedc069b0ab5f).(this);
533
534 QRectcxx . . $ QRect# rect = side_widget_cxx . . $ Core/Internal/FancyTabWidget#side_widget_.->rectcxx . . $ QWidget#rect(d857385bac04cbf7).().adjustedcxx . . $ QRect#adjusted(951e984c0912901).(0, 0, 1, 0);
535 rect =cxx . . $ QRect#`operator=`(2f0950bc81ec7a1b). stylecxx . . $ QWidget#style(5bbb00d3017c281f).()->visualRectcxx . . $ QStyle#visualRect(572b08719adeb1a2).(layoutDirectioncxx . . $ QWidget#layoutDirection(ea3485deb12b80c4).(), geometrycxx . . $ QWidget#geometry(f4023511c62cad66).(), rect);
536 Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::verticalGradientcxx . . $ Utils/StyleHelper#verticalGradient(a205dbb5f371807).(&painter, rect, rect);
537
538 if (!background_pixmap_cxx . . $ Core/Internal/FancyTabWidget#background_pixmap_..isNullcxx . . $ QPixmap#isNull(50ce9a9e25b4a850).()) {
539 QRectcxx . . $ QRect# pixmap_rect(background_pixmap_cxx . . $ Core/Internal/FancyTabWidget#background_pixmap_..rectcxx . . $ QPixmap#rect(d857385bac04cbf7).());
540 pixmap_rect.moveTocxx . . $ QRect#moveTo(4c7e4a2350b03b37).(rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).());
541
542 while (pixmap_rect.topcxx . . $ QRect#top(ea6fe5115c70a13f).() < rect.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).()) {
543 QRectcxx . . $ QRect# source_rect(pixmap_rect.intersectedcxx . . $ QRect#intersected(c87a5916684a953).(rect));
544 source_rect.moveTocxx . . $ QRect#moveTo(c0d38f4800714fae).(0, 0);
545 painter.drawPixmapcxx . . $ QPainter#drawPixmap(787494d1bc165729).(pixmap_rect.topLeftcxx . . $ QRect#topLeft(d9aead42ba53cd9b).(), background_pixmap_cxx . . $ Core/Internal/FancyTabWidget#background_pixmap_., source_rect);
546 pixmap_rect.moveTopcxx . . $ QRect#moveTop(f349c77f591a7878).(pixmap_rect.bottomcxx . . $ QRect#bottom(ea6fe5115c70a13f).() - 10);
547 }
548 }
549
550 painter.setPencxx . . $ QPainter#setPen(129a55e114526ad3).(Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::borderColorcxx . . $ Utils/StyleHelper#borderColor(9d1fd1d8b71bb60d).());
551 painter.drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.topRightcxx . . $ QRect#topRight(d9aead42ba53cd9b).(), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).());
552
553 QColorcxx . . $ QColor# light = Utilscxx . . $ Utils/::StyleHelpercxx . . $ Utils/StyleHelper#::sidebarHighlightcxx . . $ Utils/StyleHelper#sidebarHighlight(f5857e16334315e5).();
554 painter.setPencxx . . $ QPainter#setPen(129a55e114526ad3).(light);
555 painter.drawLinecxx . . $ QPainter#drawLine(1c04991299834bae).(rect.bottomLeftcxx . . $ QRect#bottomLeft(d9aead42ba53cd9b).(), rect.bottomRightcxx . . $ QRect#bottomRight(d9aead42ba53cd9b).());
556 }
557
558 int FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::current_indexcxx . . $ Core/Internal/FancyTabWidget#current_index(455f465bc33b4cdf).() const {
559 return stack_cxx . . $ Core/Internal/FancyTabWidget#stack_.->currentIndexcxx . . $ QStackedLayout#currentIndex(455f465bc33b4cdf).();
560 }
561
562 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::SetCurrentIndexcxx . . $ Core/Internal/FancyTabWidget#SetCurrentIndex(d4f767463ce0a6b3).(int index) {
563 if (FancyTabBarcxx . . $ Core/Internal/FancyTabBar#* bar = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<FancyTabBarcxx . . $ Core/Internal/FancyTabBar#*>(tab_bar_cxx . . $ Core/Internal/FancyTabWidget#tab_bar_.)) {
564 bar->setCurrentIndexcxx . . $ Core/Internal/FancyTabBar#setCurrentIndex(d4f767463ce0a6b3).(index);
565 } else if (QTabBarcxx . . $ QTabBar#* bar = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<QTabBarcxx . . $ QTabBar#*>(tab_bar_cxx . . $ Core/Internal/FancyTabWidget#tab_bar_.)) {
566 bar->setCurrentIndexcxx . . $ QTabBar#setCurrentIndex(d4f767463ce0a6b3).(index);
567 } else {
568 stack_cxx . . $ Core/Internal/FancyTabWidget#stack_.->setCurrentIndexcxx . . $ QStackedLayout#setCurrentIndex(d4f767463ce0a6b3).(index);
569 }
570 }
571
572 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::ShowWidgetcxx . . $ Core/Internal/FancyTabWidget#ShowWidget(d4f767463ce0a6b3).(int index) {
573 stack_cxx . . $ Core/Internal/FancyTabWidget#stack_.->setCurrentIndexcxx . . $ QStackedLayout#setCurrentIndex(d4f767463ce0a6b3).(index);
574 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! CurrentChangedcxx . . $ Core/Internal/FancyTabWidget#CurrentChanged(d4f767463ce0a6b3).(index);
575 }
576
577 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::AddBottomWidgetcxx . . $ Core/Internal/FancyTabWidget#AddBottomWidget(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* widget) {
578 top_layout_cxx . . $ Core/Internal/FancyTabWidget#top_layout_.->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(widget);
579 }
580
581 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::SetModecxx . . $ Core/Internal/FancyTabWidget#SetMode(dfd2534392596d8d).(Modecxx . . $ Core/Internal/FancyTabWidget#Mode# mode) {
582 // Remove previous tab bar
583 delete tab_bar_cxx . . $ Core/Internal/FancyTabWidget#tab_bar_.;
584 tab_bar_cxx . . $ Core/Internal/FancyTabWidget#tab_bar_. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
585
586 use_background_cxx . . $ Core/Internal/FancyTabWidget#use_background_. = false;
587
588 // Create new tab bar
589 switch (mode) {
590 case Mode_Nonecxx . . $ Core/Internal/FancyTabWidget#Mode_None.:
591 default:
592 qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Unknown fancy tab mode" <<cxx . . $ QDebug#`operator<<`(6e3b7ae53f380c3). mode;
593 // fallthrough
594
595 case Mode_LargeSidebarcxx . . $ Core/Internal/FancyTabWidget#Mode_LargeSidebar.: {
596 FancyTabBarcxx . . $ Core/Internal/FancyTabBar#* bar = new FancyTabBarcxx . . $ Core/Internal/FancyTabBar#(this);
597 side_layout_cxx . . $ Core/Internal/FancyTabWidget#side_layout_.->insertWidgetcxx . . $ QBoxLayout#insertWidget(7be466a1409c23e).(0, bar);
598 tab_bar_cxx . . $ Core/Internal/FancyTabWidget#tab_bar_. = bar;
599
600 foreachcxx . . $ `<external>/15045578679651060896/qglobal.h:1145:13`! (const Item& item, items_) {
601 if (item.type_cxx . . $ Core/Internal/FancyTabWidget#Item#type_. == Itemcxx . . $ Core/Internal/FancyTabWidget#Item#::Type_Spacercxx . . $ Core/Internal/FancyTabWidget#Item#Type_Spacer.)
602 bar->addSpacercxx . . $ Core/Internal/FancyTabBar#addSpacer(d4f767463ce0a6b3).(item.spacer_size_cxx . . $ Core/Internal/FancyTabWidget#Item#spacer_size_.);
603 else
604 bar->addTabcxx . . $ Core/Internal/FancyTabBar#addTab(8d594714bb74b0ab).(item.tab_icon_cxx . . $ Core/Internal/FancyTabWidget#Item#tab_icon_., item.tab_label_cxx . . $ Core/Internal/FancyTabWidget#Item#tab_label_.);
605 }
606
607 bar->setCurrentIndexcxx . . $ Core/Internal/FancyTabBar#setCurrentIndex(d4f767463ce0a6b3).(stack_cxx . . $ Core/Internal/FancyTabWidget#stack_.->currentIndexcxx . . $ QStackedLayout#currentIndex(455f465bc33b4cdf).());
608 connectcxx . . $ QObject#connect(f4332061c7e4ca89).(bar, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(currentChanged(int)), SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(ShowWidget(int)));
609
610 use_background_cxx . . $ Core/Internal/FancyTabWidget#use_background_. = true;
611
612 break;
613 }
614
615 case Mode_Tabscxx . . $ Core/Internal/FancyTabWidget#Mode_Tabs.:
616 MakeTabBarcxx . . $ Core/Internal/FancyTabWidget#MakeTabBar(232105a539837f0d).(QTabBarcxx . . $ QTabBar#::RoundedNorthcxx . . $ QTabBar#RoundedNorth., true, false, false);
617 break;
618
619 case Mode_IconOnlyTabscxx . . $ Core/Internal/FancyTabWidget#Mode_IconOnlyTabs.:
620 MakeTabBarcxx . . $ Core/Internal/FancyTabWidget#MakeTabBar(232105a539837f0d).(QTabBarcxx . . $ QTabBar#::RoundedNorthcxx . . $ QTabBar#RoundedNorth., false, true, false);
621 break;
622
623 case Mode_SmallSidebarcxx . . $ Core/Internal/FancyTabWidget#Mode_SmallSidebar.:
624 MakeTabBarcxx . . $ Core/Internal/FancyTabWidget#MakeTabBar(232105a539837f0d).(QTabBarcxx . . $ QTabBar#::RoundedWestcxx . . $ QTabBar#RoundedWest., true, true, true);
625 use_background_cxx . . $ Core/Internal/FancyTabWidget#use_background_. = true;
626 break;
627
628 case Mode_PlainSidebarcxx . . $ Core/Internal/FancyTabWidget#Mode_PlainSidebar.:
629 MakeTabBarcxx . . $ Core/Internal/FancyTabWidget#MakeTabBar(232105a539837f0d).(QTabBarcxx . . $ QTabBar#::RoundedWestcxx . . $ QTabBar#RoundedWest., true, true, false);
630 break;
631 }
632
633 tab_bar_cxx . . $ Core/Internal/FancyTabWidget#tab_bar_.->setSizePolicycxx . . $ QWidget#setSizePolicy(457db7fe1842b3dc).(QSizePolicycxx . . $ QSizePolicy#::Preferredcxx . . $ QSizePolicy#Preferred., QSizePolicycxx . . $ QSizePolicy#::Preferredcxx . . $ QSizePolicy#Preferred.);
634
635 mode_cxx . . $ Core/Internal/FancyTabWidget#mode_. = mode;
636 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! ModeChangedcxx . . $ Core/Internal/FancyTabWidget#ModeChanged(dfd2534392596d8d).(mode);
637 updatecxx . . $ QWidget#update(49f6e7a06ebc5aa8).();
638 }
639
640 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::contextMenuEventcxx . . $ Core/Internal/FancyTabWidget#contextMenuEvent(ebb2569a74e11126).(QContextMenuEventcxx . . $ QContextMenuEvent#* e) {
641 if (!menu_cxx . . $ Core/Internal/FancyTabWidget#menu_.) {
642 menu_cxx . . $ Core/Internal/FancyTabWidget#menu_. = new QMenucxx . . $ QMenu#QMenu(108f35f7aa7f3cf9).(this);
643
644 QSignalMappercxx . . $ QSignalMapper#* mapper = new QSignalMappercxx . . $ QSignalMapper#QSignalMapper(749de1b6ae65bddd).(this);
645 QActionGroupcxx . . $ QActionGroup#* group = new QActionGroupcxx . . $ QActionGroup#QActionGroup(749de1b6ae65bddd).(this);
646 AddMenuItemcxx . . $ Core/Internal/FancyTabWidget#AddMenuItem(c323779ba22a3bb3).(mapper, group, trcxx . . $ Core/Internal/FancyTabWidget#tr(75d9f1c324b4579d).("Large sidebar"), Mode_LargeSidebarcxx . . $ Core/Internal/FancyTabWidget#Mode_LargeSidebar.);
647 AddMenuItemcxx . . $ Core/Internal/FancyTabWidget#AddMenuItem(c323779ba22a3bb3).(mapper, group, trcxx . . $ Core/Internal/FancyTabWidget#tr(75d9f1c324b4579d).("Small sidebar"), Mode_SmallSidebarcxx . . $ Core/Internal/FancyTabWidget#Mode_SmallSidebar.);
648 AddMenuItemcxx . . $ Core/Internal/FancyTabWidget#AddMenuItem(c323779ba22a3bb3).(mapper, group, trcxx . . $ Core/Internal/FancyTabWidget#tr(75d9f1c324b4579d).("Plain sidebar"), Mode_PlainSidebarcxx . . $ Core/Internal/FancyTabWidget#Mode_PlainSidebar.);
649 AddMenuItemcxx . . $ Core/Internal/FancyTabWidget#AddMenuItem(c323779ba22a3bb3).(mapper, group, trcxx . . $ Core/Internal/FancyTabWidget#tr(75d9f1c324b4579d).("Tabs on top"), Mode_Tabscxx . . $ Core/Internal/FancyTabWidget#Mode_Tabs.);
650 AddMenuItemcxx . . $ Core/Internal/FancyTabWidget#AddMenuItem(c323779ba22a3bb3).(mapper, group, trcxx . . $ Core/Internal/FancyTabWidget#tr(75d9f1c324b4579d).("Icons on top"), Mode_IconOnlyTabscxx . . $ Core/Internal/FancyTabWidget#Mode_IconOnlyTabs.);
651 menu_cxx . . $ Core/Internal/FancyTabWidget#menu_.->addActionscxx . . $ QWidget#addActions(b5518ac558724ab9).(group->actionscxx . . $ QActionGroup#actions(6326ecb0baf05155).());
652
653 connectcxx . . $ QObject#connect(f4332061c7e4ca89).(mapper, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(mapped(int)), SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(SetMode(int)));
654 }
655
656 menu_cxx . . $ Core/Internal/FancyTabWidget#menu_.->popupcxx . . $ QMenu#popup(371d674a5bfc952e).(e->globalPoscxx . . $ QContextMenuEvent#globalPos(6de9f7a200ca710c).());
657 }
658
659 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::AddMenuItemcxx . . $ Core/Internal/FancyTabWidget#AddMenuItem(c323779ba22a3bb3).(QSignalMappercxx . . $ QSignalMapper#* mapper, QActionGroupcxx . . $ QActionGroup#* group,
660 const QStringcxx . . $ QString#& text, Modecxx . . $ Core/Internal/FancyTabWidget#Mode# mode) {
661 QActioncxx . . $ QAction#* action = group->addActioncxx . . $ QActionGroup#addAction(1ad47f6a39234f8e).(text);
662 action->setCheckablecxx . . $ QAction#setCheckable(b45ddcbc8423892c).(true);
663 mapper->setMappingcxx . . $ QSignalMapper#setMapping(3f47e595a91bc133).(action, mode);
664 connectcxx . . $ QObject#connect(158df1d9a01a3410).(action, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), mapper, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(map()));
665
666 if (mode == mode_cxx . . $ Core/Internal/FancyTabWidget#mode_.)
667 action->setCheckedcxx . . $ QAction#setChecked(b45ddcbc8423892c).(true);
668 }
669
670 void FancyTabWidgetcxx . . $ Core/Internal/FancyTabWidget#::MakeTabBarcxx . . $ Core/Internal/FancyTabWidget#MakeTabBar(232105a539837f0d).(QTabBarcxx . . $ QTabBar#::Shapecxx . . $ QTabBar#Shape# shape, bool text, bool icons,
671 bool fancy) {
672 QTabBarcxx . . $ QTabBar#* bar = new QTabBarcxx . . $ QTabBar#(this);
673 bar->setShapecxx . . $ QTabBar#setShape(f8a42e62528f7e8).(shape);
674 bar->setDocumentModecxx . . $ QTabBar#setDocumentMode(b45ddcbc8423892c).(true);
675 bar->setUsesScrollButtonscxx . . $ QTabBar#setUsesScrollButtons(b45ddcbc8423892c).(true);
676
677 if (shape == QTabBarcxx . . $ QTabBar#::RoundedWestcxx . . $ QTabBar#RoundedWest.) {
678 bar->setIconSizecxx . . $ QTabBar#setIconSize(1c5f201b4c2f0aba).(QSizecxx . . $ QSize#QSize(c0d38f4800714fae).(22, 22));
679 }
680
681 if (fancy) {
682 bar->setStylecxx . . $ QWidget#setStyle(bcd10a9b314ff202).(proxy_style_cxx . . $ Core/Internal/FancyTabWidget#proxy_style_..datacxx . . $ QScopedPointer#data(34d6acfd341ba7ab).());
683 }
684
685 if (shape == QTabBarcxx . . $ QTabBar#::RoundedNorthcxx . . $ QTabBar#RoundedNorth.)
686 top_layout_cxx . . $ Core/Internal/FancyTabWidget#top_layout_.->insertWidgetcxx . . $ QBoxLayout#insertWidget(7be466a1409c23e).(0, bar);
687 else
688 side_layout_cxx . . $ Core/Internal/FancyTabWidget#side_layout_.->insertWidgetcxx . . $ QBoxLayout#insertWidget(7be466a1409c23e).(0, bar);
689
690 foreachcxx . . $ `<external>/15045578679651060896/qglobal.h:1145:13`! (const Item& item, items_) {
691 if (item.type_cxx . . $ Core/Internal/FancyTabWidget#Item#type_. != Itemcxx . . $ Core/Internal/FancyTabWidget#Item#::Type_Tabcxx . . $ Core/Internal/FancyTabWidget#Item#Type_Tab.)
692 continue;
693
694 QStringcxx . . $ QString# label = itemcxx . . $ QString#QString(132dd6869045752b)..tab_label_cxx . . $ Core/Internal/FancyTabWidget#Item#tab_label_.;
695 if (shape == QTabBarcxx . . $ QTabBar#::RoundedWestcxx . . $ QTabBar#RoundedWest.) {
696 label =cxx . . $ QString#`operator=`(4f35bf974e7f8568). QFontMetricscxx . . $ QFontMetrics#QFontMetrics(d0a4bd0c8524b912).(fontcxx . . $ QWidget#font(c5040538afc47120).()).elidedTextcxx . . $ QFontMetrics#elidedText(8e070a2bf8360a7c).(label, Qtcxx . . $ Qt/::ElideMiddlecxx . . $ Qt/ElideMiddle., 100);
697 }
698
699 int tab_id = -1;
700 if (icons && text)
701 tab_id = bar->addTabcxx . . $ QTabBar#addTab(50a981a950f2ca2a).(item.tab_icon_cxx . . $ Core/Internal/FancyTabWidget#Item#tab_icon_., label);
702 else if (icons)
703 tab_id = bar->addTabcxx . . $ QTabBar#addTab(50a981a950f2ca2a).(item.tab_icon_cxx . . $ Core/Internal/FancyTabWidget#Item#tab_icon_., QStringcxx . . $ QString#QString(ced63f7c635d850d).());
704 else if (text)
705 tab_id = bar->addTabcxx . . $ QTabBar#addTab(645d6210e0be3a78).(label);
706
707 bar->setTabToolTipcxx . . $ QTabBar#setTabToolTip(4b11a7293b4ed91c).(tab_id, item.tab_label_cxx . . $ Core/Internal/FancyTabWidget#Item#tab_label_.);
708 }
709
710 bar->setCurrentIndexcxx . . $ QTabBar#setCurrentIndex(d4f767463ce0a6b3).(stack_cxx . . $ Core/Internal/FancyTabWidget#stack_.->currentIndexcxx . . $ QStackedLayout#currentIndex(455f465bc33b4cdf).());
711 connectcxx . . $ QObject#connect(f4332061c7e4ca89).(bar, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(currentChanged(int)), SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(ShowWidget(int)));
712 tab_bar_cxx . . $ Core/Internal/FancyTabWidget#tab_bar_. = bar;
713 }