23 files changed, 82 insertions, 88 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 26bc36d..78f9da2 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -235,18 +235,17 @@ void AdvancedFm::filePerms() { QStringList curFileList = getPath(); QString filePath; filePath = CurrentDir()->canonicalPath()+"/"; for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { filePermissions *filePerm; filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it)); - filePerm->showMaximized(); - filePerm->exec(); + QPEApplication::execDialog( filePerm );
if( filePerm) delete filePerm; } populateView(); } void AdvancedFm::doProperties() { #if defined(QT_QWS_OPIE) @@ -257,18 +256,17 @@ void AdvancedFm::doProperties() { filePath = CurrentDir()->canonicalPath()+"/"; // qDebug("%d",curFileList.count()); for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { // qDebug((filePath+*it)); DocLnk lnk( (filePath+*it)); LnkProperties prop( &lnk ); - prop.showMaximized(); - prop.exec(); + QPEApplication::execDialog( &prop );
} #endif } void AdvancedFm::upDir() { QDir *thisDir = CurrentDir(); QString current = thisDir->canonicalPath(); @@ -596,18 +594,17 @@ void AdvancedFm::runCommand() { // qDebug(fileDlg->LineEdit1->text()); QStringList command; command << "/bin/sh"; command << "-c"; command << fileDlg->LineEdit1->text(); Output *outDlg; outDlg = new Output( command, this, tr("AdvancedFm Output"), true); - outDlg->showMaximized(); - outDlg->exec(); + QPEApplication::execDialog( outDlg );
qApp->processEvents(); } } void AdvancedFm::runCommandStd() { if( !CurrentView()->currentItem()) return; QString curFile; @@ -634,18 +631,17 @@ void AdvancedFm::fileStatus() { QStringList command; command << "/bin/sh"; command << "-c"; command << "stat -l "+ curFile; Output *outDlg; outDlg = new Output( command, this, tr("AdvancedFm Output"), true); - outDlg->showMaximized(); - outDlg->exec(); + QPEApplication::execDialog( outDlg );
qApp->processEvents(); } void AdvancedFm::mkDir() { makeDir(); } diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp index a42c824..a5492e4 100644 --- a/noncore/apps/checkbook/checkbook.cpp +++ b/noncore/apps/checkbook/checkbook.cpp @@ -478,18 +478,17 @@ void Checkbook::slotNewTran() { TranInfo *traninfo = new TranInfo( info->getNextNumber() ); if( !_dLastNew.isNull() ) traninfo->setDate(_dLastNew); Transaction *currtran = new Transaction( this, true, info->name(), traninfo, _pCfg ); - currtran->showMaximized(); - if ( currtran->exec() == QDialog::Accepted ) + if ( QPEApplication::execDialog( currtran ) == QDialog::Accepted ) { // Add to transaction list info->addTransaction( traninfo ); // Add to transaction table float amount; QString stramount; amount = (traninfo->withdrawal() ? -1 : 1)*traninfo->amount(); @@ -525,18 +524,17 @@ void Checkbook::slotEditTran() if ( !curritem ) return; TranInfo *traninfo=info->findTransaction( curritem->text(COL_ID) ); Transaction *currtran = new Transaction( this, false, info->name(), traninfo, _pCfg ); - currtran->showMaximized(); - if ( currtran->exec() == QDialog::Accepted ) + if ( QPEApplication::execDialog( currtran ) == QDialog::Accepted ) { curritem->setText( COL_NUM, traninfo->number() ); curritem->setText( COL_SORTDATE, traninfo->datestr(false) ); curritem->setText( COL_DATE, traninfo->datestr(true) ); curritem->setText( COL_DESC, traninfo->desc() ); float amount = traninfo->amount(); if ( traninfo->withdrawal() ) diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp index f29001a..60aea42 100644 --- a/noncore/apps/checkbook/mainwindow.cpp +++ b/noncore/apps/checkbook/mainwindow.cpp @@ -31,21 +31,21 @@ #include "configuration.h" #include "password.h" #include "checkbook.h" #include "listedit.h" #include <qpe/config.h> #include <qpe/global.h> #include <qpe/qpeapplication.h> -#include <qmenubar.h> #include <qpe/qpemessagebox.h> #include <qpe/qpetoolbar.h> #include <qpe/resource.h> +#include <qmenubar.h> #include <qaction.h> #include <qcheckbox.h> #include <qdir.h> #include <qlineedit.h> #include <qwhatsthis.h> MainWindow::MainWindow( QWidget* parent, const char* name, WFlags /*fl*/ ) @@ -209,18 +209,17 @@ void MainWindow::buildFilename( const QString &name ) tempFilename.append( ".qcb" ); } void MainWindow::slotNew() { CBInfo *cb = new CBInfo(); Checkbook *currcb = new Checkbook( this, cb, &_cfg ); - currcb->showMaximized(); - if ( currcb->exec() == QDialog::Accepted ) + if ( QPEApplication::execDialog( currcb ) == QDialog::Accepted ) { // Save new checkbook buildFilename( cb->name() ); _cfg.setLastBook( cb->name() ); cb->setFilename( tempFilename ); cb->write(); // Add to listbox @@ -267,18 +266,17 @@ void MainWindow::openBook(QListViewItem *curritem) delete pw; return; } delete pw; } _cfg.setLastBook( currname ); Checkbook *currcb = new Checkbook( this, cb, &_cfg ); - currcb->showMaximized(); - if ( currcb->exec() == QDialog::Accepted ) + if ( QPEApplication::execDialog( currcb ) == QDialog::Accepted ) { QString newname = cb->name(); if ( currname != newname ) { // Update name if changed if( curritem ) { curritem->setText( posName, newname ); cbList->sort(); @@ -340,18 +338,17 @@ void MainWindow::slotDelete() delete cbList->currentItem(); } } // --- slotConfigure ---------------------------------------------------------- void MainWindow::slotConfigure() { Configuration *cfgdlg = new Configuration( this, _cfg ); - cfgdlg->showMaximized(); - if ( cfgdlg->exec() == QDialog::Accepted ) + if ( QPEApplication::execDialog( cfgdlg ) == QDialog::Accepted ) { // read data from config dialog & save it cfgdlg->saveConfig( _cfg ); writeConfig(); buildList(); } delete cfgdlg; } diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp index 2103df9..b12a395 100644 --- a/noncore/apps/odict/configdlg.cpp +++ b/noncore/apps/odict/configdlg.cpp @@ -12,20 +12,21 @@ * 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. * * * **************************************************************************/ #include "configdlg.h" #include "searchmethoddlg.h" -#include <qdialog.h> +#include <qpe/qpeapplication.h> #include <qpe/config.h> -#include <qlayout.h> +#include <qdialog.h> +#include <qlayout.h> #include <qhbox.h> #include <qvbox.h> #include <qlabel.h> #include <qlistview.h> #include <qpushbutton.h> #include <qlineedit.h> #include <qstringlist.h> @@ -48,17 +49,17 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(pa connect( new_button, SIGNAL( clicked() ), this, SLOT( slotNewMethod() ) ); connect( change_button, SIGNAL( clicked() ), this, SLOT( slotChangeMethod() )); connect( delete_button, SIGNAL( clicked() ), this, SLOT( slotDeleteMethod() )); vbox_layout_searchtab->addWidget( hbox ); vbox_layout->addWidget( search_tab ); - showMaximized(); + QPEApplication::execDialog( this ); } void ConfigDlg::slotNewMethod() { SearchMethodDlg dlg( this, "SearchMethodDlg", true ); if ( dlg.exec() == QDialog::Accepted ) { dlg.saveItem(); diff --git a/noncore/apps/odict/searchmethoddlg.cpp b/noncore/apps/odict/searchmethoddlg.cpp index 99cd8db..8ed7152 100644 --- a/noncore/apps/odict/searchmethoddlg.cpp +++ b/noncore/apps/odict/searchmethoddlg.cpp @@ -11,20 +11,21 @@ * 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. * * * **************************************************************************/ #include "searchmethoddlg.h" -#include <qdialog.h> #include <qpe/config.h> -#include <qlayout.h> +#include <qpe/qpeapplication.h> +#include <qdialog.h> +#include <qlayout.h> #include <qhbox.h> #include <qvbox.h> #include <qlabel.h> #include <qpushbutton.h> #include <qstring.h> #include <qlineedit.h> #include <qdir.h> @@ -61,17 +62,17 @@ SearchMethodDlg::SearchMethodDlg(QWidget *parent, const char *name, bool modal, grid->addWidget( devider, 0,1 ); grid->addWidget( lag2, 0,2 ); grid->addWidget( lang1, 1,0 ); grid->addWidget( trenner, 1,1 ); grid->addWidget( lang2, 1,2 ); vbox_layout->addWidget( vbox ); - showMaximized(); + QPEApplication::execDialog ( this ); if( !itemname ) setCaption( tr( "New Searchmethod" ) ); else { setCaption( tr( "Change Searchmethod" ) ); itemName = itemname; setupEntries(itemname); diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp index 8c4ee93..cd0a364 100644 --- a/noncore/apps/opie-bartender/bartender.cpp +++ b/noncore/apps/opie-bartender/bartender.cpp @@ -164,18 +164,17 @@ void Bartender::fillList() { qDebug("there are currently %d of drinks", i); } void Bartender::fileNew() { New_Drink *newDrinks; newDrinks = new New_Drink(this,"New Drink....", TRUE); QString newName, newIng; - newDrinks->showMaximized(); - newDrinks->exec(); + QPEApplication::execDialog( newDrinks ); newName = newDrinks->LineEdit1->text(); newIng= newDrinks->MultiLineEdit1->text(); if(dbFile.isOpen()) dbFile.close(); if ( !dbFile.open( IO_WriteOnly| IO_Append)) { QMessageBox::message( (tr("Note")), (tr("Drink database not opened sucessfully.\n")) ); return; @@ -221,18 +220,17 @@ void Bartender::showDrink( QListViewItem *item) { if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) { // qDebug(s2); showDrinks->MultiLineEdit1->append(s2); } if( dbFile.atEnd() ) break; } } } - showDrinks->showMaximized(); - showDrinks->exec(); + QPEApplication::execDialog( showDrinks ); if(showDrinks ->result() ==0) { doEdit(); } delete showDrinks; } void Bartender::askSearch() { @@ -312,19 +310,18 @@ void Bartender::doSearchByDrink() { void Bartender::showSearchResult(QStringList &searchList) { QString result; Search_Results *searchDlg; searchList.sort(); searchDlg = new Search_Results(this, "Search Results", TRUE); - searchDlg->showMaximized(); searchDlg->ListBox1->insertStringList( searchList,-1); - searchDlg->exec(); + QPEApplication::execDialog( searchDlg ); if( searchDlg->result() == 1 ) { result= searchDlg->ListBox1->currentText(); } QListViewItemIterator it2( DrinkView ); for ( ; it2.current(); ++it2 ) { if ( it2.current()->text(0)== result ) { // qDebug( it2.current()->text(0)); @@ -341,17 +338,17 @@ void Bartender::doEdit() { QString myDrink; myDrink= DrinkView->currentItem()->text(0); dbFile.at(0); int foundAt=0; New_Drink *newDrinks; newDrinks = new New_Drink(this,"Edit Drink....", TRUE); QString newName, newIng; - newDrinks->showMaximized(); + QPEApplication::showDialog( newDrinks ); QTextStream t( &dbFile); QString s, s2; while ( !t.eof()) { s = t.readLine(); if(s.find( myDrink, 0, TRUE) != -1) { foundAt = dbFile.at() - (s.length()+1); for(int i=0;s2.find( "#", 0, TRUE) == -1;i++) { @@ -396,18 +393,17 @@ void Bartender::doEdit() { void Bartender::clearList() { DrinkView->clear(); } void Bartender::doBac() { BacDialog *bacDlg; bacDlg = new BacDialog(this,"BAC",TRUE); - bacDlg->showMaximized(); - bacDlg->exec(); + QPEApplication::execDialog( bacDlg ); delete bacDlg; } void Bartender::openCurrentDrink() { if(DrinkView->currentItem() == NULL) return; showDrink(DrinkView->currentItem()); } diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp index b23f4d0..882cd3d 100644 --- a/noncore/apps/opie-console/configdialog.cpp +++ b/noncore/apps/opie-console/configdialog.cpp @@ -1,10 +1,12 @@ -#include <qlistview.h> +#include <qpe/qpeapplication.h> + +#include <qlistview.h> #include "configdialog.h" #include "profileeditordialog.h" class ConfigListItem : public QListViewItem { public: ConfigListItem( QListView* item, const Profile& ); ~ConfigListItem(); @@ -68,18 +70,17 @@ void ConfigDialog::slotEdit() { if(!lstView->currentItem()) return; // Load profile p = ((ConfigListItem*)lstView->currentItem())->profile(); ProfileEditorDialog dlg(m_fact, p); dlg.setCaption(tr("Edit Connection Profile")); - dlg.showMaximized(); - int ret = dlg.exec(); + int ret = QPEApplication::execDialog( &dlg ); if(ret == QDialog::Accepted) { if(lstView->currentItem()) delete lstView->currentItem(); // use dlg.terminal()! Profile p = dlg.profile(); @@ -87,18 +88,17 @@ void ConfigDialog::slotEdit() { } } void ConfigDialog::slotAdd() { ProfileEditorDialog dlg(m_fact); dlg.setCaption(tr("New Connection")); - dlg.showMaximized(); - int ret = dlg.exec(); + int ret = QPEApplication::execDialog( &dlg ); if(ret == QDialog::Accepted) { // TODO: Move into general profile save part // assignments //QString type = dlg.term_type(); //if(type == "VT102") profile = Profile::VT102; diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 2673335..3fe9040 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -3,16 +3,17 @@ #include <qaction.h> #include <qmenubar.h> #include <qtoolbar.h> #include <qmessagebox.h> #include <qwhatsthis.h> #include <qfileinfo.h> #include <qpe/filemanager.h> +#include <qpe/qpeapplication.h> #include <opie/ofiledialog.h> #include "TEmulation.h" #include "profileeditordialog.h" #include "configdialog.h" #include "default.h" #include "profilemanager.h" @@ -305,19 +306,18 @@ Session* MainWindow::currentSession() { } QList<Session> MainWindow::sessions() { return m_sessions; } void MainWindow::slotNew() { ProfileEditorDialog dlg(factory() ); - dlg.showMaximized(); dlg.setCaption( tr("New Connection") ); - int ret = dlg.exec(); + int ret = QPEApplication::execDialog( &dlg ); if ( ret == QDialog::Accepted ) { create( dlg.profile() ); } } void MainWindow::slotRecordScript() { if (currentSession()) { @@ -420,19 +420,18 @@ void MainWindow::slotQuickLaunch() { create( newProf ); slotSaveSession(); } } void MainWindow::slotConfigure() { ConfigDialog conf( manager()->all(), factory() ); - conf.showMaximized(); - int ret = conf.exec(); + int ret = QPEApplication::execDialog( &conf ); if ( QDialog::Accepted == ret ) { manager()->setProfiles( conf.list() ); manager()->save(); populateProfiles(); } } /* diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp index e552990..3466e3a 100644 --- a/noncore/apps/opie-console/modemconfigwidget.cpp +++ b/noncore/apps/opie-console/modemconfigwidget.cpp @@ -1,8 +1,11 @@ + +#include <qpe/qpeapplication.h> + #include <qlabel.h> #include <qlayout.h> #include <qcombobox.h> #include <qpushbutton.h> #include <qhbox.h> #include "modemconfigwidget.h" #include "dialdialog.h" @@ -232,24 +235,22 @@ void ModemConfigWidget::save( Profile& prof ) { } void ModemConfigWidget::slotAT() { // ATConfigDialog conf( this, "ATConfig", true ); // josef/Max I know why don't you create the stuff on the stack // but making it a TopLevel Dialog and ignoring // cancel is not fun either... // what to do? FIXME!!! -zecke - atConf->showMaximized(); - if ( atConf->exec() != QDialog::Accepted ) { + if ( QPEApplication::execDialog( atConf ) != QDialog::Accepted ) { // reload old settings } } void ModemConfigWidget::slotDial() { DialDialog dial( this, "DialConfig", true ); if(!m_telNumber->text().isEmpty()) { dial.setNumber(m_telNumber->text().replace(QRegExp("[\\-\\/\\ \\.\\,]"), "")); } - dial.showMaximized(); - if ( dial.exec() == QDialog::Accepted ) { + if ( QPEApplication::execDialog( &dial ) == QDialog::Accepted ) { m_telNumber->setText( dial.number() ); } } diff --git a/noncore/apps/opie-reader/CloseDialog.cpp b/noncore/apps/opie-reader/CloseDialog.cpp index 741fa67..d7c2652 100644 --- a/noncore/apps/opie-reader/CloseDialog.cpp +++ b/noncore/apps/opie-reader/CloseDialog.cpp @@ -1,18 +1,21 @@ #include "CloseDialog.h" #include "qlayout.h" +#include <qpe/qpeapplication.h> + CCloseDialog::CCloseDialog(const QString& fname, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true) { setCaption(tr("Tidy-up")); QVBoxLayout *tmp = new QVBoxLayout(this); QVButtonGroup* vb = new QVButtonGroup(tr("Delete"), this); tmp->addWidget(vb); QString filestring = tr("Delete") + " " + fname; file = new QCheckBox(filestring, vb); marks = new QCheckBox(tr("Delete Bookmarks"), vb); config = new QCheckBox(tr("Delete Configuration"), vb); file->setChecked(false); marks->setChecked(true); config->setChecked(true); - if (fs) showMaximized(); + if (fs) + QPEApplication::showDialog( this ); } diff --git a/noncore/apps/opie-reader/Prefs.cpp b/noncore/apps/opie-reader/Prefs.cpp index e5320d9..5150ca5 100644 --- a/noncore/apps/opie-reader/Prefs.cpp +++ b/noncore/apps/opie-reader/Prefs.cpp @@ -22,16 +22,18 @@ #include <qlineedit.h> #ifdef USEQPE #include <qpe/menubutton.h> #include <qpe/fontdatabase.h> #else #include <qfontdatabase.h> #endif +#include <qpe/qpeapplication.h> + CLayoutPrefs::CLayoutPrefs( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { QHBoxLayout* hb = new QHBoxLayout(this); QButtonGroup* bg = new QButtonGroup(2, Qt::Horizontal, tr("Text"), this); hb->addWidget(bg); StripCR = new QCheckBox( bg ); @@ -422,17 +424,18 @@ CPrefs::CPrefs(bool fs, QWidget* parent, const char* name) : QDialog(parent, nam td->addTab(layout, tr("Layout")); td->addTab(layout2, tr("Layout(2)")); td->addTab(inter, tr("Locale")); td->addTab(misc, tr("Misc")); td->addTab(button, tr("Buttons")); QVBoxLayout* v = new QVBoxLayout(this); v->addWidget(td); - if (fs) showMaximized(); + if (fs) + QPEApplication::showDialog( this ); } /* Unicode Ideo/Word Width diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp index f10020a..07af597 100644 --- a/noncore/apps/opie-reader/QTReaderApp.cpp +++ b/noncore/apps/opie-reader/QTReaderApp.cpp diff --git a/noncore/apps/opie-reader/ToolbarPrefs.cpp b/noncore/apps/opie-reader/ToolbarPrefs.cpp index 361bf97..d878829 100644 --- a/noncore/apps/opie-reader/ToolbarPrefs.cpp +++ b/noncore/apps/opie-reader/ToolbarPrefs.cpp @@ -18,16 +18,17 @@ #include <qtooltip.h> #include <qwhatsthis.h> #include <qcombobox.h> #include <qbuttongroup.h> #include <qlineedit.h> #ifdef USEQPE
#include <qpe/menubutton.h> #endif
+#include <qpe/qpeapplication.h> CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir ) { setCaption(tr( "Toolbar Settings" ) ); QTabWidget* td = new QTabWidget(this); misc = new CMiscBarPrefs(this); filebar = new CFileBarPrefs(config, this); navbar = new CNavBarPrefs(config, this); @@ -38,17 +39,18 @@ CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char td->addTab(navbar, tr("Navigation")); td->addTab(viewbar, tr("View")); td->addTab(markbar, tr("Marks")); td->addTab(indbar, tr("Indicators")); td->addTab(misc, tr("Policy")); QVBoxLayout* v = new QVBoxLayout(this); v->addWidget(td); - if (fs) showMaximized(); + if (fs) + QPEApplication::showDialog( this ); } /* CBarPrefs1::CBarPrefs1( Config& _config, QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ), config(_config) { config.setGroup( "Toolbar" ); QVBoxLayout* vb = new QVBoxLayout(this); diff --git a/noncore/apps/opie-reader/URLDialog.cpp b/noncore/apps/opie-reader/URLDialog.cpp index dd4568b..e572c80 100644 --- a/noncore/apps/opie-reader/URLDialog.cpp +++ b/noncore/apps/opie-reader/URLDialog.cpp @@ -1,14 +1,17 @@ #include "URLDialog.h" #include "qlayout.h" +#include <qpe/qpeapplication.h>
+
CURLDialog::CURLDialog(const QString& fname, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true) { setCaption(tr("Save URL")); QVBoxLayout *tmp = new QVBoxLayout(this); QVButtonGroup* vb = new QVButtonGroup(fname, this); tmp->addWidget(vb); m_clipboard = new QCheckBox(tr("Clipboard"), vb); m_localfile = new QCheckBox(tr("Local file"), vb); m_globalfile = new QCheckBox(tr("Global file"), vb); - if (fs) showMaximized(); + if (fs)
+ QPEApplication::showDialog( this );
} diff --git a/noncore/apps/opie-reader/fileBrowser.cpp b/noncore/apps/opie-reader/fileBrowser.cpp index 9cd371d..05f2c31 100644 --- a/noncore/apps/opie-reader/fileBrowser.cpp +++ b/noncore/apps/opie-reader/fileBrowser.cpp @@ -17,16 +17,18 @@ Extensive modification by Tim Wentford to allow it to work in rotated mode #ifndef _WINDOWS #include <unistd.h> #endif #include <qlayout.h> #ifdef _WINDOWS #include <direct.h> #endif +#include <qpe/qpeapplication.h> + #include "opie.h" fileBrowser::fileBrowser( bool allownew, QWidget* parent, const char* name, bool modal, WFlags fl , const QString filter, const QString iPath ) : QDialog( parent, name, true, fl/* | WStyle_Customize | WStyle_Tool*/), filterspec(QDir::All) { // showMaximized(); @@ -110,17 +112,18 @@ fileBrowser::fileBrowser( bool allownew, QWidget* parent, const char* name, boo else { currentDir.setPath(QDir::currentDirPath()); chdir(QDir::currentDirPath().latin1()); } populateList(); - if (modal) showMaximized(); + if (modal) + QPEApplication::showDialog( this ); } void fileBrowser::resizeEvent(QResizeEvent* e) { ListView->setColumnWidth(1,(ListView->width())/4); ListView->setColumnWidth(0,ListView->width()-20-ListView->columnWidth(1)); } diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp index bd98aca..3d3c688 100644 --- a/noncore/apps/opie-sheet/mainwindow.cpp +++ b/noncore/apps/opie-sheet/mainwindow.cpp @@ -12,20 +12,23 @@ * by Serdar Ozler <sozler@sitebest.com> */ #include "mainwindow.h" #include <qpe/filemanager.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/resource.h> +#include <qpe/qpeapplication.h> + #include <qmessagebox.h> #include <qfile.h> #include <qtranslator.h> #include <qradiobutton.h> + #include "cellformat.h" #include "numberdlg.h" #include "textdlg.h" #include "sortdlg.h" #include "finddlg.h" #define DEFAULT_NUM_ROWS 300 #define DEFAULT_NUM_COLS (26*3) @@ -742,17 +745,17 @@ void MainWindow::addFlyAction(const QString &text, const QString &menuText, cons action->setToolTip(tip); connect(action, SIGNAL(activated()), this, SLOT(slotFuncOutput())); action->addTo(w); } void MainWindow::slotFormatCells() { CellFormat dialogCellFormat(this); - dialogCellFormat.showMaximized(); + QPEApplication::showDialog( &dialogCellFormat ); dialogCellFormat.exec(sheet); } void MainWindow::slotEditPaste() { sheet->editPaste(); } @@ -962,17 +965,17 @@ void MainWindow::slotSheetRemove() slotSheetChanged(comboSheets->currentText()); listSheets.remove(tempSheet); } } void MainWindow::slotDataSort() { SortDialog dialogSort(this); - dialogSort.showMaximized(); + QPEApplication::showDialog( &dialogSort ); dialogSort.exec(sheet); } void MainWindow::slotDocModified() { documentModified=TRUE; } @@ -998,11 +1001,11 @@ void MainWindow::slotInsertCells() case 2: sheet->insertRows(1, TRUE); break; case 3: sheet->insertColumns(1, TRUE); break; } } void MainWindow::slotDataFindReplace() { FindDialog dialogFind(this); - dialogFind.showMaximized(); + QPEApplication::showDialog( &dialogFind ); dialogFind.exec(sheet); } diff --git a/noncore/apps/tableviewer/ui/tveditview.cpp b/noncore/apps/tableviewer/ui/tveditview.cpp index 23e2b42..20a24c8 100644 --- a/noncore/apps/tableviewer/ui/tveditview.cpp +++ b/noncore/apps/tableviewer/ui/tveditview.cpp @@ -35,16 +35,18 @@ #include <qvbox.h> #include <qlineedit.h> #include <qcheckbox.h> #include <qlist.h> #include <qlabel.h> #include <qscrollview.h> #include <qsignalmapper.h> +#include <qpe/qpeapplication.h> + TVEditView::TVEditView(TableState *s, DataElem *d, QWidget* parent, const char *name, WFlags fl ) : QDialog(parent, name, true, fl) { if (!name) setName("TVEditView"); QVBoxLayout *layout = new QVBoxLayout(this, 0); /* only so that will resize correctly in other @@ -59,17 +61,17 @@ TVEditView::TVEditView(TableState *s, DataElem *d, QWidget* parent, editDisplay = new QGrid(3, sv, 0); editDisplay->setSpacing(3); sv->addChild(editDisplay); connect(toggles, SIGNAL(mapped(int)), this, SLOT(toggleEnabled(int))); setData(s, d); #ifdef Q_WS_QWS - showMaximized(); + QPEApplication::showDialog( this ); #endif } TVEditView::~TVEditView() { } /*! set up the widgets in the grid, Set up initial values */ diff --git a/noncore/apps/tableviewer/ui/tvfilterview.cpp b/noncore/apps/tableviewer/ui/tvfilterview.cpp index 0182127..b03e846 100644 --- a/noncore/apps/tableviewer/ui/tvfilterview.cpp +++ b/noncore/apps/tableviewer/ui/tvfilterview.cpp @@ -21,16 +21,18 @@ #include <qtoolbutton.h> #include <qcombobox.h> #include <qlistview.h> #include <qlayout.h> #include <qheader.h> #include <qpushbutton.h> #include <qlabel.h> +#include <qpe/qpeapplication.h> + TVFilterView::TVFilterView(TableState *t, QWidget* parent, const char *name, WFlags fl ) : QDialog(parent, name, TRUE, fl) { if ( !name ) setName( "Filter View" ); QVBoxLayout *vlayout = new QVBoxLayout(this); @@ -90,17 +92,17 @@ TVFilterView::TVFilterView(TableState *t, QWidget* parent, SLOT(setTerm(QListViewItem *))); ts = t; current = 0; terms.setAutoDelete(true); do_filter = false; #ifdef Q_WS_QWS - showMaximized(); + QPEApplication::showDialog( this ); #endif } /*! Destroys the TVFilterView widget */ TVFilterView::~TVFilterView() { diff --git a/noncore/apps/tableviewer/ui/tvkeyedit.cpp b/noncore/apps/tableviewer/ui/tvkeyedit.cpp index 4849e87..c22ecd3 100644 --- a/noncore/apps/tableviewer/ui/tvkeyedit.cpp +++ b/noncore/apps/tableviewer/ui/tvkeyedit.cpp @@ -21,16 +21,18 @@ #include <qtoolbutton.h> #include <qlineedit.h> #include <qcombobox.h> #include <qlistview.h> #include <qmessagebox.h> #include <stdlib.h> #include <qpushbutton.h> +#include <qpe/qpeapplication.h> + /* QList view item... ?? that can store and update the values that I will * be changing */ class TVKEListViewItem : public QListViewItem { public: TVKEListViewItem(QString n, TVVariant::KeyType kt, int p, QListView *parent) : QListViewItem(parent) @@ -130,17 +132,17 @@ TVKeyEdit::TVKeyEdit(TableState *t, QWidget* parent, const char *name, deleteKeyButton->setEnabled(FALSE); clearKeysButton->setEnabled(FALSE); keyNameEdit->setEnabled(FALSE); keyTypeEdit->setEnabled(FALSE); } display->setSorting(0); #ifdef Q_WS_QWS - showMaximized(); + QPEApplication::showDialog( this ); #endif } /*! Destroys the TVKeyEdit widget */ TVKeyEdit::~TVKeyEdit() { diff --git a/noncore/apps/tinykate/libkate/view/kateview.cpp b/noncore/apps/tinykate/libkate/view/kateview.cpp index af3b30d..794fbdb 100644 --- a/noncore/apps/tinykate/libkate/view/kateview.cpp +++ b/noncore/apps/tinykate/libkate/view/kateview.cpp @@ -79,16 +79,17 @@ #include <klineeditdlg.h> #include <qapplication.h> #include <kfiledialog.h> #include <kiconloader.h> #include "../document/katetextline.h" #include "kateviewdialog.h" #include "kateundohistory.h" #include <qlayout.h> +#include <qpe/qpeapplication.h> KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc) : QWidget(view) { waitForPreHighlight=-1; myView = view; myDoc = doc; iconBorderWidth = 16; @@ -2322,18 +2323,17 @@ void KateView::configDialog() hlDataList.setAutoDelete(true); //this gets the data from the KateConfig object hlManager->getHlDataList(hlDataList); page=kd->addPage(i18n("Highlighting")); (new QVBoxLayout(page))->setAutoAdd(true); hlPage = new HighlightDialogPage(hlManager, &defaultStyleList, &hlDataList, 0, page); - kd->showMaximized(); - if (kd->exec()) { + if ( QPEApplication::execDialog( kd )) { // color options colorConfig->getColors(colors); myDoc->setFont (fontConfig->getFont()); applyColors(); // indent options indentConfig->getData(this); // select options diff --git a/noncore/apps/zsafe/scqtfileedit.cpp b/noncore/apps/zsafe/scqtfileedit.cpp index effd86b..7a3d906 100644 --- a/noncore/apps/zsafe/scqtfileedit.cpp +++ b/noncore/apps/zsafe/scqtfileedit.cpp @@ -23,16 +23,18 @@ #include "qdialog.h" #include "qpixmap.h" #include "qlistview.h" #include "qlineedit.h" #include "qtoolbutton.h" #include "scqtfileedit.h" +#include <qpe/qpeapplication.h> + // #define DEBUGFILEEDIT /* XPM */ static const char* const file_xpm[]={ "16 16 5 1", ". c #7f7f7f", "# c None", "c c #000000", @@ -153,17 +155,17 @@ ScQtFileEditDlg::ScQtFileEditDlg( QWidget *parent, const char *name, ListView->setColumnAlignment( 1, Qt::AlignRight ); fileIcon = new QPixmap( (const char **)file_xpm); dirIcon = new QPixmap( (const char **)closed_xpm); linkIcon = new QPixmap( (const char **)link_file_xpm); cdToParentIcon = new QPixmap( (const char **)cdtoparent_xpm); #ifdef QWS - showMaximized(); + QPEApplication::execDialog( this ); #endif mkdirflag = false; MkDirButton->setEnabled( false ); initDirCombo( bpath ); initTypeCombo( bfilter ); diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index ee1da77..bdd2aed 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp @@ -770,24 +770,18 @@ void ZSafe::editPwd() dialog->UsernameField->setText(selectedItem->text (1)); dialog->PasswordField->setText(selectedItem->text (2)); QString comment = selectedItem->text (3); comment.replace (QRegExp("<br>"), "\n"); dialog->Field5->setText(selectedItem->text (4)); dialog->Field6->setText(selectedItem->text (5)); dialog->CommentField->insertLine(comment); dialog->CommentField->setCursorPosition(0,0); -#ifdef DESKTOP -#ifndef WIN32 - dialog->show(); -#endif -#else - dialog->showMaximized(); -#endif - DialogCode result = (DialogCode) dialog->exec(); + + DialogCode result = (DialogCode) QPEApplication::execDialog( dialog ); #ifdef DESKTOP result = Accepted; #endif if (result == Accepted) { modified = true; // edit the selected item @@ -835,24 +829,18 @@ void ZSafe::newPwd() // set the labels dialog->Name->setText(getFieldLabel (selectedItem, "1", tr("Name"))); dialog->Username->setText(getFieldLabel (selectedItem, "2", tr("Username"))); dialog->Password->setText(getFieldLabel (selectedItem, "3", tr("Password"))); dialog->Comment->setText(getFieldLabel (selectedItem, "4", tr("Comment"))); dialog->Field5Label->setText(getFieldLabel (selectedItem,"5", tr("Field 4"))); dialog->Field6Label->setText(getFieldLabel (selectedItem,"6", tr("Field 5"))); retype: -#ifdef DESKTOP -#ifndef WIN32 - dialog->show(); -#endif -#else - dialog->showMaximized(); -#endif - DialogCode result = (DialogCode) dialog->exec(); + + DialogCode result = (DialogCode) QPEApplication::execDialog( dialog ); #ifdef DESKTOP result = Accepted; #endif if (result == Accepted) { QString name = dialog->NameField->text(); @@ -1183,22 +1171,17 @@ void ZSafe::showInfo( QListViewItem *_item) text += comment; // text += "<br>"; } text += "</body></html>"; infoForm->InfoText->setText(text); infoForm->hide(); -#ifdef DESKTOP - infoForm->show(); -#else - infoForm->showMaximized(); -#endif - + QPEApplication::showDialog( infoForm ); } } void ZSafe::listViewSelected( QListViewItem *_item) { if (!_item) return; if (selectedItem != NULL) diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp index 25c8919..2fa8d1f 100644 --- a/noncore/comm/keypebble/kvnc.cpp +++ b/noncore/comm/keypebble/kvnc.cpp @@ -122,34 +122,31 @@ KVNC::~KVNC() } void KVNC::newConnection() { curServer=new KRFBServer; KVNCConnDlg dlg( curServer,this); - dlg.showMaximized(); - if ( dlg.exec()) { + if ( QPEApplication::execDialog( &dlg )) { if (!curServer->name.isEmpty()) bookmarkSelector->addBookmark(curServer); canvas->openConnection(*curServer); } else curServer=0; } void KVNC::openConnection( QString name) { curServer=bookmarkSelector->getServer(name); if (curServer) { KVNCConnDlg dlg( curServer,this); - dlg.showMaximized(); - - if ( dlg.exec() ) { + if ( QPEApplication::execDialog( &dlg ) ) { canvas->openConnection(*curServer); bookmarkSelector->writeBookmarks(); } else curServer=0; } } void KVNC::openConnection( void ) |