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

kdf

  • sources
  • kde-4.14
  • kdeutils
  • kdf
optiondialog.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999 Espen Sand, espen@kde.org
3  * 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  */
20 
21 #include "optiondialog.h"
22 
23 #include <klocale.h>
24 
25 #include "kdfconfig.h"
26 #include "mntconfig.h"
27 
28 COptionDialog::COptionDialog( QWidget *parent )
29  :KPageDialog( parent )
30 {
31  setCaption( i18n("Configure") );
32  setButtons( Help|Apply|Ok|Cancel );
33  setDefaultButton( Ok );
34  setFaceType( KPageDialog::Tabbed );
35  setHelp( QLatin1String( "kcontrol/kdf/index.html" ), QString() );
36 
37  mConf = new KDFConfigWidget( this );
38  connect( mConf, SIGNAL(configChanged()), this, SLOT(slotChanged()) );
39  addPage( mConf, i18n("General Settings") );
40 
41  mMnt = new MntConfigWidget( this );
42  connect( mMnt, SIGNAL(configChanged()), this, SLOT(slotChanged()) );
43  addPage( mMnt, i18n("Mount Commands") );
44 
45  enableButton( Apply, false );
46  dataChanged = false;
47  connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
48  connect(this,SIGNAL(applyClicked()),this,SLOT(slotApply()));
49 }
50 
51 
52 COptionDialog::~COptionDialog( void )
53 {
54 }
55 
56 
57 void COptionDialog::slotOk( void )
58 {
59  if( dataChanged )
60  slotApply();
61  accept();
62 }
63 
64 
65 void COptionDialog::slotApply( void )
66 {
67  mConf->applySettings();
68  mMnt->applySettings();
69  emit valueChanged();
70  enableButton( Apply, false );
71  dataChanged = false;
72 }
73 
74 void COptionDialog::slotChanged()
75 {
76  enableButton( Apply, true );
77  dataChanged = true;
78 }
79 
80 #include "optiondialog.moc"
81 
QWidget
KPageDialog
COptionDialog::slotOk
virtual void slotOk(void)
Definition: optiondialog.cpp:57
COptionDialog::slotChanged
void slotChanged()
Definition: optiondialog.cpp:74
optiondialog.h
COptionDialog::valueChanged
void valueChanged(void)
KDFConfigWidget::applySettings
void applySettings(void)
Definition: kdfconfig.cpp:123
MntConfigWidget
Definition: mntconfig.h:32
QString
COptionDialog::COptionDialog
COptionDialog(QWidget *parent=0)
Definition: optiondialog.cpp:28
COptionDialog::~COptionDialog
~COptionDialog(void)
Definition: optiondialog.cpp:52
KDFConfigWidget
Definition: kdfconfig.h:42
mntconfig.h
QLatin1String
COptionDialog::slotApply
virtual void slotApply(void)
Definition: optiondialog.cpp:65
MntConfigWidget::applySettings
void applySettings(void)
Definition: mntconfig.cpp:155
kdfconfig.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdf

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal