~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kcontrol/kfontinst/kio/FontInstInterface.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __FONTINST_INTERFACE_H__
 
2
#define __FONTINST_INTERFACE_H__
 
3
 
 
4
/*
 
5
 * KFontInst - KDE Font Installer
 
6
 *
 
7
 * Copyright 2003-2009 Craig Drummond <craig@kde.org>
 
8
 *
 
9
 * ----
 
10
 *
 
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.
 
15
 *
 
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.
 
20
 *
 
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.
 
25
 */
 
26
 
 
27
#include <QtCore/QObject>
 
28
#include <QtCore/QEventLoop>
 
29
#include "Family.h"
 
30
 
 
31
class QTimer;
 
32
class OrgKdeFontinstInterface;
 
33
 
 
34
namespace KFI
 
35
{
 
36
 
 
37
class FontInstInterface : public QObject
 
38
{
 
39
    Q_OBJECT
 
40
 
 
41
    public:
 
42
 
 
43
    FontInstInterface();
 
44
    virtual ~FontInstInterface();
 
45
 
 
46
    int      install(const QString &file, bool toSystem);
 
47
    int      uninstall(const QString &name, bool fromSystem);
 
48
    int      reconfigure();
 
49
    Families list(bool system);
 
50
    Family   stat(const QString &file, bool system);
 
51
    
 
52
    private:
 
53
 
 
54
    int waitForResponse();
 
55
 
 
56
    private Q_SLOTS:
 
57
 
 
58
    void dbusServiceOwnerChanged(const QString &name, const QString &from, const QString &to);
 
59
    void status(int pid, int value);
 
60
    void fontList(int pid, const QList<KFI::Families> &families);
 
61
    void fontStat(int pid, const KFI::Family &font);
 
62
 
 
63
    private:
 
64
 
 
65
    OrgKdeFontinstInterface *itsInterface;
 
66
    bool                    itsActive;
 
67
    int                     itsStatus;
 
68
    Families                itsFamilies;
 
69
    QEventLoop              itsEventLoop;
 
70
};
 
71
 
 
72
}
 
73
 
 
74
#endif