Mercurial > hg > svgui
comparison widgets/PluginReviewDialog.cpp @ 1478:d39db4673676 by-id
Fix a number of Qt deprecation warnings
author | Chris Cannam |
---|---|
date | Wed, 03 Jul 2019 08:55:02 +0100 |
parents | 9f9a7edd7d89 |
children | 11660e0c896f |
comparison
equal
deleted
inserted
replaced
1477:0769eaacc6bf | 1478:d39db4673676 |
---|---|
17 #include <QGridLayout> | 17 #include <QGridLayout> |
18 #include <QTableWidget> | 18 #include <QTableWidget> |
19 #include <QDialogButtonBox> | 19 #include <QDialogButtonBox> |
20 #include <QFileInfo> | 20 #include <QFileInfo> |
21 #include <QHeaderView> | 21 #include <QHeaderView> |
22 #include <QDesktopWidget> | 22 #include <QScreen> |
23 #include <QApplication> | 23 #include <QApplication> |
24 | 24 |
25 #include "plugin/FeatureExtractionPluginFactory.h" | 25 #include "plugin/FeatureExtractionPluginFactory.h" |
26 #include "plugin/RealTimePluginFactory.h" | 26 #include "plugin/RealTimePluginFactory.h" |
27 | 27 |
127 m_table->resizeColumnsToContents(); | 127 m_table->resizeColumnsToContents(); |
128 | 128 |
129 int twidth = m_table->horizontalHeader()->length(); | 129 int twidth = m_table->horizontalHeader()->length(); |
130 int theight = m_table->verticalHeader()->length(); | 130 int theight = m_table->verticalHeader()->length(); |
131 | 131 |
132 QDesktopWidget *desktop = QApplication::desktop(); | 132 QScreen *screen = QGuiApplication::primaryScreen(); |
133 QRect available = desktop->availableGeometry(); | 133 QRect available = screen->availableGeometry(); |
134 | 134 |
135 int width = std::min(twidth + 30, (available.width() * 3) / 4); | 135 int width = std::min(twidth + 30, (available.width() * 3) / 4); |
136 int height = std::min(theight + 30, (available.height() * 3) / 4); | 136 int height = std::min(theight + 30, (available.height() * 3) / 4); |
137 | 137 |
138 resize(width, height); | 138 resize(width, height); |