Convert features.tabwidget to QT_[REQUIRE_]CONFIG
Change-Id: Iab985564fd2069188df01f8ff3e00add86eb86f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>bb10
parent
16f375f549
commit
4d70a501db
|
|
@ -108,7 +108,9 @@
|
|||
#include "private/qgesturemanager_p.h"
|
||||
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
#if QT_CONFIG(tabwidget)
|
||||
#include "qtabwidget.h" // Needed in inTabWidget()
|
||||
#endif
|
||||
#endif // QT_KEYPAD_NAVIGATION
|
||||
|
||||
#include "qwindowcontainer_p.h"
|
||||
|
|
|
|||
|
|
@ -68,7 +68,9 @@
|
|||
#include <qslider.h>
|
||||
#include <qstyleoption.h>
|
||||
#include <qtabbar.h>
|
||||
#if QT_CONFIG(tabwidget)
|
||||
#include <qtabwidget.h>
|
||||
#endif
|
||||
#include <qtoolbar.h>
|
||||
#include <qtoolbutton.h>
|
||||
#if QT_CONFIG(rubberband)
|
||||
|
|
@ -2566,7 +2568,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
|||
r = subElementRect(SE_CheckBoxFocusRect, opt, widget);
|
||||
r |= subElementRect(SE_CheckBoxIndicator, opt, widget);
|
||||
break;
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
case SE_TabWidgetTabBar:
|
||||
if (const QStyleOptionTabWidgetFrame *twf
|
||||
= qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) {
|
||||
|
|
@ -2808,7 +2810,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
|||
}
|
||||
|
||||
break;
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
#ifndef QT_NO_TABBAR
|
||||
case SE_TabBarTearIndicator:
|
||||
if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
|
||||
|
|
@ -5179,7 +5181,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
|
|||
case SH_FocusFrame_AboveWidget:
|
||||
ret = false;
|
||||
break;
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
case SH_TabWidget_DefaultTabPosition:
|
||||
ret = QTabWidget::North;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -2893,7 +2893,7 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
|
|||
ret = Qt::AlignRight;
|
||||
break;
|
||||
case SH_TabBar_Alignment: {
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
if (const QTabWidget *tab = qobject_cast<const QTabWidget*>(w)) {
|
||||
if (tab->documentMode()) {
|
||||
ret = Qt::AlignLeft;
|
||||
|
|
@ -3560,7 +3560,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
|
|||
}
|
||||
|
||||
break;
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
case PE_FrameTabWidget:
|
||||
if (const QStyleOptionTabWidgetFrame *twf
|
||||
= qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) {
|
||||
|
|
@ -4934,7 +4934,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
|||
int(outRect.size.height));
|
||||
break;
|
||||
}
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
case SE_TabWidgetLeftCorner:
|
||||
if (const QStyleOptionTabWidgetFrame *twf
|
||||
= qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) {
|
||||
|
|
@ -5211,7 +5211,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
|||
}
|
||||
rect.setBottom(rect.bottom() - 1);
|
||||
break;
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
case SE_TabWidgetLayoutItem:
|
||||
if (const QStyleOptionTabWidgetFrame *tabWidgetOpt =
|
||||
qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) {
|
||||
|
|
@ -6645,7 +6645,7 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
|
|||
* overlap is how much the pane should overlap the tab bar
|
||||
*/
|
||||
// then add the size between the stackwidget and the "contentsRect"
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
if (const QStyleOptionTabWidgetFrame *twf
|
||||
= qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) {
|
||||
QSize extra(0,0);
|
||||
|
|
|
|||
|
|
@ -3290,7 +3290,7 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
|
|||
Returns a T or 0 depending on the type of the given \a option.
|
||||
*/
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
/*!
|
||||
\class QStyleOptionTabWidgetFrame
|
||||
\brief The QStyleOptionTabWidgetFrame class is used to describe the
|
||||
|
|
@ -3434,7 +3434,7 @@ QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame(int version)
|
|||
and the height set to 0.
|
||||
*/
|
||||
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
#ifndef QT_NO_TABBAR
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@
|
|||
#include <QtWidgets/qslider.h>
|
||||
#include <QtWidgets/qstyle.h>
|
||||
#include <QtWidgets/qtabbar.h>
|
||||
#if QT_CONFIG(tabwidget)
|
||||
#include <QtWidgets/qtabwidget.h>
|
||||
#endif
|
||||
#if QT_CONFIG(rubberband)
|
||||
#include <QtWidgets/qrubberband.h>
|
||||
#endif
|
||||
|
|
@ -143,7 +145,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionFrame::FrameFeatures)
|
|||
typedef Q_DECL_DEPRECATED QStyleOptionFrame QStyleOptionFrameV2;
|
||||
typedef Q_DECL_DEPRECATED QStyleOptionFrame QStyleOptionFrameV3;
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
class Q_WIDGETS_EXPORT QStyleOptionTabWidgetFrame : public QStyleOption
|
||||
{
|
||||
public:
|
||||
|
|
@ -168,7 +170,7 @@ protected:
|
|||
};
|
||||
|
||||
typedef Q_DECL_DEPRECATED QStyleOptionTabWidgetFrame QStyleOptionTabWidgetFrameV2;
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
|
||||
#ifndef QT_NO_TABBAR
|
||||
|
|
|
|||
|
|
@ -1887,7 +1887,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
|
|||
extraClass |= PseudoClass_NextSelected;
|
||||
else if (hdr->selectedPosition == QStyleOptionHeader::PreviousIsSelected)
|
||||
extraClass |= PseudoClass_PreviousSelected;
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
} else if (const QStyleOptionTabWidgetFrame *tab = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) {
|
||||
switch (tab->shape) {
|
||||
case QTabBar::RoundedNorth:
|
||||
|
|
@ -4479,7 +4479,7 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
|
|||
rule.drawBorder(p, opt->rect);
|
||||
return;
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
case PE_FrameTabWidget:
|
||||
if (const QStyleOptionTabWidgetFrame *frm = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) {
|
||||
QRenderRule subRule = renderRule(w, opt, PseudoElement_TabWidgetPane);
|
||||
|
|
@ -4494,7 +4494,7 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
|
|||
return;
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
case PE_IndicatorProgressChunk:
|
||||
pseudoElement = PseudoElement_ProgressBarChunk;
|
||||
|
|
@ -4792,7 +4792,7 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const
|
|||
}
|
||||
break;
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
case PM_TabBarTabHSpace:
|
||||
case PM_TabBarTabVSpace:
|
||||
subRule = renderRule(w, opt, PseudoElement_TabBarTab);
|
||||
|
|
@ -4825,7 +4825,7 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
case PM_SliderThickness: // horizontal slider's height (sizeHint)
|
||||
case PM_SliderLength: // minimum length of slider
|
||||
|
|
@ -5277,13 +5277,13 @@ int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWi
|
|||
case SH_ScrollBar_RollBetweenButtons: s = QLatin1String("scrollbar-roll-between-buttons"); break;
|
||||
case SH_ScrollBar_ScrollWhenPointerLeavesControl: s = QLatin1String("scrollbar-scroll-when-pointer-leaves-control"); break;
|
||||
case SH_TabBar_Alignment:
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
if (qobject_cast<const QTabWidget *>(w)) {
|
||||
rule = renderRule(w, opt, PseudoElement_TabWidgetTabBar);
|
||||
if (rule.hasPosition())
|
||||
return rule.position()->position;
|
||||
}
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
s = QLatin1String("alignment");
|
||||
break;
|
||||
#ifndef QT_NO_TABBAR
|
||||
|
|
|
|||
|
|
@ -1038,7 +1038,7 @@ void QMainWindow::setDocumentMode(bool enabled)
|
|||
}
|
||||
#endif // QT_NO_TABBAR
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
/*!
|
||||
\property QMainWindow::tabShape
|
||||
\brief the tab shape used for tabbed dock widgets.
|
||||
|
|
@ -1090,7 +1090,7 @@ void QMainWindow::setTabPosition(Qt::DockWidgetAreas areas, QTabWidget::TabPosit
|
|||
{
|
||||
d_func()->layout->setTabPosition(areas, tabPosition);
|
||||
}
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
/*!
|
||||
Adds the given \a dockwidget to the specified \a area.
|
||||
|
|
|
|||
|
|
@ -42,7 +42,9 @@
|
|||
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <QtWidgets/qwidget.h>
|
||||
#if QT_CONFIG(tabwidget)
|
||||
#include <QtWidgets/qtabwidget.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -67,9 +69,9 @@ class Q_WIDGETS_EXPORT QMainWindow : public QWidget
|
|||
#ifndef QT_NO_TABBAR
|
||||
Q_PROPERTY(bool documentMode READ documentMode WRITE setDocumentMode)
|
||||
#endif // QT_NO_TABBAR
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
Q_PROPERTY(QTabWidget::TabShape tabShape READ tabShape WRITE setTabShape)
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
Q_PROPERTY(bool dockNestingEnabled READ isDockNestingEnabled WRITE setDockNestingEnabled)
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
Q_PROPERTY(DockOptions dockOptions READ dockOptions WRITE setDockOptions)
|
||||
|
|
@ -109,12 +111,12 @@ public:
|
|||
void setDocumentMode(bool enabled);
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
QTabWidget::TabShape tabShape() const;
|
||||
void setTabShape(QTabWidget::TabShape tabShape);
|
||||
QTabWidget::TabPosition tabPosition(Qt::DockWidgetArea area) const;
|
||||
void setTabPosition(Qt::DockWidgetAreas areas, QTabWidget::TabPosition tabPosition);
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
void setDockOptions(DockOptions options);
|
||||
DockOptions dockOptions() const;
|
||||
|
|
|
|||
|
|
@ -1477,7 +1477,7 @@ void QMainWindowLayout::setVerticalTabsEnabled(bool enabled)
|
|||
#endif // QT_NO_TABBAR
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
QTabWidget::TabShape QMainWindowLayout::tabShape() const
|
||||
{
|
||||
return _tabShape;
|
||||
|
|
@ -1533,12 +1533,12 @@ static inline QTabBar::Shape tabBarShapeFrom(QTabWidget::TabShape shape, QTabWid
|
|||
return rounded ? QTabBar::RoundedWest : QTabBar::TriangularWest;
|
||||
return QTabBar::RoundedNorth;
|
||||
}
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
#ifndef QT_NO_TABBAR
|
||||
void QMainWindowLayout::updateTabBarShapes()
|
||||
{
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
const QTabWidget::TabPosition vertical[] = {
|
||||
QTabWidget::West,
|
||||
QTabWidget::East,
|
||||
|
|
@ -1557,7 +1557,7 @@ void QMainWindowLayout::updateTabBarShapes()
|
|||
QDockAreaLayout &layout = layoutState.dockAreaLayout;
|
||||
|
||||
for (int i = 0; i < QInternal::DockCount; ++i) {
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
QTabWidget::TabPosition pos = verticalTabsEnabled ? vertical[i] : tabPositions[i];
|
||||
QTabBar::Shape shape = tabBarShapeFrom(_tabShape, pos);
|
||||
#else
|
||||
|
|
@ -2267,7 +2267,7 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLay
|
|||
#ifndef QT_NO_TABBAR
|
||||
, _documentMode(false)
|
||||
, verticalTabsEnabled(false)
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
, _tabShape(QTabWidget::Rounded)
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -2286,7 +2286,7 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLay
|
|||
sep = mainwindow->style()->pixelMetric(QStyle::PM_DockWidgetSeparatorExtent, 0, mainwindow);
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
for (int i = 0; i < QInternal::DockCount; ++i)
|
||||
tabPositions[i] = QTabWidget::South;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ public:
|
|||
QList<QWidget*> unusedSeparatorWidgets;
|
||||
int sep; // separator extent
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
QTabWidget::TabPosition tabPositions[4];
|
||||
QTabWidget::TabShape _tabShape;
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ public:
|
|||
void setTabPosition(Qt::DockWidgetAreas areas, QTabWidget::TabPosition tabPosition);
|
||||
|
||||
QDockWidgetGroupWindow *createTabbedDockWindow();
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
#endif // QT_NO_TABBAR
|
||||
|
||||
// separators
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ static inline QMdiArea *mdiAreaParent(QWidget *widget)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
static inline QTabBar::Shape tabBarShapeFrom(QTabWidget::TabShape shape, QTabWidget::TabPosition position)
|
||||
{
|
||||
const bool rounded = (shape == QTabWidget::Rounded);
|
||||
|
|
@ -271,7 +271,7 @@ static inline QTabBar::Shape tabBarShapeFrom(QTabWidget::TabShape shape, QTabWid
|
|||
return rounded ? QTabBar::RoundedWest : QTabBar::TriangularWest;
|
||||
return QTabBar::RoundedNorth;
|
||||
}
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
static inline QString tabTextFor(QMdiSubWindow *subWindow)
|
||||
{
|
||||
|
|
@ -685,7 +685,7 @@ QMdiAreaPrivate::QMdiAreaPrivate()
|
|||
tabsClosable(false),
|
||||
tabsMovable(false),
|
||||
#endif
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
tabShape(QTabWidget::Rounded),
|
||||
tabPosition(QTabWidget::North),
|
||||
#endif
|
||||
|
|
@ -1570,7 +1570,7 @@ void QMdiAreaPrivate::setViewMode(QMdiArea::ViewMode mode)
|
|||
tabBar->setDocumentMode(documentMode);
|
||||
tabBar->setTabsClosable(tabsClosable);
|
||||
tabBar->setMovable(tabsMovable);
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
tabBar->setShape(tabBarShapeFrom(tabShape, tabPosition));
|
||||
#endif
|
||||
|
||||
|
|
@ -1634,7 +1634,7 @@ void QMdiAreaPrivate::updateTabBarGeometry()
|
|||
return;
|
||||
|
||||
Q_Q(QMdiArea);
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
Q_ASSERT(tabBarShapeFrom(tabShape, tabPosition) == tabBar->shape());
|
||||
#endif
|
||||
const QSize tabBarSizeHint = tabBar->sizeHint();
|
||||
|
|
@ -1648,7 +1648,7 @@ void QMdiAreaPrivate::updateTabBarGeometry()
|
|||
areaWidth -= vbar->width();
|
||||
|
||||
QRect tabBarRect;
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
switch (tabPosition) {
|
||||
case QTabWidget::North:
|
||||
q->setViewportMargins(0, tabBarSizeHint.height(), 0, 0);
|
||||
|
|
@ -1675,7 +1675,7 @@ void QMdiAreaPrivate::updateTabBarGeometry()
|
|||
default:
|
||||
break;
|
||||
}
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
tabBar->setGeometry(QStyle::visualRect(q->layoutDirection(), q->contentsRect(), tabBarRect));
|
||||
}
|
||||
|
|
@ -1691,7 +1691,7 @@ void QMdiAreaPrivate::refreshTabBar()
|
|||
tabBar->setDocumentMode(documentMode);
|
||||
tabBar->setTabsClosable(tabsClosable);
|
||||
tabBar->setMovable(tabsMovable);
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
tabBar->setShape(tabBarShapeFrom(tabShape, tabPosition));
|
||||
#endif
|
||||
updateTabBarGeometry();
|
||||
|
|
@ -2218,7 +2218,7 @@ void QMdiArea::setTabsMovable(bool movable)
|
|||
}
|
||||
#endif // QT_NO_TABBAR
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
/*!
|
||||
\property QMdiArea::tabShape
|
||||
\brief the shape of the tabs in tabbed view mode.
|
||||
|
|
@ -2270,7 +2270,7 @@ void QMdiArea::setTabPosition(QTabWidget::TabPosition position)
|
|||
d->tabPosition = position;
|
||||
d->refreshTabBar();
|
||||
}
|
||||
#endif // QT_NO_TABWIDGET
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
/*!
|
||||
\reimp
|
||||
|
|
|
|||
|
|
@ -42,7 +42,9 @@
|
|||
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <QtWidgets/qabstractscrollarea.h>
|
||||
#if QT_CONFIG(tabwidget)
|
||||
#include <QtWidgets/qtabwidget.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -63,7 +65,7 @@ class Q_WIDGETS_EXPORT QMdiArea : public QAbstractScrollArea
|
|||
Q_PROPERTY(bool tabsClosable READ tabsClosable WRITE setTabsClosable)
|
||||
Q_PROPERTY(bool tabsMovable READ tabsMovable WRITE setTabsMovable)
|
||||
#endif
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
Q_PROPERTY(QTabWidget::TabShape tabShape READ tabShape WRITE setTabShape)
|
||||
Q_PROPERTY(QTabWidget::TabPosition tabPosition READ tabPosition WRITE setTabPosition)
|
||||
#endif
|
||||
|
|
@ -121,7 +123,7 @@ public:
|
|||
void setTabsMovable(bool movable);
|
||||
bool tabsMovable() const;
|
||||
#endif
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
void setTabShape(QTabWidget::TabShape shape);
|
||||
QTabWidget::TabShape tabShape() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ public:
|
|||
bool tabsClosable;
|
||||
bool tabsMovable;
|
||||
#endif
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
QTabWidget::TabShape tabShape;
|
||||
QTabWidget::TabPosition tabPosition;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -49,7 +49,9 @@
|
|||
#include "qstyle.h"
|
||||
#include "qstyleoption.h"
|
||||
#include "qstylepainter.h"
|
||||
#if QT_CONFIG(tabwidget)
|
||||
#include "qtabwidget.h"
|
||||
#endif
|
||||
#include "qtooltip.h"
|
||||
#if QT_CONFIG(whatsthis)
|
||||
#include "qwhatsthis.h"
|
||||
|
|
@ -207,7 +209,7 @@ void QTabBarPrivate::initBasicStyleOption(QStyleOptionTab *option, int tabIndex)
|
|||
option->position = QStyleOptionTab::Middle;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#if QT_CONFIG(tabwidget)
|
||||
if (const QTabWidget *tw = qobject_cast<const QTabWidget *>(q->parentWidget())) {
|
||||
option->features |= QStyleOptionTab::HasFrame;
|
||||
if (tw->cornerWidget(Qt::TopLeftCorner) || tw->cornerWidget(Qt::BottomLeftCorner))
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
#include "qtabwidget.h"
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
#include "private/qwidget_p.h"
|
||||
#include "private/qtabbar_p.h"
|
||||
#include "qapplication.h"
|
||||
|
|
@ -1375,5 +1374,3 @@ void QTabWidget::clear()
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qtabwidget.cpp"
|
||||
|
||||
#endif //QT_NO_TABWIDGET
|
||||
|
|
|
|||
|
|
@ -44,11 +44,10 @@
|
|||
#include <QtWidgets/qwidget.h>
|
||||
#include <QtGui/qicon.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(tabwidget);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_TABWIDGET
|
||||
|
||||
class QTabBar;
|
||||
class QTabWidgetPrivate;
|
||||
class QStyleOptionTabWidgetFrame;
|
||||
|
|
@ -181,8 +180,6 @@ private:
|
|||
void setUpLayout(bool = false);
|
||||
};
|
||||
|
||||
#endif // QT_NO_TABWIDGET
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QTABWIDGET_H
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ HEADERS += \
|
|||
widgets/qstatusbar.h \
|
||||
widgets/qtabbar.h \
|
||||
widgets/qtabbar_p.h \
|
||||
widgets/qtabwidget.h \
|
||||
widgets/qtextedit.h \
|
||||
widgets/qtextedit_p.h \
|
||||
widgets/qtextbrowser.h \
|
||||
|
|
@ -88,7 +87,6 @@ SOURCES += \
|
|||
widgets/qstackedwidget.cpp \
|
||||
widgets/qstatusbar.cpp \
|
||||
widgets/qtabbar.cpp \
|
||||
widgets/qtabwidget.cpp \
|
||||
widgets/qtextedit.cpp \
|
||||
widgets/qtextbrowser.cpp \
|
||||
widgets/qtoolbar.cpp \
|
||||
|
|
@ -222,6 +220,11 @@ qtConfig(splashscreen) {
|
|||
widgets/qsplashscreen.cpp
|
||||
}
|
||||
|
||||
qtConfig(tabwidget) {
|
||||
HEADERS += widgets/qtabwidget.h
|
||||
SOURCES += widgets/qtabwidget.cpp
|
||||
}
|
||||
|
||||
qtConfig(widgettextcontrol) {
|
||||
HEADERS += \
|
||||
widgets/qwidgettextcontrol_p.h \
|
||||
|
|
|
|||
Loading…
Reference in New Issue