KoDetailsPane.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 Peter Simonsson <psn@linux.se>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19#ifndef KODETAILSPANE_H
20#define KODETAILSPANE_H
21
22#include <tdelistview.h>
23
24#include "koDetailsPaneBase.h"
25
26class KoTemplateGroup;
27class KoTemplate;
28class TDEInstance;
29class TQListViewItem;
30class KoRecentDocumentsPanePrivate;
31class KoRichTextListItemPrivate;
32class KFileItem;
33class TQPixmap;
34
35namespace TDEIO {
36 class Job;
37}
38
39class KoTemplatesPanePrivate;
40
46class KoTemplatesPane : public KoDetailsPaneBase
47{
48 TQ_OBJECT
49
50 public:
59 KoTemplatesPane(TQWidget* parent, TDEInstance* instance,
60 KoTemplateGroup* group, KoTemplate* defaultTemplate);
62
64 bool isSelected();
65
66 virtual bool eventFilter(TQObject* watched, TQEvent* e);
67
68 signals:
69 void openTemplate(const TQString&);
71 void alwaysUseChanged(KoTemplatesPane* sender, const TQString& alwaysUse);
72
73 void splitterResized(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
74
75 public slots:
76 void resizeSplitter(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
77
78 protected slots:
79 void selectionChanged(TQListViewItem* item);
80 void openTemplate();
81 void openTemplate(TQListViewItem* item);
82 void alwaysUseClicked();
83 void changeAlwaysUseTemplate(KoTemplatesPane* sender, const TQString& alwaysUse);
84
85 void changePalette();
86
87 private:
88 KoTemplatesPanePrivate* d;
89};
90
91
97class KoRecentDocumentsPane : public KoDetailsPaneBase
98{
99 TQ_OBJECT
100
101 public:
107 KoRecentDocumentsPane(TQWidget* parent, TDEInstance* instance);
109
110 virtual bool eventFilter(TQObject* watched, TQEvent* e);
111
112 signals:
113 void openFile(const TQString&);
114
115 void splitterResized(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
116
117 public slots:
118 void resizeSplitter(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
119
120 protected slots:
121 void selectionChanged(TQListViewItem* item);
122 void openFile();
123 void openFile(TQListViewItem* item);
124
125 void previewResult(TDEIO::Job* job);
126 void updatePreview(const KFileItem* fileItem, const TQPixmap& preview);
127
128 void changePalette();
129
130 private:
131 KoRecentDocumentsPanePrivate* d;
132};
133
134#endif //KODETAILSPANE_H
This widget is the recent doc part of the template opening widget.
This widget is the right-side part of the template opening widget.
void alwaysUseChanged(KoTemplatesPane *sender, const TQString &alwaysUse)
Emited when the always use checkbox is selected.
bool isSelected()
Returns true if a template in this group was the last one selected.