lib

KoOpenPane.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 KOOPENPANE_H
20#define KOOPENPANE_H
21
22#include <tqlistview.h>
23
24#include <koOpenPaneBase.h>
25
26class KoCustomDocumentCreator;
27class TDEConfig;
28class KoTemplateGroup;
29class KoOpenPanePrivate;
30class TDEInstance;
31class TQPixmap;
32class TDEListViewItem;
33class KoTemplatesPane;
34class KoDetailsPaneBase;
35
36class KoOpenPane : public KoOpenPaneBase
37{
38 TQ_OBJECT
39
40
41 public:
48 KoOpenPane(TQWidget *parent, TDEInstance* instance, const TQString& templateType = TQString());
49 virtual ~KoOpenPane();
50
51 TQListViewItem* addPane(const TQString& title, const TQString& icon, TQWidget* widget, int sortWeight);
52 TQListViewItem* addPane(const TQString& title, const TQPixmap& icon, TQWidget* widget, int sortWeight);
53
60 void setCustomDocumentWidget(TQWidget *widget);
61
62 protected slots:
63 void showOpenFileDialog();
64
65 void selectionChanged(TQListViewItem* item);
66 void itemClicked(TQListViewItem* item);
67
69 void saveSplitterSizes(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
70
71 signals:
72 void openExistingFile(const TQString&);
73 void openTemplate(const TQString&);
74
76 void alwaysUseChanged(KoTemplatesPane* sender, const TQString& alwaysUse);
77
79 void splitterResized(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
80
81 protected:
82 void initRecentDocs();
87 void initTemplates(const TQString& templateType);
88
89 private:
90 KoOpenPanePrivate* d;
91};
92
93#endif //KOOPENPANE_H
This widget is the right-side part of the template opening widget.