1
/***************************************************************************
2
* Copyright © 2010-2012 Jonathan Thomas <echidnaman@kubuntu.org> *
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. *
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. *
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
***************************************************************************/
28
#include "../libmuon/MuonMainWindow.h"
30
class AbstractResourcesBackend;
31
class LaunchListModel;
32
class QAbstractItemView;
37
class QStandardItemModel;
44
class ApplicationBackend;
45
class ApplicationLauncher;
49
class MainWindow : public MuonMainWindow
56
void openApplication(const QString &app);
59
QStandardItem* createOriginItem(const QString& originName);
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;
80
void loadSplitterSizes();
81
void saveSplitterSizes();
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();
98
void viewsPopulated();