add more spacing
[personal-kdebase.git] / workspace / kcontrol / kfontinst / viewpart / FontViewPart.h
blob6dd85f2e0048e882d31c0ca365d5cf980b25453f
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 KAction;
40 class KIntNumInput;
41 class KTempDir;
43 namespace KFI
46 class BrowserExtension;
48 class CFontViewPart : public KParts::ReadOnlyPart
50 Q_OBJECT
52 public:
54 CFontViewPart(QWidget *parentWidget, QObject *parent, const QList<QVariant> &args);
55 virtual ~CFontViewPart();
57 bool openUrl(const KUrl &url);
59 protected:
61 bool openFile();
63 public Q_SLOTS:
65 void previewStatus(bool st);
66 void timeout();
67 void install();
68 void installlStatus();
69 void changeText();
70 void print();
71 void displayType(const QList<CFcEngine::TRange> &range);
72 void statResult(KJob *job);
73 void showFace(int face);
74 void zoomIn();
75 void zoomOut();
77 private:
79 void stat(const QString &path=QString());
80 // void getMetaInfo(int face);
82 private:
84 // QMap<int, QString> itsMetaInfo;
85 CFontPreview *itsPreview;
86 QPushButton *itsInstallButton;
87 QWidget *itsFaceWidget;
88 QFrame *itsFrame;
89 QLabel *itsFaceLabel;
90 // *itsMetaLabel;
91 KIntNumInput *itsFaceSelector;
92 QAction *itsChangeTextAction;
93 KAction *itsZoomInAction,
94 *itsZoomOutAction;
95 int itsFace;
96 KSharedConfigPtr itsConfig;
97 BrowserExtension *itsExtension;
98 QProcess *itsProc;
99 QString itsStatName;
100 // KUrl itsMetaUrl;
101 KTempDir *itsTempDir;
104 class BrowserExtension : public KParts::BrowserExtension
106 Q_OBJECT
108 public:
110 BrowserExtension(CFontViewPart *parent);
112 void enablePrint(bool enable);
114 public Q_SLOTS:
116 void print();
121 #endif