Mercurial > hg > orthanc-stone
annotate Applications/Qt/QCairoWidget.cpp @ 739:be9c1530d40a
deprecating enum SliceImageQuality
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 22 May 2019 09:13:04 +0200 |
parents | fe938bddb932 |
children | 922d2e61aa5d |
rev | line source |
---|---|
280
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
1 /** |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
2 * Stone of Orthanc |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
439 | 5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
280
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
6 * |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
10 * the License, or (at your option) any later version. |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
11 * |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
15 * Affero General Public License for more details. |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
16 * |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
19 **/ |
829163c6efc1
split MainWindow into a generic one and one specific to these samples
am@osimis.io
parents:
277
diff
changeset
|
20 |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
21 #include "QCairoWidget.h" |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
22 |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
23 #include <QPainter> |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
24 #include <QPaintEvent> |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
25 |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
26 #include <stdexcept> |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
27 |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
28 |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
29 QCairoWidget::StoneObserver::StoneObserver(QCairoWidget& that, |
730
fe938bddb932
fix after namespace rename to Deprecated
Alain Mazy <alain@mazy.be>
parents:
570
diff
changeset
|
30 Deprecated::IViewport& viewport, |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
31 OrthancStone::MessageBroker& broker) : |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
32 OrthancStone::IObserver(broker), |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
33 that_(that) |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
34 { |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
35 // get notified each time the content of the central viewport changes |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
36 viewport.RegisterObserverCallback( |
730
fe938bddb932
fix after namespace rename to Deprecated
Alain Mazy <alain@mazy.be>
parents:
570
diff
changeset
|
37 new OrthancStone::Callable<StoneObserver, Deprecated::IViewport::ViewportChangedMessage> |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
38 (*this, &StoneObserver::OnViewportChanged)); |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
39 } |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
40 |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
41 |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
42 QCairoWidget::QCairoWidget(QWidget *parent) : |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
43 QWidget(parent), |
277 | 44 context_(NULL) |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
45 { |
284 | 46 setFocusPolicy(Qt::StrongFocus); // catch keyPressEvents |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
47 } |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
48 |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
49 |
291 | 50 void QCairoWidget::SetContext(OrthancStone::NativeStoneApplicationContext& context) |
277 | 51 { |
52 context_ = &context; | |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
53 |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
54 { |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
55 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
56 observer_.reset(new StoneObserver(*this, |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
57 locker.GetCentralViewport(), |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
58 locker.GetMessageBroker())); |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
59 } |
277 | 60 } |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
61 |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
62 |
277 | 63 void QCairoWidget::paintEvent(QPaintEvent* /*event*/) |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
64 { |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
65 QPainter painter(this); |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
66 |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
67 if (image_.get() != NULL && |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
68 context_ != NULL) |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
69 { |
291 | 70 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); |
730
fe938bddb932
fix after namespace rename to Deprecated
Alain Mazy <alain@mazy.be>
parents:
570
diff
changeset
|
71 Deprecated::IViewport& viewport = locker.GetCentralViewport(); |
318
3a4ca166fafa
ImageAccessor refactoring + implemented Image Cache in SmartLoader
am@osimis.io
parents:
291
diff
changeset
|
72 Orthanc::ImageAccessor a; |
369
557c8ff1db5c
integration mainline->am-2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
73 surface_.GetWriteableAccessor(a); |
277 | 74 viewport.Render(a); |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
75 painter.drawImage(0, 0, *image_); |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
76 } |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
77 else |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
78 { |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
79 painter.fillRect(rect(), Qt::red); |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
80 } |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
81 } |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
82 |
277 | 83 OrthancStone::KeyboardModifiers GetKeyboardModifiers(QInputEvent* event) |
84 { | |
85 Qt::KeyboardModifiers qtModifiers = event->modifiers(); | |
86 int stoneModifiers = static_cast<int>(OrthancStone::KeyboardModifiers_None); | |
87 if ((qtModifiers & Qt::AltModifier) != 0) | |
88 { | |
89 stoneModifiers |= static_cast<int>(OrthancStone::KeyboardModifiers_Alt); | |
90 } | |
91 if ((qtModifiers & Qt::ControlModifier) != 0) | |
92 { | |
93 stoneModifiers |= static_cast<int>(OrthancStone::KeyboardModifiers_Control); | |
94 } | |
95 if ((qtModifiers & Qt::ShiftModifier) != 0) | |
96 { | |
97 stoneModifiers |= static_cast<int>(OrthancStone::KeyboardModifiers_Shift); | |
98 } | |
99 return static_cast<OrthancStone::KeyboardModifiers>(stoneModifiers); | |
100 } | |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
101 |
277 | 102 void QCairoWidget::mousePressEvent(QMouseEvent* event) |
103 { | |
104 OrthancStone::KeyboardModifiers stoneModifiers = GetKeyboardModifiers(event); | |
105 | |
106 OrthancStone::MouseButton button; | |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
107 |
277 | 108 switch (event->button()) |
109 { | |
110 case Qt::LeftButton: | |
111 button = OrthancStone::MouseButton_Left; | |
112 break; | |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
113 |
277 | 114 case Qt::RightButton: |
115 button = OrthancStone::MouseButton_Right; | |
116 break; | |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
117 |
277 | 118 case Qt::MiddleButton: |
119 button = OrthancStone::MouseButton_Middle; | |
120 break; | |
121 | |
122 default: | |
123 return; // Unsupported button | |
124 } | |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
125 |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
126 { |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
127 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); |
730
fe938bddb932
fix after namespace rename to Deprecated
Alain Mazy <alain@mazy.be>
parents:
570
diff
changeset
|
128 locker.GetCentralViewport().MouseDown(button, event->pos().x(), event->pos().y(), stoneModifiers, std::vector<Deprecated::Touch>()); |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
129 } |
277 | 130 } |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
131 |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
132 |
277 | 133 void QCairoWidget::mouseReleaseEvent(QMouseEvent* /*eventNotUsed*/) |
134 { | |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
135 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
136 locker.GetCentralViewport().MouseLeave(); |
277 | 137 } |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
138 |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
139 |
277 | 140 void QCairoWidget::mouseMoveEvent(QMouseEvent* event) |
141 { | |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
142 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); |
730
fe938bddb932
fix after namespace rename to Deprecated
Alain Mazy <alain@mazy.be>
parents:
570
diff
changeset
|
143 locker.GetCentralViewport().MouseMove(event->pos().x(), event->pos().y(), std::vector<Deprecated::Touch>()); |
277 | 144 } |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
145 |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
146 |
277 | 147 void QCairoWidget::wheelEvent(QWheelEvent * event) |
148 { | |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
149 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
150 |
277 | 151 OrthancStone::KeyboardModifiers stoneModifiers = GetKeyboardModifiers(event); |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
152 |
277 | 153 if (event->orientation() == Qt::Vertical) |
154 { | |
155 if (event->delta() < 0) // TODO: compare direction with SDL and make sure we send the same directions | |
156 { | |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
157 locker.GetCentralViewport().MouseWheel(OrthancStone::MouseWheelDirection_Up, event->pos().x(), event->pos().y(), stoneModifiers); |
277 | 158 } |
159 else | |
160 { | |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
161 locker.GetCentralViewport().MouseWheel(OrthancStone::MouseWheelDirection_Down, event->pos().x(), event->pos().y(), stoneModifiers); |
277 | 162 } |
163 } | |
164 } | |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
165 |
284 | 166 void QCairoWidget::keyPressEvent(QKeyEvent *event) |
167 { | |
327 | 168 using namespace OrthancStone; |
169 | |
284 | 170 OrthancStone::KeyboardModifiers stoneModifiers = GetKeyboardModifiers(event); |
171 | |
327 | 172 OrthancStone::KeyboardKeys keyType = OrthancStone::KeyboardKeys_Generic; |
173 char keyChar = event->text()[0].toLatin1(); | |
174 | |
175 #define CASE_QT_KEY_TO_ORTHANC(qt, o) case qt: keyType = o; break; | |
176 if (keyChar == 0) | |
177 { | |
178 switch (event->key()) | |
179 { | |
180 CASE_QT_KEY_TO_ORTHANC(Qt::Key_Up, KeyboardKeys_Up); | |
181 CASE_QT_KEY_TO_ORTHANC(Qt::Key_Down, KeyboardKeys_Down); | |
182 CASE_QT_KEY_TO_ORTHANC(Qt::Key_Left, KeyboardKeys_Left); | |
183 CASE_QT_KEY_TO_ORTHANC(Qt::Key_Right, KeyboardKeys_Right); | |
184 default: | |
185 break; | |
186 } | |
187 } | |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
188 |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
189 { |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
190 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
191 locker.GetCentralViewport().KeyPressed(keyType, keyChar, stoneModifiers); |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
192 } |
284 | 193 } |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
194 |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
195 |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
196 void QCairoWidget::resizeEvent(QResizeEvent* event) |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
197 { |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
198 grabGesture(Qt::PanGesture); |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
199 QWidget::resizeEvent(event); |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
200 |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
201 if (event) |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
202 { |
570
e77cbe4bb4c8
fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents:
457
diff
changeset
|
203 surface_.SetSize(event->size().width(), event->size().height(), true); |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
204 |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
205 image_.reset(new QImage(reinterpret_cast<uchar*>(surface_.GetBuffer()), |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
206 event->size().width(), |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
207 event->size().height(), |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
208 surface_.GetPitch(), |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
209 QImage::Format_RGB32)); |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
210 |
385
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
211 { |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
212 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
213 locker.GetCentralViewport().SetSize(event->size().width(), event->size().height()); |
6cc3ce74dc05
using message broker in widgets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
369
diff
changeset
|
214 } |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
215 } |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
diff
changeset
|
216 } |