[docs] widgets: remove remaining references to QStyleOption*V<N>

They are all obsolete since Qt 5.0.

Change-Id: Ie56b99ad470fddb87f277f3f4f3845764828d10a
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
This commit is contained in:
Marc Mutz 2015-11-02 15:40:58 +01:00
parent 595d6797be
commit d2bb036d50
2 changed files with 14 additions and 21 deletions

View File

@ -236,9 +236,8 @@ void JavaStyle::drawControl(ControlElement control, const QStyleOption *option,
break;
}
case CE_DockWidgetTitle: {
const QStyleOptionDockWidgetV2 *docker =
new QStyleOptionDockWidgetV2(
*qstyleoption_cast<const QStyleOptionDockWidget *>(option));
const QStyleOptionDockWidget *docker =
qstyleoption_cast<const QStyleOptionDockWidget *>(option);
QRect rect = docker->rect;
QRect titleRect = rect;
@ -366,11 +365,9 @@ void JavaStyle::drawControl(ControlElement control, const QStyleOption *option,
break;
}
case CE_ProgressBar: {
const QStyleOptionProgressBar *bar1 =
const QStyleOptionProgressBar *bar =
qstyleoption_cast<const QStyleOptionProgressBar *>(option);
QStyleOptionProgressBarV2 *bar = new QStyleOptionProgressBarV2(*bar1);
QRect rect = bar->rect;
if (bar->orientation == Qt::Vertical) {
rect = QRect(rect.left(), rect.top(), rect.height(), rect.width());
@ -416,7 +413,6 @@ void JavaStyle::drawControl(ControlElement control, const QStyleOption *option,
if (bar->textVisible)
drawControl(CE_ProgressBarLabel, &subBar, painter, widget);
delete bar;
break;
}
case CE_ProgressBarGroove: {
@ -2366,18 +2362,17 @@ void JavaStyle::drawPrimitive(PrimitiveElement element,
case PE_FrameLineEdit: {
const QStyleOptionFrame *frame =
qstyleoption_cast<const QStyleOptionFrame *>(option);
const QStyleOptionFrameV2 frameV2(*frame);
painter->setPen(frame->palette.color(QPalette::Mid));
painter->drawRect(frameV2.rect.adjusted(0, 0, -2, -2));
painter->drawRect(frame->rect.adjusted(0, 0, -2, -2));
painter->setPen(Qt::white);
painter->drawRect(frameV2.rect.adjusted(1, 1, -1, -1));
painter->setPen(frameV2.palette.color(QPalette::Active,
painter->drawRect(frame->rect.adjusted(1, 1, -1, -1));
painter->setPen(frame->palette.color(QPalette::Active,
QPalette::Background));
painter->drawLine(frameV2.rect.bottomLeft(),
frameV2.rect.bottomLeft() + QPoint(1, -1));
painter->drawLine(frameV2.rect.topRight(),
frameV2.rect.topRight() + QPoint(-1, 1));
painter->drawLine(frame->rect.bottomLeft(),
frame->rect.bottomLeft() + QPoint(1, -1));
painter->drawLine(frame->rect.topRight(),
frame->rect.topRight() + QPoint(-1, 1));
break;
}
case PE_FrameFocusRect: {

View File

@ -989,9 +989,7 @@
The style option for tabs (QStyleOptionTab) contains the necessary
information for drawing tabs. The option contains the position of
the tab in the tab bar, the position of the selected tab, the
shape of the tab, the text, and the icon. After Qt 4.1, the option
should be cast to a QStyleOptionTabV2, which also contains the
icon's size.
shape of the tab, the text, the icon, and the icon's size.
As the Java style tabs don't overlap, we also present an image of
a tab widget in the common style. Note that if you want the tabs
@ -1024,7 +1022,7 @@
Note that individual tabs may be disabled even if the tab bar
is not. The tab will be active if the tab bar is active.
Here follows a table of QStyleOptionTabV2's members:
Here follows a table of QStyleOptionTab's members:
\table 90%
\header
@ -1450,7 +1448,7 @@
\li Content
\row
\li features
\li Flags of the QStyleOptionFrameV2::FrameFeatures
\li Flags of the QStyleOptionFrame::FrameFeatures
enum describing the frame of the group box.
\row
\li lineWidth
@ -1501,7 +1499,7 @@
\image javastyle/progressbarimage.png
The style option for QProgressBar is QStyleOptionProgressBarV2.
The style option for QProgressBar is QStyleOptionProgressBar.
The bar does not set any state flags, but the other members of the
option are: