• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

kdf

optiondialog.cpp

Go to the documentation of this file.
00001 /*
00002  *   Copyright (C) 1999  Espen Sand, espen@kde.org
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU General Public License as published by
00006  *   the Free Software Foundation; either version 2 of the License, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU General Public License
00015  *   along with this program; if not, write to the Free Software
00016  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00017  *
00018  */
00019 
00020 #include "optiondialog.h"
00021 
00022 #include "kdfconfig.h"
00023 #include "mntconfig.h"
00024 
00025 COptionDialog::COptionDialog( QWidget *parent )
00026   :KPageDialog( parent )
00027 {
00028   setCaption( i18n("Configure") );
00029   setButtons( Help|Apply|Ok|Cancel );
00030   setDefaultButton( Ok );
00031   setFaceType( KPageDialog::Tabbed );
00032   setHelp( "kcontrol/kdf/index.html", QString() );
00033 
00034   mConf = new KDFConfigWidget( this );
00035   connect( mConf, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
00036   addPage( mConf, i18n("General Settings") );
00037 
00038   mMnt = new MntConfigWidget( this );
00039   connect( mMnt, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
00040   addPage( mMnt, i18n("Mount Commands") );
00041 
00042   enableButton( Apply, false );
00043   dataChanged = false;
00044   connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
00045   connect(this,SIGNAL(applyClicked()),this,SLOT(slotApply()));
00046 }
00047 
00048 
00049 COptionDialog::~COptionDialog( void )
00050 {
00051 }
00052 
00053 
00054 void COptionDialog::slotOk( void )
00055 {
00056   if( dataChanged )
00057     slotApply();
00058   accept();
00059 }
00060 
00061 
00062 void COptionDialog::slotApply( void )
00063 {
00064   mConf->applySettings();
00065   mMnt->applySettings();
00066   emit valueChanged();
00067   enableButton( Apply, false );
00068   dataChanged = false;
00069 }
00070 
00071 void COptionDialog::slotChanged()
00072 {
00073   enableButton( Apply, true );
00074   dataChanged = true;
00075 }
00076 
00077 #include "optiondialog.moc"
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 

kdf

Skip menu "kdf"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • okteta
  • printer-applet
  • superkaramba
  • sweeper
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal