author | zecke <zecke> | 2004-03-13 21:27:29 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-13 21:27:29 (UTC) |
commit | 184a0cd9935d0a249038cdbe05488c181b273d64 (patch) (side-by-side diff) | |
tree | c8f3508ab1be012083d9e2140221cfeb9a9ab83a | |
parent | a3304e23c7f8576a4584475ef0cf49d0e588671e (diff) | |
download | opie-184a0cd9935d0a249038cdbe05488c181b273d64.zip opie-184a0cd9935d0a249038cdbe05488c181b273d64.tar.gz opie-184a0cd9935d0a249038cdbe05488c181b273d64.tar.bz2 |
Fix namespaces in the launcher.. and found a problem with my script
-rw-r--r-- | core/launcher/applauncher.cpp | 1 | ||||
-rw-r--r-- | core/launcher/documentlist.cpp | 1 | ||||
-rw-r--r-- | core/launcher/main.cpp | 2 | ||||
-rw-r--r-- | core/launcher/qcopbridge.cpp | 1 | ||||
-rw-r--r-- | core/launcher/screensaver.cpp | 20 | ||||
-rw-r--r-- | core/launcher/server.cpp | 10 | ||||
-rw-r--r-- | core/launcher/server.h | 4 | ||||
-rw-r--r-- | core/launcher/serverapp.cpp | 9 | ||||
-rw-r--r-- | core/launcher/serverapp.h | 10 | ||||
-rw-r--r-- | core/launcher/transferserver.cpp | 1 | ||||
-rw-r--r-- | core/launcher/wait.cpp | 1 | ||||
-rw-r--r-- | core/launcher/wait.h | 4 |
12 files changed, 37 insertions, 27 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 @@ -57,8 +57,9 @@ #include "applauncher.h" #include "documentlist.h" +using namespace Opie::Core; const int AppLauncher::RAISE_TIMEOUT_MS = 5000; //--------------------------------------------------------------------------- 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 @@ -46,8 +46,9 @@ #include <qlist.h> #include <qpixmap.h> +using namespace Opie::Core; AppLnkSet *DocumentList::appLnkSet = 0; static const int MAX_SEARCH_DEPTH = 10; 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 @@ -61,9 +61,9 @@ #include <qmessagebox.h> #include <opie2/odevice.h> -using namespace Opie; +using namespace Opie::Core; static void cleanup() { 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 @@ -53,8 +53,9 @@ //#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 ), 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 @@ -6,9 +6,9 @@ #include <opie2/odevice.h> -using namespace Opie; +using namespace Opie::Core; OpieScreenSaver::OpieScreenSaver ( ) @@ -156,9 +156,9 @@ void OpieScreenSaver::setIntervals ( int dim, int lightoff, int suspend ) m_enable_lightoff = ( lightoff > 0 ); m_enable_suspend = ( suspend > 0 ); m_onlylcdoff = config.readBoolEntry ( "LcdOffOnly", false ); } - + //qDebug("screen saver intervals: %d %d %d", dim, lightoff, suspend); v [ 0 ] = QMAX( 1000 * dim, 100 ); v [ 1 ] = QMAX( 1000 * lightoff, 100 ); @@ -214,16 +214,16 @@ void OpieScreenSaver::setBacklight ( int bright ) killTimers ( ); if (( bright < 0 ) && m_use_light_sensor ) { QStringList sl = config. readListEntry ( "LightSensorData", ';' ); - + m_sensordata [LS_SensorMin] = 40; m_sensordata [LS_SensorMax] = 215; m_sensordata [LS_LightMin] = 1; m_sensordata [LS_LightMax] = 255; m_sensordata [LS_Steps] = 12; - m_sensordata [LS_Interval] = 2000; - + m_sensordata [LS_Interval] = 2000; + for ( uint i = 0; i < LS_Count; i++ ) { if ( i < sl. count ( )) m_sensordata [i] = sl [i]. toInt ( ); } @@ -278,19 +278,19 @@ void OpieScreenSaver::setBacklightInternal ( int bright ) */ void OpieScreenSaver::timerEvent ( QTimerEvent * ) { int s = ODevice::inst ( )-> readLightSensor ( ) * 256 / ODevice::inst ( )-> lightSensorResolution ( ); - + if ( s < m_sensordata [LS_SensorMin] ) m_backlight_sensor = m_sensordata [LS_LightMax]; else if ( s >= m_sensordata [LS_SensorMax] ) m_backlight_sensor = m_sensordata [LS_LightMin]; else { int dx = m_sensordata [LS_SensorMax] - m_sensordata [LS_SensorMin]; int dy = m_sensordata [LS_LightMax] - m_sensordata [LS_LightMin]; - + int stepno = ( s - m_sensordata [LS_SensorMin] ) * m_sensordata [LS_Steps] / dx; // dx is never 0 - + m_backlight_sensor = m_sensordata [LS_LightMax] - dy * stepno / ( m_sensordata [LS_Steps] - 1 ); } //qDebug ( "f(%d) = %d [%d - %d] -> [%d - %d] / %d", s, m_backlight_sensor, m_sensordata [LS_SensorMin], m_sensordata [LS_SensorMax], m_sensordata [LS_LightMin], m_sensordata [LS_LightMax], m_sensordata [LS_Steps] ); @@ -317,12 +317,12 @@ void OpieScreenSaver::setDisplayState ( bool on ) */ void OpieScreenSaver::powerStatusChanged ( PowerStatus ps ) { bool newonac = ( ps. acStatus ( ) == PowerStatus::Online ); - + if ( newonac != m_on_ac ) { m_on_ac = newonac; setInterval ( -1 ); setBacklight ( -1 ); - restore ( ); + restore ( ); } } 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 @@ -62,10 +62,10 @@ #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; @@ -158,10 +158,10 @@ Server::Server() : 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); @@ -220,12 +220,12 @@ static bool hasVisibleWindow(const QString& clientname, bool partial) #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(); 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 @@ -37,10 +37,12 @@ class StorageInfo; class SyncDialog; class DocumentList; class ServerInterface; namespace Opie { +namespace Core { class ODeviceButton; } +} class Server : public QWidget { Q_OBJECT public: @@ -59,9 +61,9 @@ public slots: 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); 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 @@ -54,8 +54,9 @@ static ServerApplication *serverApp = 0; static int loggedin=0; using namespace Opie; +using namespace Opie::Core; QCopKeyRegister::QCopKeyRegister() : m_keyCode( 0 ) { } @@ -196,9 +197,9 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe }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; @@ -330,10 +331,10 @@ ServerApplication::ServerApplication( int& argc, char **argv, Type t ) 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()) ); @@ -347,9 +348,9 @@ ServerApplication::ServerApplication( int& argc, char **argv, Type t ) 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() 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 @@ -34,10 +34,12 @@ class PowerStatus; class DesktopPowerAlerter; class OpieScreenSaver; namespace Opie { +namespace Core { class ODeviceButton; } +} struct QCopKeyRegister { QCopKeyRegister(); QCopKeyRegister( int k, const QCString&, const QCString& ); @@ -72,15 +74,15 @@ signals: 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 @@ -93,9 +95,9 @@ public: static bool doRestart; static bool allowRestart; static bool screenLocked(); static void login(bool at_poweron); - + static bool isStarting(); static void switchLCD ( bool on ); // only for togglePower in Desktop static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar @@ -112,9 +114,9 @@ signals: 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& ); 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 @@ -58,8 +58,9 @@ #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 ) { 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 @@ -28,8 +28,9 @@ Wait *lastWaitObject = NULL; +using namespace Opie::Ui; Wait::Wait( QWidget *parent ) : QWidget( parent ), pm( Resource::loadPixmap( "wait" ) ), waiting( FALSE ) { setFixedSize( pm.size() ); 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 @@ -26,9 +26,9 @@ #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 ); @@ -37,9 +37,9 @@ public: static Wait *getWaitObject(); private: QPixmap pm; bool waiting; - OWait* m_centralWait; + Opie::Ui::OWait* m_centralWait; }; #endif // __WAIT_H__ |