File indexing completed on 2025-03-09 03:50:40
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2006-05-16 0007 * Description : a tool to export GPS data to KML file. 0008 * 0009 * SPDX-FileCopyrightText: 2006-2007 by Stephane Pontier <shadow dot walker at free dot fr> 0010 * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_KML_WIDGET_H 0017 #define DIGIKAM_KML_WIDGET_H 0018 0019 // Qt includes 0020 0021 #include <QWidget> 0022 #include <QList> 0023 #include <QUrl> 0024 0025 // Local includes 0026 0027 #include "kmlexport.h" 0028 #include "dfileselector.h" 0029 #include "dcolorselector.h" 0030 #include "dinfointerface.h" 0031 #include "geolocationedit.h" 0032 #include "gpsitemmodel.h" 0033 0034 class QButtonGroup; 0035 class QCheckBox; 0036 class QGridLayout; 0037 class QGroupBox; 0038 class QLabel; 0039 class QLineEdit; 0040 class QRadioButton; 0041 class QSpacerItem; 0042 class QComboBox; 0043 class QCloseEvent; 0044 class QSpinBox; 0045 class QPushButton; 0046 0047 using namespace Digikam; 0048 0049 namespace DigikamGenericGeolocationEditPlugin 0050 { 0051 0052 class KmlWidget : public QWidget 0053 { 0054 Q_OBJECT 0055 0056 public: 0057 0058 explicit KmlWidget(GeolocationEdit* const dlg, 0059 GPSItemModel* const imageModel, 0060 DInfoInterface* const iface); 0061 ~KmlWidget() override; 0062 0063 public: 0064 0065 QLabel* ImageSizeLabel; 0066 QLabel* IconSizeLabel; 0067 QLabel* destinationDirectoryLabel_; 0068 QLabel* FileNameLabel_; 0069 QLabel* DestinationUrlLabel_; 0070 QLabel* GPXFileLabel_; 0071 QLabel* timeZoneLabel_; 0072 QLabel* GPXLineWidthLabel_; 0073 QLabel* GPXColorLabel_; 0074 QLabel* GPXAltitudeLabel_; 0075 QLabel* GPXTracksOpacityLabel_; 0076 0077 QGroupBox* TargetPreferenceGroupBox; 0078 QGroupBox* TargetTypeGroupBox; 0079 0080 QButtonGroup* buttonGroupTargetType; 0081 0082 QRadioButton* LocalTargetRadioButton_; 0083 QRadioButton* GoogleMapTargetRadioButton_; 0084 0085 QLineEdit* DestinationUrl_; 0086 QLineEdit* FileName_; 0087 0088 QCheckBox* GPXTracksCheckBox_; 0089 0090 QComboBox* AltitudeCB_; 0091 QComboBox* timeZoneCB; 0092 QComboBox* GPXAltitudeCB_; 0093 0094 DColorSelector* GPXTrackColor_; 0095 0096 DFileSelector* DestinationDirectory_; 0097 DFileSelector* GPXFileUrlRequester_; 0098 QPushButton* m_geneBtn; 0099 0100 QSpinBox* ImageSizeInput_; 0101 QSpinBox* IconSizeInput_; 0102 QSpinBox* GPXTracksOpacityInput_; 0103 QSpinBox* GPXLineWidthInput_; 0104 0105 GPSItemModel* m_model; 0106 GeolocationEdit* m_dlg; 0107 0108 Q_SIGNALS: 0109 0110 void signalSetUIEnabled(const bool enabledState); 0111 void signalProgressSetup(const int maxProgress, const QString& progressText); 0112 0113 public Q_SLOTS: 0114 0115 void slotGoogleMapTargetRadioButtonToggled(bool); 0116 void slotKMLTracksCheckButtonToggled(bool); 0117 0118 protected: 0119 0120 void saveSettings(); 0121 void readSettings(); 0122 0123 protected Q_SLOTS: 0124 0125 void slotKMLGenerate(); 0126 0127 protected: 0128 0129 QGridLayout* KMLExportConfigLayout; 0130 QGridLayout* SizeGroupBoxLayout; 0131 QGridLayout* TargetPreferenceGroupBoxLayout; 0132 QGridLayout* buttonGroupTargetTypeLayout; 0133 0134 KmlExport m_kmlExport; 0135 }; 0136 0137 } // namespace DigikamGenericGeolocationEditPlugin 0138 0139 #endif // DIGIKAM_KML_WIDGET_H