summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/CExpander.h
authorar <ar>2004-05-27 22:04:46 (UTC)
committer ar <ar>2004-05-27 22:04:46 (UTC)
commit4f7c3c4d0d634706d13950b3827714b168e279e3 (patch) (side-by-side diff)
tree2df448e7a4dcd538c26365873e194be2b55e83b7 /noncore/apps/opie-reader/CExpander.h
parent46f81a089ba8febdb79e0d150b69f74bb1ea7d18 (diff)
downloadopie-4f7c3c4d0d634706d13950b3827714b168e279e3.zip
opie-4f7c3c4d0d634706d13950b3827714b168e279e3.tar.gz
opie-4f7c3c4d0d634706d13950b3827714b168e279e3.tar.bz2
- convert qDebug to odebug
Diffstat (limited to 'noncore/apps/opie-reader/CExpander.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/CExpander.h140
1 files changed, 70 insertions, 70 deletions
diff --git a/noncore/apps/opie-reader/CExpander.h b/noncore/apps/opie-reader/CExpander.h
index 7b21d3e..9fae245 100644
--- a/noncore/apps/opie-reader/CExpander.h
+++ b/noncore/apps/opie-reader/CExpander.h
@@ -40,18 +40,18 @@ class CExpander
unsigned long m_currentstart, m_currentend;
public:
#ifdef USEQPE
- virtual void suspend() = 0;
+ virtual void suspend() = 0;
virtual void unsuspend() = 0;
#endif
size_t getHome() { return m_homepos; }
CExpander() : m_homepos(0), fname(NULL), m_scrWidth(240), m_currentstart(1), m_currentend(0) {};
virtual ~CExpander() { if (fname != NULL) delete [] fname; };
int openfile(const char *src)
- {
- bSuspended = false;
- fname = strdup(src);
- return OpenFile(src);
- }
+ {
+ bSuspended = false;
+ fname = strdup(src);
+ return OpenFile(src);
+ }
virtual int OpenFile(const char *src) = 0;
virtual unsigned int locate() = 0;
virtual void locate(unsigned int n) = 0;
@@ -59,17 +59,17 @@ class CExpander
virtual void sizes(unsigned long& file, unsigned long& text) = 0;
virtual CList<Bkmk>* getbkmklist() { return NULL; }
virtual void getch(tchar& ch, CStyle& sty)
- {
- int ich = getch();
- ch = (ich == EOF) ? UEOF : ich;
- sty.unset();
- }
+ {
+ int ich = getch();
+ ch = (ich == EOF) ? UEOF : ich;
+ sty.unset();
+ }
virtual int getch() = 0;
virtual linkType hyperlink(unsigned int n, QString& wrd)
- {
- locate(n);
- return eLink;
- }
+ {
+ locate(n);
+ return eLink;
+ }
virtual MarkupType PreferredMarkup() = 0;
virtual void saveposn(size_t posn) {}
virtual void writeposn(size_t posn) {}
@@ -77,75 +77,75 @@ class CExpander
virtual bool back(size_t& loc) { return false; }
virtual bool hasnavigation() { return false; }
unsigned long startSection()
- {
- unsigned long current = locate();
- if (m_currentstart > current || current > m_currentend)
- {
- start2endSection();
- }
- return m_currentstart;
- }
+ {
+ unsigned long current = locate();
+ if (m_currentstart > current || current > m_currentend)
+ {
+ start2endSection();
+ }
+ return m_currentstart;
+ }
unsigned long endSection()
- {
- unsigned long current = locate();
- if (m_currentstart > current || current > m_currentend)
- {
- start2endSection();
- }
- return m_currentend;
- }
+ {
+ unsigned long current = locate();
+ if (m_currentstart > current || current > m_currentend)
+ {
+ start2endSection();
+ }
+ return m_currentend;
+ }
virtual void start2endSection()
- {
- m_currentstart = 0;
- unsigned long file;
- sizes(file, m_currentend);
- }
+ {
+ m_currentstart = 0;
+ unsigned long file;
+ sizes(file, m_currentend);
+ }
virtual QImage* getPicture(unsigned long tgt) { return NULL; }
void setContinuous(bool _b) { m_continuous = _b; }
#ifdef USEQPE
virtual void suspend(FILE*& fin)
{
- bSuspended = true;
- suspos = ftell(fin);
- fclose(fin);
- fin = NULL;
- sustime = time(NULL);
+ bSuspended = true;
+ suspos = ftell(fin);
+ fclose(fin);
+ fin = NULL;
+ sustime = time(NULL);
}
virtual void unsuspend(FILE*& fin)
{
- if (bSuspended)
- {
- bSuspended = false;
- int delay = time(NULL) - sustime;
- if (delay < 10) sleep(10-delay);
- fin = fopen(fname, "rb");
- for (int i = 0; fin == NULL && i < 5; i++)
- {
- sleep(5);
- fin = fopen(fname, "rb");
- }
- if (fin == NULL)
- {
- QMessageBox::warning(NULL, PROGNAME, "Couldn't reopen file");
- exit(0);
- }
- suspos = fseek(fin, suspos, SEEK_SET);
- }
+ if (bSuspended)
+ {
+ bSuspended = false;
+ int delay = time(NULL) - sustime;
+ if (delay < 10) sleep(10-delay);
+ fin = fopen(fname, "rb");
+ for (int i = 0; fin == NULL && i < 5; i++)
+ {
+ sleep(5);
+ fin = fopen(fname, "rb");
+ }
+ if (fin == NULL)
+ {
+ QMessageBox::warning(NULL, PROGNAME, "Couldn't reopen file");
+ exit(0);
+ }
+ suspos = fseek(fin, suspos, SEEK_SET);
+ }
}
#endif
virtual void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen)
- {
- len = srclen;
- data = new unsigned char[len];
- memcpy(data, src, len);
- }
+ {
+ len = srclen;
+ data = new unsigned char[len];
+ memcpy(data, src, len);
+ }
virtual void putSaveData(unsigned char*& src, unsigned short& srclen)
- {
- if (srclen != 0)
- {
- qDebug("Don't know what to do with non-zero save data");
- }
- }
+ {
+ if (srclen != 0)
+ {
+ qDebug("Don't know what to do with non-zero save data");
+ }
+ }
void setwidth(int w) { m_scrWidth = w; }
};
#endif