configdialog.cpp
00001 /* 00002 * configdialog.cpp 00003 * 00004 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library 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 GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00019 * 02110-1301 USA 00020 */ 00021 #include "configdialog.h" 00022 #include "configwidget.h" 00023 00024 #include <klocale.h> 00025 00026 #include <tqvbox.h> 00027 00028 using namespace KSpell2; 00029 00030 class ConfigDialog::Private 00031 { 00032 public: 00033 ConfigWidget *ui; 00034 }; 00035 00036 ConfigDialog::ConfigDialog( Broker *broker, TQWidget *parent ) 00037 : KDialogBase( parent, "KSpell2ConfigDialog", true, 00038 i18n( "KSpell2 Configuration" ), 00039 KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, 00040 KDialogBase::Ok, true ) 00041 { 00042 init( broker ); 00043 } 00044 00045 ConfigDialog::~ConfigDialog() 00046 { 00047 delete d; d = 0; 00048 } 00049 00050 void ConfigDialog::init( Broker *broker ) 00051 { 00052 d = new Private; 00053 TQVBox *page = makeVBoxMainWidget(); 00054 d->ui = new ConfigWidget( broker, page ); 00055 } 00056 00057 void ConfigDialog::slotOk() 00058 { 00059 d->ui->save(); 00060 accept(); 00061 } 00062 00063 void ConfigDialog::slotApply() 00064 { 00065 d->ui->save(); 00066 } 00067 00068 00069 #include "configdialog.moc"