libtdepim

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 <tqmap.h>
00027 class TQGroupBox;
00028 class TQListViewItem;
00029 
00030 class TDEAboutData;
00031 class KComboBox;
00032 
00033 namespace Komposer {
00034 
00035   class PrefsModule : public KPrefsModule
00036   {
00037     Q_OBJECT
00038   
00039   public:
00040     PrefsModule( TQWidget *parent=0, const char *name=0 );
00041     virtual const TDEAboutData *aboutData() const;
00042   };
00043 
00044   class EditorSelection : public KPrefsWid
00045   {
00046     Q_OBJECT
00047   
00048 
00049   public:
00050     EditorSelection( const TQString &text, TQString &reference, TQWidget *parent );
00051     ~EditorSelection();
00052 
00053     void readConfig();
00054     void writeConfig();
00055 
00056     TQGroupBox *groupBox() const;
00057 
00058   private slots:
00059     void slotActivated( const TQString & );
00060 
00061   private:
00062     void setItem( const TQString & );
00063   private:
00064     TQString &m_reference;
00065 
00066     TQGroupBox *m_box;
00067     KComboBox *m_editorsCombo;
00068     TQMap<TQString, KService::Ptr> m_services;
00069   };
00070 }
00071 
00072 #endif