lib

KoDetailsPane.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2005 Peter Simonsson <psn@linux.se>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 #ifndef KODETAILSPANE_H
00020 #define KODETAILSPANE_H
00021 
00022 #include <klistview.h>
00023 
00024 #include "koDetailsPaneBase.h"
00025 
00026 class KoTemplateGroup;
00027 class KoTemplate;
00028 class KInstance;
00029 class QListViewItem;
00030 class KoRecentDocumentsPanePrivate;
00031 class KoRichTextListItemPrivate;
00032 class KFileItem;
00033 class QPixmap;
00034 
00035 namespace KIO {
00036   class Job;
00037 }
00038 
00039 class KoTemplatesPanePrivate;
00040 
00046 class KoTemplatesPane : public KoDetailsPaneBase
00047 {
00048   Q_OBJECT
00049   public:
00058     KoTemplatesPane(QWidget* parent, KInstance* instance,
00059                     KoTemplateGroup* group, KoTemplate* defaultTemplate);
00060     ~KoTemplatesPane();
00061 
00063     bool isSelected();
00064 
00065     virtual bool eventFilter(QObject* watched, QEvent* e);
00066 
00067   signals:
00068     void openTemplate(const QString&);
00070     void alwaysUseChanged(KoTemplatesPane* sender, const QString& alwaysUse);
00071 
00072     void splitterResized(KoDetailsPaneBase* sender, const QValueList<int>& sizes);
00073 
00074   public slots:
00075     void resizeSplitter(KoDetailsPaneBase* sender, const QValueList<int>& sizes);
00076 
00077   protected slots:
00078     void selectionChanged(QListViewItem* item);
00079     void openTemplate();
00080     void openTemplate(QListViewItem* item);
00081     void alwaysUseClicked();
00082     void changeAlwaysUseTemplate(KoTemplatesPane* sender, const QString& alwaysUse);
00083 
00084     void changePalette();
00085 
00086   private:
00087     KoTemplatesPanePrivate* d;
00088 };
00089 
00090 
00096 class KoRecentDocumentsPane : public KoDetailsPaneBase
00097 {
00098   Q_OBJECT
00099   public:
00105     KoRecentDocumentsPane(QWidget* parent, KInstance* instance);
00106     ~KoRecentDocumentsPane();
00107 
00108     virtual bool eventFilter(QObject* watched, QEvent* e);
00109 
00110   signals:
00111     void openFile(const QString&);
00112 
00113     void splitterResized(KoDetailsPaneBase* sender, const QValueList<int>& sizes);
00114 
00115   public slots:
00116     void resizeSplitter(KoDetailsPaneBase* sender, const QValueList<int>& sizes);
00117 
00118   protected slots:
00119     void selectionChanged(QListViewItem* item);
00120     void openFile();
00121     void openFile(QListViewItem* item);
00122 
00123     void previewResult(KIO::Job* job);
00124     void updatePreview(const KFileItem* fileItem, const QPixmap& preview);
00125 
00126     void changePalette();
00127 
00128   private:
00129     KoRecentDocumentsPanePrivate* d;
00130 };
00131 
00132 #endif //KODETAILSPANE_H
KDE Home | KDE Accessibility Home | Description of Access Keys