summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-04-25 12:15:06 (UTC)
committer llornkcor <llornkcor>2004-04-25 12:15:06 (UTC)
commit6182b509bdb16dd4d1e95b9a570219ef6c15ed21 (patch) (unidiff)
tree681bcfd272bd1d8d4873ee94acd56d42968997c3
parent84466242f91283378aec1b1ecda0bb27eb4f6097 (diff)
downloadopie-6182b509bdb16dd4d1e95b9a570219ef6c15ed21.zip
opie-6182b509bdb16dd4d1e95b9a570219ef6c15ed21.tar.gz
opie-6182b509bdb16dd4d1e95b9a570219ef6c15ed21.tar.bz2
fix bigfotos
Diffstat (more/less context) (ignore 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 86dbe85..d0e9613 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -146,64 +146,74 @@ public:
146 QWidget* qpe_main_widget; 146 QWidget* qpe_main_widget;
147 QGuardedPtr<QWidget> lastraised; 147 QGuardedPtr<QWidget> lastraised;
148 QQueue<QCopRec> qcopq; 148 QQueue<QCopRec> qcopq;
149 QString styleName; 149 QString styleName;
150 QString decorationName; 150 QString decorationName;
151 151
152 void enqueueQCop( const QCString &ch, const QCString &msg, 152 void enqueueQCop( const QCString &ch, const QCString &msg,
153 const QByteArray &data ) 153 const QByteArray &data )
154 { 154 {
155 qcopq.enqueue( new QCopRec( ch, msg, data ) ); 155 qcopq.enqueue( new QCopRec( ch, msg, data ) );
156 } 156 }
157 void sendQCopQ() 157 void sendQCopQ()
158 { 158 {
159 if (!qcopQok ) 159 if (!qcopQok )
160 return; 160 return;
161 161
162 QCopRec * r; 162 QCopRec * r;
163 163
164 while((r=qcopq.dequeue())) { 164 while((r=qcopq.dequeue())) {
165 // remove from queue before sending... 165 // remove from queue before sending...
166 // event loop can come around again before getting 166 // event loop can come around again before getting
167 // back from sendLocally 167 // back from sendLocally
168#ifndef QT_NO_COP 168#ifndef QT_NO_COP
169 QCopChannel::sendLocally( r->channel, r->message, r->data ); 169 QCopChannel::sendLocally( r->channel, r->message, r->data );
170#endif 170#endif
171 171
172 delete r; 172 delete r;
173 } 173 }
174 } 174 }
175 175
176 static void show_mx(QWidget* mw, bool nomaximize, QString &strName/* = QString::null */) 176 static void show_mx(QWidget* mw, bool nomaximize, QString &strName/* = QString::null */)
177 { 177 {
178 // ugly hack, remove that later after finding a sane solution
179 // Addendum: Only Sharp currently has models with high resolution but (physically) small displays,
180 // so this is only useful if QT_QWS_SIMPAD is NOT defined. E.g. SIMpad has 800x600 but has
181 // a (physically) large enough display to use the small icons
182#if defined(OPIE_HIGH_RES_SMALL_PHY)
183 if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) {
184 ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true );
185 }
186#endif
187
178 QPoint p; 188 QPoint p;
179 QSize s; 189 QSize s;
180 bool max; 190 bool max;
181 if ( mw->isVisible() ) { 191 if ( mw->isVisible() ) {
182 if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) { 192 if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) {
183 mw->resize(s); 193 mw->resize(s);
184 mw->move(p); 194 mw->move(p);
185 } 195 }
186 mw->raise(); 196 mw->raise();
187 } else { 197 } else {
188 198
189 if ( mw->layout() && mw->inherits("QDialog") ) { 199 if ( mw->layout() && mw->inherits("QDialog") ) {
190 if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) { 200 if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) {
191 mw->resize(s); 201 mw->resize(s);
192 mw->move(p); 202 mw->move(p);
193 203
194 if ( max && !nomaximize ) { 204 if ( max && !nomaximize ) {
195 mw->showMaximized(); 205 mw->showMaximized();
196 } else { 206 } else {
197 mw->show(); 207 mw->show();
198 } 208 }
199 } else { 209 } else {
200 qpe_show_dialog((QDialog*)mw,nomaximize); 210 qpe_show_dialog((QDialog*)mw,nomaximize);
201 } 211 }
202 } else { 212 } else {
203 if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) { 213 if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) {
204 mw->resize(s); 214 mw->resize(s);
205 mw->move(p); 215 mw->move(p);
206 } else { //no stored rectangle, make an estimation 216 } else { //no stored rectangle, make an estimation
207 int x = (qApp->desktop()->width()-mw->frameGeometry().width())/2; 217 int x = (qApp->desktop()->width()-mw->frameGeometry().width())/2;
208 int y = (qApp->desktop()->height()-mw->frameGeometry().height())/2; 218 int y = (qApp->desktop()->height()-mw->frameGeometry().height())/2;
209 mw->move( QMAX(x,0), QMAX(y,0) ); 219 mw->move( QMAX(x,0), QMAX(y,0) );