kitchensync

groupconfigdialog.cpp

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2005 Cornelius Schumacher <schumacher@kde.org>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #include "groupconfigdialog.h"
00022 
00023 #include "groupconfig.h"
00024 
00025 #include <klocale.h>
00026 
00027 #include <qlayout.h>
00028 
00029 GroupConfigDialog::GroupConfigDialog( QWidget *parent, SyncProcess *process )
00030   : KDialogBase( parent, 0, true, i18n("Configure Synchronization Group"),
00031      Ok )
00032 {
00033   QFrame *topFrame = makeMainWidget();
00034 
00035   QBoxLayout *topLayout = new QVBoxLayout( topFrame );
00036 
00037   mConfigWidget = new GroupConfig( topFrame );
00038   topLayout->addWidget( mConfigWidget );
00039 
00040   mConfigWidget->setSyncProcess( process );
00041 
00042   setInitialSize( configDialogSize( "size_groupconfigdialog" ) );
00043 }
00044 
00045 GroupConfigDialog::~GroupConfigDialog()
00046 {
00047   saveDialogSize( "size_groupconfigdialog" );
00048 }
00049 
00050 void GroupConfigDialog::slotOk()
00051 {
00052   mConfigWidget->saveConfig();
00053 
00054   accept();
00055 }
00056 
00057 #include "groupconfigdialog.moc"