kdeui Library API Documentation

kconfigdialog.h

00001 /* 00002 * This file is part of the KDE libraries 00003 * Copyright (C) 2003 Benjamin C Meyer (ben+kdelibs at meyerhome dot net) 00004 * Copyright (C) 2003 Waldo Bastian <bastian@kde.org> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 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 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public License 00017 * along with this library; see the file COPYING.LIB. If not, write to 00018 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 * Boston, MA 02111-1307, USA. 00020 */ 00021 #ifndef KCONFIGDIALOG_H 00022 #define KCONFIGDIALOG_H 00023 00024 class KConfig; 00025 class KConfigSkeleton; 00026 class KConfigDialogManager; 00027 #include <kdialogbase.h> 00028 #include <qasciidict.h> 00029 00071 class KConfigDialog : public KDialogBase { 00072 Q_OBJECT 00073 00074 signals: 00078 void widgetModified(); 00079 00084 void settingsChanged(); 00085 00094 void settingsChanged(const char *dialogName); 00095 00096 public: 00120 // KDE4: Add the "separator" parameter as in KDialogBase 00121 // Make "dialogType" an int 00122 KConfigDialog( QWidget *parent, const char *name, 00123 KConfigSkeleton *config, 00124 DialogType dialogType = IconList, 00125 int dialogButtons = Default|Ok|Apply|Cancel|Help, 00126 ButtonCode defaultButton = Ok, 00127 bool modal=false ); 00128 00134 ~KConfigDialog(); 00135 00150 // KDE4: Add a default value for itemName & pixmapName 00151 void addPage( QWidget *page, const QString &itemName, 00152 const QString &pixmapName, 00153 const QString &header=QString::null, 00154 bool manage=true ); 00155 00172 // KDE4: Add a default value for itemName & pixmapName 00173 void addPage( QWidget *page, KConfigSkeleton *config, 00174 const QString &itemName, 00175 const QString &pixmapName, 00176 const QString &header=QString::null ); 00177 00184 static KConfigDialog* exists( const char* name ); 00185 00192 static bool showDialog( const char* name ); 00193 00197 virtual void show(); 00198 00199 protected slots: 00206 virtual void updateSettings(); 00207 00215 virtual void updateWidgets(); 00216 00223 virtual void updateWidgetsDefault(); 00224 00225 protected: 00226 00232 virtual bool hasChanged() { return false; } 00233 00238 virtual bool isDefault() { return true; } 00239 00240 protected slots: 00244 void updateButtons(); 00245 00249 void settingsChangedSlot(); 00250 00251 private: 00255 void addPageInternal(QWidget *page, const QString &itemName, 00256 const QString &pixmapName, const QString &header); 00257 00262 void setupManagerConnections(KConfigDialogManager *manager); 00263 00264 private: 00268 static QAsciiDict<KConfigDialog> openDialogs; 00269 00270 class KConfigDialogPrivate; 00274 KConfigDialogPrivate *d; 00275 }; 00276 00277 #endif //KCONFIGDIALOG_H 00278
KDE Logo
This file is part of the documentation for kdeui Library Version 3.3.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Oct 17 11:27:28 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003