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.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/noncore/apps/opie-reader/StyleConsts.h b/noncore/apps/opie-reader/StyleConsts.h
index 9701d19..29d7501 100644
--- a/noncore/apps/opie-reader/StyleConsts.h
+++ b/noncore/apps/opie-reader/StyleConsts.h
@@ -5,6 +5,8 @@ typedef unsigned short StyleType;
5 5
6#include <stdlib.h> 6#ifdef _WINDOWS
7#include <string.h> 7#include <string.h>
8#endif
9#include <stdlib.h>
8#include <qglobal.h> 10#include <qglobal.h>
9class QPixmap; 11class QImage;
10 12
@@ -12,6 +14,6 @@ struct GraphicLink
12{ 14{
13 QPixmap* graphic; 15 QImage* graphic;
14 bool isLink; 16 bool isLink;
15 unsigned long link; 17 unsigned long link;
16 GraphicLink(QPixmap* p, bool isLnk, unsigned long tgt) : 18 GraphicLink(QImage* p, bool isLnk, unsigned long tgt) :
17 graphic(p), isLink(isLnk), link(tgt) {} 19 graphic(p), isLink(isLnk), link(tgt) {}
@@ -23,4 +25,5 @@ struct pmstore
23 unsigned int count; 25 unsigned int count;
26 bool m_isScaleable;
24 GraphicLink* graphic; 27 GraphicLink* graphic;
25 pmstore(QPixmap* p, bool isLnk, unsigned long tgt) : count(1) 28 pmstore(bool _canScale, QImage* p, bool isLnk, unsigned long tgt) : count(1), m_isScaleable(_canScale)
26 { 29 {
@@ -53,2 +56,4 @@ class CBasicStyle
53 unsigned char m_leftmargin, m_rightmargin; 56 unsigned char m_leftmargin, m_rightmargin;
57 signed char m_extraspace;
58 signed char m_voffset;
54 CBasicStyle() 59 CBasicStyle()
@@ -75,2 +80,4 @@ class CBasicStyle
75 m_monospaced = false; 80 m_monospaced = false;
81 m_extraspace = 0;
82 m_voffset = 0;
76 } 83 }
@@ -83,2 +90,6 @@ class CStyle
83 public: 90 public:
91 signed char getVOffset() { return sty.m_voffset; }
92 void setVOffset(signed char sp) { sty.m_voffset = sp; }
93 signed char getExtraSpace() { return sty.m_extraspace; }
94 void setExtraSpace(signed char sp) { sty.m_extraspace = sp; }
84 bool getPictureLink() 95 bool getPictureLink()
@@ -106,3 +117,3 @@ class CStyle
106 ~CStyle(); 117 ~CStyle();
107 CStyle(CStyle&); 118// CStyle(CStyle&);
108 CStyle(const CStyle&); 119 CStyle(const CStyle&);
@@ -111,7 +122,8 @@ class CStyle
111 bool isPicture() { return (graphic != NULL); } 122 bool isPicture() { return (graphic != NULL); }
123 bool canScale() { return graphic->m_isScaleable; }
112 void clearPicture(); 124 void clearPicture();
113 void setPicture(QPixmap* _g, bool il=false, unsigned long tgt=0); 125 void setPicture(bool canScale, QImage* _g, bool il=false, unsigned long tgt=0);
114 QPixmap* getPicture() 126 QImage* getPicture()
115 { 127 {
116 QPixmap* pm = ((graphic != NULL) ? graphic->graphic->graphic : NULL); 128 QImage* pm = ((graphic != NULL) ? graphic->graphic->graphic : NULL);
117 return pm; 129 return pm;
@@ -159,3 +171,3 @@ class CStyle
159 } 171 }
160 int getFontSize() 172 int getFontSize() const
161 { 173 {