summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/applauncher.cpp1
-rw-r--r--core/launcher/documentlist.cpp1
-rw-r--r--core/launcher/main.cpp2
-rw-r--r--core/launcher/qcopbridge.cpp1
-rw-r--r--core/launcher/screensaver.cpp2
-rw-r--r--core/launcher/server.cpp10
-rw-r--r--core/launcher/server.h4
-rw-r--r--core/launcher/serverapp.cpp9
-rw-r--r--core/launcher/serverapp.h8
-rw-r--r--core/launcher/transferserver.cpp1
-rw-r--r--core/launcher/wait.cpp1
-rw-r--r--core/launcher/wait.h4
12 files changed, 27 insertions, 17 deletions
diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp
index efbf426..5a5517c 100644
--- a/core/launcher/applauncher.cpp
+++ b/core/launcher/applauncher.cpp
@@ -49,24 +49,25 @@
#include <qtimer.h>
#include <qwindowsystem_qws.h>
#include <qmessagebox.h>
#include <qfileinfo.h>
#include <qtopia/qcopenvelope_qws.h>
#include <qtopia/qpeapplication.h>
#include "applauncher.h"
#include "documentlist.h"
+using namespace Opie::Core;
const int AppLauncher::RAISE_TIMEOUT_MS = 5000;
//---------------------------------------------------------------------------
static AppLauncher* appLauncherPtr;
const int appStopEventID = 1290;
class AppStoppedEvent : public QCustomEvent
{
public:
AppStoppedEvent(int pid, int status)
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index 63f853e..3e0a96c 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -38,24 +38,25 @@
#include <qfileinfo.h>
#include <qtextstream.h>
#include <qfile.h>
#include <qdir.h>
#include <qpainter.h>
#include <qimage.h>
#include <qcopchannel_qws.h>
#include <qlistview.h>
#include <qlist.h>
#include <qpixmap.h>
+using namespace Opie::Core;
AppLnkSet *DocumentList::appLnkSet = 0;
static const int MAX_SEARCH_DEPTH = 10;
class DocumentListPrivate : public QObject {
Q_OBJECT
public:
DocumentListPrivate( ServerInterface *gui );
~DocumentListPrivate();
void initialize();
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index c136bd9..3e7e0d2 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -53,25 +53,25 @@
#ifdef QT_QWS_LOGIN
#include "../login/qdmdialogimpl.h"
#endif
#ifdef Q_WS_QWS
#include <qkeyboard_qws.h>
#endif
#include <qmessagebox.h>
#include <opie2/odevice.h>
-using namespace Opie;
+using namespace Opie::Core;
static void cleanup()
{
QDir dir( "/tmp", "qcop-msg-*" );
QStringList stale = dir.entryList();
QStringList::Iterator it;
for ( it = stale.begin(); it != stale.end(); ++it ) {
dir.remove( *it );
}
}
diff --git a/core/launcher/qcopbridge.cpp b/core/launcher/qcopbridge.cpp
index 53efba4..33df6c4 100644
--- a/core/launcher/qcopbridge.cpp
+++ b/core/launcher/qcopbridge.cpp
@@ -45,24 +45,25 @@
#include <sys/types.h>
#endif
#if defined(_OS_LINUX_)
#include <shadow.h>
#endif
//#define INSECURE
const int block_size = 51200;
+using namespace Opie::Core;
QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent,
const char* name )
: QServerSocket( port, 1, parent, name ),
desktopChannel( 0 ),
cardChannel( 0 )
{
if ( !ok() )
qWarning( "Failed to bind to port %d", port );
else {
#ifndef QT_NO_COP
desktopChannel = new QCopChannel( "QPE/Desktop", this );
connect( desktopChannel, SIGNAL(received(const QCString&,const QByteArray&)),
diff --git a/core/launcher/screensaver.cpp b/core/launcher/screensaver.cpp
index e544c61..6aaab3a 100644
--- a/core/launcher/screensaver.cpp
+++ b/core/launcher/screensaver.cpp
@@ -1,22 +1,22 @@
#include "screensaver.h"
#include <qpe/config.h>
#include <qpe/network.h>
#include <opie2/odevice.h>
-using namespace Opie;
+using namespace Opie::Core;
OpieScreenSaver::OpieScreenSaver ( )
: QObject ( 0, "screensaver" ), QWSScreenSaver ( )
{
m_disable_suspend = 100;
m_enable_dim = false;
m_enable_lightoff = false;
m_enable_suspend = false;
m_onlylcdoff = false;
diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp
index ea0b792..634082b 100644
--- a/core/launcher/server.cpp
+++ b/core/launcher/server.cpp
@@ -54,26 +54,26 @@
#include <opie2/odevice.h>
#include <unistd.h>
#include <qmainwindow.h>
#include <qmessagebox.h>
#include <qtimer.h>
#include <qtextstream.h>
#include <stdlib.h>
extern QRect qt_maxWindowRect;
-using namespace Opie;
+using namespace Opie::Core;
static QWidget *calibrate(bool)
{
#ifdef Q_WS_QWS
Calibrate *c = new Calibrate;
c->show();
return c;
#else
return 0;
#endif
}
#define FACTORY(T) \
@@ -150,26 +150,26 @@ Server::Server() :
connect(appLauncher, SIGNAL(launched(int,const QString&)), this, SLOT(applicationLaunched(int,const QString&)) );
connect(appLauncher, SIGNAL(terminated(int,const QString&)), this, SLOT(applicationTerminated(int,const QString&)) );
connect(appLauncher, SIGNAL(connected(const QString&)), this, SLOT(applicationConnected(const QString&)) );
storage = new StorageInfo( this );
connect( storage, SIGNAL(disksChanged()), this, SLOT(storageChanged()) );
// start services
startTransferServer();
(void) new IrServer( this );
packageHandler = new PackageHandler( this );
- connect(qApp, SIGNAL(activate(const Opie::ODeviceButton*,bool)),
- this,SLOT(activate(const Opie::ODeviceButton*,bool)));
+ connect(qApp, SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)),
+ this,SLOT(activate(const Opie::Core::ODeviceButton*,bool)));
setGeometry( -10, -10, 9, 9 );
QCopChannel *channel = new QCopChannel("QPE/System", this);
connect(channel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(systemMsg(const QCString&,const QByteArray&)) );
QCopChannel *tbChannel = new QCopChannel( "QPE/TaskBar", this );
connect( tbChannel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(receiveTaskBar(const QCString&,const QByteArray&)) );
connect( qApp, SIGNAL(prepareForRestart()), this, SLOT(terminateServers()) );
@@ -212,28 +212,28 @@ static bool hasVisibleWindow(const QString& clientname, bool partial)
# else
QRect mwr = qt_maxWindowRect;
# endif
if ( mwr.contains(w->requested().boundingRect()) )
return TRUE;
}
}
}
#endif
return FALSE;
}
-void Server::activate(const Opie::ODeviceButton* button, bool held)
+void Server::activate(const ODeviceButton* button, bool held)
{
Global::terminateBuiltin("calibrate"); // No tr
- Opie::OQCopMessage om;
+ OQCopMessage om;
if ( held ) {
om = button->heldAction();
} else {
om = button->pressedAction();
}
if ( om.channel() != "ignore" )
om.send();
// A button with no action defined, will return a null ServiceRequest. Don't attempt
// to send/do anything with this as it will crash
/* ### FIXME */
diff --git a/core/launcher/server.h b/core/launcher/server.h
index 91bf883..1dc5e7e 100644
--- a/core/launcher/server.h
+++ b/core/launcher/server.h
@@ -29,47 +29,49 @@ class QCopBridge;
class QHostAddress;
class TransferServer;
class PackageHandler;
class ServiceRequest;
class TempScreenSaverMonitor;
class AppLauncher;
class AppLnkSet;
class StorageInfo;
class SyncDialog;
class DocumentList;
class ServerInterface;
namespace Opie {
+namespace Core {
class ODeviceButton;
}
+}
class Server : public QWidget {
Q_OBJECT
public:
Server();
~Server();
static bool mkdir(const QString &path);
void show();
static bool setKeyboardLayout( const QString &kb );
public slots:
void systemMsg(const QCString &, const QByteArray &);
void receiveTaskBar(const QCString &msg, const QByteArray &data);
void terminateServers();
void pokeTimeMonitors();
private slots:
- void activate(const Opie::ODeviceButton*,bool);
+ void activate(const Opie::Core::ODeviceButton*,bool);
void syncConnectionClosed( const QHostAddress & );
void applicationLaunched(int pid, const QString &app);
void applicationTerminated(int pid, const QString &app);
void applicationConnected(const QString &app);
void storageChanged();
void cancelSync();
protected:
void styleChange( QStyle & );
void timerEvent( QTimerEvent *e );
private:
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp
index d38dd97..e4e16f2 100644
--- a/core/launcher/serverapp.cpp
+++ b/core/launcher/serverapp.cpp
@@ -46,24 +46,25 @@
#include <qpainter.h>
#include <qfile.h>
#include <qpixmapcache.h>
#include <stdlib.h>
#include "screensaver.h"
static ServerApplication *serverApp = 0;
static int loggedin=0;
using namespace Opie;
+using namespace Opie::Core;
QCopKeyRegister::QCopKeyRegister()
: m_keyCode( 0 ) {
}
QCopKeyRegister::QCopKeyRegister( int k, const QCString& c, const QCString& m )
:m_keyCode( k ), m_channel( c ), m_message( m ) {
}
int QCopKeyRegister::keyCode()const {
return m_keyCode;
}
@@ -188,25 +189,25 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe
&& keycode != Key_Up
&& keycode != Key_Down )
return TRUE;
/* check if it was registered */
if (!db ) {
if (keycode != 0 &&press && !autoRepeat && keyRegistered(keycode) )
return true;
}else {
// First check to see if DeviceButtonManager knows something about this button:
- const Opie::ODeviceButton* button = Opie::ODevice::inst()->buttonForKeycode(keycode);
+ const ODeviceButton* button = ODevice::inst()->buttonForKeycode(keycode);
if (button && !autoRepeat) {
if ( held_tid ) {
killTimer(held_tid);
held_tid = 0;
}
if ( button->heldAction().isNull() ) {
if ( press )
emit activate(button, FALSE);
} else if ( press ) {
heldButton = button;
held_tid = startTimer( ODevice::inst ()->buttonHoldTime () );
} else if ( heldButton ) {
@@ -322,42 +323,42 @@ ServerApplication::ServerApplication( int& argc, char **argv, Type t )
QTimer::singleShot(500, this, SLOT(showSafeMode()) );
QTimer::singleShot(20*1000, this, SLOT(clearSafeMode()) );
#endif
kf = new KeyFilter(this);
connect( kf, SIGNAL(launch()), this, SIGNAL(launch()) );
connect( kf, SIGNAL(power()), this, SIGNAL(power()) );
connect( kf, SIGNAL(backlight()), this, SIGNAL(backlight()) );
connect( kf, SIGNAL(symbol()), this, SIGNAL(symbol()));
connect( kf, SIGNAL(numLockStateToggle()), this,SIGNAL(numLockStateToggle()));
connect( kf, SIGNAL(capsLockStateToggle()), this,SIGNAL(capsLockStateToggle()));
- connect( kf, SIGNAL(activate(const Opie::ODeviceButton*,bool)),
- this,SIGNAL(activate(const Opie::ODeviceButton*,bool)));
+ connect( kf, SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)),
+ this,SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)));
connect( kf, SIGNAL(backlight()), this, SLOT(toggleLight()) );
connect( this, SIGNAL(power() ),
SLOT(togglePower() ) );
rereadVolumes();
serverApp = this;
apmTimeout();
grabKeyboard();
/* make sure the event filter is installed */
- const Opie::ODeviceButton* but = Opie::ODevice::inst()->buttonForKeycode( -1 );
+ const ODeviceButton* but = ODevice::inst()->buttonForKeycode( -1 );
}
ServerApplication::~ServerApplication()
{
ungrabKeyboard();
delete pa;
delete m_ps;
delete m_ps_last;
}
diff --git a/core/launcher/serverapp.h b/core/launcher/serverapp.h
index 4d9f808..916d83c 100644
--- a/core/launcher/serverapp.h
+++ b/core/launcher/serverapp.h
@@ -26,26 +26,28 @@
#include <qwidget.h>
#ifdef QWS
#include <qwindowsystem_qws.h>
#endif
#include "shutdownimpl.h"
class PowerStatus;
class DesktopPowerAlerter;
class OpieScreenSaver;
namespace Opie {
+namespace Core {
class ODeviceButton;
}
+}
struct QCopKeyRegister {
QCopKeyRegister();
QCopKeyRegister( int k, const QCString&, const QCString& );
int keyCode()const;
QCString channel()const;
QCString message()const;
inline bool send();
private:
int m_keyCode;
QCString m_channel, m_message;
@@ -64,31 +66,31 @@ public:
protected:
void timerEvent(QTimerEvent*);
signals:
void launch();
void power();
void backlight();
void symbol();
void numLockStateToggle();
void capsLockStateToggle();
- void activate(const Opie::ODeviceButton*,bool);
+ void activate(const Opie::Core::ODeviceButton*,bool);
private:
bool keyRegistered( int key );
int held_tid;
- const Opie::ODeviceButton* heldButton;
+ const Opie::Core::ODeviceButton* heldButton;
KeyRegisterList m_keys;
};
class ServerApplication : public QPEApplication
{
Q_OBJECT
public:
ServerApplication( int& argc, char **argv, Type t );
~ServerApplication();
static bool doRestart;
static bool allowRestart;
@@ -104,25 +106,25 @@ public:
int exec();
signals:
void menu();
void home();
void launch();
void power();
void backlight();
void symbol();
void numLockStateToggle();
void capsLockStateToggle();
void prepareForRestart();
- void activate(const Opie::ODeviceButton*,bool);
+ void activate(const Opie::Core::ODeviceButton*,bool);
public slots:
virtual void systemMessage( const QCString& msg, const QByteArray& );
virtual void launcherMessage( const QCString& msg, const QByteArray& );
void rereadVolumes();
protected:
bool eventFilter( QObject*, QEvent* );
#ifdef Q_WS_QWS
bool qwsEventFilter( QWSEvent * );
#endif
void shutdown();
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index a5e20b2..e32cf41 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -50,24 +50,25 @@
#include <qtopia/private/contact.h>
#include <qtopia/version.h>
#ifdef Q_WS_QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
#include "transferserver.h"
#include <qtopia/qprocess.h>
const int block_size = 51200;
+using namespace Opie::Core;
TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
const char* name)
: QServerSocket( port, 1, parent, name )
{
connections.setAutoDelete( TRUE );
if ( !ok() )
qWarning( "Failed to bind to port %d", port );
}
void TransferServer::authorizeConnections()
{
QListIterator<ServerPI> it(connections);
diff --git a/core/launcher/wait.cpp b/core/launcher/wait.cpp
index 4148e57..a5b329d 100644
--- a/core/launcher/wait.cpp
+++ b/core/launcher/wait.cpp
@@ -20,24 +20,25 @@
#include "wait.h"
#include <qtopia/config.h>
#include <opie2/owait.h>
Wait *lastWaitObject = NULL;
+using namespace Opie::Ui;
Wait::Wait( QWidget *parent ) : QWidget( parent ),
pm( Resource::loadPixmap( "wait" ) ), waiting( FALSE )
{
setFixedSize( pm.size() );
lastWaitObject = this;
m_centralWait = new OWait( 0l );
m_centralWait->hide();
hide();
}
Wait *Wait::getWaitObject()
diff --git a/core/launcher/wait.h b/core/launcher/wait.h
index e7294d2..010fcc3 100644
--- a/core/launcher/wait.h
+++ b/core/launcher/wait.h
@@ -18,29 +18,29 @@
**
**********************************************************************/
#ifndef __WAIT_H__
#define __WAIT_H__
#include <qtopia/resource.h>
#include <qwidget.h>
#include <qpixmap.h>
#include <qpainter.h>
-class OWait;
+namespace Opie {namespace Ui {class OWait;}}
class Wait : public QWidget
{
public:
Wait( QWidget *parent );
void setWaiting( bool w );
void paintEvent( QPaintEvent * );
static Wait *getWaitObject();
private:
QPixmap pm;
bool waiting;
- OWait* m_centralWait;
+ Opie::Ui::OWait* m_centralWait;
};
#endif // __WAIT_H__