comparison Applications/Qt/QCairoWidget.cpp @ 291:87376a645ee1 am-2

renaming
author am@osimis.io
date Thu, 30 Aug 2018 17:06:22 +0200
parents 38b0ac8055b9
children 3a4ca166fafa
comparison
equal deleted inserted replaced
289:36ebe6ec8fe8 291:87376a645ee1
34 34
35 QCairoWidget::~QCairoWidget() 35 QCairoWidget::~QCairoWidget()
36 { 36 {
37 } 37 }
38 38
39 void QCairoWidget::SetContext(OrthancStone::BasicNativeApplicationContext& context) 39 void QCairoWidget::SetContext(OrthancStone::NativeStoneApplicationContext& context)
40 { 40 {
41 context_ = &context; 41 context_ = &context;
42 context_->GetCentralViewport().Register(*this); // get notified each time the content of the central viewport changes 42 context_->GetCentralViewport().Register(*this); // get notified each time the content of the central viewport changes
43 } 43 }
44 44
46 { 46 {
47 QPainter painter(this); 47 QPainter painter(this);
48 48
49 if (image_.get() != NULL && context_ != NULL) 49 if (image_.get() != NULL && context_ != NULL)
50 { 50 {
51 OrthancStone::BasicNativeApplicationContext::GlobalMutexLocker locker(*context_); 51 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_);
52 OrthancStone::IViewport& viewport = context_->GetCentralViewport(); 52 OrthancStone::IViewport& viewport = context_->GetCentralViewport();
53 Orthanc::ImageAccessor a = surface_.GetAccessor(); 53 Orthanc::ImageAccessor a = surface_.GetAccessor();
54 viewport.Render(a); 54 viewport.Render(a);
55 painter.drawImage(0, 0, *image_); 55 painter.drawImage(0, 0, *image_);
56 } 56 }