Mercurial > hg > orthanc-stone
comparison Applications/Samples/Qt/MainWindow.cpp @ 276:5de5699ad570 am-2
first display in QCairoWidget; no mouse interaction yet
author | am@osimis.io |
---|---|
date | Mon, 27 Aug 2018 12:21:52 +0200 |
parents | |
children | a38465cc909f |
comparison
equal
deleted
inserted
replaced
275:58e23e0dd86a | 276:5de5699ad570 |
---|---|
1 #include "MainWindow.h" | |
2 | |
3 /** | |
4 * Don't use "ui_MainWindow.h" instead of <ui_MainWindow.h> below, as | |
5 * this makes CMake unable to detect when the UI file changes. | |
6 **/ | |
7 #include <ui_MainWindow.h> | |
8 | |
9 MainWindow::MainWindow(OrthancStone::BasicNativeApplicationContext& context, QWidget *parent) : | |
10 QMainWindow(parent), | |
11 ui_(new Ui::MainWindow), | |
12 context_(context) | |
13 { | |
14 refreshTimer_ = new QTimer(this); | |
15 ui_->setupUi(this); | |
16 cairoCentralWidget_ = ui_->cairoCentralWidget; | |
17 cairoCentralWidget_->SetContext(context_); | |
18 | |
19 //connect(refreshTimer_, SIGNAL(timeout()), ui_->ca, SLOT(Refresh())); | |
20 refreshTimer_->start(100); | |
21 } | |
22 | |
23 MainWindow::~MainWindow() | |
24 { | |
25 delete ui_; | |
26 delete refreshTimer_; | |
27 } | |
28 | |
29 |