Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
qt
QtFont.cxx
Go to the documentation of this file.
1
14
#include "
QtFont.h
"
15
16
#include <string>
17
18
using
std::string;
19
20
namespace
hippodraw {
21
22
QtFont::
23
QtFont
()
24
: m_font(
QFont
(
"times"
) ),
25
m_flag( false )
26
{
27
}
28
29
QtFont::
30
QtFont
(
const
std::string & family,
int
pointsize,
int
weight
,
bool
italic )
31
:m_font( family.c_str(), pointsize, weight, italic ),
32
m_flag( false )
33
{
34
}
35
36
QtFont::
37
QtFont
(
const
QFont
& qfont )
38
{
39
m_font
= qfont;
40
m_flag
=
true
;
41
}
42
43
QtFont::
44
~QtFont
()
45
{
46
}
47
48
string
49
QtFont::
50
family
()
const
51
{
52
QString
qstr =
m_font
.
family
();
53
54
return
qstr.
latin1
();
55
}
56
57
void
58
QtFont::
59
setFamily
(
const
std::string & family )
60
{
61
m_font
.
setFamily
( family.c_str() );
62
}
63
64
int
65
QtFont::
66
pointSize
()
const
67
{
68
return
m_font
.
pointSize
();
69
}
70
71
void
72
QtFont::
73
setPointSize
(
int
pointsize )
74
{
75
m_font
.
setPointSize
( pointsize );
76
}
77
78
int
79
QtFont::
80
weight
()
const
81
{
82
return
m_font
.
weight
();
83
}
84
85
void
86
QtFont::
87
setWeight
(
int
weight
)
88
{
89
m_font
.
setWeight
( weight );
90
}
91
92
bool
93
QtFont::
94
italic
()
const
95
{
96
return
m_font
.
italic
();
97
}
98
99
void
100
QtFont::
101
setItalic
(
bool
enable )
102
{
103
m_font
.
setItalic
( enable );
104
}
105
106
const
QFont
&
107
QtFont::
108
font
()
const
109
{
110
return
m_font
;
111
}
112
113
void
114
QtFont::
115
setFont
(
const
QFont
& qfont )
116
{
117
m_font
= qfont;
118
m_flag
=
true
;
119
}
120
121
void
122
QtFont::
123
unsetFont
()
124
{
125
m_flag
=
false
;
126
}
127
128
bool
129
QtFont::
130
isSet
()
131
{
132
return
m_flag
;
133
}
134
135
}
// namespace hippodraw
136
137
138
Generated for HippoDraw Class Library by