VR-Forces 4.6.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
appsrc
vrfOpdEditor
descriptorCanvas.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2013 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
6
#pragma once
7
8
#include <
vrvUtil/signalslib.h
>
9
10
#include <QtWidgets/QWidget>
11
12
#include <map>
13
14
#include <vlutil/vlString.h>
15
16
#include "
descriptorPage.h
"
17
18
class
DtVrfObjectParameters
;
19
class
QTabWidget
;
20
21
namespace
makVrv
22
{
23
class
DtDe;
24
}
25
26
typedef
struct
DtDescriptorPageStruct
27
{
28
QString
myTabName
;
29
DtDescriptorPageCreatorFcn
myCreator
;
30
DtDescriptorPage
*
myPage
;
31
}
DtDescriptorPageStruct
;
32
33
typedef
std::map<int, DtDescriptorPageStruct>
DtDescriptorPages
;
34
35
class
DtDescriptorCanvas
:
public
QWidget
36
{
37
Q_OBJECT
38
39
public
:
40
DtDescriptorCanvas
(
makVrv::DtDe
&, QWidget* parent = NULL,
const
Qt::WindowFlags& flags = 0);
41
42
// Creates canvas for items found in the supplied parameter
43
virtual
bool
init
(
DtVrfObjectParameters
* current,
DtVrfObjectParameters
* backup,
const
QString&
filename
);
44
45
// Adds a new page to the pages that will be created in initTabs
46
virtual
void
addPage
(
int
iIndex,
const
QString& name,
47
DtDescriptorPageCreatorFcn
fcn);
48
49
virtual
void
savedOpdFile
();
50
51
virtual
bool
canCreateParameterItem
()
const
;
52
virtual
bool
canDeleteParameterItem
()
const
;
53
virtual
bool
canRestoreParameterItem
()
const
;
54
virtual
void
deleteCurrentlySelectedParameterEntry
();
55
virtual
void
restoreCurrentlySelectedParameterEntry
();
56
virtual
void
createParameterEntry
();
57
58
virtual
QString
currentTab
(QString&)
const
;
59
virtual
void
setCurrentTab
(
const
QString&,
const
QStringList& tabPath);
60
virtual
void
setupDescriptorPage
(
int
);
61
62
DtVrfObjectParameters
*
parameters
()
const
{
return
myParameters
; };
63
DtVrfObjectParameters
*
backupParameters
()
const
{
return
myBackupParameters
; };
64
65
protected
:
66
virtual
bool
initTabs
(
DtVrfObjectParameters
* p,
DtVrfObjectParameters
* b);
67
68
virtual
bool
setupDescriptorTabs
(
DtVrfObjectParameters
* p,
DtVrfObjectParameters
* b) {
return
false
; };
69
70
virtual
QWidget*
createTab
();
71
72
virtual
void
clearPages
();
73
74
protected
slots:
75
void
setupDescriptorPage
();
76
77
signals:
78
void
opdParameterModified
(
DtVrfObjectParameters
*);
79
void
rightButtonPressed
(
QTreeWidgetItem
*, QMouseEvent*,
int
);
80
81
protected
:
82
QTabWidget
*
myTabWidget
;
83
DtVrfObjectParameters
*
myParameters
;
84
DtVrfObjectParameters
*
myBackupParameters
;
85
86
DtDescriptorPages
myDescriptorPages
;
87
int
myCurrentIndex
;
88
QString
myFilename
;
89
makVrv::DtDe
&
myDe
;
90
};
91
92
typedef
DtDescriptorCanvas
* (*DtDescriptorCanvasCreatorFcn)(
makVrv::DtDe
&, QWidget* parent,
const
Qt::WindowFlags& flags);
Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)