1 /* 2 * Copyright 2012, 2013 Thomas Schöps 3 * Copyright 2012-2017 Kai Pastor 4 * 5 * This file is part of OpenOrienteering. 6 * 7 * OpenOrienteering is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * OpenOrienteering is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with OpenOrienteering. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 22 #ifndef OPENORIENTEERING_TEMPLATE_IMAGE_OPEN_DIALOG_H 23 #define OPENORIENTEERING_TEMPLATE_IMAGE_OPEN_DIALOG_H 24 25 #include <QDialog> 26 #include <QObject> 27 #include <QString> 28 29 class QLineEdit; 30 class QPushButton; 31 class QRadioButton; 32 class QWidget; 33 34 namespace OpenOrienteering { 35 36 class TemplateImage; 37 38 39 /** 40 * Initial setting dialog when opening a raster image as template, 41 * asking for how to position the image. 42 * 43 * \todo Move this class to separate files. 44 */ 45 class TemplateImageOpenDialog : public QDialog 46 { 47 Q_OBJECT 48 public: 49 TemplateImageOpenDialog(TemplateImage* templ, QWidget* parent); 50 51 double getMpp() const; 52 bool isGeorefRadioChecked() const; 53 54 protected slots: 55 void radioClicked(); 56 void setOpenEnabled(); 57 void doAccept(); 58 59 private: 60 QRadioButton* georef_radio; 61 QRadioButton* mpp_radio; 62 QRadioButton* dpi_radio; 63 QLineEdit* mpp_edit; 64 QLineEdit* dpi_edit; 65 QLineEdit* scale_edit; 66 QPushButton* open_button; 67 68 TemplateImage* templ; 69 }; 70 71 72 } // namespace OpenOrienteering 73 74 #endif // OPENORIENTEERING_TEMPLATE_IMAGE_OPEN_DIALOG_H 75