mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
drop QStyleOptionTabV2 and QStyleOptionTabV3 typedefs
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
ef67586cf3
commit
f57ef4b15f
8 changed files with 9 additions and 36 deletions
|
@ -646,8 +646,6 @@ katie_generate_obsolete(QStyleOptionSlider QtGui qstyleoption.h)
|
|||
katie_generate_obsolete(QStyleOptionSpinBox QtGui qstyleoption.h)
|
||||
katie_generate_obsolete(QStyleOptionTabBarBase QtGui qstyleoption.h)
|
||||
katie_generate_obsolete(QStyleOptionTab QtGui qstyleoption.h)
|
||||
katie_generate_obsolete(QStyleOptionTabV2 QtGui qstyleoption.h)
|
||||
katie_generate_obsolete(QStyleOptionTabV3 QtGui qstyleoption.h)
|
||||
katie_generate_obsolete(QStyleOptionTabWidgetFrame QtGui qstyleoption.h)
|
||||
katie_generate_obsolete(QStyleOptionTitleBar QtGui qstyleoption.h)
|
||||
katie_generate_obsolete(QStyleOptionToolBar QtGui qstyleoption.h)
|
||||
|
|
|
@ -537,8 +537,6 @@ include/katie/QtGui/QStyleOptionSlider
|
|||
include/katie/QtGui/QStyleOptionSpinBox
|
||||
include/katie/QtGui/QStyleOptionTab
|
||||
include/katie/QtGui/QStyleOptionTabBarBase
|
||||
include/katie/QtGui/QStyleOptionTabV2
|
||||
include/katie/QtGui/QStyleOptionTabV3
|
||||
include/katie/QtGui/QStyleOptionTabWidgetFrame
|
||||
include/katie/QtGui/QStyleOptionTitleBar
|
||||
include/katie/QtGui/QStyleOptionToolBar
|
||||
|
|
|
@ -199,8 +199,6 @@ incmap = {
|
|||
'QStyleOptionSpinBox': 'qstyleoption.h',
|
||||
'QStyleOptionTab': 'qstyleoption.h',
|
||||
'QStyleOptionTabBarBase': 'qstyleoption.h',
|
||||
'QStyleOptionTabV2': 'qstyleoption.h',
|
||||
'QStyleOptionTabV3': 'qstyleoption.h',
|
||||
'QStyleOptionTabWidgetFrame': 'qstyleoption.h',
|
||||
'QStyleOptionTitleBar': 'qstyleoption.h',
|
||||
'QStyleOptionToolBar': 'qstyleoption.h',
|
||||
|
|
|
@ -423,8 +423,6 @@ classlist = [
|
|||
"QStyleOptionSpinBox",
|
||||
"QStyleOptionTab",
|
||||
"QStyleOptionTabBarBase",
|
||||
"QStyleOptionTabV2",
|
||||
"QStyleOptionTabV3",
|
||||
"QStyleOptionTabWidgetFrame",
|
||||
"QStyleOptionTitleBar",
|
||||
"QStyleOptionToolBar",
|
||||
|
|
|
@ -1175,20 +1175,6 @@ QStyleOptionToolBar::QStyleOptionToolBar(int version)
|
|||
\sa QStyleOption
|
||||
*/
|
||||
|
||||
/*!
|
||||
\typedef QStyleOptionTabV2
|
||||
\relates QStyleOptionTab
|
||||
|
||||
Synonym for QStyleOptionTab.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\typedef QStyleOptionTabV3
|
||||
\relates QStyleOptionTab
|
||||
|
||||
Synonym for QStyleOptionTab.
|
||||
*/
|
||||
|
||||
/*!
|
||||
Constructs a QStyleOptionTab object, initializing the members
|
||||
variables to their default values.
|
||||
|
|
|
@ -250,9 +250,6 @@ protected:
|
|||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionTab::CornerWidgets)
|
||||
|
||||
typedef QStyleOptionTab QStyleOptionTabV2;
|
||||
typedef QStyleOptionTab QStyleOptionTabV3;
|
||||
#endif // QT_NO_TABBAR
|
||||
|
||||
|
||||
|
|
|
@ -3897,7 +3897,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
|
|||
case CE_TabBarTabLabel:
|
||||
case CE_TabBarTabShape:
|
||||
if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
|
||||
QStyleOptionTabV3 tabCopy(*tab);
|
||||
QStyleOptionTab tabCopy(*tab);
|
||||
QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab);
|
||||
QRect r = positionRect(w, subRule, PseudoElement_TabBarTab, opt->rect, opt->direction);
|
||||
if (ce == CE_TabBarTabShape && subRule.hasDrawable()) {
|
||||
|
|
|
@ -42,10 +42,8 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
/*!
|
||||
Initialize \a option with the values from the tab at \a tabIndex. This method
|
||||
is useful for subclasses when they need a QStyleOptionTab, QStyleOptionTabV2,
|
||||
or QStyleOptionTabV3 but don't want to fill in all the information themselves.
|
||||
This function will check the version of the QStyleOptionTab and fill in the
|
||||
additional values for a QStyleOptionTabV2 and QStyleOptionTabV3.
|
||||
is useful for subclasses when they need a QStyleOptionTab but don't want to
|
||||
fill in all the information themselves.
|
||||
|
||||
\sa QStyleOption::initFrom() QTabWidget::initStyleOption()
|
||||
*/
|
||||
|
@ -482,7 +480,7 @@ void QTabBarPrivate::layoutTab(int index)
|
|||
if (!(tab.leftWidget || tab.rightWidget))
|
||||
return;
|
||||
|
||||
QStyleOptionTabV3 opt;
|
||||
QStyleOptionTab opt;
|
||||
q->initStyleOption(&opt, index);
|
||||
if (tab.leftWidget) {
|
||||
QRect rect = q->style()->subElementRect(QStyle::SE_TabBarTabLeftButton, &opt, q);
|
||||
|
@ -731,7 +729,7 @@ int QTabBar::insertTab(int index, const QIcon& icon, const QString &text)
|
|||
++d->currentIndex;
|
||||
|
||||
if (d->closeButtonOnTabs) {
|
||||
QStyleOptionTabV3 opt;
|
||||
QStyleOptionTab opt;
|
||||
initStyleOption(&opt, index);
|
||||
ButtonPosition closeSide = (ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, 0, this);
|
||||
QAbstractButton *closeButton = new CloseButton(this);
|
||||
|
@ -1219,7 +1217,7 @@ QSize QTabBar::tabSizeHint(int index) const
|
|||
//Note: this must match with the computations in QCommonStylePrivate::tabLayout
|
||||
Q_D(const QTabBar);
|
||||
if (const QTabBarPrivate::Tab *tab = d->at(index)) {
|
||||
QStyleOptionTabV3 opt;
|
||||
QStyleOptionTab opt;
|
||||
initStyleOption(&opt, index);
|
||||
opt.text = d->tabList.at(index).text;
|
||||
QSize iconSize = tab->icon.isNull() ? QSize(0, 0) : opt.iconSize;
|
||||
|
@ -1411,7 +1409,7 @@ void QTabBar::paintEvent(QPaintEvent *)
|
|||
p.drawPrimitive(QStyle::PE_FrameTabBarBase, optTabBase);
|
||||
|
||||
for (int i = 0; i < d->tabList.count(); ++i) {
|
||||
QStyleOptionTabV3 tab;
|
||||
QStyleOptionTab tab;
|
||||
initStyleOption(&tab, i);
|
||||
if (d->paintWithOffsets && d->tabList[i].dragOffset != 0) {
|
||||
if (vertical) {
|
||||
|
@ -1444,7 +1442,7 @@ void QTabBar::paintEvent(QPaintEvent *)
|
|||
|
||||
// Draw the selected tab last to get it "on top"
|
||||
if (selected >= 0) {
|
||||
QStyleOptionTabV3 tab;
|
||||
QStyleOptionTab tab;
|
||||
initStyleOption(&tab, selected);
|
||||
if (d->paintWithOffsets && d->tabList[selected].dragOffset != 0) {
|
||||
if (vertical)
|
||||
|
@ -1714,7 +1712,7 @@ void QTabBarPrivate::setupMovableTab()
|
|||
QStylePainter p(&grabImage, q);
|
||||
p.initFrom(q);
|
||||
|
||||
QStyleOptionTabV3 tab;
|
||||
QStyleOptionTab tab;
|
||||
q->initStyleOption(&tab, pressedIndex);
|
||||
tab.rect.moveTopLeft(QPoint(taboverlap, 0));
|
||||
p.drawControl(QStyle::CE_TabBarTab, tab);
|
||||
|
|
Loading…
Add table
Reference in a new issue