kivio_text_style.h
1#ifndef KIVIO_TEXT_STYLE_H
2#define KIVIO_TEXT_STYLE_H
3
4#ifdef HAVE_CONFIG_H
5#include <config.h>
6#endif
7
8#include <tqfont.h>
9
10class TQDomDocument;
11class TQPainter;
12
13
14class KivioTextStyle
15{
16protected:
17 TQString m_text; // The text inside this shape
18 TQColor m_color; // The text color
19 TQFont m_font; // The text font
20 bool m_isHtml; // Is the text HTML formatted?
21 int m_hTextAlign, m_vTextAlign; // Horizontal and vertical text alignment flags
22
23public:
24 KivioTextStyle();
25 virtual ~KivioTextStyle();
26
27 TQDomElement saveXML( TQDomDocument & );
28 bool loadXML( const TQDomElement & );
29
30 void copyInto( KivioTextStyle * );
31
32
33
34
35 inline TQString text() { return m_text; }
36 inline void setText( TQString s ) { m_text=s; }
37
38 inline TQColor color() { return m_color; }
39 inline void setColor( TQColor c ) { m_color=c; }
40
41 inline TQFont font() { return m_font; }
42 inline void setFont( TQFont f ) { m_font=f; }
43
44 inline bool isHtml() { return m_isHtml; }
45 inline void setIsHtml( bool b ) { m_isHtml=b; }
46
47 inline int hTextAlign() { return m_hTextAlign; }
48 inline void setHTextAlign(int i) { m_hTextAlign=i; }
49
50 inline int vTextAlign() { return m_vTextAlign; }
51 inline void setVTextAlign(int i) { m_vTextAlign=i; }
52
53};
54
55#endif
56