[PATCH] Small changes to Yearly Statistics window
John Van Ostrand
john at vanostrand.com
Thu Nov 20 07:34:49 PST 2014
Added a title bar with close button.
Set an appropriate title.
Centred the window relative to mainwindow.
Signed-off-by: John Van Ostrand <john at vanostrand.com>
---
qt-ui/mainwindow.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 9b82f21..d908fcd 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -558,10 +558,14 @@ void MainWindow::on_actionYearlyStatistics_triggered()
view->setModel(m);
l->addWidget(view);
d.resize(width() * .8, height() / 2);
+ d.move(width() * .1, height() / 4);
QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), &d);
connect(close, SIGNAL(activated()), &d, SLOT(close()));
QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), &d);
connect(quit, SIGNAL(activated()), this, SLOT(close()));
+ d.setWindowFlags(Qt::Window | Qt::CustomizeWindowHint
+ | Qt::WindowCloseButtonHint | Qt::WindowTitleHint);
+ d.setWindowTitle(tr("Yearly Statistics"));
d.exec();
}
--
1.8.3.1
More information about the subsurface
mailing list