summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
authorharlekin <harlekin>2003-04-19 22:19:11 (UTC)
committer harlekin <harlekin>2003-04-19 22:19:11 (UTC)
commit0374e0e52e9b754ae48ada631cad2b397feabb21 (patch) (unidiff)
treec4dff4db838838956d7f137b52839a11ddaad0e1 /library/qpeapplication.cpp
parent29c556ffc9b1497cd996ceb46d646b1eaf1288be (diff)
downloadopie-0374e0e52e9b754ae48ada631cad2b397feabb21.zip
opie-0374e0e52e9b754ae48ada631cad2b397feabb21.tar.gz
opie-0374e0e52e9b754ae48ada631cad2b397feabb21.tar.bz2
big toolbar icons for screenwidths > 600
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/qpeapplication.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 2ef60d5..7f8299a 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -41,24 +41,25 @@
41#include <qpalette.h> 41#include <qpalette.h>
42#include <qbuffer.h> 42#include <qbuffer.h>
43#include <qptrdict.h> 43#include <qptrdict.h>
44#include <qregexp.h> 44#include <qregexp.h>
45#include <qdir.h> 45#include <qdir.h>
46#include <qlabel.h> 46#include <qlabel.h>
47#include <qdialog.h> 47#include <qdialog.h>
48#include <qdragobject.h> 48#include <qdragobject.h>
49#include <qtextcodec.h> 49#include <qtextcodec.h>
50#include <qevent.h> 50#include <qevent.h>
51#include <qtooltip.h> 51#include <qtooltip.h>
52#include <qsignal.h> 52#include <qsignal.h>
53#include <qmainwindow.h>
53#include "qpeapplication.h" 54#include "qpeapplication.h"
54#include "qpestyle.h" 55#include "qpestyle.h"
55#include "styleinterface.h" 56#include "styleinterface.h"
56#if QT_VERSION >= 300 57#if QT_VERSION >= 300
57#include <qstylefactory.h> 58#include <qstylefactory.h>
58#else 59#else
59#include <qplatinumstyle.h> 60#include <qplatinumstyle.h>
60#include <qwindowsstyle.h> 61#include <qwindowsstyle.h>
61#include <qmotifstyle.h> 62#include <qmotifstyle.h>
62#include <qmotifplusstyle.h> 63#include <qmotifplusstyle.h>
63#include "lightstyle.h" 64#include "lightstyle.h"
64 65
@@ -137,24 +138,30 @@ public:
137 { 138 {
138 QCopRec * r; 139 QCopRec * r;
139#ifndef QT_NO_COP 140#ifndef QT_NO_COP
140 141
141 for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it ) 142 for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it )
142 QCopChannel::sendLocally( r->channel, r->message, r->data ); 143 QCopChannel::sendLocally( r->channel, r->message, r->data );
143#endif 144#endif
144 145
145 qcopq.clear(); 146 qcopq.clear();
146 } 147 }
147 static void show_mx(QWidget* mw, bool nomaximize) 148 static void show_mx(QWidget* mw, bool nomaximize)
148 { 149 {
150
151 // ugly hack, remove that later after finding a sane solution
152 if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) {
153 ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true );
154 }
155
149 if ( mw->layout() && mw->inherits("QDialog") ) { 156 if ( mw->layout() && mw->inherits("QDialog") ) {
150 QPEApplication::showDialog((QDialog*)mw, nomaximize); 157 QPEApplication::showDialog((QDialog*)mw, nomaximize);
151 } 158 }
152 else { 159 else {
153#ifdef Q_WS_QWS 160#ifdef Q_WS_QWS
154 if ( !nomaximize ) 161 if ( !nomaximize )
155 mw->showMaximized(); 162 mw->showMaximized();
156 else 163 else
157#endif 164#endif
158 165
159 mw->show(); 166 mw->show();
160 } 167 }
@@ -854,24 +861,26 @@ bool QPEApplication::qwsEventFilter( QWSEvent * e )
854 if ( topm ) { 861 if ( topm ) {
855 topm->raise(); 862 topm->raise();
856 } 863 }
857 } 864 }
858 if ( fe->simpleData.get_focus && inputMethodDict ) { 865 if ( fe->simpleData.get_focus && inputMethodDict ) {
859 InputMethodHint m = inputMethodHint( QWidget::find( e->window() ) ); 866 InputMethodHint m = inputMethodHint( QWidget::find( e->window() ) );
860 if ( m == AlwaysOff ) 867 if ( m == AlwaysOff )
861 Global::hideInputMethod(); 868 Global::hideInputMethod();
862 if ( m == AlwaysOn ) 869 if ( m == AlwaysOn )
863 Global::showInputMethod(); 870 Global::showInputMethod();
864 } 871 }
865 } 872 }
873
874
866 return QApplication::qwsEventFilter( e ); 875 return QApplication::qwsEventFilter( e );
867} 876}
868#endif 877#endif
869 878
870/*! 879/*!
871 Destroys the QPEApplication. 880 Destroys the QPEApplication.
872*/ 881*/
873QPEApplication::~QPEApplication() 882QPEApplication::~QPEApplication()
874{ 883{
875 ungrabKeyboard(); 884 ungrabKeyboard();
876#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 885#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
877 // Need to delete QCopChannels early, since the display will 886 // Need to delete QCopChannels early, since the display will
@@ -1327,24 +1336,25 @@ void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize )
1327 This calls designates the application as 1336 This calls designates the application as
1328 a \link docwidget.html document-oriented\endlink application. 1337 a \link docwidget.html document-oriented\endlink application.
1329 1338
1330 The \a mw widget \e must have this slot: setDocument(const QString&). 1339 The \a mw widget \e must have this slot: setDocument(const QString&).
1331 1340
1332 \sa showMainWidget() 1341 \sa showMainWidget()
1333*/ 1342*/
1334void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) 1343void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize )
1335{ 1344{
1336 if ( mw && argc() == 2 ) 1345 if ( mw && argc() == 2 )
1337 Global::setDocument( mw, QString::fromUtf8(argv()[1]) ); 1346 Global::setDocument( mw, QString::fromUtf8(argv()[1]) );
1338 1347
1348
1339 d->show(mw, nomaximize ); 1349 d->show(mw, nomaximize );
1340} 1350}
1341 1351
1342 1352
1343/*! 1353/*!
1344 If an application is started via a \link qcop.html QCop\endlink 1354 If an application is started via a \link qcop.html QCop\endlink
1345 message, the application will process the \link qcop.html 1355 message, the application will process the \link qcop.html
1346 QCop\endlink message and then quit. If the application calls this 1356 QCop\endlink message and then quit. If the application calls this
1347 function while processing a \link qcop.html QCop\endlink message, 1357 function while processing a \link qcop.html QCop\endlink message,
1348 after processing its outstanding \link qcop.html QCop\endlink 1358 after processing its outstanding \link qcop.html QCop\endlink
1349 messages the application will start 'properly' and show itself. 1359 messages the application will start 'properly' and show itself.
1350 1360