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

« back to all changes in this revision

Viewing changes to installer/MainWindow.h

  • Committer: Package Import Robot
  • Author(s): Scarlett Clark
  • Date: 2015-03-24 07:36:31 UTC
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: package-import@ubuntu.com-20150324073631-7nmay5episnfkdlt
Tags: upstream-5.2.2
Import upstream version 5.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright © 2010-2012 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 MAINWINDOW_H
22
 
#define MAINWINDOW_H
23
 
 
24
 
// KDE includes
25
 
#include <KService>
26
 
 
27
 
// Own includes
28
 
#include "../libmuon/MuonMainWindow.h"
29
 
 
30
 
class AbstractResourcesBackend;
31
 
class LaunchListModel;
32
 
class QAbstractItemView;
33
 
class QModelIndex;
34
 
class QSplitter;
35
 
class QStackedWidget;
36
 
class QStandardItem;
37
 
class QStandardItemModel;
38
 
class QTreeView;
39
 
 
40
 
class KMessageWidget;
41
 
class KService;
42
 
class KVBox;
43
 
 
44
 
class ApplicationBackend;
45
 
class ApplicationLauncher;
46
 
class ProgressView;
47
 
class ViewSwitcher;
48
 
 
49
 
class MainWindow : public MuonMainWindow
50
 
{
51
 
    Q_OBJECT
52
 
public:
53
 
    MainWindow();
54
 
    ~MainWindow();
55
 
 
56
 
    void openApplication(const QString &app);
57
 
 
58
 
private:
59
 
    QStandardItem* createOriginItem(const QString& originName);
60
 
 
61
 
    AbstractResourcesBackend *m_appBackend;
62
 
    QString m_appToBeOpened;
63
 
    QSplitter *m_mainWidget;
64
 
    QStackedWidget *m_viewStack;
65
 
    QWidget *m_busyWidget;
66
 
    ViewSwitcher *m_viewSwitcher;
67
 
    QStandardItemModel *m_viewModel;
68
 
    QHash<QModelIndex, QWidget *> m_viewHash;
69
 
    QAction *m_loadSelectionsAction;
70
 
    QAction *m_saveSelectionsAction;
71
 
    LaunchListModel *m_launches;
72
 
    KMessageWidget *m_launcherMessage;
73
 
    ApplicationLauncher *m_appLauncher;
74
 
    ProgressView *m_progressView;
75
 
    QStandardItem *m_progressItem;
76
 
 
77
 
private Q_SLOTS:
78
 
    void initGUI();
79
 
    void initObject();
80
 
    void loadSplitterSizes();
81
 
    void saveSplitterSizes();
82
 
    void clearViews();
83
 
    void populateViews();
84
 
    void changeView(const QModelIndex &index);
85
 
    void selectFirstRow(const QAbstractItemView *itemView);
86
 
    void sourcesEditorFinished();
87
 
    void showLauncherMessage();
88
 
    void launchSingleApp();
89
 
    void showAppLauncher();
90
 
    void onAppLauncherClosed();
91
 
    void clearMessageActions();
92
 
    void addProgressItem();
93
 
    void removeProgressItem();
94
 
    void triggerOpenApplication();
95
 
    void aptFetchingChanged();
96
 
 
97
 
signals:
98
 
    void viewsPopulated();
99
 
};
100
 
 
101
 
#endif