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>
9
namespace
NDEVR
10
{
11
class
NDEVR_API
QTWidgetImage
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
:
18
String
m_image_id
;
19
QPixmap*
m_pixmap
;
20
QWidget*
m_widget_to_paint
;
21
};
22
23
class
NDEVR_API
QWidgetModel
:
public
Model
24
{
25
public
:
26
QWidgetModel
(QWidget* widget,
const
Model
& model,
const
void
* lock);
27
~QWidgetModel
();
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
;
36
QTWidgetImage
*
m_image
;
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
}
DLLInfo.h
NDEVR_API
#define NDEVR_API
Definition
DLLInfo.h:67
NDEVR::DesignObjectLookup
Definition
DesignObjectLookup.h:61
NDEVR::Model
Definition
Model.h:54
NDEVR::MouseEvent
Definition
Event.h:276
NDEVR::QTWidgetImage
Definition
QTWidgetModel.h:12
NDEVR::QTWidgetImage::m_pixmap
QPixmap * m_pixmap
Definition
QTWidgetModel.h:19
NDEVR::QTWidgetImage::m_widget_to_paint
QWidget * m_widget_to_paint
Definition
QTWidgetModel.h:20
NDEVR::QTWidgetImage::imageID
const String & imageID() const
Definition
QTWidgetModel.h:16
NDEVR::QTWidgetImage::m_image_id
String m_image_id
Definition
QTWidgetModel.h:18
NDEVR::QWidgetModel
Definition
QTWidgetModel.h:24
NDEVR::QWidgetModel::m_lock
const void * m_lock
Definition
QTWidgetModel.h:33
NDEVR::QWidgetModel::m_timer
QTimer * m_timer
Definition
QTWidgetModel.h:34
NDEVR::QWidgetModel::widget
QWidget * widget() const
Definition
QTWidgetModel.h:28
NDEVR::QWidgetModel::m_image
QTWidgetImage * m_image
Definition
QTWidgetModel.h:36
NDEVR::QWidgetModel::m_widget
QWidget * m_widget
Definition
QTWidgetModel.h:35
NDEVR::SelectionInfo
Definition
Selector.h:46
NDEVR::String
Definition
String.h:40
NDEVR
Definition
ACIColor.h:37
NDEVR
Headers
QTWidgetModel.h