| 
									
										
										
										
											2017-04-27 20:26:05 +02:00
										 |  |  | // SPDX-License-Identifier: GPL-2.0
 | 
					
						
							| 
									
										
										
										
											2014-09-21 16:11:58 +02:00
										 |  |  | #ifndef DIVESHAREEXPORTDIALOG_H
 | 
					
						
							|  |  |  | #define DIVESHAREEXPORTDIALOG_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QDialog>
 | 
					
						
							|  |  |  | #include <QNetworkReply>
 | 
					
						
							|  |  |  | #include <QNetworkAccessManager>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define DIVESHARE_WEBSITE "dive-share.appspot.com"
 | 
					
						
							|  |  |  | #define DIVESHARE_BASE_URI "http://" DIVESHARE_WEBSITE
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Ui { | 
					
						
							|  |  |  | class DiveShareExportDialog; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class DiveShareExportDialog : public QDialog | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2017-05-27 11:05:38 -07:00
										 |  |  | 	Q_OBJECT | 
					
						
							| 
									
										
										
										
											2014-09-21 16:11:58 +02:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2017-05-27 11:05:38 -07:00
										 |  |  | 	explicit DiveShareExportDialog(QWidget *parent = 0); | 
					
						
							|  |  |  | 	~DiveShareExportDialog(); | 
					
						
							|  |  |  | 	static DiveShareExportDialog *instance(); | 
					
						
							|  |  |  | 	void prepareDivesForUpload(bool); | 
					
						
							| 
									
										
										
										
											2014-09-21 16:11:58 +02:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2017-05-27 11:05:38 -07:00
										 |  |  | 	Ui::DiveShareExportDialog *ui; | 
					
						
							|  |  |  | 	bool exportSelected; | 
					
						
							| 
									
										
										
										
											2014-09-21 16:11:58 +02:00
										 |  |  | private | 
					
						
							|  |  |  | slots: | 
					
						
							| 
									
										
										
										
											2017-05-27 11:05:38 -07:00
										 |  |  | 	void UIDFromBrowser(); | 
					
						
							|  |  |  | 	void doUpload(); | 
					
						
							| 
									
										
										
										
											2019-12-10 15:36:31 +01:00
										 |  |  | 	void finishedSlot(bool, const QString &, const QByteArray &); | 
					
						
							| 
									
										
										
										
											2014-09-21 16:11:58 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // DIVESHAREEXPORTDIALOG_H
 |