Documentation and versioning for new Window properties

Task-number: QTBUG-29807
Change-Id: Id03ae17270832a7b5915e4324a508e591c0b6d98
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
bb10
Shawn Rutledge 2013-03-05 10:10:51 +01:00 committed by The Qt Project
parent 77f7a8ef4c
commit 268972999a
2 changed files with 28 additions and 18 deletions

View File

@ -781,6 +781,7 @@ void QWindow::lower()
/*!
\property QWindow::opacity
\brief The opacity of the window in the windowing system.
\since 5.1
If the windowing system supports window opacity, this can be used to fade the
window in and out, or to make it semitransparent.
@ -904,6 +905,7 @@ bool QWindow::isActive() const
/*!
\property QWindow::contentOrientation
\brief the orientation of the window's contents
\since 5.1
This is a hint to the window manager in case it needs to display
additional content like popups, dialogs, status bars, or similar
@ -1160,6 +1162,7 @@ void QWindow::setHeight(int arg)
/*!
\property QWindow::minimumWidth
\brief the minimum width of the window's geometry
\since 5.1
*/
void QWindow::setMinimumWidth(int w)
{
@ -1169,6 +1172,7 @@ void QWindow::setMinimumWidth(int w)
/*!
\property QWindow::minimumHeight
\brief the minimum height of the window's geometry
\since 5.1
*/
void QWindow::setMinimumHeight(int h)
{
@ -1201,6 +1205,7 @@ void QWindow::setMaximumSize(const QSize &size)
/*!
\property QWindow::maximumWidth
\brief the maximum width of the window's geometry
\since 5.1
*/
void QWindow::setMaximumWidth(int w)
{
@ -1210,6 +1215,7 @@ void QWindow::setMaximumWidth(int w)
/*!
\property QWindow::maximumHeight
\brief the maximum height of the window's geometry
\since 5.1
*/
void QWindow::setMaximumHeight(int h)
{

View File

@ -99,6 +99,10 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface
// For example "state" (meaning windowState) is not a good property to declare, because it has
// a different meaning in QQuickItem, and users will tend to assume it is the same for Window.
// Any new properties which you add here MUST be versioned and MUST be documented both as
// C++ properties in qwindow.cpp AND as QML properties in qquickwindow.cpp.
// http://qt-project.org/doc/qt-5.0/qtqml/qtqml-cppintegration-definetypes.html#type-revisions-and-versions
Q_PROPERTY(QString title READ title WRITE setTitle)
Q_PROPERTY(Qt::WindowModality modality READ modality WRITE setModality NOTIFY modalityChanged)
Q_PROPERTY(Qt::WindowFlags flags READ flags WRITE setFlags)
@ -106,14 +110,14 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface
Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged)
Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged)
Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged)
Q_PROPERTY(int minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged)
Q_PROPERTY(int maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged)
Q_PROPERTY(int maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged)
Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged REVISION 1)
Q_PROPERTY(int minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged REVISION 1)
Q_PROPERTY(int maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged REVISION 1)
Q_PROPERTY(int maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged REVISION 1)
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
Q_PROPERTY(Visibility visibility READ visibility WRITE setVisibility NOTIFY visibilityChanged)
Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation WRITE reportContentOrientationChange NOTIFY contentOrientationChanged)
Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
Q_PROPERTY(Visibility visibility READ visibility WRITE setVisibility NOTIFY visibilityChanged REVISION 1)
Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation WRITE reportContentOrientationChange NOTIFY contentOrientationChanged REVISION 1)
Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged REVISION 1)
public:
enum Visibility {
@ -281,10 +285,10 @@ public Q_SLOTS:
void setWidth(int arg);
void setHeight(int arg);
void setMinimumWidth(int w);
void setMinimumHeight(int h);
void setMaximumWidth(int w);
void setMaximumHeight(int h);
Q_REVISION(1) void setMinimumWidth(int w);
Q_REVISION(1) void setMinimumHeight(int h);
Q_REVISION(1) void setMaximumWidth(int w);
Q_REVISION(1) void setMaximumHeight(int h);
Q_SIGNALS:
void screenChanged(QScreen *screen);
@ -297,18 +301,18 @@ Q_SIGNALS:
void widthChanged(int arg);
void heightChanged(int arg);
void minimumWidthChanged(int arg);
void minimumHeightChanged(int arg);
void maximumWidthChanged(int arg);
void maximumHeightChanged(int arg);
Q_REVISION(1) void minimumWidthChanged(int arg);
Q_REVISION(1) void minimumHeightChanged(int arg);
Q_REVISION(1) void maximumWidthChanged(int arg);
Q_REVISION(1) void maximumHeightChanged(int arg);
void visibleChanged(bool arg);
void visibilityChanged(QWindow::Visibility visibility);
void contentOrientationChanged(Qt::ScreenOrientation orientation);
Q_REVISION(1) void visibilityChanged(QWindow::Visibility visibility);
Q_REVISION(1) void contentOrientationChanged(Qt::ScreenOrientation orientation);
void focusObjectChanged(QObject *object);
void opacityChanged(qreal opacity);
Q_REVISION(1) void opacityChanged(qreal opacity);
private Q_SLOTS:
void screenDestroyed(QObject *screen);