21 #ifndef _MPC_IMPORT_WINDOW_
22 #define _MPC_IMPORT_WINDOW_
25 #include <QNetworkAccessManager>
26 #include <QNetworkReply>
27 #include <QStandardItemModel>
28 #include "StelDialog.hpp"
30 #include "SolarSystemEditor.hpp"
32 class Ui_mpcImportWindow;
53 void objectsImported();
57 void switchImportType(
bool checked);
63 void pasteClipboardURL();
64 void bookmarkSelected(QString);
67 void acquireObjectData();
72 void sendQueryToUrl(QUrl url);
74 void updateCountdown();
78 void updateDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
79 void updateQueryProgress(qint64 bytesReceived, qint64 bytesTotal);
80 void downloadComplete(QNetworkReply * reply);
81 void receiveQueryReply(QNetworkReply * reply);
82 void readQueryReply(QNetworkReply * reply);
89 void discardObjects();
96 QList<SsoElements> candidatesForAddition;
97 QList<SsoElements> candidatesForUpdate;
98 QStandardItemModel * candidateObjectsModel;
100 ImportType importType;
105 SsoElements readElementsFromString(QString elements);
107 QList<SsoElements> readElementsFromFile(ImportType type, QString filePath);
109 void populateBookmarksList();
111 void populateCandidateObjects(QList<SsoElements>);
112 void enableInterface(
bool enable);
115 QNetworkAccessManager * networkManager;
116 QNetworkReply * downloadReply;
117 QNetworkReply * queryReply;
120 void startDownload(QString url);
121 void deleteDownloadProgressBar();
122 void deleteQueryProgressBar();
124 typedef QHash<QString,QString> Bookmarks;
125 QHash<ImportType, Bookmarks> bookmarks;
126 void loadBookmarks();
127 void loadBookmarksGroup(QVariantMap source, Bookmarks & bookmarkGroup);
128 void saveBookmarks();
129 void saveBookmarksGroup(Bookmarks & bookmarkGroup, QVariantMap & output);
134 QTimer * countdownTimer;
135 void startCountdown();
136 void resetCountdown();
139 virtual void createDialogContent();
140 Ui_mpcImportWindow * ui;
143 #endif //_MPC_IMPORT_WINDOW_
A local copy of StelDialog, the base class for all the GUI windows in Stellarium, included to allow t...
Main class of the Solar System Editor plug-in.
Window for importing orbital elements from the Minor Planet Center.