1 #ifndef __FONT_LISTER_H__
2 #define __FONT_LISTER_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.
30 #include <KDE/KIO/Job>
31 #include <KDE/KFileItem>
32 #include <QtCore/QObject>
33 #include <QtCore/QHash>
40 Rename(const KUrl
&f
, const KUrl
&t
)
47 typedef QList
<Rename
> RenameList
;
49 class CFontLister
: public QObject
65 CFontLister(QObject
*parent
);
67 void scan(const KUrl
&url
=KUrl());
68 void setAutoUpdate(bool e
);
69 bool busy() const { return NULL
!=itsJob
; }
73 void newItems(const KFileItemList
&items
);
74 void deleteItems(const KFileItemList
&items
);
75 void renameItems(const RenameList
&items
);
79 void message(const QString
&msg
);
83 void fileRenamed(const QString
&from
, const QString
&to
);
84 void filesAdded(const QString
&dir
);
85 void filesRemoved(const QStringList
&files
);
86 void result(KJob
*job
);
87 void entries(KIO::Job
*job
, const KIO::UDSEntryList
&entries
);
88 void processedSize(KJob
*job
, qulonglong s
);
89 void totalSize(KJob
*job
, qulonglong s
);
90 void infoMessage(KJob
*job
, const QString
&msg
);
94 void removeItems(KFileItemList
&items
);
95 bool inScope(const KUrl
&url
);
97 static EListing
listing(const KUrl
&url
);
101 typedef QHash
<KUrl
, KFileItem
> ItemCont
;
108 qulonglong itsJobSize
;
109 RenameList itsItemsToRename
;