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

« back to all changes in this revision

Viewing changes to kcontrol/kfontinst/kcmfontinst/KCmFontInst.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 __KCM_FONT_INST_H__
 
2
#define __KCM_FONT_INST_H__
 
3
 
 
4
/*
 
5
 * KFontInst - KDE Font Installer
 
6
 *
 
7
 * Copyright 2003-2007 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 <config-workspace.h>
 
28
#include "GroupList.h"
 
29
#include "JobRunner.h"
 
30
#include <QtCore/QSet>
 
31
#include <KDE/KCModule>
 
32
#include <KDE/KUrl>
 
33
#include <KDE/KConfig>
 
34
#include <KDE/KIO/Job>
 
35
 
 
36
class KPushButton;
 
37
class KProgressDialog;
 
38
class KTempDir;
 
39
class KToggleAction;
 
40
class KActionMenu;
 
41
class KAction;
 
42
class QLabel;
 
43
class QMenu;
 
44
class QProcess;
 
45
class QSplitter;
 
46
class QComboBox;
 
47
 
 
48
namespace KFI
 
49
{
 
50
 
 
51
class CFontFilter;
 
52
class CFontList;
 
53
class CFontPreview;
 
54
class CUpdateDialog;
 
55
class CFontListView;
 
56
class CProgressBar;
 
57
class CPreviewListView;
 
58
 
 
59
class CKCmFontInst : public KCModule
 
60
{
 
61
    Q_OBJECT
 
62
 
 
63
    public:
 
64
 
 
65
    explicit CKCmFontInst(QWidget *parent=NULL, const QVariantList &list=QVariantList());
 
66
    virtual ~CKCmFontInst();
 
67
 
 
68
    public Q_SLOTS:
 
69
 
 
70
    QString quickHelp() const;
 
71
    void    previewMenu(const QPoint &pos);
 
72
    void    fontsSelected(const QModelIndexList &list);
 
73
    void    groupSelected(const QModelIndex &index);
 
74
    void    addFonts();
 
75
    void    deleteFonts();
 
76
    void    moveFonts();
 
77
    void    zipGroup();
 
78
    void    enableFonts();
 
79
    void    disableFonts();
 
80
    void    addGroup();
 
81
    void    removeGroup();
 
82
    void    enableGroup();
 
83
    void    disableGroup();
 
84
    void    changeText();
 
85
    void    duplicateFonts();
 
86
    void    print();
 
87
    void    printGroup();
 
88
    void    listingPercent(int p);
 
89
    void    refreshFontList();
 
90
    void    refreshFamilies();
 
91
    void    showInfo(const QString &info);
 
92
    void    setStatusBar();
 
93
    void    addFonts(const QSet<KUrl> &src);
 
94
 
 
95
    private:
 
96
 
 
97
    void    removeDeletedFontsFromGroups();
 
98
    void    selectGroup(CGroupListItem::EType grp);
 
99
    void    print(bool all);
 
100
    void    toggleGroup(bool enable);
 
101
    void    toggleFonts(bool enable, const QString &grp=QString());
 
102
    void    toggleFonts(CJobRunner::ItemList &urls, const QStringList &fonts, bool enable, const QString &grp);
 
103
    void    selectMainGroup();
 
104
    void    doCmd(CJobRunner::ECommand cmd, const CJobRunner::ItemList &urls, bool system=false);
 
105
 
 
106
    private:
 
107
 
 
108
    QSplitter        *itsGroupSplitter,
 
109
                     *itsPreviewSplitter;
 
110
    CFontPreview     *itsPreview;
 
111
    CPreviewListView *itsPreviewList;
 
112
    KConfig          itsConfig;
 
113
    QLabel           *itsStatusLabel;
 
114
    CProgressBar     *itsListingProgress;
 
115
    CFontList        *itsFontList;
 
116
    CFontListView    *itsFontListView;
 
117
    CGroupList       *itsGroupList;
 
118
    CGroupListView   *itsGroupListView;
 
119
    KActionMenu      *itsToolsMenu;
 
120
    KPushButton      *itsDeleteGroupControl,
 
121
                     *itsEnableGroupControl,
 
122
                     *itsDisableGroupControl,
 
123
                     *itsAddFontControl,
 
124
                     *itsDeleteFontControl;
 
125
    CFontFilter      *itsFilter;
 
126
    QString          itsLastStatusBarMsg;
 
127
    KIO::Job         *itsJob;
 
128
    KProgressDialog  *itsProgress;
 
129
    CUpdateDialog    *itsUpdateDialog;
 
130
    KTempDir         *itsTempDir;
 
131
    QProcess         *itsPrintProc;
 
132
    QSet<QString>    itsDeletedFonts;
 
133
    KUrl::List       itsModifiedUrls;
 
134
    CJobRunner       *itsRunner;
 
135
    QMenu            *itsPreviewMenu,
 
136
                     *itsPreviewListMenu;
 
137
};
 
138
 
 
139
}
 
140
 
 
141
#endif