Diffstat (limited to 'noncore/apps/opie-reader/QTReader.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/QTReader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-reader/QTReader.cpp b/noncore/apps/opie-reader/QTReader.cpp index 3995ee7..f2ee027 100644 --- a/noncore/apps/opie-reader/QTReader.cpp +++ b/noncore/apps/opie-reader/QTReader.cpp | |||
@@ -7,86 +7,86 @@ | |||
7 | ** program may be used, distributed and modified without limitation. | 7 | ** program may be used, distributed and modified without limitation. |
8 | ** | 8 | ** |
9 | *****************************************************************************/ | 9 | *****************************************************************************/ |
10 | 10 | ||
11 | #include <qpainter.h> | 11 | #include <qpainter.h> |
12 | #include "config.h" | 12 | #include "config.h" |
13 | #include "QTReader.h" | 13 | #include "QTReader.h" |
14 | #include "QTReaderApp.h" | 14 | #include "QTReaderApp.h" |
15 | #include "CDrawBuffer.h" | 15 | #include "CDrawBuffer.h" |
16 | #include <qpe/qpeapplication.h> | 16 | #include <qpe/qpeapplication.h> |
17 | #include <math.h> | 17 | #include <math.h> |
18 | #include <ctype.h> | 18 | #include <ctype.h> |
19 | #include <stdio.h> //for sprintf | 19 | #include <stdio.h> //for sprintf |
20 | #include <qpe/config.h> | 20 | #include <qpe/config.h> |
21 | #include <qpe/applnk.h> | 21 | #include <qpe/applnk.h> |
22 | #include <qfontdatabase.h> | 22 | #include <qfontdatabase.h> |
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | #include <qpe/qcopenvelope_qws.h> | 24 | #include <qpe/qcopenvelope_qws.h> |
25 | #include "StateData.h" | 25 | #include "StateData.h" |
26 | 26 | ||
27 | #ifdef _UNICODE | 27 | #ifdef _UNICODE |
28 | const char *QTReader::fonts[] = { "unifont", "Courier", "Times", 0 }; | 28 | const char *QTReader::fonts[] = { "unifont", "Courier", "Times", 0 }; |
29 | #else | 29 | #else |
30 | const char *QTReader::fonts[] = { "Helvetica", "Courier", "Times", 0 }; | 30 | const char *QTReader::fonts[] = { "Helvetica", "Courier", "Times", 0 }; |
31 | #endif | 31 | #endif |
32 | //const int QTReader::fontsizes[] = { 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 70, 80, 90, 100, 0 }; | 32 | //const int QTReader::fontsizes[] = { 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 70, 80, 90, 100, 0 }; |
33 | 33 | ||
34 | //const tchar *QTReader::fonts[] = { "unifont", "fixed", "micro", "smoothtimes", "Courier", "Times", 0 }; | 34 | //const tchar *QTReader::fonts[] = { "unifont", "fixed", "micro", "smoothtimes", "Courier", "Times", 0 }; |
35 | //const int QTReader::fontsizes[] = {10,16,17,22,0}; | 35 | //const int QTReader::fontsizes[] = {10,16,17,22,0}; |
36 | //const tchar *QTReader::fonts[] = { "verdana", "Courier", "Times", 0 }; | 36 | //const tchar *QTReader::fonts[] = { "verdana", "Courier", "Times", 0 }; |
37 | //const int QTReader::fontsizes[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,0}; | 37 | //const int QTReader::fontsizes[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,0}; |
38 | 38 | ||
39 | QTReader::QTReader( QWidget *parent=0, const char *name=0, WFlags f = 0) : | 39 | QTReader::QTReader( QWidget *parent, const char *name, WFlags f) : |
40 | QWidget(parent, name, f), | 40 | QWidget(parent, name, f), |
41 | m_delay(100), | 41 | m_delay(100), |
42 | m_scrolldy1(0), | 42 | m_scrolldy1(0), |
43 | m_scrolldy2(0), | 43 | m_scrolldy2(0), |
44 | m_autoScroll(false), | 44 | m_autoScroll(false), |
45 | //textarray(NULL), | 45 | //textarray(NULL), |
46 | //locnarray(NULL), | 46 | //locnarray(NULL), |
47 | numlines(0), | 47 | numlines(0), |
48 | m_fontname("unifont"), | 48 | m_fontname("unifont"), |
49 | m_fm(NULL), | 49 | m_fm(NULL), |
50 | mouseUpOn(true), | 50 | mouseUpOn(true), |
51 | m_twotouch(true), | 51 | m_twotouch(true), |
52 | m_touchone(true), | 52 | m_touchone(true), |
53 | bDoUpdates(false), | 53 | bDoUpdates(false), |
54 | m_navkeys(true) | 54 | m_navkeys(true) |
55 | { | 55 | { |
56 | m_overlap = 1; | 56 | m_overlap = 1; |
57 | // init(); | 57 | // init(); |
58 | } | 58 | } |
59 | /* | 59 | /* |
60 | QTReader::QTReader( const QString& filename, QWidget *parent=0, const tchar *name=0, WFlags f = 0) : | 60 | QTReader::QTReader( const QString& filename, QWidget *parent, const tchar *name, WFlags f ) : |
61 | QWidget(parent, name, f), | 61 | QWidget(parent, name, f), |
62 | m_textfont(0), | 62 | m_textfont(0), |
63 | m_textsize(1), | 63 | m_textsize(1), |
64 | textarray(NULL), | 64 | textarray(NULL), |
65 | numlines(0), | 65 | numlines(0), |
66 | bstripcr(true), | 66 | bstripcr(true), |
67 | bunindent(false), | 67 | bunindent(false), |
68 | brepara(false), | 68 | brepara(false), |
69 | bdblspce(false), | 69 | bdblspce(false), |
70 | btight(false), | 70 | btight(false), |
71 | bindenter(0), | 71 | bindenter(0), |
72 | m_fm(NULL) | 72 | m_fm(NULL) |
73 | { | 73 | { |
74 | init(); | 74 | init(); |
75 | // qDebug("Load_file(1)"); | 75 | // qDebug("Load_file(1)"); |
76 | load_file((const tchar*)filename); | 76 | load_file((const tchar*)filename); |
77 | } | 77 | } |
78 | */ | 78 | */ |
79 | 79 | ||
80 | long QTReader::real_delay() | 80 | long QTReader::real_delay() |
81 | { | 81 | { |
82 | return ( 8976 + m_delay ) / ( m_linespacing * m_linespacing ); | 82 | return ( 8976 + m_delay ) / ( m_linespacing * m_linespacing ); |
83 | } | 83 | } |
84 | 84 | ||
85 | void QTReader::mousePressEvent( QMouseEvent* _e ) | 85 | void QTReader::mousePressEvent( QMouseEvent* _e ) |
86 | { | 86 | { |
87 | buffdoc.unsuspend(); | 87 | buffdoc.unsuspend(); |
88 | if (_e->button() == RightButton) | 88 | if (_e->button() == RightButton) |
89 | { | 89 | { |
90 | mouseUpOn = false; | 90 | mouseUpOn = false; |
91 | if (buffdoc.hasnavigation()) | 91 | if (buffdoc.hasnavigation()) |
92 | { | 92 | { |