-rw-r--r-- | noncore/apps/opie-reader/CExpander.h | 21 | ||||
-rw-r--r-- | noncore/games/zlines/linesboard.h | 12 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 1 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.h | 42 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/modem.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/tabmanager/tablistview.h | 24 |
6 files changed, 53 insertions, 48 deletions
diff --git a/noncore/apps/opie-reader/CExpander.h b/noncore/apps/opie-reader/CExpander.h index 9fae245..553069c 100644 --- a/noncore/apps/opie-reader/CExpander.h +++ b/noncore/apps/opie-reader/CExpander.h @@ -1,48 +1,55 @@ #ifndef __CExpander_h #define __CExpander_h -#ifndef _WINDOWS -#include <unistd.h> -#endif -#include <stdio.h> -#include <time.h> -#include <qmessagebox.h> #include "useqpe.h" #include "config.h" #include "StyleConsts.h" #include "Markups.h" #include "names.h" #include "linktype.h" +/* OPIE */ +#include <opie2/odebug.h> + +/* QT */ +#include <qmessagebox.h> + +/* STD */ +#ifndef _WINDOWS +#include <unistd.h> +#endif +#include <stdio.h> +#include <time.h> + class QImage; class Bkmk; template<class T> class CList; class CCharacterSource { public: virtual void getch(tchar&, CStyle&) = 0; virtual linkType hyperlink(unsigned int n, QString&) = 0; }; class CExpander { protected: size_t m_homepos; bool m_continuous; char* fname; bool bSuspended; size_t suspos; time_t sustime; int m_scrWidth; unsigned long m_currentstart, m_currentend; public: #ifdef USEQPE 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; }; @@ -114,38 +121,38 @@ class CExpander 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); } } #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); } virtual void putSaveData(unsigned char*& src, unsigned short& srclen) { if (srclen != 0) { - qDebug("Don't know what to do with non-zero save data"); + odebug << "Don't know what to do with non-zero save data" << oendl; } } void setwidth(int w) { m_scrWidth = w; } }; #endif diff --git a/noncore/games/zlines/linesboard.h b/noncore/games/zlines/linesboard.h index 97697cd..58478ee 100644 --- a/noncore/games/zlines/linesboard.h +++ b/noncore/games/zlines/linesboard.h @@ -1,96 +1,88 @@ /*************************************************************************** linesboard.h - description ------------------- begin : Fri May 19 2000 copyright : (C) 2000 by Roman Merzlyakov email : roman@sbrf.barrt.ru copyright : (C) 2000 by Roman Razilov email : Roman.Razilov@gmx.de ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef __linesboard_h #define __linesboard_h #include <qwidget.h> #include <qpixmap.h> #include <qtimer.h> #include "field.h" //#include "shotcounter.h" #include "ballpainter.h" -#ifdef Q_WS_QWS -# define debug (void) -#else -# define debug qDebug -#endif -#define fatal qFatal -#define warning qWarning - class LinesBoard : public Field { Q_OBJECT public: LinesBoard( BallPainter * abPainter, QWidget* parent=0, const char* name=0 ); ~LinesBoard(); int width(); int height(); int wHint(); int hHint(); // void doAfterBalls(); void placeBalls(int nextBalls[BALLSDROP]); - void undo(); + void undo(); signals: void endTurn(); void endGame(); void eraseLine(int nb); private: int anim; struct Waypoints { int x,y; } *way; - int nextBalls[BALLSDROP]; + int nextBalls[BALLSDROP]; int animmax; //used for running and animation phase int painting; int animstep; int animdelaycount; int animdelaystart; int direction; int nextBallToPlace; int jumpingCol; int jumpingRow; QTimer* timer; // ShotCounter* shCounter; BallPainter* bPainter; void paintEvent( QPaintEvent* ); void mousePressEvent( QMouseEvent* ); void AnimStart(int panim); void AnimNext(); int AnimEnd(); int getAnim(int x, int y ); // returns if the specifyed cell is animated.. void AnimJump( int col, int row ); int erase5Balls(); bool existPath(int ax, int ay, int bx, int by); void placeBall(); diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 203ff91..ba4e11a 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp @@ -9,65 +9,64 @@ .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // this file is based on work by trolltech #include <qpe/config.h> #include "mediaplayerstate.h" #include <assert.h> -//#define MediaPlayerDebug(x) qDebug x #define MediaPlayerDebug(x) MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) : QObject( parent, name ) { Config cfg( "OpiePlayer" ); readConfig( cfg ); streaming = false; seekable = true; } MediaPlayerState::~MediaPlayerState() { } void MediaPlayerState::readConfig( Config& cfg ) { cfg.setGroup("Options"); fullscreen = cfg.readBoolEntry( "FullScreen" ); scaled = cfg.readBoolEntry( "Scaling" ); looping = cfg.readBoolEntry( "Looping" ); shuffled = cfg.readBoolEntry( "Shuffle" ); videoGamma = cfg.readNumEntry( "VideoGamma" ); playing = FALSE; streaming = FALSE; paused = FALSE; curPosition = 0; curLength = 0; m_displayType = MediaSelection; } diff --git a/noncore/net/mail/libmailwrapper/settings.h b/noncore/net/mail/libmailwrapper/settings.h index 27e2823..bf27b97 100644 --- a/noncore/net/mail/libmailwrapper/settings.h +++ b/noncore/net/mail/libmailwrapper/settings.h @@ -1,161 +1,165 @@ #ifndef SETTINGS_H #define SETTINGS_H #include "maildefines.h" +/* OPIE */ +#include <opie2/odebug.h> + +/* QT */ #include <qobject.h> #include <qlist.h> -class Account +class Account { - + public: Account(); virtual ~Account() {} void remove(); void setAccountName( QString name ) { accountName = name; } const QString&getAccountName()const{ return accountName; } MAILLIB::ATYPE getType()const{ return type; } - + void setServer(const QString&str){ server = str; } const QString&getServer()const{ return server; } - + void setPort(const QString&str) { port = str; } const QString&getPort()const{ return port; } - + void setUser(const QString&str){ user = str; } const QString&getUser()const{ return user; } - + void setPassword(const QString&str) { password = str; } const QString&getPassword()const { return password; } - + void setSSL( bool b ) { ssl = b; } bool getSSL() { return ssl; } - + void setConnectionType( int x ) { connectionType = x; } int ConnectionType() { return connectionType; } - + void setOffline(bool b) {offline = b;} bool getOffline()const{return offline;} virtual QString getFileName() { return accountName; } - virtual void read() { qDebug( "base reading..." ); } - virtual void save() { qDebug( "base saving..." ); } - + virtual void read() { odebug << "base reading..." << oendl; } + virtual void save() { odebug << "base saving..." << oendl; } + protected: QString accountName, server, port, user, password; bool ssl; int connectionType; bool offline; MAILLIB::ATYPE type; }; class IMAPaccount : public Account { - + public: IMAPaccount(); IMAPaccount( QString filename ); static QString getUniqueFileName(); virtual void read(); virtual void save(); virtual QString getFileName(); void setPrefix(const QString&str) {prefix=str;} const QString&getPrefix()const{return prefix;} private: QString file,prefix; }; class POP3account : public Account { - + public: POP3account(); POP3account( QString filename ); static QString getUniqueFileName(); virtual void read(); virtual void save(); virtual QString getFileName(); private: QString file; - + }; class SMTPaccount : public Account { - + public: SMTPaccount(); SMTPaccount( QString filename ); static QString getUniqueFileName(); virtual void read(); virtual void save(); virtual QString getFileName(); void setLogin( bool b ) { login = b; } bool getLogin() { return login; } private: QString file, name, mail, org, cc, bcc, reply, signature; bool useCC, useBCC, useReply, login; }; class NNTPaccount : public Account { - + public: NNTPaccount(); NNTPaccount( QString filename ); static QString getUniqueFileName(); virtual void read(); virtual void save(); virtual QString getFileName(); void setLogin( bool b ) { login = b; } bool getLogin() { return login; } void setGroups( QStringList list ) { subscribedGroups = list; } - QStringList getGroups() { return subscribedGroups; } + QStringList getGroups() { return subscribedGroups; } private: QString file; bool login; QStringList subscribedGroups; }; class Settings : public QObject { Q_OBJECT public: Settings(); QList<Account> getAccounts(); void addAccount(Account *account); void delAccount(Account *account); void saveAccounts(); void readAccounts(); static void checkDirectory(); private: void updateAccounts(); QList<Account> accounts; - + }; #endif diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp index 3bc7d43..79f015b 100644 --- a/noncore/settings/networksettings/ppp/modem.cpp +++ b/noncore/settings/networksettings/ppp/modem.cpp @@ -27,65 +27,64 @@ /* OPIE */ #include <opie2/odebug.h> using namespace Opie::Core; /* STD */ #include <errno.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <signal.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/stat.h> #include <setjmp.h> #include <regex.h> #include <qregexp.h> #include <assert.h> #include <string.h> #ifdef HAVE_RESOLV_H # include <arpa/nameser.h> # include <resolv.h> #endif #ifndef _PATH_RESCONF #define _PATH_RESCONF "/etc/resolv.conf" #endif #define strlcpy strcpy #include "auth.h" #include "modem.h" #include "pppdata.h" -#define qError qDebug #define MY_ASSERT(x) if (!(x)) { \ ofatal << "ASSERT: \"" << #x << "\" in " << __FILE__ << " (" << __LINE__ << ")\n" << oendl; \ exit(1); } static sigjmp_buf jmp_buffer; //Modem *Modem::modem = 0; const char* pppdPath() { // wasting a few bytes static char buffer[sizeof(PPPDSEARCHPATH)+sizeof(PPPDNAME)]; static char *pppdPath = 0L; char *p; if(pppdPath == 0L) { const char *c = PPPDSEARCHPATH; while(*c != '\0') { while(*c == ':') c++; p = buffer; while(*c != '\0' && *c != ':') *p++ = *c++; *p = '\0'; strcat(p, "/"); strcat(p, PPPDNAME); if(access(buffer, F_OK) == 0) return (pppdPath = buffer); } diff --git a/noncore/settings/tabmanager/tablistview.h b/noncore/settings/tabmanager/tablistview.h index dfd88f7..54b87b6 100644 --- a/noncore/settings/tabmanager/tablistview.h +++ b/noncore/settings/tabmanager/tablistview.h @@ -1,65 +1,69 @@ #ifndef TABLISTVIEW_H #define TABLISTVIEW_H +/* OPIE */ +#include <opie2/odebug.h> + +/* QT */ #include <qlistview.h> #include <qcursor.h> #include <qapplication.h> -class TabListView : public QListView { +class TabListView : public QListView { Q_OBJECT - + signals: void moveItem(QListViewItem *item, QListViewItem *newFolder); public: TabListView( QWidget* parent = 0, const char* name = 0) : QListView(parent, name){ currentSelectedItem = NULL; connect(this, SIGNAL(pressed ( QListViewItem *)), this, SLOT(itemPressed(QListViewItem *))); internalCursor.setShape(0); }; protected: void contentsMouseReleaseEvent(QMouseEvent* ){ - QListViewItem *newGroup = this->currentItem(); + QListViewItem *newGroup = this->currentItem(); // Make sure they are both real. if (currentSelectedItem == NULL || newGroup == NULL) return; // Make sure they are not the same if(this->isSelected(currentSelectedItem) == true) return; - + // Ok we have two valid items. if(newGroup->parent()) newGroup = newGroup->parent(); - + // Just in case the parent was null if(newGroup == NULL) return; - - // If the new folder and buddies current parent are the same don't do anything. + + // If the new folder and buddies current parent are the same don't do anything. if (newGroup != currentSelectedItem->parent()) moveItem(currentSelectedItem, newGroup); currentSelectedItem = NULL; qApp->restoreOverrideCursor(); }; private slots: void itemPressed(QListViewItem *item){ if(item == NULL || !item->parent()){ if(item == NULL) - qDebug("Item is NULL"); + odebug << "Item is NULL" << oendl; return; } - + currentSelectedItem = item; internalCursor.setShape(13); qApp->setOverrideCursor(internalCursor); }; private: QListViewItem *currentSelectedItem; QCursor internalCursor; }; #endif - + |