1 #ifndef __KCM_FONT_INST_H__
2 #define __KCM_FONT_INST_H__
5 * KFontInst - KDE Font Installer
7 * Copyright 2003-2007 Craig Drummond <craig@kde.org>
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 <config-workspace.h>
28 #include "GroupList.h"
29 #include "JobRunner.h"
30 #include <QtCore/QSet>
31 #include <KDE/KCModule>
33 #include <KDE/KConfig>
34 #include <KDE/KIO/Job>
37 class KProgressDialog
;
57 class CPreviewSelectAction
;
59 class CKCmFontInst
: public KCModule
65 explicit CKCmFontInst(QWidget
*parent
=NULL
, const QVariantList
&list
=QVariantList());
66 virtual ~CKCmFontInst();
70 QString
quickHelp() const;
71 void fontSelected(const QModelIndex
&index
, bool en
, bool dis
);
72 void groupSelected(const QModelIndex
&index
);
85 void showPreview(bool s
);
86 void duplicateFonts();
89 void listingStarted();
90 void listingCompleted();
91 void refreshFontList();
92 void refreshFamilies();
93 void showInfo(const QString
&info
);
95 void addFonts(const QSet
<KUrl
> &src
);
96 void toggleFontManagement(bool on
);
97 void selectMode(int mode
);
103 void selectGroup(CGroupListItem::EType grp
);
104 void print(bool all
);
105 void toggleGroup(bool enable
);
106 void toggleFonts(bool enable
, const QString
&grp
=QString());
107 void toggleFonts(CJobRunner::ItemList
&urls
, const QStringList
&fonts
, bool enable
, const QString
&grp
,
109 bool working(bool displayMsg
=true);
110 KUrl
baseUrl(bool sys
);
111 void selectMainGroup();
112 void doCmd(CJobRunner::ECommand cmd
, const CJobRunner::ItemList
&urls
, const KUrl
&dest
);
113 CGroupListItem::EType
getCurrentGroupType();
117 QWidget
*itsGroupsWidget
,
120 QComboBox
*itsModeControl
;
122 QSplitter
*itsGroupSplitter
,
124 CFontPreview
*itsPreview
;
126 QLabel
*itsStatusLabel
;
127 CProgressBar
*itsListingProgress
;
128 CFontList
*itsFontList
;
129 CFontListView
*itsFontListView
;
130 CGroupList
*itsGroupList
;
131 CGroupListView
*itsGroupListView
;
132 CPreviewSelectAction
*itsPreviewControl
;
133 KToggleAction
*itsMgtMode
,
135 KActionMenu
*itsToolsMenu
;
136 KAction
*itsZoomInAction
,
138 KPushButton
*itsDeleteGroupControl
,
139 *itsEnableGroupControl
,
140 *itsDisableGroupControl
,
142 *itsDeleteFontControl
,
143 *itsEnableFontControl
,
144 *itsDisableFontControl
;
145 CFontFilter
*itsFilter
;
146 QString itsLastStatusBarMsg
;
148 KProgressDialog
*itsProgress
;
149 CUpdateDialog
*itsUpdateDialog
;
150 KTempDir
*itsTempDir
;
151 QProcess
*itsPrintProc
;
153 QSet
<QString
> itsDeletedFonts
;
154 KUrl::List itsModifiedUrls
;
155 CJobRunner
*itsRunner
;