DI-Guy C++ SDK Reference
13.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
diguyQGraphicsProxyWidget.h
Go to the documentation of this file.
1
2
#ifndef diguyQGraphicsProxyWidget_H
3
#define diguyQGraphicsProxyWidget_H
4
5
#include <QtGui/QGraphicsView>
6
#include <QObject>
7
#include <QGraphicsProxyWidget>
8
#include <QList>
9
#include <QString>
10
11
class
QGraphicsRectItem;
12
class
QGraphicsSimpleTextItem;
13
14
class
diguyQGraphicsProxyWidget
;
15
class
bdiQGraphicsView;
16
17
#include <
diguy_constants.h
>
18
19
20
/****************************************************************************/
21
/*
22
A graphics proxy widget embeds a widget in a scene. An instance should only
23
be made by a factory function, which has a pointer to a graphics view instance.
24
*/
25
class
diguyQGraphicsProxyWidget
:
public
QGraphicsProxyWidget
26
{
27
Q_OBJECT
28
29
public
:
30
31
friend
class
bdiQGraphicsView
;
32
33
diguyQGraphicsProxyWidget
(
const
char
* name,
34
bdiQGraphicsView
* view,
35
QGraphicsItem* parent = 0,
36
Qt::WindowFlags wFlags = 0,
37
int
base_x = 10,
38
int
base_y = 10,
39
int
base_z = 50,
40
int
base_w = 0,
41
int
base_h = 0);
42
virtual
~diguyQGraphicsProxyWidget
();
43
44
void
resizeEvent
(QGraphicsSceneResizeEvent* event);
45
46
const
char
*
get_name
() {
return
m_name
.ascii();}
47
48
void
set_base_position
(
int
base_x,
int
base_y);
49
void
set_base_size
(
int
base_w,
int
base_h);
50
void
set_base_depth
(
int
base_z);
51
void
set_handle_own_justification
(
bool
state ) {
m_handle_own_justification
= state; }
52
53
int
get_x
() {
return
m_base_x
; }
54
int
get_y
() {
return
m_base_y
; }
55
int
get_w
() {
return
m_base_w
; }
56
int
get_h
() {
return
m_base_h
; }
57
58
bdiQGraphicsView
*
get_graphics_view
();
59
bool
get_updating_position
(){
return
m_updating_position
;}
60
void
update_position
();
61
62
signals:
63
void
signal_view_size_changed
();
64
65
protected
:
66
QString
m_name
;
67
68
QGraphicsRectItem*
m_item_title_bar
;
69
QGraphicsSimpleTextItem*
m_item_title_bar_text
;
70
71
bdiQGraphicsView
*
m_view
;
72
int
m_base_x
;
73
int
m_base_y
;
74
int
m_base_z
;
75
int
m_base_w
;
76
int
m_base_h
;
77
78
bool
m_updating_position
;
79
bool
m_handle_own_justification
;
80
};
81
82
83
#endif // bdiQGraphicsView_H
84
include
diguyQGraphicsProxyWidget.h
Generated on Wed Jul 9 2014 21:35:59 for DI-Guy C++ SDK Reference by
1.8.3.1