VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
tmqt
unitDisplayWidget.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2008 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: unitDisplayWidget.h,v $ $Revision: 1.1 $ $State: Exp $
7
*******************************************************************************/
8
11
12
#ifndef DTUNITDISPLAYWIDGET_H_
13
#define DTUNITDISPLAYWIDGET_H_
14
15
#include <QtGui/QWidget>
16
#include <QtCore/QVector>
17
18
class
DtUnitDisplayManager
;
19
class
DtUnitDisplay
;
20
class
QLabel
;
21
class
QComboBox
;
22
class
QLineEdit
;
23
class
QIntValidator;
24
29
30
class
DtDisplayLine
31
{
32
public
:
33
DtDisplayLine
&
operator=
(
const
DtDisplayLine
& rhs)
34
{
35
myLabel
= rhs.
myLabel
;
36
myUnits
= rhs.
myUnits
;
37
myPrecision
= rhs.
myPrecision
;
38
myUnitDisplay
= rhs.
myUnitDisplay
;
39
myUnitNames
= rhs.
myUnitNames
;
40
41
return
*
this
;
42
};
43
44
QLabel
*
myLabel
;
45
QComboBox
*
myUnits
;
46
QLineEdit
*
myPrecision
;
47
QIntValidator*
myValidator
;
48
QString
myUnitDisplay
;
49
QStringList
myUnitNames
;
50
};
51
52
class
DtUnitDisplayWidget
:
public
QWidget
53
{
54
Q_OBJECT
55
56
public
:
57
DtUnitDisplayWidget
(
QWidget
* p);
58
virtual
~DtUnitDisplayWidget
();
59
60
virtual
bool
init
();
61
63
virtual
bool
setup
(
const
DtUnitDisplayManager
*);
64
66
virtual
void
applyChanges
(
DtUnitDisplayManager
*);
67
68
protected
:
69
virtual
void
addDisplayLine
(
int
i,
const
QString&,
const
DtUnitDisplay
&);
70
71
signals:
72
void
changed
();
73
74
protected
slots:
75
virtual
void
unitsChanged
(
int
);
76
virtual
void
precisionChanged
(
const
QString&);
77
78
protected
:
79
QVector<DtDisplayLine>
myDisplayLines
;
80
};
81
82
#endif
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)