summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2012-11-01 17:03:45 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-02 12:16:49 +0100
commitf01b498310ea7c05ec73669b34cb83b9f159006f (patch)
tree43bf9895d85ac8ca405ba1041bec23bd44aaa3e1 /src/gui/kernel/qwindow.h
parent774b643b850d770f16d04856aa613ebf394f913b (diff)
Introduced QWindow properties {min/max}imum{Width/Height}
These are useful when QWindow is exposed to QML. Change-Id: I7ec49ef365183e2c784605889e8ea22c2ef34781 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/gui/kernel/qwindow.h')
-rw-r--r--src/gui/kernel/qwindow.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 62268cd88a..4832adfb63 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -104,6 +104,10 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface
Q_PROPERTY(QPoint pos READ pos WRITE setPos)
Q_PROPERTY(QSize size READ size WRITE resize)
Q_PROPERTY(QRect geometry READ geometry WRITE setGeometry)
+ 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(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation WRITE reportContentOrientationChange NOTIFY contentOrientationChanged)
#ifndef QT_NO_CURSOR
@@ -170,6 +174,11 @@ public:
bool isExposed() const;
+ int minimumWidth() const { return minimumSize().width(); }
+ int minimumHeight() const { return minimumSize().height(); }
+ int maximumWidth() const { return maximumSize().width(); }
+ int maximumHeight() const { return maximumSize().height(); }
+
QSize minimumSize() const;
QSize maximumSize() const;
QSize baseSize() const;
@@ -273,6 +282,11 @@ public Q_SLOTS:
setGeometry(QRect(x(), y(), width(), arg));
}
+ void setMinimumWidth(int w);
+ void setMinimumHeight(int h);
+ void setMaximumWidth(int w);
+ void setMaximumHeight(int h);
+
Q_SIGNALS:
void screenChanged(QScreen *screen);
void windowModalityChanged(Qt::WindowModality windowModality);
@@ -283,6 +297,11 @@ 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);
+
void visibleChanged(bool arg);
void contentOrientationChanged(Qt::ScreenOrientation orientation);