API Documentation
Loading...
Searching...
No Matches
QTWidgetModel.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Model.h>
4#include <NDEVR/MouseController.h>
5#include <QPixmap>
6#include <QWidget>
7#include <QTimer>
8#include <QMouseEvent>
9namespace NDEVR
10{
12 {
13 public:
14 QTWidgetImage(QWidget* widget, const String& image_id);
15 void updateImage();
16 const String& imageID() const { return m_image_id; }
17 protected:
19 QPixmap* m_pixmap;
21 };
22
24 {
25 public:
26 QWidgetModel(QWidget* widget, const Model& model, const void* lock);
28 QWidget* widget() const { return m_widget; }
29 protected:
30 void init();
31 void update();
32 protected:
33 const void* m_lock;
34 QTimer* m_timer;
35 QWidget* m_widget;
37 };
38#if NDEVR_VIEWPORT
39 class NDEVR_API WidgetMouseController : public MouseControllerBase
40 {
41 public:
42 WidgetMouseController(QWidgetModel* model);
43 virtual bool processMouseEvent(const MouseEvent& event, DesignObjectLookup* lookup, Camera* camera) override;
44 bool processMouseEvent(const MouseEvent& event, DesignObjectLookup* lookup, SelectionInfo& info);
45 protected:
46 QWidgetModel* m_widget;
47 };
48#endif
49}
#define NDEVR_API
Definition DLLInfo.h:67
Definition DesignObjectLookup.h:61
Definition Model.h:54
Definition Event.h:276
Definition QTWidgetModel.h:12
QPixmap * m_pixmap
Definition QTWidgetModel.h:19
QWidget * m_widget_to_paint
Definition QTWidgetModel.h:20
const String & imageID() const
Definition QTWidgetModel.h:16
String m_image_id
Definition QTWidgetModel.h:18
Definition QTWidgetModel.h:24
const void * m_lock
Definition QTWidgetModel.h:33
QTimer * m_timer
Definition QTWidgetModel.h:34
QWidget * widget() const
Definition QTWidgetModel.h:28
QTWidgetImage * m_image
Definition QTWidgetModel.h:36
QWidget * m_widget
Definition QTWidgetModel.h:35
Definition Selector.h:46
Definition String.h:40
Definition ACIColor.h:37