kabc Library API Documentation

kcmkabc.h

00001 /*
00002     This file is part of libkabc.
00003     Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018     Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #include <qcombobox.h>
00022 #include <qstringlist.h>
00023 #include <qwidget.h>
00024 
00025 #include <kcmodule.h>
00026 #include <klineedit.h>
00027 #include <klistview.h>
00028 #include <kpushbutton.h>
00029 
00030 class KAboutData;
00031 
00032 #ifndef KCMKABC_H
00033 #define KCMKABC_H
00034 
00035 class ConfigPage : public QWidget
00036 {
00037   Q_OBJECT
00038 
00039 public:
00040   ConfigPage( QWidget *parent = 0, const char *name = 0 );
00041 
00042   void load();
00043   void save();
00044   void defaults();
00045  
00046 
00047 public slots:
00048   void slotAdd();
00049   void slotRemove();
00050   void slotEdit();
00051   void slotConvert();
00052   void slotStandard();
00053   void slotSelectionChanged();
00054 
00055 signals:
00056   void changed(bool);
00057 
00058 private:
00059   KConfig *config;
00060 
00061   KListView* mListView;
00062   QPushButton* mAddButton;
00063   QPushButton* mRemoveButton;
00064   QPushButton* mEditButton;
00065   QPushButton* mConvertButton;
00066   QPushButton* mStandardButton;
00067 
00068   QListViewItem* mLastItem;
00069 };
00070 
00071 class KCMkabc : public KCModule
00072 {
00073   Q_OBJECT
00074 
00075 public:
00076   KCMkabc( QWidget *parent = 0, const char *name = 0 );
00077 
00078   void load();
00079   void save();
00080   void defaults();
00081   const KAboutData* aboutData() const;
00082 
00083 
00084 private:
00085   ConfigPage *mConfigPage;
00086 };
00087 
00088 class ConfigViewItem : public QObject, public QCheckListItem
00089 {
00090   Q_OBJECT
00091 
00092 public:
00093   ConfigViewItem( QListView *parent, QString name, QString type,
00094       QString identifier = QString::null );
00095 
00096   void setStandard( bool value );
00097   bool standard();
00098 
00099   QString key;
00100   QString type;
00101   bool readOnly;
00102 
00103 signals:
00104   void changed( bool );
00105 
00106 protected:
00107   void stateChange( bool value );
00108 
00109 private:
00110   bool isStandard;
00111 };
00112 
00113 
00114 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 27 22:16:07 2005 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001