kconfigdialog.h
/*
* This file is part of the KDE libraries
* Copyright (C) 2003 Benjamin C Meyer (ben+kdelibs at meyerhome dot net)
* Copyright (C) 2003 Waldo Bastian <bastian@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KCONFIGDIALOG_H
#define KCONFIGDIALOG_H
class KConfig;
class KConfigSkeleton;
class KConfigDialogManager;
#include <kdialogbase.h>
#include <qasciidict.h>
class KDEUI_EXPORT KConfigDialog : public KDialogBase {
Q_OBJECT
signals:
void widgetModified();
void settingsChanged();
void settingsChanged(const char *dialogName);
public:
// KDE4: Add the "separator" parameter as in KDialogBase
// Make "dialogType" an int
KConfigDialog( QWidget *parent, const char *name,
KConfigSkeleton *config,
DialogType dialogType = IconList,
int dialogButtons = Default|Ok|Apply|Cancel|Help,
ButtonCode defaultButton = Ok,
bool modal=false );
~KConfigDialog();
// KDE4: Add a default value for itemName & pixmapName
void addPage( QWidget *page, const QString &itemName,
const QString &pixmapName,
const QString &header=QString::null,
bool manage=true );
// KDE4: Add a default value for itemName & pixmapName
void addPage( QWidget *page, KConfigSkeleton *config,
const QString &itemName,
const QString &pixmapName,
const QString &header=QString::null );
static KConfigDialog* exists( const char* name );
static bool showDialog( const char* name );
virtual void show();
protected slots:
virtual void updateSettings();
virtual void updateWidgets();
virtual void updateWidgetsDefault();
protected:
virtual bool hasChanged() { return false; }
virtual bool isDefault() { return true; }
protected slots:
void updateButtons();
void settingsChangedSlot();
private:
void addPageInternal(QWidget *page, const QString &itemName,
const QString &pixmapName, const QString &header);
void setupManagerConnections(KConfigDialogManager *manager);
private:
static QAsciiDict<KConfigDialog> openDialogs;
class KConfigDialogPrivate;
KConfigDialogPrivate *d;
};
#endif //KCONFIGDIALOG_H
KConfigDialogManager
KDialogBase::addPage
QFrame * addPage(const QString &itemName, const QString &header=QString::null, const QPixmap &pixmap=QPixmap())
Add a page to the dialog when the class is used in TreeList , IconList or Tabbed mode.
Definition: kdialogbase.cpp:1296
KConfigSkeleton
KDialogBase::ButtonCode
ButtonCode
Definition: kdialogbase.h:197
KDialogBase
A dialog base class with standard buttons and predefined layouts.
Definition: kdialogbase.h:191
KDialogBase::DialogType
DialogType
Definition: kdialogbase.h:237
KConfigDialog
Standard KDE configuration dialog class.
Definition: kconfigdialog.h:72
KConfigDialog::hasChanged
virtual bool hasChanged()
Returns whether the current state of the dialog is different from the current configutation.
Definition: kconfigdialog.h:233
KConfigDialog::isDefault
virtual bool isDefault()
Returns whether the current state of the dialog is the same as the default configuration.
Definition: kconfigdialog.h:239
KConfig

KDE Home | KDE Accessibility Home | Description of Access Keys