kcmdesignerfields.h
00001 /* 00002 This file is part of libkdepim. 00003 00004 Copyright (c) 2004 Tobias Koenig <tokoe@kde.org> 00005 Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 00021 */ 00022 #ifndef KPIM_KCMDESIGNERFIELDS_H 00023 #define KPIM_KCMDESIGNERFIELDS_H 00024 00025 #include <kcmodule.h> 00026 #include <kdepimmacros.h> 00027 00028 class KListView; 00029 00030 class TQLabel; 00031 class TQListViewItem; 00032 class TQPushButton; 00033 00034 namespace KPIM { 00035 00036 class KDE_EXPORT KCMDesignerFields : public KCModule 00037 { 00038 Q_OBJECT 00039 TQ_OBJECT 00040 00041 public: 00042 KCMDesignerFields( TQWidget *parent = 0, const char *name = 0 ); 00043 00044 virtual void load(); 00045 virtual void save(); 00046 virtual void defaults(); 00047 00048 protected: 00049 void loadUiFiles(); 00050 void loadActivePages(const TQStringList&); 00051 TQStringList saveActivePages(); 00052 00053 virtual TQString localUiDir() = 0; 00054 virtual TQString uiPath() = 0; 00055 virtual void writeActivePages( const TQStringList & ) = 0; 00056 virtual TQStringList readActivePages() = 0; 00057 virtual TQString applicationName() = 0; 00058 00059 private slots: 00060 void updatePreview( TQListViewItem* ); 00061 void itemClicked( TQListViewItem* ); 00062 void startDesigner(); 00063 void rebuildList(); 00064 void deleteFile(); 00065 void importFile(); 00066 void delayedInit(); 00067 00068 private: 00069 void initGUI(); 00070 00071 KListView *mPageView; 00072 TQLabel *mPagePreview; 00073 TQLabel *mPageDetails; 00074 TQPushButton *mDeleteButton; 00075 TQPushButton *mImportButton; 00076 TQPushButton *mDesignerButton; 00077 }; 00078 00079 } 00080 00081 #endif