summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index a17270912f..d845be3d01 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -941,9 +941,24 @@ void QWindow::setMinimumSize(const QSize &size)
QSize adjustedSize = QSize(qBound(0, size.width(), QWINDOWSIZE_MAX), qBound(0, size.height(), QWINDOWSIZE_MAX));
if (d->minimumSize == adjustedSize)
return;
+ QSize oldSize = d->minimumSize;
d->minimumSize = adjustedSize;
if (d->platformWindow && isTopLevel())
d->platformWindow->propagateSizeHints();
+ if (d->minimumSize.width() != oldSize.width())
+ emit minimumWidthChanged(d->minimumSize.width());
+ if (d->minimumSize.height() != oldSize.height())
+ emit minimumHeightChanged(d->minimumSize.height());
+}
+
+void QWindow::setMinimumWidth(int w)
+{
+ setMinimumSize(QSize(w, minimumHeight()));
+}
+
+void QWindow::setMinimumHeight(int h)
+{
+ setMinimumSize(QSize(minimumWidth(), h));
}
/*!
@@ -959,9 +974,24 @@ void QWindow::setMaximumSize(const QSize &size)
QSize adjustedSize = QSize(qBound(0, size.width(), QWINDOWSIZE_MAX), qBound(0, size.height(), QWINDOWSIZE_MAX));
if (d->maximumSize == adjustedSize)
return;
+ QSize oldSize = d->maximumSize;
d->maximumSize = adjustedSize;
if (d->platformWindow && isTopLevel())
d->platformWindow->propagateSizeHints();
+ if (d->maximumSize.width() != oldSize.width())
+ emit maximumWidthChanged(d->maximumSize.width());
+ if (d->maximumSize.height() != oldSize.height())
+ emit maximumHeightChanged(d->maximumSize.height());
+}
+
+void QWindow::setMaximumWidth(int w)
+{
+ setMaximumSize(QSize(w, maximumHeight()));
+}
+
+void QWindow::setMaximumHeight(int h)
+{
+ setMaximumSize(QSize(maximumWidth(), h));
}
/*!
@@ -1060,6 +1090,26 @@ void QWindow::setGeometry(const QRect &rect)
*/
/*!
+ \property QWindow::minimumWidth
+ \brief the minimum width of the window's geometry
+*/
+
+/*!
+ \property QWindow::minimumHeight
+ \brief the minimum height of the window's geometry
+*/
+
+/*!
+ \property QWindow::maximumWidth
+ \brief the maximum width of the window's geometry
+*/
+
+/*!
+ \property QWindow::maximumHeight
+ \brief the maximum height of the window's geometry
+*/
+
+/*!
Returns the geometry of the window, excluding its window frame.
\sa frameMargins(), frameGeometry()