/*
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 PACKAGESELECTOR_H
#define PACKAGESELECTOR_H
#include
#include
#include "package.h"
namespace Ui {
class PackageSelector;
}
class AAptInterface;
class Settings;
class MainWindow;
class PackageSelector : public QDialog
{
Q_OBJECT
public:
explicit PackageSelector(Package* pkg, AAptInterface* apt, Settings* set, MainWindow* mw, QWidget *parent);
virtual ~PackageSelector();
/*
#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation
int exec() {
QRect r = dynamic_cast(this->parent())->rect();
if(r.width() < r.height())
this->setAttribute(Qt::WA_Maemo5PortraitOrientation);
int e = QDialog::exec();
this->setAttribute(Qt::WA_Maemo5AutoOrientation);
return e;
}
#endif
*/
Package::operation selectedOperation();
protected:
void changeEvent(QEvent *e);
private:
PackageSelector(const PackageSelector& old);
PackageSelector operator= (const PackageSelector& old);
QString getMaemoOrgUrl(Package* pkg);
void updateInfo();
void queryChangelog();
QString parseChangeTable(QString tabledata);
Ui::PackageSelector *ui;
Package* iPkg;
AAptInterface* iAptInterface;
Settings* iSettings;
QNetworkAccessManager* iNetworkAccessManager;
MainWindow* iMainWindow;
bool iChangelogFetched;
bool iFetchInProgress;
QString iChangelog;
private slots:
void on_radioTabDepends_clicked();
void on_radioTabChanges_clicked();
void on_radioTabBasic_clicked();
void on_pushButton_website_clicked();
void on_pushButton_blacklist_clicked();
void changelogFetchNetworkReply(QNetworkReply* reply);
};
#endif // PACKAGESELECTOR_H