~blue-shell/blue-shell/muon-firefox-apps

« back to all changes in this revision

Viewing changes to muon/DetailsTabs/MainTab.h

  • Committer: Jonathan Thomas
  • Date: 2011-11-06 02:19:48 UTC
  • Revision ID: git-v1:498a98a05157c758a93f50092851c3ede98812f8
These classes are all now only used by MPM due to the new Updater GUI,
so move them out of libmuon and back to the muon folder.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright © 2010 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 MAINTAB_H
 
22
#define MAINTAB_H
 
23
 
 
24
// Qt includes
 
25
#include <QtCore/QVariantMap>
 
26
#include <QtGui/QWidget>
 
27
 
 
28
// LibQApt includes
 
29
#include <LibQApt/Globals>
 
30
 
 
31
class QPushButton;
 
32
class QLabel;
 
33
class QToolButton;
 
34
 
 
35
class KAction;
 
36
class KMenu;
 
37
class KTextBrowser;
 
38
 
 
39
namespace QApt
 
40
{
 
41
    class Backend;
 
42
    class Package;
 
43
}
 
44
 
 
45
class MainTab : public QWidget
 
46
{
 
47
    Q_OBJECT
 
48
public:
 
49
    explicit MainTab(QWidget *parent);
 
50
    ~MainTab();
 
51
 
 
52
private:
 
53
    QApt::Backend *m_backend;
 
54
    QApt::Package *m_package;
 
55
 
 
56
    QLabel *m_packageShortDescLabel;
 
57
 
 
58
    QPushButton *m_installButton;
 
59
    QToolButton *m_removeButton;
 
60
    QPushButton *m_upgradeButton;
 
61
    QPushButton *m_reinstallButton;
 
62
    KAction *m_purgeAction;
 
63
    KMenu *m_purgeMenu;
 
64
    QPushButton *m_purgeButton;
 
65
    QPushButton *m_cancelButton;
 
66
 
 
67
    KTextBrowser *m_descriptionBrowser;
 
68
 
 
69
public Q_SLOTS:
 
70
    void setBackend(QApt::Backend *backend);
 
71
    void setPackage(QApt::Package *package);
 
72
    void refresh();
 
73
    void clear();
 
74
 
 
75
private Q_SLOTS:
 
76
    void emitSetInstall();
 
77
    void emitSetRemove();
 
78
    void emitSetUpgrade();
 
79
    void emitSetReInstall();
 
80
    void emitSetPurge();
 
81
    void emitSetKeep();
 
82
 
 
83
Q_SIGNALS:
 
84
    void setInstall(QApt::Package *package);
 
85
    void setRemove(QApt::Package *package);
 
86
    void setUpgrade(QApt::Package *package);
 
87
    void setReInstall(QApt::Package *package);
 
88
    void setKeep(QApt::Package *package);
 
89
    void setPurge(QApt::Package *package);
 
90
};
 
91
 
 
92
#endif