author | chicken <chicken> | 2004-03-01 20:00:34 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 20:00:34 (UTC) |
commit | 6bab4a28785c4ab5b0f0707c8c8db953e399cac8 (patch) (side-by-side diff) | |
tree | 126dd6c09cc82b3d41ea70410803daac5cde5b60 /noncore/comm | |
parent | 4ffae5ecb25f6d640c69f53f02755b6ec58d4c98 (diff) | |
download | opie-6bab4a28785c4ab5b0f0707c8c8db953e399cac8.zip opie-6bab4a28785c4ab5b0f0707c8c8db953e399cac8.tar.gz opie-6bab4a28785c4ab5b0f0707c8c8db953e399cac8.tar.bz2 |
fix includes
-rw-r--r-- | noncore/comm/keypebble/krfbbuffer.cpp | 3 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbcanvas.cpp | 9 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbconnection.cpp | 1 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbdecoder.cpp | 6 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfblogin.cpp | 1 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbserver.cpp | 1 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvnc.cpp | 13 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncbookmarkdlg.cpp | 14 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncconndlg.cpp | 8 | ||||
-rw-r--r-- | noncore/comm/keypebble/main.cpp | 1 | ||||
-rw-r--r-- | noncore/comm/mobilemsg/mobilemsg.cpp | 5 |
11 files changed, 0 insertions, 62 deletions
diff --git a/noncore/comm/keypebble/krfbbuffer.cpp b/noncore/comm/keypebble/krfbbuffer.cpp index f1cb929..92918d4 100644 --- a/noncore/comm/keypebble/krfbbuffer.cpp +++ b/noncore/comm/keypebble/krfbbuffer.cpp @@ -1,58 +1,55 @@ #include <assert.h> -#include <qpixmap.h> -#include <qbrush.h> #include <qimage.h> #include <qpainter.h> #include <qapplication.h> #include "krfbdecoder.h" #include "krfbbuffer.h" #include "krfbconnection.h" -#include "krfbserver.h" #include "krfbserverinfo.h" // // Endian stuff // #ifndef KDE_USE_FINAL const int endianTest = 1; #endif #define Swap16IfLE(s) \ (*(char *)&endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) #define Swap32IfLE(l) \ (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \ (((l) & 0x00ff0000) >> 8) | \ (((l) & 0x0000ff00) << 8) | \ (((l) & 0x000000ff) << 24)) : (l)) KRFBBuffer::KRFBBuffer( KRFBDecoder *decoder, QObject *parent, const char *name ) : QObject( parent, name ) { assert( decoder ); this->decoder = decoder; pix = new QPixmap(); } KRFBBuffer::~KRFBBuffer() { delete pix; } void KRFBBuffer::resize( int w, int h ) { qWarning( "Resizing buffer" ); pix->resize( w, h ); QPalette pal = qApp->palette(); pix->fill( pal.active().base() ); emit sizeChanged( w, h ); } void KRFBBuffer::soundBell() { emit bell(); } diff --git a/noncore/comm/keypebble/krfbcanvas.cpp b/noncore/comm/keypebble/krfbcanvas.cpp index bc71c90..75cba68 100644 --- a/noncore/comm/keypebble/krfbcanvas.cpp +++ b/noncore/comm/keypebble/krfbcanvas.cpp @@ -1,64 +1,55 @@ #include "krfbconnection.h" #include "krfbcanvas.h" -#include "krfbserver.h" #include "krfbbuffer.h" -#include <qpe/config.h> #include <qpe/qpeapplication.h> -#include <qapplication.h> #include <qclipboard.h> -#include <qaction.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qapplication.h> -#include <qmainwindow.h> -#include <qiconset.h> KRFBCanvas::KRFBCanvas( QWidget *parent, const char *name ) : QScrollView( parent, name ) { connection_ = new KRFBConnection(); connect( connection_, SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); loggedIn_ = false; //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold); viewport()->setFocusPolicy( QWidget::StrongFocus ); viewport()->setFocus(); nextRightClick=0; nextDoubleClick=0; } KRFBCanvas::~KRFBCanvas() { } void KRFBCanvas::openConnection(KRFBServer server) { QCString host = server.hostname.latin1(); password=server.password; connection_->connectTo( server); } void KRFBCanvas::openURL( const QUrl &url ) { if ( loggedIn_ ) { qWarning( "openURL invoked when logged in\n" ); return; } QCString host = url.host().latin1(); int display = url.port(); // connection_->connectTo( host, display ); } void KRFBCanvas::closeConnection() diff --git a/noncore/comm/keypebble/krfbconnection.cpp b/noncore/comm/keypebble/krfbconnection.cpp index 389c836..e6c33c6 100644 --- a/noncore/comm/keypebble/krfbconnection.cpp +++ b/noncore/comm/keypebble/krfbconnection.cpp @@ -1,56 +1,55 @@ #include <assert.h> #include <qsocket.h> #include <qtimer.h> #include <string.h> #include "krfbconnection.h" #include "krfblogin.h" -#include "krfbserver.h" #include "krfbdecoder.h" #include "krfbbuffer.h" KRFBConnection::KRFBConnection( QObject *parent ) : QObject( parent, "KRFBConnection" ) { portBase_ = 5900; currentState_ = Disconnected; sock = 0; minData_ = 0; options_ = new KRFBServer(); updater = 0; decoder_ = 0; buffer_ = 0; } KRFBConnection::~KRFBConnection() { if ( ( currentState_ != Disconnected ) && ( currentState_ != Disconnecting ) && sock ) { disconnectDone(); } delete options_; } void KRFBConnection::connectTo( KRFBServer server) { if ( currentState_ != Disconnected ) disconnect(); (*options_)=server; sock = new QSocket( this, "rfbSocket" ); CHECK_PTR( sock ); // Connect to something to notice connection or error connect( sock, SIGNAL( error( int ) ), SLOT( gotSocketError( int ) ) ); connect( sock, SIGNAL( connected() ), SLOT( gotSocketConnection() ) ); qWarning( "Connecting..." ); currentState_ = Connecting; sock->connectToHost( options_->hostname.latin1(), portBase_ + options_->display ); } void KRFBConnection::disconnect() { qWarning( "Disconnecting from server" ); diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index c43aed5..2c9ad71 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp @@ -1,61 +1,55 @@ #include "krfbconnection.h" -#include "krfbserver.h" #include "krfbserverinfo.h" #include "krfbdecoder.h" #include "krfbbuffer.h" -#include <qpe/qpeapplication.h> #include <qpixmap.h> -#include <qsocket.h> -#include <qevent.h> -#include <qstring.h> -#include <qclipboard.h> #include <assert.h> // // Endian stuff // #ifndef KDE_USE_FINAL const int endianTest = 1; #endif #define Swap16IfLE(s) \ (*(char *)&endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) #define Swap32IfLE(l) \ (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \ (((l) & 0x00ff0000) >> 8) | \ (((l) & 0x0000ff00) << 8) | \ (((l) & 0x000000ff) << 24)) : (l)) // // The lengths of the messages we need to wait for // const int ServerInitLength = 24; const int UpdateHeaderLength = 4; const int RectHeaderLength = 12; const int RectChunkSize = 4; const int CopyRectPosLength = 4; const int ServerCutLenLength = 7; // // Client -> Server Message Identifiers // static CARD8 SetPixelFormatId = 0; //static CARD8 FixColourMapEntriesId = 1; // Not used static CARD8 SetEncodingsId = 2; static CARD8 UpdateRequestId = 3; static CARD8 KeyEventId = 4; static CARD8 PointerEventId = 5; static CARD8 ClientCutTextId = 6; // // Server -> Client Message Identifiers // static CARD8 UpdateId = 0; static CARD8 BellId = 2; static CARD8 ServerCutId = 3; // diff --git a/noncore/comm/keypebble/krfblogin.cpp b/noncore/comm/keypebble/krfblogin.cpp index 0d2a205..0b4a757 100644 --- a/noncore/comm/keypebble/krfblogin.cpp +++ b/noncore/comm/keypebble/krfblogin.cpp @@ -1,59 +1,58 @@ #include <assert.h> extern "C" { #include "vncauth.h" } #include "krfblogin.h" #include "krfbconnection.h" #include <qtimer.h> -#include <qregexp.h> // The length of the various messages (used to decide how many bytes to // wait for). const int ServerVersionLength = 12; const int ClientVersionLength = 12; const int AuthSchemeLength = 4; const int FailureReasonSizeLength = 4; const int ChallengeLength = 16; const int AuthResultLength = 4; // Authentication results enum AuthResult { AuthOk, AuthFailed, AuthTooMany }; typedef unsigned char CARD8; typedef unsigned short CARD16; typedef unsigned long CARD32; const int endianTest = 1; // Endian stuff #define Swap16IfLE(s) \ (*(char *)&endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) #define Swap32IfLE(l) \ (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \ (((l) & 0x00ff0000) >> 8) | \ (((l) & 0x0000ff00) << 8) | \ (((l) & 0x000000ff) << 24)) : (l)) KRFBLogin::KRFBLogin( KRFBConnection *con ) : QObject( con, "RFB login manager" ) { assert( con ); this->con = con; currentState = AwaitingServerVersion; connect( this, SIGNAL( error( const QString & ) ), con, SIGNAL( error( const QString & ) ) ); qWarning( "Waiting for server version..." ); static QString statusMsg = tr( "Waiting for server version..." ); emit status( statusMsg ); diff --git a/noncore/comm/keypebble/krfbserver.cpp b/noncore/comm/keypebble/krfbserver.cpp index b47534e..fda81a1 100644 --- a/noncore/comm/keypebble/krfbserver.cpp +++ b/noncore/comm/keypebble/krfbserver.cpp @@ -1,41 +1,40 @@ -#include <qpe/config.h> #include <qpe/qpeapplication.h> #include "krfbserver.h" KRFBServer::KRFBServer() { QString name; QString hostname; QString password; display=0; scaleFactor=1; hexTile=0; corre=0; rre=0; copyrect=1; colors256=1; shared=0; readOnly=0; deIconify=0; updateRate=0; } KRFBServer::~KRFBServer() { } int KRFBServer::encodings() { // Initially one because we always support raw encoding int count = 1; count += hexTile ? 1 : 0; count += corre ? 1 : 0; count += rre ? 1 : 0; count += copyrect ? 1 : 0; return count; } diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp index 2fa8d1f..c678edf 100644 --- a/noncore/comm/keypebble/kvnc.cpp +++ b/noncore/comm/keypebble/kvnc.cpp @@ -1,75 +1,62 @@ -#include <qiconset.h> -#include <qdialog.h> -#include <qpixmap.h> -#include <qdom.h> #include <qaction.h> -#include <qmenubar.h> -#include <qstatusbar.h> #include <qpopupmenu.h> #include <qpushbutton.h> -#include <qpe/qpetoolbar.h> -#include <qtimer.h> #include <qmessagebox.h> -#include <qspinbox.h> #include <qlistbox.h> -#include <qlineedit.h> #include <qpe/qpeapplication.h> -#include <qpe/global.h> -#include <qpe/qpetoolbar.h> #include <qpe/resource.h> #include <assert.h> #include "kvnc.h" #include "krfbcanvas.h" #include "krfbconnection.h" #include "kvncconndlg.h" -#include "krfbserver.h" static int u_id = 1; static int get_unique_id() { return u_id++; } /* XPM */ static char * menu_xpm[] = { "12 12 5 1", " c None", ". c #000000", "+ c #FFFDAD", "@ c #FFFF00", "# c #E5E100", " ", " ", " ......... ", " .+++++++. ", " .+@@@@#. ", " .+@@@#. ", " .+@@#. ", " .+@#. ", " .+#. ", " .+. ", " .. ", " "}; const int StatusTextId = 0; KVNC::KVNC( QWidget *parent, const char *name, WFlags f) : QMainWindow( 0, name ,WStyle_ContextHelp) { setCaption( tr("VNC Viewer") ); fullscreen = false; stack = new QWidgetStack( this ); setCentralWidget( stack ); bookmarkSelector=new KVNCBookmarkDlg(); stack->addWidget(bookmarkSelector,get_unique_id()); stack->raiseWidget( bookmarkSelector ); canvas = new KRFBCanvas( stack, "canvas" ); stack->addWidget(canvas,get_unique_id()); setCentralWidget( stack ); diff --git a/noncore/comm/keypebble/kvncbookmarkdlg.cpp b/noncore/comm/keypebble/kvncbookmarkdlg.cpp index 8556d49..ef2fa12 100644 --- a/noncore/comm/keypebble/kvncbookmarkdlg.cpp +++ b/noncore/comm/keypebble/kvncbookmarkdlg.cpp @@ -1,66 +1,52 @@ -#include <qframe.h> -#include <qvbox.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qfile.h> #include <qdir.h> -#include <qstring.h> -#include <qapplication.h> -#include <qlineedit.h> #include <qtextstream.h> -#include <qpushbutton.h> #include <qlistbox.h> -#include <qpe/config.h> #include <qpe/global.h> -#include "krfbserver.h" #include "kvncbookmarkdlg.h" KVNCBookmarkDlg::KVNCBookmarkDlg( QWidget * parent, const char * name, WFlags f ) : KVNCBookmarkDlgBase( parent, name,f) { readBookmarks(); refresh(); } KVNCBookmarkDlg::~KVNCBookmarkDlg() { } void KVNCBookmarkDlg::addBookmark(KRFBServer * server) { if (server) { servers.append(server); bookmarkList->insertItem(server->name); writeBookmarks(); refresh(); } } void KVNCBookmarkDlg::deleteBookmark(QString name) { KRFBServer * server=0; for ( server=servers.first(); server != 0; server=servers.next() ) { if (server->name==name) { servers.remove(servers.at()); writeBookmarks(); refresh(); return; } } } KRFBServer *KVNCBookmarkDlg::getServer(QString name) { KRFBServer * server=0; for ( server=servers.first(); server != 0; server=servers.next() ) { if (server->name==name) return server; } return 0; } diff --git a/noncore/comm/keypebble/kvncconndlg.cpp b/noncore/comm/keypebble/kvncconndlg.cpp index cd55bb0..420c816 100644 --- a/noncore/comm/keypebble/kvncconndlg.cpp +++ b/noncore/comm/keypebble/kvncconndlg.cpp @@ -1,60 +1,52 @@ -#include <qframe.h> -#include <qvbox.h> #include <qcheckbox.h> #include <qcombobox.h> #include <qspinbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qapplication.h> #include <qlineedit.h> -#include <qpushbutton.h> -#include "krfbserver.h" #include "kvncconndlg.h" KVNCConnDlg::KVNCConnDlg( KRFBServer *options, QWidget *parent, char *name, bool modal ) : KVNCConnDlgBase( parent, name, modal, WStyle_ContextHelp ) { this->options=options; tmpOptions=*options; serverHostname->setText(options->hostname); serverDisplay->setValue(options->display); serverPassword->setText(options->password); serverBookmark->setText(options->name); hex->setChecked( options->hexTile ); corre->setChecked( options->corre ); rre->setChecked( options->rre ); copyRect->setChecked( options->copyrect ); for (int i=0; i < scaleFactor->count(); ++i) { if (scaleFactor->text(i).toInt()==tmpOptions.scaleFactor) { scaleFactor->setCurrentItem(i); } } // TODO hex->setEnabled( false ); corre->setEnabled( false ); rre->setEnabled( false ); // /TODO deIconify->setChecked( options->deIconify ); bit->setChecked( options->colors256 ); shared->setChecked( options->shared ); timeBox->setValue( options->updateRate ); serverPassword->setEchoMode(QLineEdit::Password); connect(togglePassword, SIGNAL( stateChanged(int) ), this, SLOT( showPassword(int) ) ); } KVNCConnDlg::~KVNCConnDlg() { } void KVNCConnDlg::accept() diff --git a/noncore/comm/keypebble/main.cpp b/noncore/comm/keypebble/main.cpp index 11f67fc..fc34099 100644 --- a/noncore/comm/keypebble/main.cpp +++ b/noncore/comm/keypebble/main.cpp @@ -1,10 +1,9 @@ -#include <qpe/qpeapplication.h> #include "kvnc.h" #include <opie/oapplicationfactory.h> OPIE_EXPORT_APP( OApplicationFactory<KVNC> ) diff --git a/noncore/comm/mobilemsg/mobilemsg.cpp b/noncore/comm/mobilemsg/mobilemsg.cpp index 707872e..9a4db35 100644 --- a/noncore/comm/mobilemsg/mobilemsg.cpp +++ b/noncore/comm/mobilemsg/mobilemsg.cpp @@ -1,38 +1,33 @@ #include "mobilemsg.h" -#include <qpushbutton.h> -#include <qpe/qpeapplication.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qlayout.h> /* * Constructs a MobileMsg which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ MobileMsg::MobileMsg( QWidget* parent, const char* name, WFlags fl ) : MobileMsgBase( parent, name, fl ) { //connect(add, SIGNAL(clicked()), this, SLOT(goodBye())); //connect(remove, SIGNAL(clicked()), this, SLOT(goodBye())); //connect(props, SIGNAL(clicked()), this, SLOT(goodBye())); //connect(settings, SIGNAL(selectionChanged()), this, SLOT(goodBye()) ); } /* * Destroys the object and frees any allocated resources */ MobileMsg::~MobileMsg() { // no need to delete child widgets, Qt does it all for us } /* * A simple slot... not very interesting. */ void MobileMsg::goodBye() { close(); } |