libkdepim

prefsmodule.h

00001 /*
00002  * prefsmodule.h
00003  *
00004  * Copyright (C)  2003  Zack Rusin <zack@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 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  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301  USA
00020  */
00021 #ifndef KOMPOSER_PREFSMODULE_H
00022 #define KOMPOSER_PREFSMODULE_H
00023 
00024 #include <kprefsdialog.h>
00025 #include <kservice.h>
00026 #include <qmap.h>
00027 class QGroupBox;
00028 class QListViewItem;
00029 
00030 class KAboutData;
00031 class KComboBox;
00032 
00033 namespace Komposer {
00034 
00035   class PrefsModule : public KPrefsModule
00036   {
00037     Q_OBJECT
00038   public:
00039     PrefsModule( QWidget *parent=0, const char *name=0 );
00040     virtual const KAboutData *aboutData() const;
00041   };
00042 
00043   class EditorSelection : public KPrefsWid
00044   {
00045     Q_OBJECT
00046 
00047   public:
00048     EditorSelection( const QString &text, QString &reference, QWidget *parent );
00049     ~EditorSelection();
00050 
00051     void readConfig();
00052     void writeConfig();
00053 
00054     QGroupBox *groupBox() const;
00055 
00056   private slots:
00057     void slotActivated( const QString & );
00058 
00059   private:
00060     void setItem( const QString & );
00061   private:
00062     QString &m_reference;
00063 
00064     QGroupBox *m_box;
00065     KComboBox *m_editorsCombo;
00066     QMap<QString, KService::Ptr> m_services;
00067   };
00068 }
00069 
00070 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys