summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/StyleConsts.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/StyleConsts.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/StyleConsts.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/StyleConsts.h b/noncore/apps/opie-reader/StyleConsts.h
index 8e23c6f..4b7ff4b 100644
--- a/noncore/apps/opie-reader/StyleConsts.h
+++ b/noncore/apps/opie-reader/StyleConsts.h
@@ -35,20 +35,22 @@ struct pmstore
35 35
36enum EalignmentType 36enum EalignmentType
37{ 37{
38 m_AlignLeft, 38 m_AlignLeft,
39 m_AlignRight, 39 m_AlignRight,
40 m_AlignCentre, 40 m_AlignCentre,
41 m_AlignJustify 41 m_AlignJustify,
42 m_AlignNone
42}; 43};
43 44
44class CBasicStyle 45class CBasicStyle
45{ 46{
46 friend class CStyle; 47 friend class CStyle;
47 bool m_bold, 48 bool m_bold,
48 m_italic; 49 m_italic;
50 unsigned long m_table;
49 int m_fontsize; 51 int m_fontsize;
50 EalignmentType m_align; 52 EalignmentType m_align;
51 unsigned char red, green, blue; 53 unsigned char red, green, blue;
52 unsigned char bred, bgreen, bblue; 54 unsigned char bred, bgreen, bblue;
53 unsigned char pred, pgreen, pblue; 55 unsigned char pred, pgreen, pblue;
54 unsigned long data; 56 unsigned long data;
@@ -61,12 +63,13 @@ class CBasicStyle
61 unsigned char m_leftmargin, m_rightmargin; 63 unsigned char m_leftmargin, m_rightmargin;
62 signed char m_extraspace; 64 signed char m_extraspace;
63 signed char m_voffset; 65 signed char m_voffset;
64 CBasicStyle() 66 CBasicStyle()
65 { 67 {
66 unset(); 68 unset();
69 m_table = 0xffffffff;
67 } 70 }
68 bool operator!=(const CBasicStyle& rhs) 71 bool operator!=(const CBasicStyle& rhs)
69 { 72 {
70 return (memcmp(this, &rhs, sizeof(CBasicStyle)) != 0); 73 return (memcmp(this, &rhs, sizeof(CBasicStyle)) != 0);
71 } 74 }
72 void unset() 75 void unset()
@@ -143,12 +146,15 @@ class CStyle
143 CStyle() : graphic(NULL) {} 146 CStyle() : graphic(NULL) {}
144 ~CStyle(); 147 ~CStyle();
145// CStyle(CStyle&); 148// CStyle(CStyle&);
146 CStyle(const CStyle&); 149 CStyle(const CStyle&);
147 CStyle& operator=(const CStyle&); 150 CStyle& operator=(const CStyle&);
148 void unset(); 151 void unset();
152 bool isTable() const { return (sty.m_table != 0xffffffff); }
153 void setTable(unsigned long _b) { sty.m_table = _b; }
154 unsigned long getTable() { return sty.m_table; }
149 bool isPicture() const { return (graphic != NULL); } 155 bool isPicture() const { return (graphic != NULL); }
150 bool canScale() const { return graphic->m_isScaleable; } 156 bool canScale() const { return graphic->m_isScaleable; }
151 void clearPicture(); 157 void clearPicture();
152 void setPicture(bool canScale, QImage* _g, bool il=false, unsigned long tgt=0); 158 void setPicture(bool canScale, QImage* _g, bool il=false, unsigned long tgt=0);
153 QImage* getPicture() 159 QImage* getPicture()
154 { 160 {
@@ -184,12 +190,16 @@ class CStyle
184 sty.m_align = m_AlignCentre; 190 sty.m_align = m_AlignCentre;
185 } 191 }
186 void setFullJustify() 192 void setFullJustify()
187 { 193 {
188 sty.m_align = m_AlignJustify; 194 sty.m_align = m_AlignJustify;
189 } 195 }
196 void setNoJustify()
197 {
198 sty.m_align = m_AlignNone;
199 }
190 StyleType getJustify() 200 StyleType getJustify()
191 { 201 {
192 return sty.m_align; 202 return sty.m_align;
193 } 203 }
194 204
195 void setFontSize(int _fs) 205 void setFontSize(int _fs)