summaryrefslogtreecommitdiff
path: root/core/launcher
Side-by-side diff
Diffstat (limited to 'core/launcher') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/inputmethods.cpp14
-rw-r--r--core/launcher/inputmethods.h2
-rw-r--r--core/launcher/taskbar.cpp17
-rw-r--r--core/launcher/taskbar.h28
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[]={
".........",
"........."};
-static const int inputWidgetStyle = QWidget::WStyle_Customize |
- QWidget::WStyle_Tool |
- QWidget::WStyle_StaysOnTop |
- QWidget::WGroupLeader;
-
-
int InputMethod::operator <(const InputMethod& o) const
{
return name() < o.name();
@@ -104,6 +98,12 @@ InputMethods::InputMethods( QWidget *parent ) :
QWidget( parent, "InputMethods", WStyle_Tool | WStyle_Customize ),
mkeyboard(0), imethod(0)
{
+ Config cfg( "Launcher" );
+ cfg.setGroup( "InputMethods" );
+ inputWidgetStyle = QWidget::WStyle_Customize | QWidget::WStyle_StaysOnTop | QWidget::WGroupLeader;
+ inputWidgetStyle |= cfg.readBoolEntry( "Float", false ) ? QWidget::WStyle_DialogBorder : QWidget::WStyle_Tool;
+ inputWidgetWidth = cfg.readNumEntry( "Width", 100 );
+
setBackgroundMode( PaletteBackground );
QHBoxLayout *hbox = new QHBoxLayout( this );
@@ -537,7 +537,7 @@ void InputMethods::showKbd( bool on )
// HACK... Make the texteditor fit with all input methods
// Input methods should also never use more than about 40% of the screen
int height = QMIN( mkeyboard->widget->sizeHint().height(), 134 );
- mkeyboard->widget->resize( qApp->desktop()->width(), height );
+ mkeyboard->widget->resize( qApp->desktop()->width() * (inputWidgetWidth*0.01), height );
mkeyboard->widget->move( 0, mapToGlobal( QPoint() ).y() - height );
mkeyboard->widget->show();
} 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:
InputMethod *imethod;
QValueList<InputMethod> inputMethodList;
QValueList<InputMethod> inputModifierList;
+ int inputWidgetStyle;
+ int inputWidgetWidth;
};
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 @@
#include "taskbar.h"
#include "server.h"
+#include <qtopia/config.h>
#include <qtopia/qpeapplication.h>
#ifdef QWS
#include <qtopia/qcopenvelope_qws.h>
@@ -172,6 +173,10 @@ TaskBar::~TaskBar()
TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader)
{
+ Config cfg( "Launcher" );
+ cfg.setGroup( "InputMethods" );
+ resizeRunningApp = cfg.readBoolEntry( "Resize", true );
+
sm = new StartMenu( this );
connect( sm, SIGNAL(tabSelected(const QString&)), this,
SIGNAL(tabSelected(const QString&)) );
@@ -291,8 +296,9 @@ void TaskBar::styleChange( QStyle &s )
void TaskBar::calcMaxWindowRect()
{
- /*
-#ifdef Q_WS_QWS
+ if ( resizeRunningApp )
+ {
+ #if defined(Q_WS_QWS)
QRect wr;
int displayWidth = qApp->desktop()->width();
QRect ir = inputMethods->inputRect();
@@ -301,16 +307,13 @@ void TaskBar::calcMaxWindowRect()
} else {
wr.setCoords( 0, 0, displayWidth-1, y()-1 );
}
-
#if QT_VERSION < 0x030000
- QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,
- QSize(qt_screen->width(),qt_screen->height()))
- );
+ QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,QSize(qt_screen->width(),qt_screen->height())) );
#else
QWSServer::setMaxWindowRect( wr );
#endif
#endif
- */
+ }
}
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 @@
/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qtopia Environment.
+** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -18,10 +18,12 @@
**
**********************************************************************/
-#ifndef __TASKBAR_H__
-#define __TASKBAR_H__
+#ifndef TASKBAR_H
+#define TASKBAR_H
#include <qhbox.h>
+#include "serverinterface.h"
+#include "startmenu.h"
class QLabel;
class QTimer;
@@ -32,8 +34,8 @@ class RunningAppBar;
class QWidgetStack;
class QTimer;
class QLabel;
-class StartMenu;
class LockKeyState;
+class AppLnkSet;
class TaskBar : public QHBox {
Q_OBJECT
@@ -41,32 +43,33 @@ public:
TaskBar();
~TaskBar();
- static QWidget *calibrate( bool );
+ void launchStartMenu() { if (sm) sm->launch(); }
+ void refreshStartMenu() { if (sm) sm->refreshMenu(); }
+ void setApplicationState( const QString &name, ServerInterface::ApplicationState state );
- bool recoverMemory();
+signals:
+ void tabSelected(const QString&);
- StartMenu *startMenu() const { return sm; }
public slots:
void startWait();
void stopWait(const QString&);
void stopWait();
+
void clearStatusBar();
void toggleNumLockState();
void toggleCapsLockState();
void toggleSymbolInput();
+ void calcMaxWindowRect();
protected:
void resizeEvent( QResizeEvent * );
void styleChange( QStyle & );
void setStatusMessage( const QString &text );
-public slots:
- void calcMaxWindowRect();
private slots:
void receive( const QCString &msg, const QByteArray &data );
private:
-
QTimer *waitTimer;
Wait *waitIcon;
InputMethods *inputMethods;
@@ -77,7 +80,8 @@ private:
QLabel *label;
LockKeyState* lockState;
StartMenu *sm;
+ bool resizeRunningApp;
};
-#endif // __TASKBAR_H__
+#endif // TASKBAR_H