NDEVR
API Documentation
CoordinateBoundsSelector.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Bounds.h>
4#include <NDEVR/SoftwareService.h>
5#include <NDEVR/Angle.h>
6#include <QWidget>
7#include <functional>
8namespace NDEVR
9{
14 class NDEVR_API CoordinateBoundsSelector : public QWidget, public SoftwareService, public SoftwareServiceManager
15 {
16 Q_OBJECT
17 public:
22 virtual void setCurrentBounds(const Bounds<2, fltp08>& wgs84_bounds) = 0;
27 virtual void setCurrentBounds(const Bounds<2, Angle<fltp08>>& wgs84_bounds) = 0;
32 virtual Bounds<2, fltp08> currentBounds() const = 0;
38 signals:
47 public:
53 static CoordinateBoundsSelector* CreateCoordinateSelector(QWidget* parent = nullptr);
63 static void RegisterCreator(std::function<CoordinateBoundsSelector* (QWidget* parent)> creator);
64 protected:
65 static std::function<CoordinateBoundsSelector*(QWidget* parent)> s_create_coordinate_selector;
66 };
67}
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
Definition Angle.h:83
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:54
A dedicated dialog for allowing the user to select bounds for a northing and easting.
static CoordinateBoundsSelector * CreateCoordinateSelector(QWidget *parent=nullptr)
Creates a new CoordinateBoundsSelector using the registered creator.
void canceledSignal()
Emitted when the user cancels the bounds selection.
static bool CanCreateCoordinateSelector()
Returns whether a coordinate selector creator has been registered.
virtual void setCurrentBounds(const Bounds< 2, Angle< fltp08 > > &wgs84_bounds)=0
Sets the current bounds in WGS84 coordinates as angles.
static void RegisterCreator(std::function< CoordinateBoundsSelector *(QWidget *parent)> creator)
Registers a factory function for creating CoordinateBoundsSelector instances.
void finishedSignal()
Emitted when the user finishes selecting bounds.
virtual Bounds< 2, Angle< fltp08 > > currentBoundsAngle() const =0
Returns the current bounds as WGS84 angle values.
virtual Bounds< 2, fltp08 > currentBounds() const =0
Returns the current bounds as WGS84 decimal degree values.
virtual void setCurrentBounds(const Bounds< 2, fltp08 > &wgs84_bounds)=0
Sets the current bounds in WGS84 coordinates as decimal degrees.
static std::function< CoordinateBoundsSelector *(QWidget *parent)> s_create_coordinate_selector
Factory function for creating selector instances.
Software Service Managers take a Software service to modify the behavior of the software.
Base interface for services that extend or modify software behavior through modules.
The primary namespace for the NDEVR SDK.