kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Improve Qt4 -> Qt5 compatibility.
rodzic
4474b96baa
commit
3f833e63ef
2
global.h
2
global.h
|
@ -33,7 +33,7 @@
|
|||
|
||||
|
||||
#define PROGRAM_NAME "DSRemote"
|
||||
#define PROGRAM_VERSION "0.31_1512251807"
|
||||
#define PROGRAM_VERSION "0.31_1512291404"
|
||||
|
||||
#define MAX_PATHLEN 4096
|
||||
|
||||
|
|
|
@ -455,6 +455,19 @@ UI_Mainwindow::UI_Mainwindow()
|
|||
vertScaleDial_timer = new QTimer(this);
|
||||
vertScaleDial_timer->setSingleShot(true);
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
scrn_timer->setTimerType(Qt::PreciseTimer);
|
||||
adjdial_timer->setTimerType(Qt::PreciseTimer);
|
||||
navDial_timer->setTimerType(Qt::PreciseTimer);
|
||||
label_timer->setTimerType(Qt::PreciseTimer);
|
||||
test_timer->setTimerType(Qt::PreciseTimer);
|
||||
horPosDial_timer->setTimerType(Qt::PreciseTimer);
|
||||
trigAdjDial_timer->setTimerType(Qt::PreciseTimer);
|
||||
vertOffsDial_timer->setTimerType(Qt::PreciseTimer);
|
||||
horScaleDial_timer->setTimerType(Qt::PreciseTimer);
|
||||
vertScaleDial_timer->setTimerType(Qt::PreciseTimer);
|
||||
#endif
|
||||
|
||||
connect(scrn_timer, SIGNAL(timeout()), this, SLOT(scrn_timer_handler()));
|
||||
connect(scrn_thread, SIGNAL(finished()), this, SLOT(screenUpdate()));
|
||||
connect(adjdial_timer, SIGNAL(timeout()), this, SLOT(adjdial_timer_handler()));
|
||||
|
|
|
@ -38,6 +38,9 @@ void UI_Mainwindow::save_screenshot()
|
|||
opath[MAX_PATHLEN];
|
||||
|
||||
QPainter painter;
|
||||
#if QT_VERSION >= 0x050000
|
||||
painter.setRenderHint(QPainter::Qt4CompatiblePainting, true);
|
||||
#endif
|
||||
|
||||
QPainterPath path;
|
||||
|
||||
|
|
|
@ -55,6 +55,11 @@ SignalCurve::SignalCurve(QWidget *w_parent) : QWidget(w_parent)
|
|||
|
||||
trig_stat_timer = new QTimer(this);
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
trig_line_timer->setTimerType(Qt::PreciseTimer);
|
||||
trig_stat_timer->setTimerType(Qt::PreciseTimer);
|
||||
#endif
|
||||
|
||||
bufsize = 0;
|
||||
bordersize = 60;
|
||||
|
||||
|
@ -126,6 +131,9 @@ void SignalCurve::paintEvent(QPaintEvent *)
|
|||
if(updates_enabled == true)
|
||||
{
|
||||
QPainter paint(this);
|
||||
#if QT_VERSION >= 0x050000
|
||||
paint.setRenderHint(QPainter::Qt4CompatiblePainting, true);
|
||||
#endif
|
||||
|
||||
drawWidget(&paint, width(), height());
|
||||
|
||||
|
|
3
tled.cpp
3
tled.cpp
|
@ -43,6 +43,9 @@ TLed::TLed(QWidget *p) : QWidget(p)
|
|||
void TLed::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter paint(this);
|
||||
#if QT_VERSION >= 0x050000
|
||||
paint.setRenderHint(QPainter::Qt4CompatiblePainting, true);
|
||||
#endif
|
||||
drawLed(&paint);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue