2015-03-25 14:16:09 +00:00
|
|
|
#ifndef PATHSDIALOG_HXX
|
|
|
|
#define PATHSDIALOG_HXX
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
#include <simgear/package/Root.hxx>
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
2016-04-08 09:26:19 +00:00
|
|
|
class AddOnsPage;
|
2015-03-25 14:16:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class CatalogListModel;
|
|
|
|
|
2016-04-08 09:26:19 +00:00
|
|
|
class AddOnsPage : public QWidget
|
2015-03-25 14:16:09 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2016-04-08 09:26:19 +00:00
|
|
|
explicit AddOnsPage(QWidget *parent, simgear::pkg::RootRef root);
|
|
|
|
~AddOnsPage();
|
2015-03-25 14:16:09 +00:00
|
|
|
|
2017-02-22 17:00:27 +00:00
|
|
|
static void addDefaultCatalog(QWidget* pr, bool silent);
|
2016-04-15 16:06:53 +00:00
|
|
|
|
2016-04-08 09:26:19 +00:00
|
|
|
signals:
|
|
|
|
void downloadDirChanged();
|
|
|
|
void sceneryPathsChanged();
|
2017-02-22 17:09:13 +00:00
|
|
|
void aircraftPathsChanged();
|
|
|
|
|
2015-03-25 14:16:09 +00:00
|
|
|
private slots:
|
|
|
|
void onAddSceneryPath();
|
|
|
|
void onRemoveSceneryPath();
|
|
|
|
|
|
|
|
void onAddAircraftPath();
|
|
|
|
void onRemoveAircraftPath();
|
|
|
|
|
|
|
|
void onAddCatalog();
|
|
|
|
void onRemoveCatalog();
|
2015-11-23 22:58:00 +00:00
|
|
|
void onAddDefaultCatalog();
|
|
|
|
|
2015-03-25 14:16:09 +00:00
|
|
|
void onChangeDownloadDir();
|
|
|
|
void onClearDownloadDir();
|
2016-04-08 09:26:19 +00:00
|
|
|
|
|
|
|
void onChangeDataDir();
|
2016-06-15 21:28:27 +00:00
|
|
|
void onInstallScenery();
|
2015-03-25 14:16:09 +00:00
|
|
|
private:
|
|
|
|
void updateUi();
|
2016-04-08 09:26:19 +00:00
|
|
|
void setDownloadDir();
|
|
|
|
|
|
|
|
void saveAircraftPaths();
|
|
|
|
void saveSceneryPaths();
|
2016-06-15 21:28:27 +00:00
|
|
|
bool haveSceneryPath(QString path) const;
|
2015-03-25 14:16:09 +00:00
|
|
|
|
2016-04-08 09:26:19 +00:00
|
|
|
Ui::AddOnsPage* m_ui;
|
2015-03-25 14:16:09 +00:00
|
|
|
CatalogListModel* m_catalogsModel;
|
|
|
|
simgear::pkg::RootRef m_packageRoot;
|
|
|
|
QString m_downloadDir;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PATHSDIALOG_HXX
|