/*
This file is part of Faster Application Manager.
Faster Application Manager is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Faster Application Manager is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Faster Application Manager. If not, see .
(C) Heikki Holstila 2010
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include
#include
#include
#include "aaptinterface.h"
class PackageView;
class Uninstall;
class Dialog;
class dimmer;
class RepoView;
class Settings;
class DpkgInterface;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
#ifdef Q_WS_MAEMO_5
Q_CLASSINFO("D-Bus Interface", "org.maemo.faster_application_manager")
#endif
public:
enum nextOperation { OpNone, OpPromptSimulated, OpOpenPkgView };
explicit MainWindow(QWidget *parent = 0);
virtual ~MainWindow();
void openNetworkConnection();
void operationQueueFinished(QList lastModes, bool success, QString title, QStringList msgs);
void busyDialog(bool show_, QString title="", QString text="");
void closeEvent(QCloseEvent *event);
void GdkEventIconThemeReload();
void notifyDialog(QString title, QString msg);
bool confirmDialog(QString title, QString msg);
void setNextOperation(nextOperation op_) { iNextOperation=op_; }
void on_btnUpdate_clicked();
void resizeEvent(QResizeEvent* event);
public slots:
void orientationChanged();
#ifdef Q_WS_MAEMO_5
Q_SCRIPTABLE int top_application();
#endif
protected:
void changeEvent(QEvent *e);
private:
MainWindow(const MainWindow& old);
MainWindow operator= (const MainWindow& old);
void dateFetchAsk();
void showFreeSpace();
void rescaleMenuView();
Ui::MainWindow *ui;
AAptInterface* iAptInterface;
DpkgInterface* iDpkgInterface;
PackageView* iWinPackageView;
RepoView* iWinRepoView;
Dialog* iDlgBusy;
Settings* iSettings;
//operation iOperation;
dimmer* iDimmer;
bool iReposAutoUpdating;
bool iUpgradeAutoUpdate;
nextOperation iNextOperation;
Phonon::MediaObject* iMediaObject;
QNetworkSession* iNetworkSession;
QNetworkConfigurationManager* iNetworkConfigurationManager;
void on_btnRepos_clicked();
void on_btnUpgrade_clicked();
void on_btnListInstallable_clicked();
void on_btnListInstalled_clicked();
private slots:
void on_listWidget_itemClicked(QListWidgetItem* item);
void on_actionLoad_file_triggered();
void on_actionOptions_triggered();
void on_actionView_log_triggered();
void on_actionClean_triggered();
void on_actionAbout_triggered();
};
#endif // MAINWINDOW_H