libkdepim

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 QLabel;
00031 class QListViewItem;
00032 class QPushButton;
00033 
00034 namespace KPIM {
00035 
00036 class KDE_EXPORT KCMDesignerFields : public KCModule
00037 {
00038   Q_OBJECT
00039 
00040   public:
00041     KCMDesignerFields( QWidget *parent = 0, const char *name = 0 );
00042 
00043     virtual void load();
00044     virtual void save();
00045     virtual void defaults();
00046 
00047   protected:
00048     void        loadUiFiles();
00049     void        loadActivePages(const QStringList&);
00050     QStringList saveActivePages();
00051 
00052     virtual QString localUiDir() = 0;
00053     virtual QString uiPath() = 0;
00054     virtual void writeActivePages( const QStringList & ) = 0;
00055     virtual QStringList readActivePages() = 0;
00056     virtual QString applicationName() = 0;
00057 
00058   private slots:
00059     void updatePreview( QListViewItem* );
00060     void itemClicked( QListViewItem* );
00061     void startDesigner();
00062     void rebuildList();
00063     void deleteFile();
00064     void importFile();
00065     void delayedInit();
00066 
00067   private:
00068     void initGUI();
00069 
00070     KListView *mPageView;
00071     QLabel *mPagePreview;
00072     QLabel *mPageDetails;
00073     QPushButton *mDeleteButton;    
00074     QPushButton *mImportButton;
00075     QPushButton *mDesignerButton;
00076 };
00077 
00078 }
00079 
00080 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys