~ubuntu-branches/ubuntu/vivid/muon/vivid-proposed

« back to all changes in this revision

Viewing changes to installer/Application.h

Tags: upstream-1.3.65
Import upstream version 1.3.65

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright © 2010-2011 Jonathan Thomas <echidnaman@kubuntu.org>        *
3
 
 *                                                                         *
4
 
 *   This program is free software; you can redistribute it and/or         *
5
 
 *   modify it under the terms of the GNU General Public License as        *
6
 
 *   published by the Free Software Foundation; either version 2 of        *
7
 
 *   the License or (at your option) version 3 or any later version        *
8
 
 *   accepted by the membership of KDE e.V. (or its successor approved     *
9
 
 *   by the membership of KDE e.V.), which shall act as a proxy            *
10
 
 *   defined in Section 14 of version 3 of the license.                    *
11
 
 *                                                                         *
12
 
 *   This program is distributed in the hope that it will be useful,       *
13
 
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
14
 
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
15
 
 *   GNU General Public License for more details.                          *
16
 
 *                                                                         *
17
 
 *   You should have received a copy of the GNU General Public License     *
18
 
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
19
 
 ***************************************************************************/
20
 
 
21
 
#ifndef APPLICATION_H
22
 
#define APPLICATION_H
23
 
 
24
 
#include <QtCore/QByteArray>
25
 
#include <QtCore/QHash>
26
 
#include <QtCore/QStringList>
27
 
 
28
 
#include <KUrl>
29
 
 
30
 
#include <LibQApt/Package>
31
 
 
32
 
namespace QApt {
33
 
    class Backend;
34
 
}
35
 
 
36
 
class Application
37
 
{
38
 
public:
39
 
    explicit Application(const QString &fileName, QApt::Backend *backend);
40
 
    explicit Application(QApt::Package *package, QApt::Backend *backend);
41
 
    ~Application();
42
 
 
43
 
    QString name();
44
 
    QString untranslatedName();
45
 
    QString comment();
46
 
    QApt::Package *package();
47
 
    QString icon() const;
48
 
    QString mimetypes() const;
49
 
    QString menuPath();
50
 
    QString categories();
51
 
    KUrl screenshotUrl(QApt::ScreenshotType type);
52
 
    QApt::PackageList addons();
53
 
    bool isValid() const;
54
 
    bool isTechnical() const;
55
 
 
56
 
    QByteArray getField(const QByteArray &field) const;
57
 
    QHash<QByteArray, QByteArray> desktopContents();
58
 
 
59
 
private:
60
 
    QString m_fileName;
61
 
    QHash<QByteArray, QByteArray> m_data;
62
 
    QApt::Backend *m_backend;
63
 
    QApt::Package *m_package;
64
 
 
65
 
    bool m_isValid;
66
 
    bool m_isTechnical;
67
 
 
68
 
    QVector<QPair<QString, QString> > locateApplication(const QString &_relPath, const QString &menuId) const;
69
 
};
70
 
 
71
 
#endif