1#ifndef IVS3D_GEODISTANCEPLUGIN_H
2#define IVS3D_GEODISTANCEPLUGIN_H
8#include <QDoubleSpinBox>
9#include <QGeoCoordinate>
16#include "iselection.h"
18#define DESCRIPTION_STYLE \
19 "color: rgb(58, 58, 58); border-left: 6px solid rgb(58, 58, 58); " \
20 "border-top-right-radius: 5px; border-bottom-right-radius: 5px; " \
21 "background-color: lightblue;"
23#define NAME_Distance "Distance"
24#define NAME_Altitude "Altitude"
44 Q_PLUGIN_METADATA(IID
"iVS3D.IBase")
53 QString
getName()
const override;
54 QMap<QString, QVariant>
getSettings()
const override;
56 const QMap<QString, QVariant>& settings)
override;
62 const std::vector<uint>& selectedImages)
override;
65 volatile bool& cancelFlag)
override;
68 void syncSettingsWidget(
double distance,
bool useAltitude,
69 bool altitudeVisible);
72 void slot_distChanged(
double n);
73 void slot_altitudeCheckChanged(
bool check);
76 std::unique_ptr<QWidget> createSettingsWidget();
77 void readMetaData(
MetaData* metaData);
79 QPointF gpsHashToLatLong(
const QVariant& hash,
bool* ok =
nullptr)
const;
80 QGeoCoordinate gpsHashToGeoCo(
const QVariant& hash)
const;
81 double distanceBetweenPoints(
int first,
int second)
const;
82 double greatCircleDistance(QPointF first, QPointF second)
const;
87 QList<QVariant> mMetaData;
88 QList<QPair<QPointF, bool>> mGpsData;
90 bool mIsGpsAvailable =
false;
91 bool mAltitudeExisting =
false;
92 bool mUseAltitude =
false;
93 double mDistance = 1.0;
95 QDoubleSpinBox* mSpinBoxDist =
nullptr;
96 QCheckBox* mAltitudeCheckBox =
nullptr;
Selects images based on traveled geographic distance between frames.
Definition geodistance.h:41
PLUG::InputLoadedResult onInputLoaded(const PLUG::InputData &input) override
onInputLoaded is called when a new input video or image set is loaded.
Definition geodistance.cpp:83
PLUG::ApplySettingsResult applySettings(const QMap< QString, QVariant > &settings) override
applySettings applies the provided settings to the plugin. This method is used to restore plugin conf...
Definition geodistance.cpp:63
PLUG::SettingsWidgetResult getSettingsWidget() override
getSettingsWidget creates and returns a settings QWidget for this plugin.
Definition geodistance.cpp:36
QMap< QString, QVariant > getSettings() const override
getSettings retrieves the current settings of the plugin as a map of key-value pairs....
Definition geodistance.cpp:54
QString getName() const override
getName returns the name of the plugin which will be displayed in the iVS3D interface.
Definition geodistance.cpp:48
PLUG::MetaDataLoadedResult onMetaDataLoaded(const PLUG::InputMetaData &inputMetaData) override
onMetaDataLoaded is called whenever metadata was loaded or refreshed for the currently active input.
Definition geodistance.cpp:95
PLUG::SelectionResult selectImages(const PLUG::SelectionData &data, volatile bool &cancelFlag) override
Selects images based on the provided selection data.
Definition geodistance.cpp:128
void onSelectedImagesChanged(const std::vector< uint > &selectedImages) override
onSelectedImagesChanged is called when the current keyframe / selected-image list changed.
Definition geodistance.cpp:109
The IBase interface provides a base class for all plugin interfaces in iVS3D. It inherits from QObjec...
Definition ibase.h:102
Interface for keyframe/image-selection plugins in iVS3D.
Definition iselection.h:53
The Reader interface defines functions which are used for reading and parsing the import.
Definition reader.h:23
tl::expected< void, Error > InputLoadedResult
Type alias for the result of handling an input loaded event, which can be either a successful void re...
Definition ibase.h:58
tl::expected< void, Error > ApplySettingsResult
Type alias for the result of applying settings to a plugin, which can be either a successful void res...
Definition ibase.h:51
tl::expected< std::unique_ptr< QWidget >, Error > SettingsWidgetResult
Type alias for the result of a settings widget creation operation, which can be either a successful u...
Definition ibase.h:44
tl::expected< void, Error > MetaDataLoadedResult
Type alias for the result of handling a metadata-loaded event, either success (void) or an Error.
Definition ibase.h:65
Data available for image selection in ISelection plugins.
Definition iselection.h:31