comparison widgets/TransformFinder.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 c8a6fd3f9dff
children b1f3b5678549
comparison
equal deleted inserted replaced
1477:0769eaacc6bf 1478:d39db4673676
24 #include <QLineEdit> 24 #include <QLineEdit>
25 #include <QLabel> 25 #include <QLabel>
26 #include <QDialogButtonBox> 26 #include <QDialogButtonBox>
27 #include <QScrollArea> 27 #include <QScrollArea>
28 #include <QApplication> 28 #include <QApplication>
29 #include <QDesktopWidget> 29 #include <QScreen>
30 #include <QTimer> 30 #include <QTimer>
31 #include <QAction> 31 #include <QAction>
32 32
33 TransformFinder::TransformFinder(QWidget *parent) : 33 TransformFinder::TransformFinder(QWidget *parent) :
34 QDialog(parent), 34 QDialog(parent),
90 QAction *down = new QAction(tr("Down"), this); 90 QAction *down = new QAction(tr("Down"), this);
91 down->setShortcut(tr("Down")); 91 down->setShortcut(tr("Down"));
92 connect(down, SIGNAL(triggered()), this, SLOT(down())); 92 connect(down, SIGNAL(triggered()), this, SLOT(down()));
93 addAction(down); 93 addAction(down);
94 94
95 QDesktopWidget *desktop = QApplication::desktop(); 95 QScreen *screen = QApplication::primaryScreen();
96 QRect available = desktop->availableGeometry(); 96 QRect available = screen->availableGeometry();
97 97
98 int width = available.width() / 2; 98 int width = available.width() / 2;
99 int height = available.height() / 2; 99 int height = available.height() / 2;
100 if (height < 450) { 100 if (height < 450) {
101 if (available.height() > 500) height = 450; 101 if (available.height() > 500) height = 450;