summaryrefslogtreecommitdiff
path: root/noncore/tools/opie-sh/opie-sh.cpp
authorar <ar>2004-02-21 19:09:12 (UTC)
committer ar <ar>2004-02-21 19:09:12 (UTC)
commitc7e563cbb26c20807e66dd4284d1ce9cbf8e1419 (patch) (unidiff)
treee55119af88abe930c1ce492f30efb72c929a730c /noncore/tools/opie-sh/opie-sh.cpp
parent536f271b1e6a1d1886e96a28524a3503c4c38c4e (diff)
downloadopie-c7e563cbb26c20807e66dd4284d1ce9cbf8e1419.zip
opie-c7e563cbb26c20807e66dd4284d1ce9cbf8e1419.tar.gz
opie-c7e563cbb26c20807e66dd4284d1ce9cbf8e1419.tar.bz2
improve support for BigScreen
Diffstat (limited to 'noncore/tools/opie-sh/opie-sh.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/tools/opie-sh/opie-sh.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/noncore/tools/opie-sh/opie-sh.cpp b/noncore/tools/opie-sh/opie-sh.cpp
index a353d3f..7d54a03 100644
--- a/noncore/tools/opie-sh/opie-sh.cpp
+++ b/noncore/tools/opie-sh/opie-sh.cpp
@@ -11,23 +11,29 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11Public License for more details. 11Public License for more details.
12 12
13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free 13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15*/ 15*/
16 16
17
18#include "mbox.h"
19#include "fviewer.h"
20#include "inputdialog.h"
21
22/* OPIE */
23#include <qpe/qpeapplication.h>
24
25/* QT */
17#include <qstring.h> 26#include <qstring.h>
18#include <qstringlist.h> 27#include <qstringlist.h>
19#include <qpe/qpeapplication.h>
20#include <qmessagebox.h> 28#include <qmessagebox.h>
21#include <qwidget.h> 29#include <qwidget.h>
22 30
31/* STD */
23#include <stdio.h> 32#include <stdio.h>
24 33
25#include "mbox.h"
26#include "fviewer.h"
27#include "inputdialog.h"
28 34
29int myMessageBox(int wi, int h, QWidget *w, int argc, QStringList args) 35int myMessageBox(int wi, int h, QWidget *w, int argc, QStringList args)
30{ 36{
31 int i, type=0; 37 int i, type=0;
32 QString button0Text, button1Text, button2Text, string, title; 38 QString button0Text, button1Text, button2Text, string, title;
33 bool full=true; 39 bool full=true;
@@ -81,13 +87,13 @@ int myMessageBox(int wi, int h, QWidget *w, int argc, QStringList args)
81 } 87 }
82 88
83 MBox *mbox = new MBox(wi, h, (int)type, title, string, &button0Text, &button1Text, &button2Text, w, (QString)"messagebox"); 89 MBox *mbox = new MBox(wi, h, (int)type, title, string, &button0Text, &button1Text, &button2Text, w, (QString)"messagebox");
84 if(full) 90 if(full)
85 { 91 {
86 w->setCaption(title); 92 w->setCaption(title);
87 w->showMaximized(); 93 QPEApplication::showWidget( w );
88 } 94 }
89 //mbox->show(); 95 //mbox->show();
90 switch(mbox->exec() ) 96 switch(mbox->exec() )
91 { 97 {
92 case 0: 98 case 0:
93 return -1; 99 return -1;
@@ -158,13 +164,13 @@ int fileviewer(QPEApplication *a, int argc, QStringList args)
158 { 164 {
159 title = args[i+1]; 165 title = args[i+1];
160 } 166 }
161 } 167 }
162 FViewer *fview = new FViewer(icon, filename, title, 0, (QString) "fileviewer"); 168 FViewer *fview = new FViewer(icon, filename, title, 0, (QString) "fileviewer");
163 a->setMainWidget(fview); 169 a->setMainWidget(fview);
164 fview->showMaximized(); 170 QPEApplication::showWidget( fview );
165 return a->exec(); 171 return a->exec();
166} 172}
167 173
168int input(int wi, int h, QWidget *w, int argc, QStringList args) 174int input(int wi, int h, QWidget *w, int argc, QStringList args)
169{ 175{
170 int i, type = 0; 176 int i, type = 0;
@@ -222,13 +228,13 @@ int input(int wi, int h, QWidget *w, int argc, QStringList args)
222 } 228 }
223 } 229 }
224 InputDialog *id = new InputDialog(wi, h, type, label, title, filename, edit, w); 230 InputDialog *id = new InputDialog(wi, h, type, label, title, filename, edit, w);
225 if(full) 231 if(full)
226 { 232 {
227 w->setCaption(title); 233 w->setCaption(title);
228 w->showMaximized(); 234 QPEApplication::showWidget( w );
229 } 235 }
230 if( id->exec() == 1) 236 if( id->exec() == 1)
231 { 237 {
232 printf("%s\n", id->getString().latin1()); 238 printf("%s\n", id->getString().latin1());
233 return 0; 239 return 0;
234 } 240 }