summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-06-07 12:05:33 +0200
committerLiang Qi <liang.qi@qt.io>2017-06-07 14:02:43 +0200
commit7cbee5629604aa49c618829c8e3e55fc64e94df7 (patch)
treed12041105160c1cb21226b365edb9653d87b5853 /src/widgets/widgets
parente400b7e326c554ccd819448866265953d2a0f24d (diff)
parent5f0ce2333f7e11a3ffb5d16a27cd9303efa712d5 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qcheckbox.cpp14
-rw-r--r--src/widgets/widgets/qcombobox.cpp4
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp33
-rw-r--r--src/widgets/widgets/qdial.cpp12
-rw-r--r--src/widgets/widgets/qgroupbox.cpp11
-rw-r--r--src/widgets/widgets/qlabel.cpp30
-rw-r--r--src/widgets/widgets/qlabel.h6
-rw-r--r--src/widgets/widgets/qlabel_p.h6
-rw-r--r--src/widgets/widgets/qlcdnumber.cpp17
-rw-r--r--src/widgets/widgets/qlcdnumber.h5
-rw-r--r--src/widgets/widgets/qlineedit.cpp12
-rw-r--r--src/widgets/widgets/qmenu.cpp10
-rw-r--r--src/widgets/widgets/qprogressbar.cpp11
-rw-r--r--src/widgets/widgets/qpushbutton.cpp21
-rw-r--r--src/widgets/widgets/qradiobutton.cpp11
-rw-r--r--src/widgets/widgets/qscrollbar.cpp9
-rw-r--r--src/widgets/widgets/qslider.cpp11
-rw-r--r--src/widgets/widgets/qspinbox.cpp11
-rw-r--r--src/widgets/widgets/qsplashscreen.cpp4
-rw-r--r--src/widgets/widgets/qsplashscreen.h6
-rw-r--r--src/widgets/widgets/qtabwidget.cpp11
-rw-r--r--src/widgets/widgets/widgets.pri19
22 files changed, 73 insertions, 201 deletions
diff --git a/src/widgets/widgets/qcheckbox.cpp b/src/widgets/widgets/qcheckbox.cpp
index d4ba17b08e..9b49916774 100644
--- a/src/widgets/widgets/qcheckbox.cpp
+++ b/src/widgets/widgets/qcheckbox.cpp
@@ -73,6 +73,8 @@ public:
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-checkbox.png
+
A QCheckBox is an option button that can be switched on (checked) or off
(unchecked). Checkboxes are typically used to represent features in an
application that can be enabled or disabled without affecting others.
@@ -117,18 +119,6 @@ public:
setAutoRepeat(), toggle(), pressed(), released(), clicked(), toggled(),
checkState(), and stateChanged().
- \table 100%
- \row
- \li \inlineimage macintosh-checkbox.png Screenshot of a Macintosh style checkbox
- \li A checkbox shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row
- \li \inlineimage windowsvista-checkbox.png Screenshot of a Windows Vista style checkbox
- \li A checkbox shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \row
- \li \inlineimage fusion-checkbox.png Screenshot of a Fusion style checkbox
- \li A checkbox shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \endtable
-
\sa QAbstractButton, QRadioButton, {fowler}{GUI Design Handbook: Check Box}
*/
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 4a49542fdd..29c51a2de1 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -909,6 +909,8 @@ QComboBox::QComboBox(QComboBoxPrivate &dd, QWidget *parent)
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-combobox.png
+
A QComboBox provides a means of presenting a list of options to the user
in a way that takes up the minimum amount of screen space.
@@ -969,8 +971,6 @@ QComboBox::QComboBox(QComboBoxPrivate &dd, QWidget *parent)
of the view(), e.g., by using
\l{QAbstractItemView::}{setSelectionMode()}.
- \image qstyle-comboboxes.png Comboboxes in the different built-in styles.
-
\sa QLineEdit, QSpinBox, QRadioButton, QButtonGroup,
{fowler}{GUI Design Handbook: Combo Box, Drop-Down List Box}
*/
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index 0eaa110bee..2e0a8a3cd7 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -76,6 +76,8 @@ QT_BEGIN_NAMESPACE
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-datetimeedit.png
+
QDateTimeEdit allows the user to edit dates by using the keyboard or
the arrow keys to increase and decrease date and time values. The
arrow keys can be used to move from section to section within the
@@ -103,15 +105,6 @@ QT_BEGIN_NAMESPACE
calendar pop-up by calling the setCalendarWidget() function. The existing
calendar widget can be retrieved with calendarWidget().
- \table 100%
- \row \li \inlineimage windowsvista-datetimeedit.png Screenshot of a Windows Vista style date time editing widget
- \li A date time editing widget shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \row \li \inlineimage macintosh-datetimeedit.png Screenshot of a Macintosh style date time editing widget
- \li A date time editing widget shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage fusion-datetimeedit.png Screenshot of a Fusion style date time editing widget
- \li A date time editing widget shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \endtable
-
\sa QDateEdit, QTimeEdit, QDate, QTime
*/
@@ -1505,6 +1498,8 @@ void QDateTimeEdit::mousePressEvent(QMouseEvent *event)
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-timeedit.png
+
Many of the properties and functions provided by QTimeEdit are implemented in
QDateTimeEdit. These are the relevant properties of this class:
@@ -1518,15 +1513,6 @@ void QDateTimeEdit::mousePressEvent(QMouseEvent *event)
to format the time displayed in the widget.
\endlist
- \table 100%
- \row \li \inlineimage windowsvista-timeedit.png Screenshot of a Windows Vista style time editing widget
- \li A time editing widget shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \row \li \inlineimage macintosh-timeedit.png Screenshot of a Macintosh style time editing widget
- \li A time editing widget shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage fusion-timeedit.png Screenshot of a Fusion style time editing widget
- \li A time editing widget shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \endtable
-
\sa QDateEdit, QDateTimeEdit
*/
@@ -1582,6 +1568,8 @@ QTimeEdit::~QTimeEdit()
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-dateedit.png
+
Many of the properties and functions provided by QDateEdit are implemented in
QDateTimeEdit. These are the relevant properties of this class:
@@ -1595,15 +1583,6 @@ QTimeEdit::~QTimeEdit()
to format the date displayed in the widget.
\endlist
- \table 100%
- \row \li \inlineimage windowsvista-dateedit.png Screenshot of a Windows Vista style date editing widget
- \li A date editing widget shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \row \li \inlineimage macintosh-dateedit.png Screenshot of a Macintosh style date editing widget
- \li A date editing widget shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage fusion-dateedit.png Screenshot of a Fusion style date editing widget
- \li A date editing widget shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \endtable
-
\sa QTimeEdit, QDateTimeEdit
*/
diff --git a/src/widgets/widgets/qdial.cpp b/src/widgets/widgets/qdial.cpp
index cee39e2ae3..a219e4ccb6 100644
--- a/src/widgets/widgets/qdial.cpp
+++ b/src/widgets/widgets/qdial.cpp
@@ -179,6 +179,8 @@ int QDialPrivate::valueFromPoint(const QPoint &p) const
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-dial.png
+
QDial is used when the user needs to control a value within a
program-definable range, and the range either wraps around
(for example, with angles measured from 0 to 359 degrees) or the
@@ -226,16 +228,6 @@ int QDialPrivate::valueFromPoint(const QPoint &p) const
by \l {QAbstractSlider::singleStep} {singleStep}, and
\l {QAbstractSlider::pageStep} {pageStep}.
- \table
- \row \li \inlineimage fusion-dial.png Screenshot of a dial in the Fusion widget style
- \li \inlineimage windowsvista-dial.png Screenshot of a dial in the Windows Vista widget style
- \li \inlineimage macintosh-dial.png Screenshot of a dial in the Macintosh widget style
- \row \li {3,1} Dials shown in various widget styles (from left to right):
- \l{Fusion Style Widget Gallery}{Fusion},
- \l{Windows Vista Style Widget Gallery}{Windows Vista},
- \l{Macintosh Style Widget Gallery}{Macintosh}.
- \endtable
-
\sa QScrollBar, QSpinBox, QSlider, {fowler}{GUI Design Handbook: Slider}, {Sliders Example}
*/
diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
index fda68879d1..9e323df9a6 100644
--- a/src/widgets/widgets/qgroupbox.cpp
+++ b/src/widgets/widgets/qgroupbox.cpp
@@ -145,6 +145,8 @@ void QGroupBoxPrivate::click()
\ingroup geomanagement
\inmodule QtWidgets
+ \image windows-groupbox.png
+
A group box provides a frame, a title on top, a keyboard shortcut, and
displays various other widgets inside itself. The keyboard shortcut moves
keyboard focus to one of the group box's child widgets.
@@ -166,15 +168,6 @@ void QGroupBoxPrivate::click()
\snippet widgets/groupbox/window.cpp 2
- \table 100%
- \row \li \inlineimage windowsvista-groupbox.png Screenshot of a Windows Vista style group box
- \li \inlineimage macintosh-groupbox.png Screenshot of a Macintosh style group box
- \li \inlineimage fusion-groupbox.png Screenshot of a Fusion style group box
- \row \li A \l{Windows Vista Style Widget Gallery}{Windows Vista style} group box.
- \li A \l{Macintosh Style Widget Gallery}{Macintosh style} group box.
- \li A \l{Fusion Style Widget Gallery}{Fusion style} group box.
- \endtable
-
\sa QButtonGroup, {Group Box Example}
*/
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 39e072234e..e3225800cc 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -72,7 +72,7 @@ QLabelPrivate::QLabelPrivate()
#ifndef QT_NO_PICTURE
picture(Q_NULLPTR),
#endif
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
movie(),
#endif
control(Q_NULLPTR),
@@ -116,6 +116,8 @@ QLabelPrivate::~QLabelPrivate()
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-label.png
+
QLabel is used for displaying text or an image. No user
interaction functionality is provided. The visual appearance of
the label can be configured in various ways, and it can be used
@@ -181,18 +183,6 @@ QLabelPrivate::~QLabelPrivate()
was a button (inheriting from QAbstractButton), triggering the
mnemonic would emulate a button click.
- \table 100%
- \row
- \li \inlineimage macintosh-label.png Screenshot of a Macintosh style label
- \li A label shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row
- \li \inlineimage fusion-label.png Screenshot of a Fusion style label
- \li A label shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \row
- \li \inlineimage windowsvista-label.png Screenshot of a Windows Vista style label
- \li A label shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \endtable
-
\sa QLineEdit, QTextEdit, QPixmap, QMovie,
{fowler}{GUI Design Handbook: Label}
*/
@@ -582,7 +572,7 @@ QSize QLabelPrivate::sizeForWidth(int w) const
} else if (picture && !picture->isNull()) {
br = picture->boundingRect();
#endif
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
} else if (movie && !movie->currentPixmap().isNull()) {
br = movie->currentPixmap().rect();
br.setSize(br.size() / movie->currentPixmap().devicePixelRatio());
@@ -1015,7 +1005,7 @@ void QLabel::paintEvent(QPaintEvent *)
int align = QStyle::visualAlignment(d->isTextLabel ? d->textDirection()
: layoutDirection(), QFlag(d->align));
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
if (d->movie) {
if (d->scaledcontents)
style->drawItemPixmap(&painter, cr, align, d->movie->currentPixmap().scaled(cr.size()));
@@ -1216,7 +1206,7 @@ void QLabelPrivate::updateShortcut()
#endif // QT_NO_SHORTCUT
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
void QLabelPrivate::_q_movieUpdated(const QRect& rect)
{
Q_Q(QLabel);
@@ -1276,7 +1266,7 @@ void QLabel::setMovie(QMovie *movie)
d->updateLabel();
}
-#endif // QT_NO_MOVIE
+#endif // QT_CONFIG(movie)
/*!
\internal
@@ -1309,7 +1299,7 @@ void QLabelPrivate::clearContents()
q->releaseShortcut(shortcutId);
shortcutId = 0;
#endif
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
if (movie) {
QObject::disconnect(movie, SIGNAL(resized(QSize)), q, SLOT(_q_movieResized(QSize)));
QObject::disconnect(movie, SIGNAL(updated(QRect)), q, SLOT(_q_movieUpdated(QRect)));
@@ -1329,7 +1319,7 @@ void QLabelPrivate::clearContents()
}
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
/*!
Returns a pointer to the label's movie, or 0 if no movie has been
@@ -1344,7 +1334,7 @@ QMovie *QLabel::movie() const
return d->movie;
}
-#endif // QT_NO_MOVIE
+#endif // QT_CONFIG(movie)
/*!
\property QLabel::textFormat
diff --git a/src/widgets/widgets/qlabel.h b/src/widgets/widgets/qlabel.h
index 3978e34d14..469254a145 100644
--- a/src/widgets/widgets/qlabel.h
+++ b/src/widgets/widgets/qlabel.h
@@ -76,7 +76,7 @@ public:
#ifndef QT_NO_PICTURE
const QPicture *picture() const;
#endif
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
QMovie *movie() const;
#endif
@@ -122,7 +122,7 @@ public Q_SLOTS:
#ifndef QT_NO_PICTURE
void setPicture(const QPicture &);
#endif
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
void setMovie(QMovie *movie);
#endif
void setNum(int);
@@ -152,7 +152,7 @@ protected:
private:
Q_DISABLE_COPY(QLabel)
Q_DECLARE_PRIVATE(QLabel)
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
Q_PRIVATE_SLOT(d_func(), void _q_movieUpdated(const QRect&))
Q_PRIVATE_SLOT(d_func(), void _q_movieResized(const QSize&))
#endif
diff --git a/src/widgets/widgets/qlabel_p.h b/src/widgets/widgets/qlabel_p.h
index d13c05fc99..f3236ac527 100644
--- a/src/widgets/widgets/qlabel_p.h
+++ b/src/widgets/widgets/qlabel_p.h
@@ -59,7 +59,9 @@
#include "qtextdocumentfragment.h"
#include "qframe_p.h"
#include "qtextdocument.h"
+#if QT_CONFIG(movie)
#include "qmovie.h"
+#endif
#include "qimage.h"
#include "qbitmap.h"
#include "qpicture.h"
@@ -79,7 +81,7 @@ public:
void updateLabel();
QSize sizeForWidth(int w) const;
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
void _q_movieUpdated(const QRect&);
void _q_movieResized(const QSize&);
#endif
@@ -116,7 +118,7 @@ public:
#ifndef QT_NO_PICTURE
QPicture *picture;
#endif
-#ifndef QT_NO_MOVIE
+#if QT_CONFIG(movie)
QPointer<QMovie> movie;
#endif
mutable QWidgetTextControl *control;
diff --git a/src/widgets/widgets/qlcdnumber.cpp b/src/widgets/widgets/qlcdnumber.cpp
index aa052ef5cb..282714843c 100644
--- a/src/widgets/widgets/qlcdnumber.cpp
+++ b/src/widgets/widgets/qlcdnumber.cpp
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qlcdnumber.h"
-#ifndef QT_NO_LCDNUMBER
+
#include "qbitarray.h"
#include "qpainter.h"
#include "private/qframe_p.h"
@@ -74,6 +74,8 @@ public:
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-lcdnumber.png
+
It can display a number in just about any size. It can display
decimal, hexadecimal, octal or binary numbers. It is easy to
connect to data sources using the display() slot, which is
@@ -103,17 +105,6 @@ public:
Incidentally, QLCDNumber is the very oldest part of Qt, tracing
its roots back to a BASIC program on the \l{Sinclair Spectrum}{Sinclair Spectrum}.
- \table
- \row \li
- \inlineimage windows-lcdnumber.png Screenshot of a Windows style LCD number widget
- \inlineimage windowsvista-lcdnumber.png Screenshot of a Windows Vista style LCD number widget
- \inlineimage macintosh-lcdnumber.png Screenshot of a Macintosh style LCD number widget
- \inlineimage fusion-lcdnumber.png Screenshot of a Fusion style LCD number widget
- \row \li LCD number widgets shown in various widget styles (from left to right):
- \l{Windows Style Widget Gallery}{Windows}, \l{Windows Vista Style Widget Gallery}{Windows Vista},
- \l{Macintosh Style Widget Gallery}{Macintosh}, \l{Fusion Style Widget Gallery}{Fusion}.
- \endtable
-
\sa QLabel, QFrame, {Digital Clock Example}, {Tetrix Example}
*/
@@ -1220,5 +1211,3 @@ bool QLCDNumber::event(QEvent *e)
QT_END_NAMESPACE
#include "moc_qlcdnumber.cpp"
-
-#endif // QT_NO_LCDNUMBER
diff --git a/src/widgets/widgets/qlcdnumber.h b/src/widgets/widgets/qlcdnumber.h
index 33669fa900..28fd530e6e 100644
--- a/src/widgets/widgets/qlcdnumber.h
+++ b/src/widgets/widgets/qlcdnumber.h
@@ -45,8 +45,7 @@
QT_BEGIN_NAMESPACE
-
-#ifndef QT_NO_LCDNUMBER
+QT_REQUIRE_CONFIG(lcdnumber);
class QLCDNumberPrivate;
class Q_WIDGETS_EXPORT QLCDNumber : public QFrame // LCD number widget
@@ -115,8 +114,6 @@ private:
Q_DECLARE_PRIVATE(QLCDNumber)
};
-#endif // QT_NO_LCDNUMBER
-
QT_END_NAMESPACE
#endif // QLCDNUMBER_H
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index b7f19a3bcf..75e3524ab2 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -127,6 +127,8 @@ void QLineEdit::initStyleOption(QStyleOptionFrame *option) const
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-lineedit.png
+
A line edit allows the user to enter and edit a single line of
plain text with a useful collection of editing functions,
including undo and redo, cut and paste, and drag and drop (see
@@ -141,7 +143,6 @@ void QLineEdit::initStyleOption(QStyleOptionFrame *option) const
on the same line edit, it is best to clear the validator or input mask to
prevent undefined behavior.
-
A related class is QTextEdit which allows multi-line, rich text
editing.
@@ -201,15 +202,6 @@ void QLineEdit::initStyleOption(QStyleOptionFrame *option) const
Any other key sequence that represents a valid character, will
cause the character to be inserted into the line edit.
- \table 100%
- \row \li \inlineimage macintosh-lineedit.png Screenshot of a Macintosh style line edit
- \li A line edit shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage windowsvista-lineedit.png Screenshot of a Windows Vista style line edit
- \li A line edit shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \row \li \inlineimage fusion-lineedit.png Screenshot of a Fusion style line edit
- \li A line edit shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \endtable
-
\sa QTextEdit, QLabel, QComboBox, {fowler}{GUI Design Handbook: Field, Entry}, {Line Edits Example}
*/
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 4567f7c2a3..955d445b24 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -1535,6 +1535,8 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action)
\ingroup basicwidgets
\inmodule QtWidgets
+ \image fusion-menu.png
+
A menu widget is a selection menu. It can be either a pull-down
menu in a menu bar or a standalone context menu. Pull-down menus
are shown by the menu bar when the user clicks on the respective
@@ -1546,14 +1548,6 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action)
response to button presses; these are just like context menus
except for how they are invoked.
- \table 100%
- \row
- \li \inlineimage fusion-menu.png
- \li \inlineimage macintosh-menu.png
- \endtable
- \caption Fig. A menu shown in \l{Fusion Style Widget Gallery}{Fusion widget style}
- and \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
-
\section1 Actions
A menu consists of a list of action items. Actions are added with
diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp
index 39faf2e458..e26673a010 100644
--- a/src/widgets/widgets/qprogressbar.cpp
+++ b/src/widgets/widgets/qprogressbar.cpp
@@ -177,6 +177,8 @@ bool QProgressBarPrivate::repaintRequired() const
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-progressbar.png
+
A progress bar is used to give the user an indication of the
progress of an operation and to reassure them that the application
is still running.
@@ -198,15 +200,6 @@ bool QProgressBarPrivate::repaintRequired() const
example, when using QNetworkAccessManager to download items when
they are unable to determine the size of the item being downloaded.
- \table
- \row \li \inlineimage macintosh-progressbar.png Screenshot of a Macintosh style progress bar
- \li A progress bar shown in the Macintosh widget style.
- \row \li \inlineimage windowsvista-progressbar.png Screenshot of a Windows Vista style progress bar
- \li A progress bar shown in the Windows Vista widget style.
- \row \li \inlineimage fusion-progressbar.png Screenshot of a Fusion style progress bar
- \li A progress bar shown in the Fusion widget style.
- \endtable
-
\sa QProgressDialog, {fowler}{GUI Design Handbook: Progress Indicator}
*/
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp
index a4318681c9..57af09fef5 100644
--- a/src/widgets/widgets/qpushbutton.cpp
+++ b/src/widgets/widgets/qpushbutton.cpp
@@ -77,6 +77,8 @@ QT_BEGIN_NAMESPACE
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-pushbutton.jpg
+
The push button, or command button, is perhaps the most commonly
used widget in any graphical user interface. Push (click) a button
to command the computer to perform some action, or to answer a
@@ -148,6 +150,11 @@ QT_BEGIN_NAMESPACE
button is probably not what you want. When in doubt, use a tool
button.
+ \note On \macos when a push button's width becomes smaller than 50 or
+ its height becomes smaller than 30, the button's corners are
+ changed from round to square. Use the setMinimumSize()
+ function to prevent this behavior.
+
A variation of a command button is a menu button. These provide
not just one command, but several, since when they are clicked
they pop up a menu of options. Use the method setMenu() to
@@ -156,20 +163,6 @@ QT_BEGIN_NAMESPACE
Other classes of buttons are option buttons (see QRadioButton) and
check boxes (see QCheckBox).
- \table 100%
- \row \li \inlineimage macintosh-pushbutton.png Screenshot of a Macintosh style push button
- \li A push button shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
-
- Note that when a button's width becomes smaller than 50 or
- its height becomes smaller than 30, the button's corners are
- changed from round to square. Use the setMinimumSize()
- function to prevent this behavior.
-
- \row \li \inlineimage windowsvista-pushbutton.png Screenshot of a Windows Vista style push button
- \li A push button shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \row \li \inlineimage fusion-pushbutton.png Screenshot of a Fusion style push button
- \li A push button shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \endtable
In Qt, the QAbstractButton base class provides most of the modes
and other API, and QPushButton provides GUI logic.
diff --git a/src/widgets/widgets/qradiobutton.cpp b/src/widgets/widgets/qradiobutton.cpp
index 284c5f56cf..ac711d34c7 100644
--- a/src/widgets/widgets/qradiobutton.cpp
+++ b/src/widgets/widgets/qradiobutton.cpp
@@ -80,6 +80,8 @@ void QRadioButtonPrivate::init()
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-radiobutton.png
+
A QRadioButton is an option button that can be switched on (checked) or
off (unchecked). Radio buttons typically present the user with a "one
of many" choice. In a group of radio buttons, only one radio button at
@@ -113,15 +115,6 @@ void QRadioButtonPrivate::init()
setDown(), isDown(), autoRepeat(), group(), setAutoRepeat(),
toggle(), pressed(), released(), clicked(), and toggled().
- \table 100%
- \row \li \inlineimage fusion-radiobutton.png Screenshot of a Fusion radio button
- \li A radio button shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \row \li \inlineimage windowsvista-radiobutton.png Screenshot of a Windows Vista radio button
- \li A radio button shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \row \li \inlineimage macintosh-radiobutton.png Screenshot of a Macintosh radio button
- \li A radio button shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \endtable
-
\sa QPushButton, QToolButton, QCheckBox, {fowler}{GUI Design Handbook: Radio Button},
{Group Box Example}
*/
diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp
index 79bfedb8c4..66f1a4c689 100644
--- a/src/widgets/widgets/qscrollbar.cpp
+++ b/src/widgets/widgets/qscrollbar.cpp
@@ -187,15 +187,6 @@ QT_BEGIN_NAMESPACE
Most GUI styles use the pageStep() value to calculate the size of the
slider.
- \table 100%
- \row \li \inlineimage macintosh-horizontalscrollbar.png Screenshot of a Macintosh style scroll bar
- \li A scroll bar shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage windowsvista-horizontalscrollbar.png Screenshot of a Windows Vista style scroll bar
- \li A scroll bar shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \row \li \inlineimage fusion-horizontalscrollbar.png Screenshot of a Fusion style scroll bar
- \li A scroll bar shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \endtable
-
\sa QScrollArea, QSlider, QDial, QSpinBox, {fowler}{GUI Design Handbook: Scroll Bar}, {Sliders Example}
*/
diff --git a/src/widgets/widgets/qslider.cpp b/src/widgets/widgets/qslider.cpp
index 744a43253a..356cbcfce7 100644
--- a/src/widgets/widgets/qslider.cpp
+++ b/src/widgets/widgets/qslider.cpp
@@ -203,6 +203,8 @@ QStyle::SubControl QSliderPrivate::newHoverControl(const QPoint &pos)
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-slider.png
+
The slider is the classic widget for controlling a bounded value.
It lets the user move a slider handle along a horizontal or vertical
groove and translates the handle's position into an integer value
@@ -252,15 +254,6 @@ QStyle::SubControl QSliderPrivate::newHoverControl(const QPoint &pos)
\li End moves to the end (maximum).
\endlist
- \table 100%
- \row \li \inlineimage macintosh-slider.png Screenshot of a Macintosh slider
- \li A slider shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage windowsvista-slider.png Screenshot of a Windows Vista slider
- \li A slider shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \row \li \inlineimage fusion-slider.png Screenshot of a Fusion slider
- \li A slider shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \endtable
-
\sa QScrollBar, QSpinBox, QDial, {fowler}{GUI Design Handbook: Slider}, {Sliders Example}
*/
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index 0daa624ae8..508cb05cfc 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -112,6 +112,8 @@ public:
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-spinbox.png
+
QSpinBox is designed to handle integers and discrete sets of
values (e.g., month names); use QDoubleSpinBox for floating point
values.
@@ -151,15 +153,6 @@ public:
choice in addition to the range of numeric values. See
setSpecialValueText() for how to do this with QSpinBox.
- \table 100%
- \row \li \inlineimage windowsvista-spinbox.png Screenshot of a Windows Vista spin box
- \li A spin box shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
- \row \li \inlineimage fusion-spinbox.png Screenshot of a Fusion spin box
- \li A spin box shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \row \li \inlineimage macintosh-spinbox.png Screenshot of a Macintosh spin box
- \li A spin box shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \endtable
-
\section1 Subclassing QSpinBox
If using prefix(), suffix(), and specialValueText() don't provide
diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp
index 85c63077eb..d1b59b5196 100644
--- a/src/widgets/widgets/qsplashscreen.cpp
+++ b/src/widgets/widgets/qsplashscreen.cpp
@@ -39,8 +39,6 @@
#include "qsplashscreen.h"
-#ifndef QT_NO_SPLASHSCREEN
-
#include "qapplication.h"
#include "qdesktopwidget.h"
#include "qpainter.h"
@@ -354,5 +352,3 @@ bool QSplashScreen::event(QEvent *e)
QT_END_NAMESPACE
#include "moc_qsplashscreen.cpp"
-
-#endif //QT_NO_SPLASHSCREEN
diff --git a/src/widgets/widgets/qsplashscreen.h b/src/widgets/widgets/qsplashscreen.h
index de58d86592..1971b8bacf 100644
--- a/src/widgets/widgets/qsplashscreen.h
+++ b/src/widgets/widgets/qsplashscreen.h
@@ -44,10 +44,10 @@
#include <QtGui/qpixmap.h>
#include <QtWidgets/qwidget.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(splashscreen);
+QT_BEGIN_NAMESPACE
-#ifndef QT_NO_SPLASHSCREEN
class QSplashScreenPrivate;
class Q_WIDGETS_EXPORT QSplashScreen : public QWidget
@@ -82,8 +82,6 @@ private:
Q_DECLARE_PRIVATE(QSplashScreen)
};
-#endif // QT_NO_SPLASHSCREEN
-
QT_END_NAMESPACE
#endif // QSPLASHSCREEN_H
diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp
index be870133ee..7c75f859ed 100644
--- a/src/widgets/widgets/qtabwidget.cpp
+++ b/src/widgets/widgets/qtabwidget.cpp
@@ -64,6 +64,8 @@ QT_BEGIN_NAMESPACE
\ingroup basicwidgets
\inmodule QtWidgets
+ \image windows-tabwidget.png
+
A tab widget provides a tab bar (see QTabBar) and a "page area"
that is used to display pages related to each tab. By default, the
tab bar is shown above the page area, but different configurations
@@ -117,15 +119,6 @@ QT_BEGIN_NAMESPACE
(at the top, providing the tabs) and a QStackedWidget (most of the
area, organizing the individual pages).
- \table 100%
- \row \li \inlineimage windowsvista-tabwidget.png Screenshot of a Windows Vista style tab widget
- \li \inlineimage macintosh-tabwidget.png Screenshot of a Macintosh style tab widget
- \li \inlineimage fusion-tabwidget.png Screenshot of a Fusion style tab widget
- \row \li A Windows Vista style tab widget.
- \li A Macintosh style tab widget.
- \li A Fusion style tab widget.
- \endtable
-
\sa QTabBar, QStackedWidget, QToolBox, {Tab Dialog Example}
*/
diff --git a/src/widgets/widgets/widgets.pri b/src/widgets/widgets/widgets.pri
index 086585f0e6..1779c8d183 100644
--- a/src/widgets/widgets/widgets.pri
+++ b/src/widgets/widgets/widgets.pri
@@ -20,7 +20,6 @@ HEADERS += \
widgets/qgroupbox.h \
widgets/qkeysequenceedit.h \
widgets/qkeysequenceedit_p.h \
- widgets/qlcdnumber.h \
widgets/qlineedit.h \
widgets/qlineedit_p.h \
widgets/qmainwindow.h \
@@ -41,7 +40,6 @@ HEADERS += \
widgets/qsizegrip.h \
widgets/qslider.h \
widgets/qspinbox.h \
- widgets/qsplashscreen.h \
widgets/qsplitter.h \
widgets/qsplitter_p.h \
widgets/qstackedwidget.h \
@@ -84,7 +82,6 @@ SOURCES += \
widgets/qframe.cpp \
widgets/qgroupbox.cpp \
widgets/qkeysequenceedit.cpp \
- widgets/qlcdnumber.cpp \
widgets/qlineedit_p.cpp \
widgets/qlineedit.cpp \
widgets/qmainwindow.cpp \
@@ -99,7 +96,6 @@ SOURCES += \
widgets/qsizegrip.cpp \
widgets/qslider.cpp \
widgets/qspinbox.cpp \
- widgets/qsplashscreen.cpp \
widgets/qsplitter.cpp \
widgets/qstackedwidget.cpp \
widgets/qstatusbar.cpp \
@@ -165,6 +161,13 @@ qtConfig(label) {
widgets/qlabel.cpp
}
+qtConfig(lcdnumber) {
+ HEADERS += \
+ widgets/qlcdnumber.h
+
+ SOURCES += \
+ widgets/qlcdnumber.cpp
+}
qtConfig(pushbutton) {
HEADERS += \
@@ -191,6 +194,14 @@ qtConfig(dialogbuttonbox) {
widgets/qdialogbuttonbox.cpp
}
+qtConfig(splashscreen) {
+ HEADERS += \
+ widgets/qsplashscreen.h
+
+ SOURCES += \
+ widgets/qsplashscreen.cpp
+}
+
qtConfig(widgettextcontrol) {
HEADERS += \
widgets/qwidgettextcontrol_p.h \