-rw-r--r-- | core/launcher/inputmethods.cpp | 14 | ||||
-rw-r--r-- | core/launcher/inputmethods.h | 2 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 17 | ||||
-rw-r--r-- | core/launcher/taskbar.h | 28 |
4 files changed, 35 insertions, 26 deletions
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp index f0d8294..d89a366 100644 --- a/core/launcher/inputmethods.cpp +++ b/core/launcher/inputmethods.cpp | |||
@@ -68,12 +68,6 @@ static const char * tri_xpm[]={ | |||
68 | ".........", | 68 | ".........", |
69 | "........."}; | 69 | "........."}; |
70 | 70 | ||
71 | static const int inputWidgetStyle = QWidget::WStyle_Customize | | ||
72 | QWidget::WStyle_Tool | | ||
73 | QWidget::WStyle_StaysOnTop | | ||
74 | QWidget::WGroupLeader; | ||
75 | |||
76 | |||
77 | int InputMethod::operator <(const InputMethod& o) const | 71 | int InputMethod::operator <(const InputMethod& o) const |
78 | { | 72 | { |
79 | return name() < o.name(); | 73 | return name() < o.name(); |
@@ -104,6 +98,12 @@ InputMethods::InputMethods( QWidget *parent ) : | |||
104 | QWidget( parent, "InputMethods", WStyle_Tool | WStyle_Customize ), | 98 | QWidget( parent, "InputMethods", WStyle_Tool | WStyle_Customize ), |
105 | mkeyboard(0), imethod(0) | 99 | mkeyboard(0), imethod(0) |
106 | { | 100 | { |
101 | Config cfg( "Launcher" ); | ||
102 | cfg.setGroup( "InputMethods" ); | ||
103 | inputWidgetStyle = QWidget::WStyle_Customize | QWidget::WStyle_StaysOnTop | QWidget::WGroupLeader; | ||
104 | inputWidgetStyle |= cfg.readBoolEntry( "Float", false ) ? QWidget::WStyle_DialogBorder : QWidget::WStyle_Tool; | ||
105 | inputWidgetWidth = cfg.readNumEntry( "Width", 100 ); | ||
106 | |||
107 | setBackgroundMode( PaletteBackground ); | 107 | setBackgroundMode( PaletteBackground ); |
108 | QHBoxLayout *hbox = new QHBoxLayout( this ); | 108 | QHBoxLayout *hbox = new QHBoxLayout( this ); |
109 | 109 | ||
@@ -537,7 +537,7 @@ void InputMethods::showKbd( bool on ) | |||
537 | // HACK... Make the texteditor fit with all input methods | 537 | // HACK... Make the texteditor fit with all input methods |
538 | // Input methods should also never use more than about 40% of the screen | 538 | // Input methods should also never use more than about 40% of the screen |
539 | int height = QMIN( mkeyboard->widget->sizeHint().height(), 134 ); | 539 | int height = QMIN( mkeyboard->widget->sizeHint().height(), 134 ); |
540 | mkeyboard->widget->resize( qApp->desktop()->width(), height ); | 540 | mkeyboard->widget->resize( qApp->desktop()->width() * (inputWidgetWidth*0.01), height ); |
541 | mkeyboard->widget->move( 0, mapToGlobal( QPoint() ).y() - height ); | 541 | mkeyboard->widget->move( 0, mapToGlobal( QPoint() ).y() - height ); |
542 | mkeyboard->widget->show(); | 542 | mkeyboard->widget->show(); |
543 | } else { | 543 | } else { |
diff --git a/core/launcher/inputmethods.h b/core/launcher/inputmethods.h index 93b69de..246661a 100644 --- a/core/launcher/inputmethods.h +++ b/core/launcher/inputmethods.h | |||
@@ -103,6 +103,8 @@ private: | |||
103 | InputMethod *imethod; | 103 | InputMethod *imethod; |
104 | QValueList<InputMethod> inputMethodList; | 104 | QValueList<InputMethod> inputMethodList; |
105 | QValueList<InputMethod> inputModifierList; | 105 | QValueList<InputMethod> inputModifierList; |
106 | int inputWidgetStyle; | ||
107 | int inputWidgetWidth; | ||
106 | }; | 108 | }; |
107 | 109 | ||
108 | 110 | ||
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 37fdb30..2966168 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "taskbar.h" | 28 | #include "taskbar.h" |
29 | #include "server.h" | 29 | #include "server.h" |
30 | 30 | ||
31 | #include <qtopia/config.h> | ||
31 | #include <qtopia/qpeapplication.h> | 32 | #include <qtopia/qpeapplication.h> |
32 | #ifdef QWS | 33 | #ifdef QWS |
33 | #include <qtopia/qcopenvelope_qws.h> | 34 | #include <qtopia/qcopenvelope_qws.h> |
@@ -172,6 +173,10 @@ TaskBar::~TaskBar() | |||
172 | 173 | ||
173 | TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) | 174 | TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) |
174 | { | 175 | { |
176 | Config cfg( "Launcher" ); | ||
177 | cfg.setGroup( "InputMethods" ); | ||
178 | resizeRunningApp = cfg.readBoolEntry( "Resize", true ); | ||
179 | |||
175 | sm = new StartMenu( this ); | 180 | sm = new StartMenu( this ); |
176 | connect( sm, SIGNAL(tabSelected(const QString&)), this, | 181 | connect( sm, SIGNAL(tabSelected(const QString&)), this, |
177 | SIGNAL(tabSelected(const QString&)) ); | 182 | SIGNAL(tabSelected(const QString&)) ); |
@@ -291,8 +296,9 @@ void TaskBar::styleChange( QStyle &s ) | |||
291 | 296 | ||
292 | void TaskBar::calcMaxWindowRect() | 297 | void TaskBar::calcMaxWindowRect() |
293 | { | 298 | { |
294 | /* | 299 | if ( resizeRunningApp ) |
295 | #ifdef Q_WS_QWS | 300 | { |
301 | #if defined(Q_WS_QWS) | ||
296 | QRect wr; | 302 | QRect wr; |
297 | int displayWidth = qApp->desktop()->width(); | 303 | int displayWidth = qApp->desktop()->width(); |
298 | QRect ir = inputMethods->inputRect(); | 304 | QRect ir = inputMethods->inputRect(); |
@@ -301,16 +307,13 @@ void TaskBar::calcMaxWindowRect() | |||
301 | } else { | 307 | } else { |
302 | wr.setCoords( 0, 0, displayWidth-1, y()-1 ); | 308 | wr.setCoords( 0, 0, displayWidth-1, y()-1 ); |
303 | } | 309 | } |
304 | |||
305 | #if QT_VERSION < 0x030000 | 310 | #if QT_VERSION < 0x030000 |
306 | QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr, | 311 | QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,QSize(qt_screen->width(),qt_screen->height())) ); |
307 | QSize(qt_screen->width(),qt_screen->height())) | ||
308 | ); | ||
309 | #else | 312 | #else |
310 | QWSServer::setMaxWindowRect( wr ); | 313 | QWSServer::setMaxWindowRect( wr ); |
311 | #endif | 314 | #endif |
312 | #endif | 315 | #endif |
313 | */ | 316 | } |
314 | } | 317 | } |
315 | 318 | ||
316 | void TaskBar::receive( const QCString &msg, const QByteArray &data ) | 319 | void TaskBar::receive( const QCString &msg, const QByteArray &data ) |
diff --git a/core/launcher/taskbar.h b/core/launcher/taskbar.h index 0cfc123..ed558b1 100644 --- a/core/launcher/taskbar.h +++ b/core/launcher/taskbar.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
@@ -18,10 +18,12 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #ifndef __TASKBAR_H__ | 21 | #ifndef TASKBAR_H |
22 | #define __TASKBAR_H__ | 22 | #define TASKBAR_H |
23 | 23 | ||
24 | #include <qhbox.h> | 24 | #include <qhbox.h> |
25 | #include "serverinterface.h" | ||
26 | #include "startmenu.h" | ||
25 | 27 | ||
26 | class QLabel; | 28 | class QLabel; |
27 | class QTimer; | 29 | class QTimer; |
@@ -32,8 +34,8 @@ class RunningAppBar; | |||
32 | class QWidgetStack; | 34 | class QWidgetStack; |
33 | class QTimer; | 35 | class QTimer; |
34 | class QLabel; | 36 | class QLabel; |
35 | class StartMenu; | ||
36 | class LockKeyState; | 37 | class LockKeyState; |
38 | class AppLnkSet; | ||
37 | 39 | ||
38 | class TaskBar : public QHBox { | 40 | class TaskBar : public QHBox { |
39 | Q_OBJECT | 41 | Q_OBJECT |
@@ -41,32 +43,33 @@ public: | |||
41 | TaskBar(); | 43 | TaskBar(); |
42 | ~TaskBar(); | 44 | ~TaskBar(); |
43 | 45 | ||
44 | static QWidget *calibrate( bool ); | 46 | void launchStartMenu() { if (sm) sm->launch(); } |
47 | void refreshStartMenu() { if (sm) sm->refreshMenu(); } | ||
48 | void setApplicationState( const QString &name, ServerInterface::ApplicationState state ); | ||
45 | 49 | ||
46 | bool recoverMemory(); | 50 | signals: |
51 | void tabSelected(const QString&); | ||
47 | 52 | ||
48 | StartMenu *startMenu() const { return sm; } | ||
49 | public slots: | 53 | public slots: |
50 | void startWait(); | 54 | void startWait(); |
51 | void stopWait(const QString&); | 55 | void stopWait(const QString&); |
52 | void stopWait(); | 56 | void stopWait(); |
57 | |||
53 | void clearStatusBar(); | 58 | void clearStatusBar(); |
54 | void toggleNumLockState(); | 59 | void toggleNumLockState(); |
55 | void toggleCapsLockState(); | 60 | void toggleCapsLockState(); |
56 | void toggleSymbolInput(); | 61 | void toggleSymbolInput(); |
62 | void calcMaxWindowRect(); | ||
57 | 63 | ||
58 | protected: | 64 | protected: |
59 | void resizeEvent( QResizeEvent * ); | 65 | void resizeEvent( QResizeEvent * ); |
60 | void styleChange( QStyle & ); | 66 | void styleChange( QStyle & ); |
61 | void setStatusMessage( const QString &text ); | 67 | void setStatusMessage( const QString &text ); |
62 | 68 | ||
63 | public slots: | ||
64 | void calcMaxWindowRect(); | ||
65 | private slots: | 69 | private slots: |
66 | void receive( const QCString &msg, const QByteArray &data ); | 70 | void receive( const QCString &msg, const QByteArray &data ); |
67 | 71 | ||
68 | private: | 72 | private: |
69 | |||
70 | QTimer *waitTimer; | 73 | QTimer *waitTimer; |
71 | Wait *waitIcon; | 74 | Wait *waitIcon; |
72 | InputMethods *inputMethods; | 75 | InputMethods *inputMethods; |
@@ -77,7 +80,8 @@ private: | |||
77 | QLabel *label; | 80 | QLabel *label; |
78 | LockKeyState* lockState; | 81 | LockKeyState* lockState; |
79 | StartMenu *sm; | 82 | StartMenu *sm; |
83 | bool resizeRunningApp; | ||
80 | }; | 84 | }; |
81 | 85 | ||
82 | 86 | ||
83 | #endif // __TASKBAR_H__ | 87 | #endif // TASKBAR_H |