kitchensync

configuredialog.cpp

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
00005     Copyright (c) 2002 Maximilian Reiß <harlekin@handhelds.org>
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Library General Public
00009     License as published by the Free Software Foundation; either
00010     version 2 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Library General Public License for more details.
00016 
00017     You should have received a copy of the GNU Library General Public License
00018     along with this library; see the file COPYING.LIB.  If not, write to
00019     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020     Boston, MA 02110-1301, USA.
00021 */
00022 
00023 #include <qlayout.h>
00024 #include <config.h>
00025 #include <klocale.h>
00026 
00027 #include "configuredialog.h"
00028 
00029 using namespace KSync;
00030 
00031 
00032 ConfigureDialog::ConfigureDialog( QWidget *parent, const char *name, bool modal )
00033  : KDialogBase( IconList, i18n( "Configure KitchenSync" ), Ok | Cancel, Ok,
00034                 parent, name, modal, true )
00035 {
00036   setIconListAllVisible( false );
00037   resize( 500, 300 );
00038 }
00039 
00040 ConfigureDialog::~ConfigureDialog()
00041 {
00042 }
00043 
00044 void ConfigureDialog::show()
00045 {
00046   if ( !isVisible() )
00047     setup();
00048 
00049   KDialogBase::show();
00050 }
00051 
00052 void ConfigureDialog::slotOk()
00053 {
00054   apply( true );
00055   accept();
00056   emit ok();
00057 }
00058 
00059 void ConfigureDialog::slotCancel()
00060 {
00061   apply( false );
00062   reject();
00063 }
00064 
00065 void ConfigureDialog::addWidget( QWidget* widget, const QString &name, QPixmap* pixmap )
00066 {
00067   QFrame *frame = addPage( name, name, *pixmap );
00068   QHBoxLayout *lay = new QHBoxLayout( frame );
00069   widget->reparent( frame, QPoint( 0, 0 ) );
00070   lay->addWidget( widget );
00071 }
00072 
00073 void ConfigureDialog::setup()
00074 {
00075 }
00076 
00077 void ConfigureDialog::unload()
00078 {
00079 }
00080 
00081 void ConfigureDialog::apply( bool )
00082 {
00083 }
00084 
00085 #include "configuredialog.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys