author | chicken <chicken> | 2004-03-01 19:23:21 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 19:23:21 (UTC) |
commit | e6fcfb9a4c0c744ea7b0ec8b7e200b185a8a309a (patch) (unidiff) | |
tree | 35b7298eb0d91fa038f84814205f415102975f3f /noncore/apps | |
parent | ddc3d749af5f7afebf69488b79641771fe246b5b (diff) | |
download | opie-e6fcfb9a4c0c744ea7b0ec8b7e200b185a8a309a.zip opie-e6fcfb9a4c0c744ea7b0ec8b7e200b185a8a309a.tar.gz opie-e6fcfb9a4c0c744ea7b0ec8b7e200b185a8a309a.tar.bz2 |
fix includes
-rw-r--r-- | noncore/apps/opie-reader/Bkmks.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-reader/BuffDoc.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-reader/CDrawBuffer.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-reader/CEncoding_tables.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-reader/CFilter.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-reader/FontControl.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-reader/Palm2QImage.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-reader/Prefs.cpp | 9 | ||||
-rw-r--r-- | noncore/apps/opie-reader/QTReader.cpp | 9 | ||||
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-reader/ToolbarPrefs.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/opie-reader/fileBrowser.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-reader/main.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-reader/plucker.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/opie-reader/plucker_base.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/opie-reader/ppm.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-reader/version.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/Excel.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sheet.cpp | 1 |
20 files changed, 0 insertions, 70 deletions
diff --git a/noncore/apps/opie-reader/Bkmks.cpp b/noncore/apps/opie-reader/Bkmks.cpp index 889c6d8..16bc1f1 100644 --- a/noncore/apps/opie-reader/Bkmks.cpp +++ b/noncore/apps/opie-reader/Bkmks.cpp | |||
@@ -1,30 +1,28 @@ | |||
1 | #include <qmessagebox.h> | 1 | #include <qmessagebox.h> |
2 | 2 | ||
3 | #include "Bkmks.h" | 3 | #include "Bkmks.h" |
4 | 4 | ||
5 | #include "StyleConsts.h" | ||
6 | #include "Markups.h" | ||
7 | #include "my_list.h" | 5 | #include "my_list.h" |
8 | #include "version.h" | 6 | #include "version.h" |
9 | #include "names.h" | 7 | #include "names.h" |
10 | 8 | ||
11 | const unsigned long BkmkFile::magic = ((unsigned long)'q' << 24) | ((unsigned long)'t' << 16) | ((unsigned long)'r' << 8) | ((unsigned long)BKMKTYPE); | 9 | const unsigned long BkmkFile::magic = ((unsigned long)'q' << 24) | ((unsigned long)'t' << 16) | ((unsigned long)'r' << 8) | ((unsigned long)BKMKTYPE); |
12 | 10 | ||
13 | Bkmk::Bkmk(const unsigned char* _nm, unsigned short _nmlen, const unsigned char* _anno, unsigned short _annolen, unsigned int _p) : m_position(_p) | 11 | Bkmk::Bkmk(const unsigned char* _nm, unsigned short _nmlen, const unsigned char* _anno, unsigned short _annolen, unsigned int _p) : m_position(_p) |
14 | { | 12 | { |
15 | init(_nm, _nmlen, _anno, _annolen, _p); | 13 | init(_nm, _nmlen, _anno, _annolen, _p); |
16 | } | 14 | } |
17 | 15 | ||
18 | Bkmk::Bkmk(const tchar* _nm, const unsigned char* _anno, unsigned short annolen, unsigned int _p) : m_position(_p) | 16 | Bkmk::Bkmk(const tchar* _nm, const unsigned char* _anno, unsigned short annolen, unsigned int _p) : m_position(_p) |
19 | { | 17 | { |
20 | init(_nm, sizeof(tchar)*(ustrlen(_nm)+1), _anno, annolen, _p); | 18 | init(_nm, sizeof(tchar)*(ustrlen(_nm)+1), _anno, annolen, _p); |
21 | } | 19 | } |
22 | 20 | ||
23 | Bkmk::Bkmk(const tchar* _nm, const tchar* _anno, unsigned int _p) : m_position(_p) | 21 | Bkmk::Bkmk(const tchar* _nm, const tchar* _anno, unsigned int _p) : m_position(_p) |
24 | { | 22 | { |
25 | 23 | ||
26 | if (_anno == NULL) | 24 | if (_anno == NULL) |
27 | { | 25 | { |
28 | tchar t = 0; | 26 | tchar t = 0; |
29 | init(_nm, sizeof(tchar)*(ustrlen(_nm)+1), &t, sizeof(t), _p); | 27 | init(_nm, sizeof(tchar)*(ustrlen(_nm)+1), &t, sizeof(t), _p); |
30 | } | 28 | } |
diff --git a/noncore/apps/opie-reader/BuffDoc.cpp b/noncore/apps/opie-reader/BuffDoc.cpp index 2402904..4fbab93 100644 --- a/noncore/apps/opie-reader/BuffDoc.cpp +++ b/noncore/apps/opie-reader/BuffDoc.cpp | |||
@@ -1,34 +1,30 @@ | |||
1 | #include "names.h" | ||
2 | 1 | ||
3 | #define NEWLINEBREAK | 2 | #define NEWLINEBREAK |
4 | 3 | ||
5 | #include "BuffDoc.h" | 4 | #include "BuffDoc.h" |
6 | //#include <FL/fl_draw.h> | 5 | //#include <FL/fl_draw.h> |
7 | #include "config.h" | ||
8 | #include "CDrawBuffer.h" | ||
9 | #include "plucker.h" | 6 | #include "plucker.h" |
10 | #include "usenef.h" | ||
11 | #ifdef USENEF | 7 | #ifdef USENEF |
12 | #include "nef.h" | 8 | #include "nef.h" |
13 | #include "arrierego.h" | 9 | #include "arrierego.h" |
14 | #endif | 10 | #endif |
15 | 11 | ||
16 | linkType BuffDoc::hyperlink(unsigned int n, QString& wrd) | 12 | linkType BuffDoc::hyperlink(unsigned int n, QString& wrd) |
17 | { | 13 | { |
18 | linkType bRet = eNone; | 14 | linkType bRet = eNone; |
19 | if (exp != NULL) | 15 | if (exp != NULL) |
20 | { | 16 | { |
21 | bRet = exp->hyperlink(n, wrd); | 17 | bRet = exp->hyperlink(n, wrd); |
22 | if (bRet == eLink) | 18 | if (bRet == eLink) |
23 | { | 19 | { |
24 | lastword.empty(); | 20 | lastword.empty(); |
25 | lastsizes[0] = laststartline = n; | 21 | lastsizes[0] = laststartline = n; |
26 | #ifdef NEWLINEBREAK | 22 | #ifdef NEWLINEBREAK |
27 | lastispara = true; | 23 | lastispara = true; |
28 | #else | 24 | #else |
29 | lastispara = false; | 25 | lastispara = false; |
30 | #endif | 26 | #endif |
31 | lastsizes[0] = laststartline = exp->locate(); | 27 | lastsizes[0] = laststartline = exp->locate(); |
32 | } | 28 | } |
33 | } | 29 | } |
34 | return bRet; | 30 | return bRet; |
diff --git a/noncore/apps/opie-reader/CDrawBuffer.cpp b/noncore/apps/opie-reader/CDrawBuffer.cpp index 77b76fb..ec36fb2 100644 --- a/noncore/apps/opie-reader/CDrawBuffer.cpp +++ b/noncore/apps/opie-reader/CDrawBuffer.cpp | |||
@@ -1,32 +1,28 @@ | |||
1 | #include "CDrawBuffer.h" | 1 | #include "CDrawBuffer.h" |
2 | #include "FontControl.h" | 2 | #include "FontControl.h" |
3 | #include <qfontmetrics.h> | ||
4 | #include <qpainter.h> | 3 | #include <qpainter.h> |
5 | #include <qpixmap.h> | ||
6 | #include <qimage.h> | 4 | #include <qimage.h> |
7 | #include "useqpe.h" | ||
8 | #include "opie.h" | ||
9 | 5 | ||
10 | CDrawBuffer::~CDrawBuffer() | 6 | CDrawBuffer::~CDrawBuffer() |
11 | { | 7 | { |
12 | while (!segs.isEmpty()) segs.erase(0); | 8 | while (!segs.isEmpty()) segs.erase(0); |
13 | } | 9 | } |
14 | 10 | ||
15 | void CDrawBuffer::setright(CDrawBuffer& rhs, int f) | 11 | void CDrawBuffer::setright(CDrawBuffer& rhs, int f) |
16 | { | 12 | { |
17 | int i; | 13 | int i; |
18 | len = rhs.len; | 14 | len = rhs.len; |
19 | fc = rhs.fc; | 15 | fc = rhs.fc; |
20 | m_maxstyle = m_ascent = m_descent = m_lineSpacing = m_lineExtraSpacing = 0; | 16 | m_maxstyle = m_ascent = m_descent = m_lineSpacing = m_lineExtraSpacing = 0; |
21 | while (!segs.isEmpty()) | 17 | while (!segs.isEmpty()) |
22 | { | 18 | { |
23 | segs.erase(0); | 19 | segs.erase(0); |
24 | } | 20 | } |
25 | for (CList<textsegment>::iterator iter = rhs.segs.begin(); iter != rhs.segs.end(); ) | 21 | for (CList<textsegment>::iterator iter = rhs.segs.begin(); iter != rhs.segs.end(); ) |
26 | { | 22 | { |
27 | CList<textsegment>::iterator next = iter; | 23 | CList<textsegment>::iterator next = iter; |
28 | iter++; | 24 | iter++; |
29 | if (iter == rhs.segs.end() || iter->start > f) | 25 | if (iter == rhs.segs.end() || iter->start > f) |
30 | { | 26 | { |
31 | int st = next->start-f; | 27 | int st = next->start-f; |
32 | if (st < 0) st = 0; | 28 | if (st < 0) st = 0; |
diff --git a/noncore/apps/opie-reader/CEncoding_tables.cpp b/noncore/apps/opie-reader/CEncoding_tables.cpp index 667bda0..e335819 100644 --- a/noncore/apps/opie-reader/CEncoding_tables.cpp +++ b/noncore/apps/opie-reader/CEncoding_tables.cpp | |||
@@ -1,26 +1,25 @@ | |||
1 | #include "CEncoding_tables.h" | 1 | #include "CEncoding_tables.h" |
2 | #include "config.h" | ||
3 | 2 | ||
4 | static const unicodetable unicodevalues[] = { | 3 | static const unicodetable unicodevalues[] = { |
5 | // from RFC 1489, ftp://ftp.isi.edu/in-notes/rfc1489.txt | 4 | // from RFC 1489, ftp://ftp.isi.edu/in-notes/rfc1489.txt |
6 | { "KOI8-R", "KOI8-R", 2084, | 5 | { "KOI8-R", "KOI8-R", 2084, |
7 | { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, | 6 | { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, |
8 | 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, | 7 | 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, |
9 | 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248, | 8 | 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248, |
10 | 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, | 9 | 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, |
11 | 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, | 10 | 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, |
12 | 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E, | 11 | 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E, |
13 | 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, | 12 | 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, |
14 | 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9, | 13 | 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9, |
15 | 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, | 14 | 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, |
16 | 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, | 15 | 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, |
17 | 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, | 16 | 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, |
18 | 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A, | 17 | 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A, |
19 | 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, | 18 | 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, |
20 | 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, | 19 | 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, |
21 | 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, | 20 | 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, |
22 | 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A } }, | 21 | 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A } }, |
23 | // /**/ - The BULLET OPERATOR is confused. Some people think | 22 | // /**/ - The BULLET OPERATOR is confused. Some people think |
24 | // it should be 0x2022 (BULLET). | 23 | // it should be 0x2022 (BULLET). |
25 | 24 | ||
26 | // from RFC 2319, ftp://ftp.isi.edu/in-notes/rfc2319.txt | 25 | // from RFC 2319, ftp://ftp.isi.edu/in-notes/rfc2319.txt |
diff --git a/noncore/apps/opie-reader/CFilter.cpp b/noncore/apps/opie-reader/CFilter.cpp index 73a0872..0422ba6 100644 --- a/noncore/apps/opie-reader/CFilter.cpp +++ b/noncore/apps/opie-reader/CFilter.cpp | |||
@@ -1,25 +1,24 @@ | |||
1 | #include "CDrawBuffer.h" | ||
2 | #include "CFilter.h" | 1 | #include "CFilter.h" |
3 | 2 | ||
4 | unsigned short striphtml::skip_ws() | 3 | unsigned short striphtml::skip_ws() |
5 | { | 4 | { |
6 | tchar ch; | 5 | tchar ch; |
7 | CStyle sty; | 6 | CStyle sty; |
8 | do | 7 | do |
9 | { | 8 | { |
10 | parent->getch(ch, sty); | 9 | parent->getch(ch, sty); |
11 | } | 10 | } |
12 | while (ch < 33); | 11 | while (ch < 33); |
13 | return ch; | 12 | return ch; |
14 | } | 13 | } |
15 | 14 | ||
16 | unsigned short striphtml::skip_ws_end() | 15 | unsigned short striphtml::skip_ws_end() |
17 | { | 16 | { |
18 | tchar ch; | 17 | tchar ch; |
19 | CStyle sty; | 18 | CStyle sty; |
20 | parent->getch(ch, sty); | 19 | parent->getch(ch, sty); |
21 | if (ch == ' ') | 20 | if (ch == ' ') |
22 | { | 21 | { |
23 | do | 22 | do |
24 | { | 23 | { |
25 | parent->getch(ch, sty); | 24 | parent->getch(ch, sty); |
diff --git a/noncore/apps/opie-reader/FontControl.cpp b/noncore/apps/opie-reader/FontControl.cpp index e03bf64..cfa8534 100644 --- a/noncore/apps/opie-reader/FontControl.cpp +++ b/noncore/apps/opie-reader/FontControl.cpp | |||
@@ -1,26 +1,24 @@ | |||
1 | #include "opie.h" | ||
2 | #include "useqpe.h" | ||
3 | #include "FontControl.h" | 1 | #include "FontControl.h" |
4 | 2 | ||
5 | int FontControl::gzoom() | 3 | int FontControl::gzoom() |
6 | { | 4 | { |
7 | int ret; | 5 | int ret; |
8 | if (m_size == g_size) | 6 | if (m_size == g_size) |
9 | { | 7 | { |
10 | ret = m_fontsizes[m_size]*m_basesize; | 8 | ret = m_fontsizes[m_size]*m_basesize; |
11 | } | 9 | } |
12 | else if (g_size < 0) | 10 | else if (g_size < 0) |
13 | { | 11 | { |
14 | int f = -g_size; | 12 | int f = -g_size; |
15 | ret = (m_fontsizes[0]*m_basesize) >> (f/2); | 13 | ret = (m_fontsizes[0]*m_basesize) >> (f/2); |
16 | if (f%2) ret = (2*ret/3); | 14 | if (f%2) ret = (2*ret/3); |
17 | } | 15 | } |
18 | else | 16 | else |
19 | { | 17 | { |
20 | int f = g_size - m_maxsize + 1; | 18 | int f = g_size - m_maxsize + 1; |
21 | ret = (m_fontsizes[m_maxsize-1]*m_basesize) << (f/2); | 19 | ret = (m_fontsizes[m_maxsize-1]*m_basesize) << (f/2); |
22 | if (f%2) ret = (3*ret/2); | 20 | if (f%2) ret = (3*ret/2); |
23 | } | 21 | } |
24 | return ret; | 22 | return ret; |
25 | } | 23 | } |
26 | 24 | ||
diff --git a/noncore/apps/opie-reader/Palm2QImage.cpp b/noncore/apps/opie-reader/Palm2QImage.cpp index bf5ece3..9339595 100644 --- a/noncore/apps/opie-reader/Palm2QImage.cpp +++ b/noncore/apps/opie-reader/Palm2QImage.cpp | |||
@@ -1,26 +1,25 @@ | |||
1 | /* -*- mode: c; indent-tabs-mode: nil; -*- */ | 1 | /* -*- mode: c; indent-tabs-mode: nil; -*- */ |
2 | #include "useqpe.h" | ||
3 | #include <stdio.h> | 2 | #include <stdio.h> |
4 | #include <stdlib.h> | 3 | #include <stdlib.h> |
5 | #include <string.h> | 4 | #include <string.h> |
6 | #ifndef _WINDOWS | 5 | #ifndef _WINDOWS |
7 | #include <unistd.h> /* for link */ | 6 | #include <unistd.h> /* for link */ |
8 | #endif | 7 | #endif |
9 | #include <sys/types.h> | 8 | #include <sys/types.h> |
10 | #include <sys/stat.h> | 9 | #include <sys/stat.h> |
11 | #include <stdarg.h> | 10 | #include <stdarg.h> |
12 | 11 | ||
13 | #include <qimage.h> | 12 | #include <qimage.h> |
14 | 13 | ||
15 | /***********************************************************************/ | 14 | /***********************************************************************/ |
16 | /***********************************************************************/ | 15 | /***********************************************************************/ |
17 | /***** *****/ | 16 | /***** *****/ |
18 | /***** Code to decode the Palm image format to JPEG *****/ | 17 | /***** Code to decode the Palm image format to JPEG *****/ |
19 | /***** *****/ | 18 | /***** *****/ |
20 | /***********************************************************************/ | 19 | /***********************************************************************/ |
21 | /***********************************************************************/ | 20 | /***********************************************************************/ |
22 | 21 | ||
23 | #define READ_BIGENDIAN_SHORT(p) (((p)[0] << 8)|((p)[1])) | 22 | #define READ_BIGENDIAN_SHORT(p) (((p)[0] << 8)|((p)[1])) |
24 | #define READ_BIGENDIAN_LONG(p) (((p)[0] << 24)|((p)[1] << 16)|((p)[2] << 8)|((p)[3])) | 23 | #define READ_BIGENDIAN_LONG(p) (((p)[0] << 24)|((p)[1] << 16)|((p)[2] << 8)|((p)[3])) |
25 | 24 | ||
26 | #define PALM_IS_COMPRESSED_FLAG 0x8000 | 25 | #define PALM_IS_COMPRESSED_FLAG 0x8000 |
diff --git a/noncore/apps/opie-reader/Prefs.cpp b/noncore/apps/opie-reader/Prefs.cpp index 5150ca5..72eefba 100644 --- a/noncore/apps/opie-reader/Prefs.cpp +++ b/noncore/apps/opie-reader/Prefs.cpp | |||
@@ -1,46 +1,37 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** Form implementation generated from reading ui file 'Prefs.ui' | 2 | ** Form implementation generated from reading ui file 'Prefs.ui' |
3 | ** | 3 | ** |
4 | ** Created: Tue Feb 11 23:53:35 2003 | 4 | ** Created: Tue Feb 11 23:53:35 2003 |
5 | ** by: The User Interface Compiler (uic) | 5 | ** by: The User Interface Compiler (uic) |
6 | ** | 6 | ** |
7 | ** WARNING! All changes made in this file will be lost! | 7 | ** WARNING! All changes made in this file will be lost! |
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
9 | #include "useqpe.h" | ||
10 | #include "Prefs.h" | 9 | #include "Prefs.h" |
11 | 10 | ||
12 | #include <qcheckbox.h> | ||
13 | #include <qlabel.h> | 11 | #include <qlabel.h> |
14 | #include <qpushbutton.h> | ||
15 | #include <qspinbox.h> | ||
16 | #include <qlayout.h> | 12 | #include <qlayout.h> |
17 | #include <qvariant.h> | ||
18 | #include <qtooltip.h> | ||
19 | #include <qwhatsthis.h> | ||
20 | #include <qcombobox.h> | ||
21 | #include <qbuttongroup.h> | 13 | #include <qbuttongroup.h> |
22 | #include <qlineedit.h> | ||
23 | #ifdef USEQPE | 14 | #ifdef USEQPE |
24 | #include <qpe/menubutton.h> | 15 | #include <qpe/menubutton.h> |
25 | #include <qpe/fontdatabase.h> | 16 | #include <qpe/fontdatabase.h> |
26 | #else | 17 | #else |
27 | #include <qfontdatabase.h> | 18 | #include <qfontdatabase.h> |
28 | #endif | 19 | #endif |
29 | 20 | ||
30 | #include <qpe/qpeapplication.h> | 21 | #include <qpe/qpeapplication.h> |
31 | 22 | ||
32 | CLayoutPrefs::CLayoutPrefs( QWidget* parent, const char* name, WFlags fl ) | 23 | CLayoutPrefs::CLayoutPrefs( QWidget* parent, const char* name, WFlags fl ) |
33 | : QWidget( parent, name, fl ) | 24 | : QWidget( parent, name, fl ) |
34 | { | 25 | { |
35 | QHBoxLayout* hb = new QHBoxLayout(this); | 26 | QHBoxLayout* hb = new QHBoxLayout(this); |
36 | QButtonGroup* bg = new QButtonGroup(2, Qt::Horizontal, tr("Text"), this); | 27 | QButtonGroup* bg = new QButtonGroup(2, Qt::Horizontal, tr("Text"), this); |
37 | hb->addWidget(bg); | 28 | hb->addWidget(bg); |
38 | 29 | ||
39 | StripCR = new QCheckBox( bg ); | 30 | StripCR = new QCheckBox( bg ); |
40 | StripCR->setText( tr( "Strip CR" ) ); | 31 | StripCR->setText( tr( "Strip CR" ) ); |
41 | 32 | ||
42 | Dehyphen = new QCheckBox( bg ); | 33 | Dehyphen = new QCheckBox( bg ); |
43 | Dehyphen->setText( tr( "Dehyphen" ) ); | 34 | Dehyphen->setText( tr( "Dehyphen" ) ); |
44 | 35 | ||
45 | SingleSpace = new QCheckBox( bg ); | 36 | SingleSpace = new QCheckBox( bg ); |
46 | SingleSpace->setText( tr( "Single Space" ) ); | 37 | SingleSpace->setText( tr( "Single Space" ) ); |
diff --git a/noncore/apps/opie-reader/QTReader.cpp b/noncore/apps/opie-reader/QTReader.cpp index 03c8fbe..d64abb4 100644 --- a/noncore/apps/opie-reader/QTReader.cpp +++ b/noncore/apps/opie-reader/QTReader.cpp | |||
@@ -1,55 +1,48 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 4 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
5 | ** | 5 | ** |
6 | ** This file is part of an example program for Qt. This example | 6 | ** This file is part of an example program for Qt. This example |
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 "useqpe.h" | ||
12 | #include <qpainter.h> | ||
13 | #include <qimage.h> | ||
14 | #include <qtimer.h> | ||
15 | #include "config.h" | ||
16 | #include "QTReader.h" | 11 | #include "QTReader.h" |
17 | #include "QTReaderApp.h" | 12 | #include "QTReaderApp.h" |
18 | #include "CDrawBuffer.h" | ||
19 | #ifdef USEQPE | 13 | #ifdef USEQPE |
20 | #include <qpe/qpeapplication.h> | 14 | #include <qpe/qpeapplication.h> |
21 | #endif | 15 | #endif |
22 | #include <math.h> | 16 | #include <math.h> |
23 | #include <ctype.h> | 17 | #include <ctype.h> |
24 | #include <stdio.h> //for sprintf | 18 | #include <stdio.h> //for sprintf |
25 | #ifdef USEQPE | 19 | #ifdef USEQPE |
26 | #include <qpe/config.h> | 20 | #include <qpe/config.h> |
27 | #include <qpe/applnk.h> | 21 | #include <qpe/applnk.h> |
28 | #include <qpe/global.h> | 22 | #include <qpe/global.h> |
29 | #include <qpe/qcopenvelope_qws.h> | 23 | #include <qpe/qcopenvelope_qws.h> |
30 | #endif | 24 | #endif |
31 | #include <qfontdatabase.h> | ||
32 | 25 | ||
33 | #ifdef _UNICODE | 26 | #ifdef _UNICODE |
34 | const char *QTReader::fonts[] = { "unifont", "Courier", "Times", 0 }; | 27 | const char *QTReader::fonts[] = { "unifont", "Courier", "Times", 0 }; |
35 | #else | 28 | #else |
36 | const char *QTReader::fonts[] = { "Helvetica", "Courier", "Times", 0 }; | 29 | const char *QTReader::fonts[] = { "Helvetica", "Courier", "Times", 0 }; |
37 | #endif | 30 | #endif |
38 | //const int QTReader::fontsizes[] = { 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 70, 80, 90, 100, 0 }; | 31 | //const int QTReader::fontsizes[] = { 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 70, 80, 90, 100, 0 }; |
39 | 32 | ||
40 | //const tchar *QTReader::fonts[] = { "unifont", "fixed", "micro", "smoothtimes", "Courier", "Times", 0 }; | 33 | //const tchar *QTReader::fonts[] = { "unifont", "fixed", "micro", "smoothtimes", "Courier", "Times", 0 }; |
41 | //const int QTReader::fontsizes[] = {10,16,17,22,0}; | 34 | //const int QTReader::fontsizes[] = {10,16,17,22,0}; |
42 | //const tchar *QTReader::fonts[] = { "verdana", "Courier", "Times", 0 }; | 35 | //const tchar *QTReader::fonts[] = { "verdana", "Courier", "Times", 0 }; |
43 | //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}; | 36 | //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}; |
44 | 37 | ||
45 | tchar QTReader::pluckernextpart[] = { 'C','l','i','c','k',' ','h','e','r','e',' ','f','o','r',' ','t','h','e',' ','n','e','x','t',' ','p','a','r','t',0 }; | 38 | tchar QTReader::pluckernextpart[] = { 'C','l','i','c','k',' ','h','e','r','e',' ','f','o','r',' ','t','h','e',' ','n','e','x','t',' ','p','a','r','t',0 }; |
46 | tchar QTReader::jplucknextpart[] = { 'N','e','x','t',' ','P','a','r','t',' ','>','>',0 }; | 39 | tchar QTReader::jplucknextpart[] = { 'N','e','x','t',' ','P','a','r','t',' ','>','>',0 }; |
47 | //tchar QTReader::jplucknextpart[] = { 10,'#',10,'N','e','x','t',' ','P','a','r','t',' ','>','>',0 }; | 40 | //tchar QTReader::jplucknextpart[] = { 10,'#',10,'N','e','x','t',' ','P','a','r','t',' ','>','>',0 }; |
48 | 41 | ||
49 | QTReader::QTReader( QWidget *parent, const char *name, WFlags f) : | 42 | QTReader::QTReader( QWidget *parent, const char *name, WFlags f) : |
50 | QWidget(parent, name, f), | 43 | QWidget(parent, name, f), |
51 | m_delay(100), | 44 | m_delay(100), |
52 | m_scrolldy1(0), | 45 | m_scrolldy1(0), |
53 | m_scrolldy2(0), | 46 | m_scrolldy2(0), |
54 | m_autoScroll(false), | 47 | m_autoScroll(false), |
55 | //textarray(NULL), | 48 | //textarray(NULL), |
@@ -427,50 +420,48 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e ) | |||
427 | } | 420 | } |
428 | } | 421 | } |
429 | else | 422 | else |
430 | { | 423 | { |
431 | mouseUpOn = true; | 424 | mouseUpOn = true; |
432 | } | 425 | } |
433 | } | 426 | } |
434 | } | 427 | } |
435 | 428 | ||
436 | void QTReader::focusInEvent(QFocusEvent* e) | 429 | void QTReader::focusInEvent(QFocusEvent* e) |
437 | { | 430 | { |
438 | if (m_autoScroll) timer->start(real_delay(), false); | 431 | if (m_autoScroll) timer->start(real_delay(), false); |
439 | update(); | 432 | update(); |
440 | } | 433 | } |
441 | 434 | ||
442 | void QTReader::focusOutEvent(QFocusEvent* e) | 435 | void QTReader::focusOutEvent(QFocusEvent* e) |
443 | { | 436 | { |
444 | if (m_autoScroll) | 437 | if (m_autoScroll) |
445 | { | 438 | { |
446 | timer->stop(); | 439 | timer->stop(); |
447 | //m_scrolldy1 = m_scrolldy2 = 0; | 440 | //m_scrolldy1 = m_scrolldy2 = 0; |
448 | } | 441 | } |
449 | } | 442 | } |
450 | 443 | ||
451 | #include <qapplication.h> | ||
452 | #include <qdrawutil.h> | ||
453 | #ifndef _WINDOWS | 444 | #ifndef _WINDOWS |
454 | #include <unistd.h> | 445 | #include <unistd.h> |
455 | #endif | 446 | #endif |
456 | 447 | ||
457 | void QTReader::goDown() | 448 | void QTReader::goDown() |
458 | { | 449 | { |
459 | if (m_bpagemode) | 450 | if (m_bpagemode) |
460 | { | 451 | { |
461 | dopagedn(); | 452 | dopagedn(); |
462 | } | 453 | } |
463 | else | 454 | else |
464 | { | 455 | { |
465 | lineDown(); | 456 | lineDown(); |
466 | } | 457 | } |
467 | } | 458 | } |
468 | 459 | ||
469 | void QTReader::goUp() | 460 | void QTReader::goUp() |
470 | { | 461 | { |
471 | if (m_bpagemode) | 462 | if (m_bpagemode) |
472 | { | 463 | { |
473 | dopageup(); | 464 | dopageup(); |
474 | } | 465 | } |
475 | else | 466 | else |
476 | { | 467 | { |
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp index 07af597..e759249 100644 --- a/noncore/apps/opie-reader/QTReaderApp.cpp +++ b/noncore/apps/opie-reader/QTReaderApp.cpp | |||
@@ -58,49 +58,48 @@ | |||
58 | #include "GraphicWin.h" | 58 | #include "GraphicWin.h" |
59 | #include "Bkmks.h" | 59 | #include "Bkmks.h" |
60 | #include "cbkmkselector.h" | 60 | #include "cbkmkselector.h" |
61 | #include "infowin.h" | 61 | #include "infowin.h" |
62 | #include "ToolbarPrefs.h" | 62 | #include "ToolbarPrefs.h" |
63 | #include "Prefs.h" | 63 | #include "Prefs.h" |
64 | #include "CAnnoEdit.h" | 64 | #include "CAnnoEdit.h" |
65 | #include "QFloatBar.h" | 65 | #include "QFloatBar.h" |
66 | #include "FixedFont.h" | 66 | #include "FixedFont.h" |
67 | #include "URLDialog.h" | 67 | #include "URLDialog.h" |
68 | //#include <qpe/fontdatabase.h> | 68 | //#include <qpe/fontdatabase.h> |
69 | 69 | ||
70 | #ifdef USEQPE | 70 | #ifdef USEQPE |
71 | #include <qpe/resource.h> | 71 | #include <qpe/resource.h> |
72 | #include <qpe/qpeapplication.h> | 72 | #include <qpe/qpeapplication.h> |
73 | #include "fileBrowser.h" | 73 | #include "fileBrowser.h" |
74 | #else | 74 | #else |
75 | #include "qfiledialog.h" | 75 | #include "qfiledialog.h" |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #include "QTReaderApp.h" | 78 | #include "QTReaderApp.h" |
79 | #include "CDrawBuffer.h" | 79 | #include "CDrawBuffer.h" |
80 | #include "Filedata.h" | 80 | #include "Filedata.h" |
81 | #include "opie.h" | 81 | #include "opie.h" |
82 | #include "useqpe.h" | ||
83 | #include "names.h" | 82 | #include "names.h" |
84 | #include "CEncoding_tables.h" | 83 | #include "CEncoding_tables.h" |
85 | #include "CloseDialog.h" | 84 | #include "CloseDialog.h" |
86 | 85 | ||
87 | bool CheckVersion(int&, int&, char&); | 86 | bool CheckVersion(int&, int&, char&); |
88 | 87 | ||
89 | #ifdef _WINDOWS | 88 | #ifdef _WINDOWS |
90 | #define PICDIR "c:\\uqtreader\\pics\\" | 89 | #define PICDIR "c:\\uqtreader\\pics\\" |
91 | #else | 90 | #else |
92 | #ifdef USEQPE | 91 | #ifdef USEQPE |
93 | #define PICDIR "opie-reader/" | 92 | #define PICDIR "opie-reader/" |
94 | #else | 93 | #else |
95 | #define PICDIR "/home/tim/uqtreader/pics/" | 94 | #define PICDIR "/home/tim/uqtreader/pics/" |
96 | #endif | 95 | #endif |
97 | #endif | 96 | #endif |
98 | 97 | ||
99 | unsigned long QTReaderApp::m_uid = 0; | 98 | unsigned long QTReaderApp::m_uid = 0; |
100 | 99 | ||
101 | void QTReaderApp::setScrollState(bool _b) { m_scrollButton->setOn(_b); } | 100 | void QTReaderApp::setScrollState(bool _b) { m_scrollButton->setOn(_b); } |
102 | 101 | ||
103 | #ifdef USEQPE | 102 | #ifdef USEQPE |
104 | #define geticon(iconname) Resource::loadPixmap( iconname ) | 103 | #define geticon(iconname) Resource::loadPixmap( iconname ) |
105 | #define getmyicon(iconname) Resource::loadPixmap( PICDIR iconname ) | 104 | #define getmyicon(iconname) Resource::loadPixmap( PICDIR iconname ) |
106 | #else | 105 | #else |
diff --git a/noncore/apps/opie-reader/ToolbarPrefs.cpp b/noncore/apps/opie-reader/ToolbarPrefs.cpp index d878829..0347736 100644 --- a/noncore/apps/opie-reader/ToolbarPrefs.cpp +++ b/noncore/apps/opie-reader/ToolbarPrefs.cpp | |||
@@ -1,46 +1,36 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** Form implementation generated from reading ui file 'Prefs.ui' | 2 | ** Form implementation generated from reading ui file 'Prefs.ui' |
3 | ** | 3 | ** |
4 | ** Created: Tue Feb 11 23:53:35 2003 | 4 | ** Created: Tue Feb 11 23:53:35 2003 |
5 | ** by: The User Interface Compiler (uic) | 5 | ** by: The User Interface Compiler (uic) |
6 | ** | 6 | ** |
7 | ** WARNING! All changes made in this file will be lost! | 7 | ** WARNING! All changes made in this file will be lost! |
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
9 | #include "useqpe.h" | ||
10 | #include "ToolbarPrefs.h" | 9 | #include "ToolbarPrefs.h" |
11 | 10 | ||
12 | #include <qcheckbox.h> | ||
13 | #include <qlabel.h> | ||
14 | #include <qpushbutton.h> | ||
15 | #include <qspinbox.h> | ||
16 | #include <qlayout.h> | 11 | #include <qlayout.h> |
17 | #include <qvariant.h> | ||
18 | #include <qtooltip.h> | ||
19 | #include <qwhatsthis.h> | ||
20 | #include <qcombobox.h> | ||
21 | #include <qbuttongroup.h> | 12 | #include <qbuttongroup.h> |
22 | #include <qlineedit.h> | ||
23 | #ifdef USEQPE | 13 | #ifdef USEQPE |
24 | #include <qpe/menubutton.h> | 14 | #include <qpe/menubutton.h> |
25 | #endif | 15 | #endif |
26 | #include <qpe/qpeapplication.h> | 16 | #include <qpe/qpeapplication.h> |
27 | 17 | ||
28 | CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir ) | 18 | CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir ) |
29 | { | 19 | { |
30 | setCaption(tr( "Toolbar Settings" ) ); | 20 | setCaption(tr( "Toolbar Settings" ) ); |
31 | QTabWidget* td = new QTabWidget(this); | 21 | QTabWidget* td = new QTabWidget(this); |
32 | misc = new CMiscBarPrefs(this); | 22 | misc = new CMiscBarPrefs(this); |
33 | filebar = new CFileBarPrefs(config, this); | 23 | filebar = new CFileBarPrefs(config, this); |
34 | navbar = new CNavBarPrefs(config, this); | 24 | navbar = new CNavBarPrefs(config, this); |
35 | viewbar = new CViewBarPrefs(config, this); | 25 | viewbar = new CViewBarPrefs(config, this); |
36 | markbar = new CMarkBarPrefs(config, this); | 26 | markbar = new CMarkBarPrefs(config, this); |
37 | indbar = new CIndBarPrefs(config, this); | 27 | indbar = new CIndBarPrefs(config, this); |
38 | td->addTab(filebar, tr("File")); | 28 | td->addTab(filebar, tr("File")); |
39 | td->addTab(navbar, tr("Navigation")); | 29 | td->addTab(navbar, tr("Navigation")); |
40 | td->addTab(viewbar, tr("View")); | 30 | td->addTab(viewbar, tr("View")); |
41 | td->addTab(markbar, tr("Marks")); | 31 | td->addTab(markbar, tr("Marks")); |
42 | td->addTab(indbar, tr("Indicators")); | 32 | td->addTab(indbar, tr("Indicators")); |
43 | td->addTab(misc, tr("Policy")); | 33 | td->addTab(misc, tr("Policy")); |
44 | QVBoxLayout* v = new QVBoxLayout(this); | 34 | QVBoxLayout* v = new QVBoxLayout(this); |
45 | v->addWidget(td); | 35 | v->addWidget(td); |
46 | 36 | ||
diff --git a/noncore/apps/opie-reader/fileBrowser.cpp b/noncore/apps/opie-reader/fileBrowser.cpp index 05f2c31..ebd14f3 100644 --- a/noncore/apps/opie-reader/fileBrowser.cpp +++ b/noncore/apps/opie-reader/fileBrowser.cpp | |||
@@ -1,51 +1,48 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | 2 | ||
3 | Derived from a file browser which was | 3 | Derived from a file browser which was |
4 | 4 | ||
5 | ** copyright 2001 ljp ljp@llornkcor.com | 5 | ** copyright 2001 ljp ljp@llornkcor.com |
6 | 6 | ||
7 | Extensive modification by Tim Wentford to allow it to work in rotated mode | 7 | Extensive modification by Tim Wentford to allow it to work in rotated mode |
8 | 8 | ||
9 | ****************************************************************************/ | 9 | ****************************************************************************/ |
10 | #include "fileBrowser.h" | 10 | #include "fileBrowser.h" |
11 | 11 | ||
12 | #include "QtrListView.h" | 12 | #include "QtrListView.h" |
13 | #include <qlineedit.h> | 13 | #include <qlineedit.h> |
14 | #include <qpushbutton.h> | 14 | #include <qpushbutton.h> |
15 | #include <qfile.h> | ||
16 | #include <qmessagebox.h> | ||
17 | #ifndef _WINDOWS | 15 | #ifndef _WINDOWS |
18 | #include <unistd.h> | 16 | #include <unistd.h> |
19 | #endif | 17 | #endif |
20 | #include <qlayout.h> | 18 | #include <qlayout.h> |
21 | #ifdef _WINDOWS | 19 | #ifdef _WINDOWS |
22 | #include <direct.h> | 20 | #include <direct.h> |
23 | #endif | 21 | #endif |
24 | 22 | ||
25 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
26 | 24 | ||
27 | #include "opie.h" | ||
28 | 25 | ||
29 | fileBrowser::fileBrowser( bool allownew, QWidget* parent, const char* name, bool modal, WFlags fl , const QString filter, const QString iPath ) | 26 | fileBrowser::fileBrowser( bool allownew, QWidget* parent, const char* name, bool modal, WFlags fl , const QString filter, const QString iPath ) |
30 | : QDialog( parent, name, true, | 27 | : QDialog( parent, name, true, |
31 | fl/* | WStyle_Customize | WStyle_Tool*/), | 28 | fl/* | WStyle_Customize | WStyle_Tool*/), |
32 | filterspec(QDir::All) | 29 | filterspec(QDir::All) |
33 | { | 30 | { |
34 | // showMaximized(); | 31 | // showMaximized(); |
35 | if ( !name ) | 32 | if ( !name ) |
36 | setName( "fileBrowser" ); | 33 | setName( "fileBrowser" ); |
37 | /* | 34 | /* |
38 | if (parent != NULL) | 35 | if (parent != NULL) |
39 | { | 36 | { |
40 | #ifdef OPIE | 37 | #ifdef OPIE |
41 | move(0,0); | 38 | move(0,0); |
42 | resize( parent->width(), parent->height() ); | 39 | resize( parent->width(), parent->height() ); |
43 | #else | 40 | #else |
44 | setGeometry(parent->x(), parent->y(), parent->width(), parent->height() ); | 41 | setGeometry(parent->x(), parent->y(), parent->width(), parent->height() ); |
45 | #endif | 42 | #endif |
46 | } | 43 | } |
47 | */ | 44 | */ |
48 | // showFullScreen(); | 45 | // showFullScreen(); |
49 | setCaption(tr( "Browse for file" ) ); | 46 | setCaption(tr( "Browse for file" ) ); |
50 | filterStr=filter; | 47 | filterStr=filter; |
51 | 48 | ||
diff --git a/noncore/apps/opie-reader/main.cpp b/noncore/apps/opie-reader/main.cpp index 3e1f5e7..6d706c4 100644 --- a/noncore/apps/opie-reader/main.cpp +++ b/noncore/apps/opie-reader/main.cpp | |||
@@ -1,35 +1,33 @@ | |||
1 | #include "useqpe.h" | 1 | #include "useqpe.h" |
2 | #ifdef USEQPE | 2 | #ifdef USEQPE |
3 | #include <qpe/qpeapplication.h> | 3 | #include <qpe/qpeapplication.h> |
4 | #else | 4 | #else |
5 | #include <qapplication.h> | 5 | #include <qapplication.h> |
6 | #endif | 6 | #endif |
7 | #include "QTReaderApp.h" | 7 | #include "QTReaderApp.h" |
8 | 8 | ||
9 | #include "signal.h" | 9 | #include "signal.h" |
10 | #include "stdio.h" | ||
11 | #include "time.h" | ||
12 | 10 | ||
13 | 11 | ||
14 | #ifdef USEQPE | 12 | #ifdef USEQPE |
15 | QTReaderApp* app = NULL; | 13 | QTReaderApp* app = NULL; |
16 | 14 | ||
17 | void handler(int signum) | 15 | void handler(int signum) |
18 | { | 16 | { |
19 | if (app != NULL) | 17 | if (app != NULL) |
20 | { | 18 | { |
21 | app->suspend(); | 19 | app->suspend(); |
22 | app->saveprefs(); | 20 | app->saveprefs(); |
23 | } | 21 | } |
24 | signal(signum, handler); | 22 | signal(signum, handler); |
25 | } | 23 | } |
26 | #endif | 24 | #endif |
27 | 25 | ||
28 | int main( int argc, char ** argv ) | 26 | int main( int argc, char ** argv ) |
29 | { | 27 | { |
30 | 28 | ||
31 | #ifdef USEQPE | 29 | #ifdef USEQPE |
32 | signal(SIGCONT, handler); | 30 | signal(SIGCONT, handler); |
33 | QPEApplication a( argc, argv ); | 31 | QPEApplication a( argc, argv ); |
34 | QTReaderApp m; | 32 | QTReaderApp m; |
35 | a.showMainDocumentWidget( &m ); | 33 | a.showMainDocumentWidget( &m ); |
diff --git a/noncore/apps/opie-reader/plucker.cpp b/noncore/apps/opie-reader/plucker.cpp index e49e35f..e52fd6a 100644 --- a/noncore/apps/opie-reader/plucker.cpp +++ b/noncore/apps/opie-reader/plucker.cpp | |||
@@ -1,45 +1,40 @@ | |||
1 | #include "useqpe.h" | ||
2 | #include <stdio.h> | 1 | #include <stdio.h> |
3 | #include <string.h> | 2 | #include <string.h> |
4 | #include <qmessagebox.h> | ||
5 | #include <qpixmap.h> | ||
6 | #ifdef USEQPE | 3 | #ifdef USEQPE |
7 | #include <qpe/qcopenvelope_qws.h> | 4 | #include <qpe/qcopenvelope_qws.h> |
8 | #endif | 5 | #endif |
9 | #ifdef LOCALPICTURES | 6 | #ifdef LOCALPICTURES |
10 | #include <qscrollview.h> | 7 | #include <qscrollview.h> |
11 | #endif | 8 | #endif |
12 | #ifdef USEQPE | 9 | #ifdef USEQPE |
13 | #include <qpe/global.h> | 10 | #include <qpe/global.h> |
14 | #include <qpe/qpeapplication.h> | 11 | #include <qpe/qpeapplication.h> |
15 | #else | 12 | #else |
16 | #include <qapplication.h> | 13 | #include <qapplication.h> |
17 | #endif | 14 | #endif |
18 | #include <qclipboard.h> | ||
19 | 15 | ||
20 | #include "plucker.h" | 16 | #include "plucker.h" |
21 | #include "Aportis.h" | ||
22 | #include "Palm2QImage.h" | 17 | #include "Palm2QImage.h" |
23 | 18 | ||
24 | 19 | ||
25 | struct CPlucker_dataRecord | 20 | struct CPlucker_dataRecord |
26 | { | 21 | { |
27 | UInt16 uid; | 22 | UInt16 uid; |
28 | UInt16 nParagraphs; | 23 | UInt16 nParagraphs; |
29 | UInt16 size; | 24 | UInt16 size; |
30 | UInt8 type; | 25 | UInt8 type; |
31 | UInt8 reserved; | 26 | UInt8 reserved; |
32 | }; | 27 | }; |
33 | 28 | ||
34 | int CPlucker::HeaderSize() | 29 | int CPlucker::HeaderSize() |
35 | { | 30 | { |
36 | return sizeof(CPlucker_dataRecord); | 31 | return sizeof(CPlucker_dataRecord); |
37 | } | 32 | } |
38 | 33 | ||
39 | void CPlucker::GetHeader(UInt16& uid, UInt16& nParagraphs, UInt32& size, UInt8& type, UInt8& reserved) | 34 | void CPlucker::GetHeader(UInt16& uid, UInt16& nParagraphs, UInt32& size, UInt8& type, UInt8& reserved) |
40 | { | 35 | { |
41 | CPlucker_dataRecord thishdr; | 36 | CPlucker_dataRecord thishdr; |
42 | fread(&thishdr, 1, HeaderSize(), fin); | 37 | fread(&thishdr, 1, HeaderSize(), fin); |
43 | uid = ntohs(thishdr.uid); | 38 | uid = ntohs(thishdr.uid); |
44 | nParagraphs = ntohs(thishdr.nParagraphs); | 39 | nParagraphs = ntohs(thishdr.nParagraphs); |
45 | size = ntohs(thishdr.size); | 40 | size = ntohs(thishdr.size); |
diff --git a/noncore/apps/opie-reader/plucker_base.cpp b/noncore/apps/opie-reader/plucker_base.cpp index 9047a45..caa945d 100644 --- a/noncore/apps/opie-reader/plucker_base.cpp +++ b/noncore/apps/opie-reader/plucker_base.cpp | |||
@@ -1,39 +1,36 @@ | |||
1 | #include "useqpe.h" | 1 | #include "useqpe.h" |
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | #include <string.h> | 3 | #include <string.h> |
4 | #include <qmessagebox.h> | ||
5 | #include <qpixmap.h> | ||
6 | #ifdef USEQPE | 4 | #ifdef USEQPE |
7 | #include <qpe/qcopenvelope_qws.h> | 5 | #include <qpe/qcopenvelope_qws.h> |
8 | #endif /* USEQPE */ | 6 | #endif /* USEQPE */ |
9 | #ifdef LOCALPICTURES | 7 | #ifdef LOCALPICTURES |
10 | #include <qscrollview.h> | 8 | #include <qscrollview.h> |
11 | #endif | 9 | #endif |
12 | #ifdef USEQPE | 10 | #ifdef USEQPE |
13 | #include <qpe/global.h> | 11 | #include <qpe/global.h> |
14 | #endif /* USEQPE */ | 12 | #endif /* USEQPE */ |
15 | #include <qclipboard.h> | ||
16 | #ifndef USEQPE | 13 | #ifndef USEQPE |
17 | #include <qapplication.h> | 14 | #include <qapplication.h> |
18 | #else /* USEQPE */ | 15 | #else /* USEQPE */ |
19 | #include <qpe/qpeapplication.h> | 16 | #include <qpe/qpeapplication.h> |
20 | #endif /* USEQPE */ | 17 | #endif /* USEQPE */ |
21 | 18 | ||
22 | #include "plucker_base.h" | 19 | #include "plucker_base.h" |
23 | #include "Aportis.h" | 20 | #include "Aportis.h" |
24 | #include "Palm2QImage.h" | 21 | #include "Palm2QImage.h" |
25 | 22 | ||
26 | CPlucker_base::CPlucker_base() : | 23 | CPlucker_base::CPlucker_base() : |
27 | #ifdef LOCALPICTURES | 24 | #ifdef LOCALPICTURES |
28 | m_viewer(NULL), | 25 | m_viewer(NULL), |
29 | m_picture(NULL), | 26 | m_picture(NULL), |
30 | #endif | 27 | #endif |
31 | expandedtextbuffer(NULL), | 28 | expandedtextbuffer(NULL), |
32 | compressedtextbuffer(NULL) | 29 | compressedtextbuffer(NULL) |
33 | //, urls(NULL) | 30 | //, urls(NULL) |
34 | { /*printf("constructing:%x\n",fin);*/ } | 31 | { /*printf("constructing:%x\n",fin);*/ } |
35 | 32 | ||
36 | 33 | ||
37 | void CPlucker_base::Expand(UInt32 reclen, UInt8 type, UInt8* buffer, UInt32 buffersize) | 34 | void CPlucker_base::Expand(UInt32 reclen, UInt8 type, UInt8* buffer, UInt32 buffersize) |
38 | { | 35 | { |
39 | if (type%2 == 0) | 36 | if (type%2 == 0) |
@@ -524,49 +521,48 @@ void CPlucker_base::home() | |||
524 | CList<Bkmk>* CPlucker_base::getbkmklist() | 521 | CList<Bkmk>* CPlucker_base::getbkmklist() |
525 | { | 522 | { |
526 | /* | 523 | /* |
527 | UInt16 thishdr_uid, thishdr_nParagraphs; | 524 | UInt16 thishdr_uid, thishdr_nParagraphs; |
528 | UInt32 thishdr_size; | 525 | UInt32 thishdr_size; |
529 | UInt8 thishdr_type, thishdr_reserved; | 526 | UInt8 thishdr_type, thishdr_reserved; |
530 | 527 | ||
531 | for (int i = 1; i < ntohs(head.recordList.numRecords); i++) | 528 | for (int i = 1; i < ntohs(head.recordList.numRecords); i++) |
532 | { | 529 | { |
533 | gotorecordnumber(i); | 530 | gotorecordnumber(i); |
534 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); | 531 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); |
535 | if (thishdr_type == 8) | 532 | if (thishdr_type == 8) |
536 | { | 533 | { |
537 | UInt16 n; | 534 | UInt16 n; |
538 | fread(&n, 1, sizeof(n), fin); | 535 | fread(&n, 1, sizeof(n), fin); |
539 | n = ntohs(n); | 536 | n = ntohs(n); |
540 | //qDebug("Found %u bookmarks", n); | 537 | //qDebug("Found %u bookmarks", n); |
541 | } | 538 | } |
542 | //qDebug("Found:%d, %u", i , thishdr_type); | 539 | //qDebug("Found:%d, %u", i , thishdr_type); |
543 | } | 540 | } |
544 | */ | 541 | */ |
545 | return NULL; | 542 | return NULL; |
546 | } | 543 | } |
547 | 544 | ||
548 | #include <qnamespace.h> | ||
549 | 545 | ||
550 | QImage* CPlucker_base::expandimg(UInt16 tgt, bool border) | 546 | QImage* CPlucker_base::expandimg(UInt16 tgt, bool border) |
551 | { | 547 | { |
552 | QImage* qimage = getimg(tgt); | 548 | QImage* qimage = getimg(tgt); |
553 | QImage* ret; | 549 | QImage* ret; |
554 | if (qimage == NULL) return NULL; | 550 | if (qimage == NULL) return NULL; |
555 | if (border) | 551 | if (border) |
556 | { | 552 | { |
557 | QPixmap* image = new QPixmap(0,0); | 553 | QPixmap* image = new QPixmap(0,0); |
558 | image->convertFromImage(*qimage); | 554 | image->convertFromImage(*qimage); |
559 | delete qimage; | 555 | delete qimage; |
560 | QPixmap* pret = new QPixmap(image->width()+4, image->height()+4); | 556 | QPixmap* pret = new QPixmap(image->width()+4, image->height()+4); |
561 | pret->fill(Qt::red); | 557 | pret->fill(Qt::red); |
562 | bitBlt(pret, 2, 2, image, 0, 0, -1, -1);//, Qt::RasterOp::CopyROP); | 558 | bitBlt(pret, 2, 2, image, 0, 0, -1, -1);//, Qt::RasterOp::CopyROP); |
563 | delete image; | 559 | delete image; |
564 | ret = new QImage(pret->convertToImage()); | 560 | ret = new QImage(pret->convertToImage()); |
565 | } | 561 | } |
566 | else | 562 | else |
567 | { | 563 | { |
568 | ret = qimage; | 564 | ret = qimage; |
569 | } | 565 | } |
570 | return ret; | 566 | return ret; |
571 | } | 567 | } |
572 | 568 | ||
@@ -659,49 +655,48 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) | |||
659 | } | 655 | } |
660 | gotorecordnumber(jmin); | 656 | gotorecordnumber(jmin); |
661 | UInt16 thishdr_uid, thishdr_nParagraphs; | 657 | UInt16 thishdr_uid, thishdr_nParagraphs; |
662 | UInt32 thishdr_size; | 658 | UInt32 thishdr_size; |
663 | UInt8 thishdr_type, thishdr_reserved; | 659 | UInt8 thishdr_type, thishdr_reserved; |
664 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); | 660 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); |
665 | unsigned short luid = thishdr_uid; | 661 | unsigned short luid = thishdr_uid; |
666 | //qDebug("jmin at end:%u,%u", jmin, luid); | 662 | //qDebug("jmin at end:%u,%u", jmin, luid); |
667 | if (luid == urlid) | 663 | if (luid == urlid) |
668 | { | 664 | { |
669 | return jmin; | 665 | return jmin; |
670 | } | 666 | } |
671 | gotorecordnumber(jmax); | 667 | gotorecordnumber(jmax); |
672 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); | 668 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); |
673 | luid = thishdr_uid; | 669 | luid = thishdr_uid; |
674 | //qDebug("jmax at end:%u,%u", jmax, luid); | 670 | //qDebug("jmax at end:%u,%u", jmax, luid); |
675 | if (luid == urlid) | 671 | if (luid == urlid) |
676 | { | 672 | { |
677 | return jmax; | 673 | return jmax; |
678 | } | 674 | } |
679 | //qDebug("Couldn't find %u", urlid); | 675 | //qDebug("Couldn't find %u", urlid); |
680 | return 0; // Not found! | 676 | return 0; // Not found! |
681 | } | 677 | } |
682 | 678 | ||
683 | #include <qnamespace.h> | ||
684 | 679 | ||
685 | void CPlucker_base::setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) | 680 | void CPlucker_base::setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) |
686 | { | 681 | { |
687 | unsigned short sz = 0; | 682 | unsigned short sz = 0; |
688 | for (CList<unsigned long>::iterator it = visited.begin(); it != visited.end(); it++) | 683 | for (CList<unsigned long>::iterator it = visited.begin(); it != visited.end(); it++) |
689 | { | 684 | { |
690 | sz++; | 685 | sz++; |
691 | } | 686 | } |
692 | size_t newlen = srclen+sizeof(sz)+sz*sizeof(unsigned long); | 687 | size_t newlen = srclen+sizeof(sz)+sz*sizeof(unsigned long); |
693 | unsigned char* newdata = new unsigned char[newlen]; | 688 | unsigned char* newdata = new unsigned char[newlen]; |
694 | unsigned char* pdata = newdata; | 689 | unsigned char* pdata = newdata; |
695 | memcpy(newdata, src, srclen); | 690 | memcpy(newdata, src, srclen); |
696 | newdata += srclen; | 691 | newdata += srclen; |
697 | memcpy(newdata, &sz, sizeof(sz)); | 692 | memcpy(newdata, &sz, sizeof(sz)); |
698 | newdata += sizeof(sz); | 693 | newdata += sizeof(sz); |
699 | #ifdef _WINDOWS | 694 | #ifdef _WINDOWS |
700 | for (it = visited.begin(); it != visited.end(); it++) | 695 | for (it = visited.begin(); it != visited.end(); it++) |
701 | #else | 696 | #else |
702 | for (CList<unsigned long>::iterator it = visited.begin(); it != visited.end(); it++) | 697 | for (CList<unsigned long>::iterator it = visited.begin(); it != visited.end(); it++) |
703 | #endif | 698 | #endif |
704 | { | 699 | { |
705 | unsigned long t = *it; | 700 | unsigned long t = *it; |
706 | //qDebug("[%u]", t); | 701 | //qDebug("[%u]", t); |
707 | memcpy(newdata, &t, sizeof(t)); | 702 | memcpy(newdata, &t, sizeof(t)); |
diff --git a/noncore/apps/opie-reader/ppm.cpp b/noncore/apps/opie-reader/ppm.cpp index e8bf110..1face46 100644 --- a/noncore/apps/opie-reader/ppm.cpp +++ b/noncore/apps/opie-reader/ppm.cpp | |||
@@ -1,27 +1,26 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | #include "arith.h" | ||
4 | #include "ppm.h" | 3 | #include "ppm.h" |
5 | 4 | ||
6 | /**************************************************************************** | 5 | /**************************************************************************** |
7 | * Gestion des noeuds | 6 | * Gestion des noeuds |
8 | ****************************************************************************/ | 7 | ****************************************************************************/ |
9 | 8 | ||
10 | /* | 9 | /* |
11 | * Désallocation du noeud p | 10 | * Désallocation du noeud p |
12 | */ | 11 | */ |
13 | 12 | ||
14 | void ppm_worker::Node_Free(UINT p) { | 13 | void ppm_worker::Node_Free(UINT p) { |
15 | node_heap[node_free_last].free_next=p; | 14 | node_heap[node_free_last].free_next=p; |
16 | node_heap[p].free_next=NIL; | 15 | node_heap[p].free_next=NIL; |
17 | node_free_last=p; | 16 | node_free_last=p; |
18 | node_free_nb++; | 17 | node_free_nb++; |
19 | } | 18 | } |
20 | 19 | ||
21 | /* | 20 | /* |
22 | * Allocation d'un noeud | 21 | * Allocation d'un noeud |
23 | * s'il ne reste plus de place, on désalloue le contexte le moins utilisé. | 22 | * s'il ne reste plus de place, on désalloue le contexte le moins utilisé. |
24 | */ | 23 | */ |
25 | 24 | ||
26 | UINT ppm_worker::Node_Alloc(void) { | 25 | UINT ppm_worker::Node_Alloc(void) { |
27 | UINT p; | 26 | UINT p; |
diff --git a/noncore/apps/opie-reader/version.cpp b/noncore/apps/opie-reader/version.cpp index 3796b67..864e4c1 100644 --- a/noncore/apps/opie-reader/version.cpp +++ b/noncore/apps/opie-reader/version.cpp | |||
@@ -1,27 +1,25 @@ | |||
1 | #include "version.h" | 1 | #include "version.h" |
2 | #include "names.h" | ||
3 | #include <qmessagebox.h> | ||
4 | 2 | ||
5 | bool CheckVersion(int& major, int& bkmktype, char& minor) | 3 | bool CheckVersion(int& major, int& bkmktype, char& minor) |
6 | { | 4 | { |
7 | if ( | 5 | if ( |
8 | (major != MAJOR) | 6 | (major != MAJOR) |
9 | || | 7 | || |
10 | (bkmktype != BKMKTYPE) | 8 | (bkmktype != BKMKTYPE) |
11 | || | 9 | || |
12 | (minor != MINOR) | 10 | (minor != MINOR) |
13 | ) | 11 | ) |
14 | { | 12 | { |
15 | major = MAJOR; | 13 | major = MAJOR; |
16 | bkmktype = BKMKTYPE; | 14 | bkmktype = BKMKTYPE; |
17 | minor = MINOR; | 15 | minor = MINOR; |
18 | /* | 16 | /* |
19 | QMessageBox::warning(NULL, PROGNAME, | 17 | QMessageBox::warning(NULL, PROGNAME, |
20 | "This is the first time that you have\n" | 18 | "This is the first time that you have\n" |
21 | "run this version of OpieReader.\n\n" | 19 | "run this version of OpieReader.\n\n" |
22 | "There are two new icons visible at\n" | 20 | "There are two new icons visible at\n" |
23 | "the left end of the toolbar. The left\n" | 21 | "the left end of the toolbar. The left\n" |
24 | "one brings up the menus, the next\n" | 22 | "one brings up the menus, the next\n" |
25 | "one brings up the settings dialog.\n\n" | 23 | "one brings up the settings dialog.\n\n" |
26 | "Start by tapping the settings icon\n" | 24 | "Start by tapping the settings icon\n" |
27 | "and selecting the Buttons tab to\n" | 25 | "and selecting the Buttons tab to\n" |
diff --git a/noncore/apps/opie-sheet/Excel.cpp b/noncore/apps/opie-sheet/Excel.cpp index 225c3e1..fc49d56 100644 --- a/noncore/apps/opie-sheet/Excel.cpp +++ b/noncore/apps/opie-sheet/Excel.cpp | |||
@@ -1,35 +1,32 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #include <stdio.h> | 3 | #include <stdio.h> |
4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
5 | #include <math.h> | 5 | #include <math.h> |
6 | #include <time.h> | 6 | #include <time.h> |
7 | #include <sys/types.h> | 7 | #include <sys/types.h> |
8 | #include <strings.h> | 8 | #include <strings.h> |
9 | #include <qstring.h> | ||
10 | #include <qlist.h> | ||
11 | #include <qarray.h> | ||
12 | #include "Excel.h" | 9 | #include "Excel.h" |
13 | 10 | ||
14 | static xfrecord formatter[] = { | 11 | static xfrecord formatter[] = { |
15 | { 0xe , DATEFORMAT, "%m/%d/%y"}, | 12 | { 0xe , DATEFORMAT, "%m/%d/%y"}, |
16 | { 0xf , DATEFORMAT, "%d-%b-%y"}, | 13 | { 0xf , DATEFORMAT, "%d-%b-%y"}, |
17 | { 0x10, DATEFORMAT, "%d-%b"}, | 14 | { 0x10, DATEFORMAT, "%d-%b"}, |
18 | { 0x11, DATEFORMAT, "%b-%y"}, | 15 | { 0x11, DATEFORMAT, "%b-%y"}, |
19 | { 0x12, DATEFORMAT, "%I:%M %p"}, | 16 | { 0x12, DATEFORMAT, "%I:%M %p"}, |
20 | { 0x13, DATEFORMAT, "%I:%M:%S %p"}, | 17 | { 0x13, DATEFORMAT, "%I:%M:%S %p"}, |
21 | { 0x14, DATEFORMAT, "%H:%M"}, | 18 | { 0x14, DATEFORMAT, "%H:%M"}, |
22 | { 0x15, DATEFORMAT, "%H:%M:%S"}, | 19 | { 0x15, DATEFORMAT, "%H:%M:%S"}, |
23 | { 0x16, DATEFORMAT, "%m/%d/%y %H:%M"}, | 20 | { 0x16, DATEFORMAT, "%m/%d/%y %H:%M"}, |
24 | { 0x2d, DATEFORMAT, "%M:%S"}, | 21 | { 0x2d, DATEFORMAT, "%M:%S"}, |
25 | { 0x2e, DATEFORMAT, "%H:%M:%S"}, | 22 | { 0x2e, DATEFORMAT, "%H:%M:%S"}, |
26 | { 0x2f, DATEFORMAT, "%M:%S"}, | 23 | { 0x2f, DATEFORMAT, "%M:%S"}, |
27 | { 0xa5, DATEFORMAT, "%m/%d/%y %I:%M %p"}, | 24 | { 0xa5, DATEFORMAT, "%m/%d/%y %I:%M %p"}, |
28 | { 0x1 , NUMBERFORMAT, "%.0f"}, | 25 | { 0x1 , NUMBERFORMAT, "%.0f"}, |
29 | { 0x2 , NUMBERFORMAT, "%.2f"}, | 26 | { 0x2 , NUMBERFORMAT, "%.2f"}, |
30 | { 0x3 , NUMBERFORMAT, "#,##%.0f"}, | 27 | { 0x3 , NUMBERFORMAT, "#,##%.0f"}, |
31 | { 0x4 , NUMBERFORMAT, "#,##%.2f"}, | 28 | { 0x4 , NUMBERFORMAT, "#,##%.2f"}, |
32 | { 0x5 , NUMBERFORMAT, "$#,##%.0f"}, | 29 | { 0x5 , NUMBERFORMAT, "$#,##%.0f"}, |
33 | { 0x6 , NUMBERFORMAT, "$#,##%.0f"}, | 30 | { 0x6 , NUMBERFORMAT, "$#,##%.0f"}, |
34 | { 0x7 , NUMBERFORMAT, "$#,##%.2f"}, | 31 | { 0x7 , NUMBERFORMAT, "$#,##%.2f"}, |
35 | { 0x8 , NUMBERFORMAT, "$#,##%.2f"}, | 32 | { 0x8 , NUMBERFORMAT, "$#,##%.2f"}, |
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp index 3d3c688..1fb2a3d 100644 --- a/noncore/apps/opie-sheet/mainwindow.cpp +++ b/noncore/apps/opie-sheet/mainwindow.cpp | |||
@@ -1,48 +1,44 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | * This program is free software; you can redistribute it and/or modify * |
4 | * it under the terms of the GNU General Public License as published by * | 4 | * it under the terms of the GNU General Public License as published by * |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * (at your option) any later version. * | 6 | * (at your option) any later version. * |
7 | * * | 7 | * * |
8 | ***************************************************************************/ | 8 | ***************************************************************************/ |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * Opie Sheet (formerly Sheet/Qt) | 11 | * Opie Sheet (formerly Sheet/Qt) |
12 | * by Serdar Ozler <sozler@sitebest.com> | 12 | * by Serdar Ozler <sozler@sitebest.com> |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "mainwindow.h" | 15 | #include "mainwindow.h" |
16 | 16 | ||
17 | #include <qpe/filemanager.h> | ||
18 | #include <qpe/qcopenvelope_qws.h> | ||
19 | #include <qpe/resource.h> | 17 | #include <qpe/resource.h> |
20 | #include <qpe/qpeapplication.h> | 18 | #include <qpe/qpeapplication.h> |
21 | 19 | ||
22 | #include <qmessagebox.h> | 20 | #include <qmessagebox.h> |
23 | #include <qfile.h> | ||
24 | #include <qtranslator.h> | ||
25 | #include <qradiobutton.h> | 21 | #include <qradiobutton.h> |
26 | 22 | ||
27 | #include "cellformat.h" | 23 | #include "cellformat.h" |
28 | #include "numberdlg.h" | 24 | #include "numberdlg.h" |
29 | #include "textdlg.h" | 25 | #include "textdlg.h" |
30 | #include "sortdlg.h" | 26 | #include "sortdlg.h" |
31 | #include "finddlg.h" | 27 | #include "finddlg.h" |
32 | 28 | ||
33 | #define DEFAULT_NUM_ROWS 300 | 29 | #define DEFAULT_NUM_ROWS 300 |
34 | #define DEFAULT_NUM_COLS (26*3) | 30 | #define DEFAULT_NUM_COLS (26*3) |
35 | #define DEFAULT_NUM_SHEETS 3 | 31 | #define DEFAULT_NUM_SHEETS 3 |
36 | 32 | ||
37 | MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl) | 33 | MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl) |
38 | :QMainWindow(parent, n, fl) | 34 | :QMainWindow(parent, n, fl) |
39 | { | 35 | { |
40 | // initialize variables | 36 | // initialize variables |
41 | documentModified=FALSE; | 37 | documentModified=FALSE; |
42 | 38 | ||
43 | // construct objects | 39 | // construct objects |
44 | currentDoc=0; | 40 | currentDoc=0; |
45 | fileSelector=new FileSelector("application/sheet-qt", this, QString::null); | 41 | fileSelector=new FileSelector("application/sheet-qt", this, QString::null); |
46 | ExcelSelector=new FileSelector("application/excel",this,QString::null,FALSE); | 42 | ExcelSelector=new FileSelector("application/excel",this,QString::null,FALSE); |
47 | connect(fileSelector, SIGNAL(closeMe()), this, SLOT(selectorHide())); | 43 | connect(fileSelector, SIGNAL(closeMe()), this, SLOT(selectorHide())); |
48 | connect(fileSelector, SIGNAL(newSelected(const DocLnk &)), this, SLOT(selectorFileNew(const DocLnk &))); | 44 | connect(fileSelector, SIGNAL(newSelected(const DocLnk &)), this, SLOT(selectorFileNew(const DocLnk &))); |
diff --git a/noncore/apps/opie-sheet/sheet.cpp b/noncore/apps/opie-sheet/sheet.cpp index e1e4744..f303d33 100644 --- a/noncore/apps/opie-sheet/sheet.cpp +++ b/noncore/apps/opie-sheet/sheet.cpp | |||
@@ -1,41 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | * This program is free software; you can redistribute it and/or modify * |
4 | * it under the terms of the GNU General Public License as published by * | 4 | * it under the terms of the GNU General Public License as published by * |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * (at your option) any later version. * | 6 | * (at your option) any later version. * |
7 | * * | 7 | * * |
8 | ***************************************************************************/ | 8 | ***************************************************************************/ |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * Opie Sheet (formerly Sheet/Qt) | 11 | * Opie Sheet (formerly Sheet/Qt) |
12 | * by Serdar Ozler <sozler@sitebest.com> | 12 | * by Serdar Ozler <sozler@sitebest.com> |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "sheet.h" | 15 | #include "sheet.h" |
16 | 16 | ||
17 | #include <qmainwindow.h> | ||
18 | #include <qmessagebox.h> | 17 | #include <qmessagebox.h> |
19 | #include <math.h> | 18 | #include <math.h> |
20 | #include <stdlib.h> | 19 | #include <stdlib.h> |
21 | #include <stdio.h> | 20 | #include <stdio.h> |
22 | #include <time.h> | 21 | #include <time.h> |
23 | 22 | ||
24 | #define DEFAULT_COL_WIDTH 50 | 23 | #define DEFAULT_COL_WIDTH 50 |
25 | 24 | ||
26 | Sheet::Sheet(int numRows, int numCols, QWidget *parent) | 25 | Sheet::Sheet(int numRows, int numCols, QWidget *parent) |
27 | :QTable(numRows, numCols, parent) | 26 | :QTable(numRows, numCols, parent) |
28 | { | 27 | { |
29 | defaultBorders.right=defaultBorders.bottom=QPen(Qt::gray, 1, Qt::SolidLine); | 28 | defaultBorders.right=defaultBorders.bottom=QPen(Qt::gray, 1, Qt::SolidLine); |
30 | defaultCellData.data=""; | 29 | defaultCellData.data=""; |
31 | defaultCellData.background=QBrush(Qt::white, Qt::SolidPattern); | 30 | defaultCellData.background=QBrush(Qt::white, Qt::SolidPattern); |
32 | defaultCellData.alignment=(Qt::AlignmentFlags)(Qt::AlignLeft | Qt::AlignTop); | 31 | defaultCellData.alignment=(Qt::AlignmentFlags)(Qt::AlignLeft | Qt::AlignTop); |
33 | defaultCellData.fontColor=Qt::black; | 32 | defaultCellData.fontColor=Qt::black; |
34 | defaultCellData.font=font(); | 33 | defaultCellData.font=font(); |
35 | defaultCellData.borders=defaultBorders; | 34 | defaultCellData.borders=defaultBorders; |
36 | 35 | ||
37 | clicksLocked=FALSE; | 36 | clicksLocked=FALSE; |
38 | selectionNo=-1; | 37 | selectionNo=-1; |
39 | setSelectionMode(QTable::Single); | 38 | setSelectionMode(QTable::Single); |
40 | 39 | ||
41 | sheetData.setAutoDelete(TRUE); | 40 | sheetData.setAutoDelete(TRUE); |