author | zecke <zecke> | 2004-03-13 21:27:29 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-13 21:27:29 (UTC) |
commit | 184a0cd9935d0a249038cdbe05488c181b273d64 (patch) (unidiff) | |
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 | |||
@@ -59,4 +59,5 @@ | |||
59 | #include "documentlist.h" | 59 | #include "documentlist.h" |
60 | 60 | ||
61 | using namespace Opie::Core; | ||
61 | const int AppLauncher::RAISE_TIMEOUT_MS = 5000; | 62 | const int AppLauncher::RAISE_TIMEOUT_MS = 5000; |
62 | 63 | ||
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 | |||
@@ -48,4 +48,5 @@ | |||
48 | 48 | ||
49 | 49 | ||
50 | using namespace Opie::Core; | ||
50 | AppLnkSet *DocumentList::appLnkSet = 0; | 51 | AppLnkSet *DocumentList::appLnkSet = 0; |
51 | 52 | ||
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 | |||
@@ -63,5 +63,5 @@ | |||
63 | #include <opie2/odevice.h> | 63 | #include <opie2/odevice.h> |
64 | 64 | ||
65 | using namespace Opie; | 65 | using namespace Opie::Core; |
66 | 66 | ||
67 | 67 | ||
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 | |||
@@ -55,4 +55,5 @@ | |||
55 | const int block_size = 51200; | 55 | const int block_size = 51200; |
56 | 56 | ||
57 | using namespace Opie::Core; | ||
57 | QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent, | 58 | QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent, |
58 | const char* name ) | 59 | const char* name ) |
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 | |||
@@ -8,5 +8,5 @@ | |||
8 | 8 | ||
9 | 9 | ||
10 | using namespace Opie; | 10 | using namespace Opie::Core; |
11 | 11 | ||
12 | 12 | ||
@@ -158,5 +158,5 @@ void OpieScreenSaver::setIntervals ( int dim, int lightoff, int suspend ) | |||
158 | m_onlylcdoff = config.readBoolEntry ( "LcdOffOnly", false ); | 158 | m_onlylcdoff = config.readBoolEntry ( "LcdOffOnly", false ); |
159 | } | 159 | } |
160 | 160 | ||
161 | //qDebug("screen saver intervals: %d %d %d", dim, lightoff, suspend); | 161 | //qDebug("screen saver intervals: %d %d %d", dim, lightoff, suspend); |
162 | 162 | ||
@@ -216,5 +216,5 @@ void OpieScreenSaver::setBacklight ( int bright ) | |||
216 | if (( bright < 0 ) && m_use_light_sensor ) { | 216 | if (( bright < 0 ) && m_use_light_sensor ) { |
217 | QStringList sl = config. readListEntry ( "LightSensorData", ';' ); | 217 | QStringList sl = config. readListEntry ( "LightSensorData", ';' ); |
218 | 218 | ||
219 | m_sensordata [LS_SensorMin] = 40; | 219 | m_sensordata [LS_SensorMin] = 40; |
220 | m_sensordata [LS_SensorMax] = 215; | 220 | m_sensordata [LS_SensorMax] = 215; |
@@ -222,6 +222,6 @@ void OpieScreenSaver::setBacklight ( int bright ) | |||
222 | m_sensordata [LS_LightMax] = 255; | 222 | m_sensordata [LS_LightMax] = 255; |
223 | m_sensordata [LS_Steps] = 12; | 223 | m_sensordata [LS_Steps] = 12; |
224 | m_sensordata [LS_Interval] = 2000; | 224 | m_sensordata [LS_Interval] = 2000; |
225 | 225 | ||
226 | for ( uint i = 0; i < LS_Count; i++ ) { | 226 | for ( uint i = 0; i < LS_Count; i++ ) { |
227 | if ( i < sl. count ( )) | 227 | if ( i < sl. count ( )) |
@@ -280,5 +280,5 @@ void OpieScreenSaver::timerEvent ( QTimerEvent * ) | |||
280 | { | 280 | { |
281 | int s = ODevice::inst ( )-> readLightSensor ( ) * 256 / ODevice::inst ( )-> lightSensorResolution ( ); | 281 | int s = ODevice::inst ( )-> readLightSensor ( ) * 256 / ODevice::inst ( )-> lightSensorResolution ( ); |
282 | 282 | ||
283 | if ( s < m_sensordata [LS_SensorMin] ) | 283 | if ( s < m_sensordata [LS_SensorMin] ) |
284 | m_backlight_sensor = m_sensordata [LS_LightMax]; | 284 | m_backlight_sensor = m_sensordata [LS_LightMax]; |
@@ -288,7 +288,7 @@ void OpieScreenSaver::timerEvent ( QTimerEvent * ) | |||
288 | int dx = m_sensordata [LS_SensorMax] - m_sensordata [LS_SensorMin]; | 288 | int dx = m_sensordata [LS_SensorMax] - m_sensordata [LS_SensorMin]; |
289 | int dy = m_sensordata [LS_LightMax] - m_sensordata [LS_LightMin]; | 289 | int dy = m_sensordata [LS_LightMax] - m_sensordata [LS_LightMin]; |
290 | 290 | ||
291 | int stepno = ( s - m_sensordata [LS_SensorMin] ) * m_sensordata [LS_Steps] / dx; // dx is never 0 | 291 | int stepno = ( s - m_sensordata [LS_SensorMin] ) * m_sensordata [LS_Steps] / dx; // dx is never 0 |
292 | 292 | ||
293 | m_backlight_sensor = m_sensordata [LS_LightMax] - dy * stepno / ( m_sensordata [LS_Steps] - 1 ); | 293 | m_backlight_sensor = m_sensordata [LS_LightMax] - dy * stepno / ( m_sensordata [LS_Steps] - 1 ); |
294 | } | 294 | } |
@@ -319,10 +319,10 @@ void OpieScreenSaver::powerStatusChanged ( PowerStatus ps ) | |||
319 | { | 319 | { |
320 | bool newonac = ( ps. acStatus ( ) == PowerStatus::Online ); | 320 | bool newonac = ( ps. acStatus ( ) == PowerStatus::Online ); |
321 | 321 | ||
322 | if ( newonac != m_on_ac ) { | 322 | if ( newonac != m_on_ac ) { |
323 | m_on_ac = newonac; | 323 | m_on_ac = newonac; |
324 | setInterval ( -1 ); | 324 | setInterval ( -1 ); |
325 | setBacklight ( -1 ); | 325 | setBacklight ( -1 ); |
326 | restore ( ); | 326 | restore ( ); |
327 | } | 327 | } |
328 | } | 328 | } |
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 | |||
@@ -64,6 +64,6 @@ | |||
64 | extern QRect qt_maxWindowRect; | 64 | extern QRect qt_maxWindowRect; |
65 | 65 | ||
66 | using namespace Opie; | ||
67 | 66 | ||
67 | using namespace Opie::Core; | ||
68 | static QWidget *calibrate(bool) | 68 | static QWidget *calibrate(bool) |
69 | { | 69 | { |
@@ -160,6 +160,6 @@ Server::Server() : | |||
160 | 160 | ||
161 | packageHandler = new PackageHandler( this ); | 161 | packageHandler = new PackageHandler( this ); |
162 | connect(qApp, SIGNAL(activate(const Opie::ODeviceButton*,bool)), | 162 | connect(qApp, SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)), |
163 | this,SLOT(activate(const Opie::ODeviceButton*,bool))); | 163 | this,SLOT(activate(const Opie::Core::ODeviceButton*,bool))); |
164 | 164 | ||
165 | setGeometry( -10, -10, 9, 9 ); | 165 | setGeometry( -10, -10, 9, 9 ); |
@@ -222,8 +222,8 @@ static bool hasVisibleWindow(const QString& clientname, bool partial) | |||
222 | } | 222 | } |
223 | 223 | ||
224 | void Server::activate(const Opie::ODeviceButton* button, bool held) | 224 | void Server::activate(const ODeviceButton* button, bool held) |
225 | { | 225 | { |
226 | Global::terminateBuiltin("calibrate"); // No tr | 226 | Global::terminateBuiltin("calibrate"); // No tr |
227 | Opie::OQCopMessage om; | 227 | OQCopMessage om; |
228 | if ( held ) { | 228 | if ( held ) { |
229 | om = button->heldAction(); | 229 | om = button->heldAction(); |
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 | |||
@@ -39,6 +39,8 @@ class DocumentList; | |||
39 | class ServerInterface; | 39 | class ServerInterface; |
40 | namespace Opie { | 40 | namespace Opie { |
41 | namespace Core { | ||
41 | class ODeviceButton; | 42 | class ODeviceButton; |
42 | } | 43 | } |
44 | } | ||
43 | 45 | ||
44 | class Server : public QWidget { | 46 | class Server : public QWidget { |
@@ -61,5 +63,5 @@ public slots: | |||
61 | 63 | ||
62 | private slots: | 64 | private slots: |
63 | void activate(const Opie::ODeviceButton*,bool); | 65 | void activate(const Opie::Core::ODeviceButton*,bool); |
64 | void syncConnectionClosed( const QHostAddress & ); | 66 | void syncConnectionClosed( const QHostAddress & ); |
65 | void applicationLaunched(int pid, const QString &app); | 67 | void applicationLaunched(int pid, 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 | |||
@@ -56,4 +56,5 @@ static int loggedin=0; | |||
56 | using namespace Opie; | 56 | using namespace Opie; |
57 | 57 | ||
58 | using namespace Opie::Core; | ||
58 | QCopKeyRegister::QCopKeyRegister() | 59 | QCopKeyRegister::QCopKeyRegister() |
59 | : m_keyCode( 0 ) { | 60 | : m_keyCode( 0 ) { |
@@ -198,5 +199,5 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe | |||
198 | 199 | ||
199 | // First check to see if DeviceButtonManager knows something about this button: | 200 | // First check to see if DeviceButtonManager knows something about this button: |
200 | const Opie::ODeviceButton* button = Opie::ODevice::inst()->buttonForKeycode(keycode); | 201 | const ODeviceButton* button = ODevice::inst()->buttonForKeycode(keycode); |
201 | if (button && !autoRepeat) { | 202 | if (button && !autoRepeat) { |
202 | if ( held_tid ) { | 203 | if ( held_tid ) { |
@@ -332,6 +333,6 @@ ServerApplication::ServerApplication( int& argc, char **argv, Type t ) | |||
332 | connect( kf, SIGNAL(numLockStateToggle()), this,SIGNAL(numLockStateToggle())); | 333 | connect( kf, SIGNAL(numLockStateToggle()), this,SIGNAL(numLockStateToggle())); |
333 | connect( kf, SIGNAL(capsLockStateToggle()), this,SIGNAL(capsLockStateToggle())); | 334 | connect( kf, SIGNAL(capsLockStateToggle()), this,SIGNAL(capsLockStateToggle())); |
334 | connect( kf, SIGNAL(activate(const Opie::ODeviceButton*,bool)), | 335 | connect( kf, SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)), |
335 | this,SIGNAL(activate(const Opie::ODeviceButton*,bool))); | 336 | this,SIGNAL(activate(const Opie::Core::ODeviceButton*,bool))); |
336 | 337 | ||
337 | 338 | ||
@@ -349,5 +350,5 @@ ServerApplication::ServerApplication( int& argc, char **argv, Type t ) | |||
349 | 350 | ||
350 | /* make sure the event filter is installed */ | 351 | /* make sure the event filter is installed */ |
351 | const Opie::ODeviceButton* but = Opie::ODevice::inst()->buttonForKeycode( -1 ); | 352 | const ODeviceButton* but = ODevice::inst()->buttonForKeycode( -1 ); |
352 | } | 353 | } |
353 | 354 | ||
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 | |||
@@ -36,6 +36,8 @@ class DesktopPowerAlerter; | |||
36 | class OpieScreenSaver; | 36 | class OpieScreenSaver; |
37 | namespace Opie { | 37 | namespace Opie { |
38 | namespace Core { | ||
38 | class ODeviceButton; | 39 | class ODeviceButton; |
39 | } | 40 | } |
41 | } | ||
40 | 42 | ||
41 | struct QCopKeyRegister { | 43 | struct QCopKeyRegister { |
@@ -74,5 +76,5 @@ signals: | |||
74 | void numLockStateToggle(); | 76 | void numLockStateToggle(); |
75 | void capsLockStateToggle(); | 77 | void capsLockStateToggle(); |
76 | void activate(const Opie::ODeviceButton*,bool); | 78 | void activate(const Opie::Core::ODeviceButton*,bool); |
77 | 79 | ||
78 | 80 | ||
@@ -80,5 +82,5 @@ private: | |||
80 | bool keyRegistered( int key ); | 82 | bool keyRegistered( int key ); |
81 | int held_tid; | 83 | int held_tid; |
82 | const Opie::ODeviceButton* heldButton; | 84 | const Opie::Core::ODeviceButton* heldButton; |
83 | KeyRegisterList m_keys; | 85 | KeyRegisterList m_keys; |
84 | }; | 86 | }; |
@@ -95,5 +97,5 @@ public: | |||
95 | static bool screenLocked(); | 97 | static bool screenLocked(); |
96 | static void login(bool at_poweron); | 98 | static void login(bool at_poweron); |
97 | 99 | ||
98 | static bool isStarting(); | 100 | static bool isStarting(); |
99 | 101 | ||
@@ -114,5 +116,5 @@ signals: | |||
114 | void capsLockStateToggle(); | 116 | void capsLockStateToggle(); |
115 | void prepareForRestart(); | 117 | void prepareForRestart(); |
116 | void activate(const Opie::ODeviceButton*,bool); | 118 | void activate(const Opie::Core::ODeviceButton*,bool); |
117 | 119 | ||
118 | public slots: | 120 | public slots: |
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 | |||
@@ -60,4 +60,5 @@ | |||
60 | const int block_size = 51200; | 60 | const int block_size = 51200; |
61 | 61 | ||
62 | using namespace Opie::Core; | ||
62 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent, | 63 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent, |
63 | const char* name) | 64 | const char* 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 | |||
@@ -30,4 +30,5 @@ Wait *lastWaitObject = NULL; | |||
30 | 30 | ||
31 | 31 | ||
32 | using namespace Opie::Ui; | ||
32 | Wait::Wait( QWidget *parent ) : QWidget( parent ), | 33 | Wait::Wait( QWidget *parent ) : QWidget( parent ), |
33 | pm( Resource::loadPixmap( "wait" ) ), waiting( FALSE ) | 34 | pm( Resource::loadPixmap( "wait" ) ), waiting( FALSE ) |
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 | |||
@@ -28,5 +28,5 @@ | |||
28 | #include <qpainter.h> | 28 | #include <qpainter.h> |
29 | 29 | ||
30 | class OWait; | 30 | namespace Opie {namespace Ui {class OWait;}} |
31 | class Wait : public QWidget | 31 | class Wait : public QWidget |
32 | { | 32 | { |
@@ -39,5 +39,5 @@ private: | |||
39 | QPixmap pm; | 39 | QPixmap pm; |
40 | bool waiting; | 40 | bool waiting; |
41 | OWait* m_centralWait; | 41 | Opie::Ui::OWait* m_centralWait; |
42 | }; | 42 | }; |
43 | 43 | ||