Add (and install) svg for the new krunner interface.
[kdebase/uwolfer.git] / workspace / kcontrol / kfontinst / viewpart / FontViewPart.h
blobaa59bb10aa71245d23cce582dd2cf1a6edbfe9c4
1 #ifndef __FONT_VIEW_PART_H__
2 #define __FONT_VIEW_PART_H__
4 /*
5 * KFontInst - KDE Font Installer
7 * Copyright 2003-2007 Craig Drummond <craig@kde.org>
9 * ----
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; see the file COPYING. If not, write to
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
27 #include <KDE/KParts/ReadOnlyPart>
28 #include <KDE/KParts/BrowserExtension>
29 #include <KDE/KUrl>
30 #include <QtGui/QFrame>
31 #include <QtCore/QMap>
32 #include "KfiConstants.h"
33 #include "FontPreview.h"
35 class QPushButton;
36 class QLabel;
37 class QProcess;
38 class QAction;
39 class KIntNumInput;
40 class KTempDir;
42 namespace KFI
45 class BrowserExtension;
47 class CFontViewPart : public KParts::ReadOnlyPart
49 Q_OBJECT
51 public:
53 CFontViewPart(QWidget *parentWidget, QObject *parent, const QList<QVariant> &args);
54 virtual ~CFontViewPart();
56 bool openUrl(const KUrl &url);
58 protected:
60 bool openFile();
62 public Q_SLOTS:
64 void previewStatus(bool st);
65 void timeout();
66 void install();
67 void installlStatus();
68 void changeText();
69 void print();
70 void displayType(const QList<CFcEngine::TRange> &range);
71 void statResult(KJob *job);
72 void showFace(int face);
74 private:
76 void stat(const QString &path=QString());
77 // void getMetaInfo(int face);
79 private:
81 // QMap<int, QString> itsMetaInfo;
82 CFontPreview *itsPreview;
83 QPushButton *itsInstallButton;
84 QWidget *itsFaceWidget;
85 QFrame *itsFrame;
86 QLabel *itsFaceLabel;
87 // *itsMetaLabel;
88 KIntNumInput *itsFaceSelector;
89 QAction *itsChangeTextAction;
90 int itsFace;
91 KSharedConfigPtr itsConfig;
92 BrowserExtension *itsExtension;
93 QProcess *itsProc;
94 QString itsStatName;
95 // KUrl itsMetaUrl;
96 KTempDir *itsTempDir;
99 class BrowserExtension : public KParts::BrowserExtension
101 Q_OBJECT
103 public:
105 BrowserExtension(CFontViewPart *parent);
107 void enablePrint(bool enable);
109 public Q_SLOTS:
111 void print();
116 #endif