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.cpp | 20 |
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 @@ -5,35 +5,41 @@ Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include "mbox.h" +#include "fviewer.h" +#include "inputdialog.h" + +/* OPIE */ +#include <qpe/qpeapplication.h> + +/* QT */ #include <qstring.h> #include <qstringlist.h> -#include <qpe/qpeapplication.h> #include <qmessagebox.h> #include <qwidget.h> +/* STD */ #include <stdio.h> -#include "mbox.h" -#include "fviewer.h" -#include "inputdialog.h" int myMessageBox(int wi, int h, QWidget *w, int argc, QStringList args) { int i, type=0; QString button0Text, button1Text, button2Text, string, title; bool full=true; for(i=0; i<argc; i++) { if(args[i] == "-t") { title = args[i+1]; @@ -75,25 +81,25 @@ int myMessageBox(int wi, int h, QWidget *w, int argc, QStringList args) } if(args[i] == "-g") { full = false; } } MBox *mbox = new MBox(wi, h, (int)type, title, string, &button0Text, &button1Text, &button2Text, w, (QString)"messagebox"); if(full) { w->setCaption(title); - w->showMaximized(); + QPEApplication::showWidget( w ); } // mbox->show(); switch(mbox->exec() ) { case 0: return -1; case 1: return -1; case 2: return 0; case 3: return 1; @@ -152,25 +158,25 @@ int fileviewer(QPEApplication *a, int argc, QStringList args) if(args[i] == "-I") { icon=args[i+1]; } if(args[i] == "-t") { title = args[i+1]; } } FViewer *fview = new FViewer(icon, filename, title, 0, (QString) "fileviewer"); a->setMainWidget(fview); - fview->showMaximized(); + QPEApplication::showWidget( fview ); return a->exec(); } int input(int wi, int h, QWidget *w, int argc, QStringList args) { int i, type = 0; QString title, label, filename; bool edit=false, full=true; for(i=0; i < argc; i++) { if(args[i] == "-s") @@ -216,25 +222,25 @@ int input(int wi, int h, QWidget *w, int argc, QStringList args) edit = true; } if(args[i] == "-g") { full = false; } } InputDialog *id = new InputDialog(wi, h, type, label, title, filename, edit, w); if(full) { w->setCaption(title); - w->showMaximized(); + QPEApplication::showWidget( w ); } if( id->exec() == 1) { printf("%s\n", id->getString().latin1()); return 0; } else { return -1; } } |