1
/***************************************************************************
2
* Copyright (C) 2009-2012 by Savoir-Faire Linux *
3
* Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> *
4
* Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>*
6
* This program is free software; you can redistribute it and/or modify *
7
* it under the terms of the GNU General Public License as published by *
8
* the Free Software Foundation; either version 3 of the License, or *
9
* (at your option) any later version. *
11
* This program is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
16
* You should have received a copy of the GNU General Public License *
17
* along with this program; if not, write to the *
18
* Free Software Foundation, Inc., *
19
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
20
***************************************************************************/
21
#ifndef CONFIGURATIONDIALOG_H
22
#define CONFIGURATIONDIALOG_H
24
#include <kconfigdialog.h>
27
#include "kcfg_settings.h"
28
#include "SFLPhoneView.h"
31
#define SETTINGS_NAME "settings"
44
@author Jérémy Quentin <jeremy.quentin@gmail.com>
45
This class represents the config dialog for sflphone.
46
It uses the ConfigurationSkeleton class to handle most of the settings.
47
It inherits KConfigDialog with the pages defined in dlg... files.
48
A few complicated settings are handled directly by its pages.
49
Some custom behaviors have been added to handle specific cases,
50
as this config dialog is not the usual kind.
51
A few things might be done a cleaner way by passing the handling
52
to the skeleton like it has been done with codecs.
54
class ConfigurationDialog : public KConfigDialog
60
DlgGeneral * dlgGeneral;
61
DlgDisplay * dlgDisplay;
62
DlgAccounts * dlgAccounts;
64
DlgAddressBook * dlgAddressBook;
68
ConfigurationDialog(SFLPhoneView *parent = 0);
70
~ConfigurationDialog();
75
* Reimplements KConfigDialog
79
* Reimplements KConfigDialog
81
void updateSettings();
83
* Is implemented in KConfigDialog only from KDE4.3
84
* It it implemented here for KDE4.2 users.
85
* I didn't test with KDE4.3 so I leave it even for 4.3 users.
86
* Causes problems for a few cases (item managed by kconfig switched, item not managed
87
* switched and then switched back, apply becomes disabled).
88
* Can't be resolved without a method to know if items managed by kconfig have changed.
89
* Disable/Enable Apply Button according to hasChanged() result
93
* @return whether any custom widget has changed in the dialog.
98
* reloads the informations before showing it.
104
* Apply settings not managed by kconfig (accounts)
105
* Should be removed when accounts are managed by kconfig.
107
void applyCustomSettings();
111
void clearCallHistoryAsked();
112
void changesApplied();