summaryrefslogtreecommitdiff
path: root/core/settings/launcher/tabssettings.cpp
authorar <ar>2004-02-08 16:09:19 (UTC)
committer ar <ar>2004-02-08 16:09:19 (UTC)
commit6506eeeeaa8d52ae0895630de00e38bc2b8ff10c (patch) (side-by-side diff)
treea306b368cc4192e6a8528c7d602e4726c73a247c /core/settings/launcher/tabssettings.cpp
parent811821ed75b87468f521bef2077cf5988aac9b47 (diff)
downloadopie-6506eeeeaa8d52ae0895630de00e38bc2b8ff10c.zip
opie-6506eeeeaa8d52ae0895630de00e38bc2b8ff10c.tar.gz
opie-6506eeeeaa8d52ae0895630de00e38bc2b8ff10c.tar.bz2
improve support for BigScreen
Diffstat (limited to 'core/settings/launcher/tabssettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/tabssettings.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index a3d31a5..17a1609 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -1,82 +1,83 @@
/*
               =. This file is part of the OPIE Project
             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
           .>+-=
 _;:,     .>    :=|. This file is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This file 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 file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "tabssettings.h"
#include <qpe/resource.h>
#include <qpe/applnk.h>
#include <qpe/mimetype.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qwhatsthis.h>
#include <qcheckbox.h>
#include "tabdialog.h"
#include <stdlib.h>
#include <qmessagebox.h>
#define GLOBALID ".global."
TabsSettings::TabsSettings ( QWidget *parent, const char *name )
: QWidget ( parent, name )
{
QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 );
QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this );
lay-> addMultiCellWidget ( l, 0, 0, 0, 1 );
m_list = new QListBox ( this );
lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 );
QWhatsThis::add ( m_list, tr( "foobar" ));
QPushButton *p1, *p2, *p3;
p1 = new QPushButton ( tr( "New" ), this );
lay-> addWidget ( p1, 1, 1 );
connect ( p1, SIGNAL( clicked ( )), this, SLOT( newClicked ( )));
p2 = new QPushButton ( tr( "Edit" ), this );
lay-> addWidget ( p2, 2, 1 );
connect ( p2, SIGNAL( clicked ( )), this, SLOT( editClicked ( )));
p3 = new QPushButton ( tr( "Delete" ), this );
lay-> addWidget ( p3, 3, 1 );
connect ( p3, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( )));
lay-> setRowStretch ( 4, 10 );
m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this );
lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 );
@@ -255,63 +256,62 @@ void TabsSettings::accept ( )
QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" );
fe << *it;
fe << ( tc. m_font_use ? tc. m_font_family : QString::null );
fe << tc. m_font_size;
fe << tc. m_font_weight;
fe << ( tc. m_font_italic ? 1 : 0 );
tc. m_changed = false;
}
cfg. setGroup ( "GUI" );
QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" );
cfg. writeEntry ( "BusyType", busytype );
cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) );
{
QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" );
e << busytype;
}
}
void TabsSettings::newClicked ( )
{
QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
}
void TabsSettings::deleteClicked ( )
{
int ind = m_list-> currentItem ( );
if ( ind < 0 )
return;
QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
}
void TabsSettings::editClicked ( )
{
int ind = m_list-> currentItem ( );
if ( ind < 0 )
return;
TabConfig tc = m_tabs [m_ids [ind]];
TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true );
- d-> showMaximized ( );
- if ( d-> exec ( ) == QDialog::Accepted ) {
+ if ( QPEApplication::execDialog( d ) == QDialog::Accepted ) {
tc. m_changed = true;
m_tabs [m_ids [ind]] = tc;
if ( m_ids [ind] == GLOBALID ) {
for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
if ( *it != GLOBALID )
m_tabs [*it] = tc;
}
}
}
delete d;
}