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
;
56 class CPreviewSelectAction
;
58 class CKCmFontInst
: public KCModule
64 explicit CKCmFontInst(QWidget
*parent
=NULL
, const QVariantList
&list
=QVariantList());
65 virtual ~CKCmFontInst();
69 QString
quickHelp() const;
70 void fontSelected(const QModelIndex
&index
, bool en
, bool dis
);
71 void groupSelected(const QModelIndex
&index
);
84 void showPreview(bool s
);
85 void duplicateFonts();
88 void listingStarted();
89 void listingCompleted();
90 void refreshFontList();
91 void refreshFamilies();
92 void showInfo(const QString
&info
);
94 void addFonts(const QSet
<KUrl
> &src
);
95 void toggleFontManagement(bool on
);
96 void selectMode(int mode
);
100 void selectGroup(CGroupListItem::EType grp
);
101 void print(bool all
);
102 void toggleGroup(bool enable
);
103 void toggleFonts(bool enable
, const QString
&grp
=QString());
104 void toggleFonts(CJobRunner::ItemList
&urls
, const QStringList
&fonts
, bool enable
, const QString
&grp
,
106 bool working(bool displayMsg
=true);
107 KUrl
baseUrl(bool sys
);
108 void selectMainGroup();
109 void doCmd(CJobRunner::ECommand cmd
, const CJobRunner::ItemList
&urls
, const KUrl
&dest
);
110 CGroupListItem::EType
getCurrentGroupType();
114 QWidget
*itsGroupsWidget
,
117 QComboBox
*itsModeControl
;
119 QSplitter
*itsGroupSplitter
,
121 CFontPreview
*itsPreview
;
123 QLabel
*itsStatusLabel
;
124 CProgressBar
*itsListingProgress
;
125 CFontList
*itsFontList
;
126 CFontListView
*itsFontListView
;
127 CGroupList
*itsGroupList
;
128 CGroupListView
*itsGroupListView
;
129 CPreviewSelectAction
*itsPreviewControl
;
130 KToggleAction
*itsMgtMode
,
132 KActionMenu
*itsToolsMenu
;
133 KPushButton
*itsDeleteGroupControl
,
134 *itsEnableGroupControl
,
135 *itsDisableGroupControl
,
137 *itsDeleteFontControl
,
138 *itsEnableFontControl
,
139 *itsDisableFontControl
;
140 CFontFilter
*itsFilter
;
141 QString itsLastStatusBarMsg
;
143 KProgressDialog
*itsProgress
;
144 CUpdateDialog
*itsUpdateDialog
;
145 KTempDir
*itsTempDir
;
146 QProcess
*itsPrintProc
;
148 QSet
<QString
> itsDeletedFonts
;
149 KUrl::List itsModifiedUrls
;
150 CJobRunner
*itsRunner
;