NDEVR
API Documentation
AerialImageView.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: AerialImageView
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/QCustomStackedWidget.h>
35#include <NDEVR/ProgressWidget.h>
36#include <NDEVR/ImageView.h>
37#include <NDEVR/MercatorImageManager.h>
38namespace NDEVR
39{
40 class BasicThread;
41 class Log;
46 class NDEVR_API AerialImageView : public QCustomStackedWidget
47 {
48 Q_OBJECT
49 public:
61
65 AerialImageView(QWidget* parent = nullptr);
70 void setCoordinateSpace(const UUID& id);
75 void setLocalBounds(const Bounds<3, fltp08>& bounds);
85 bool previewBoundsTolerable(QSize size) const;
90 void resizeEvent(QResizeEvent* event) override;
95 virtual void showEvent(QShowEvent* event) override;
115 void setDrawBounds(const Bounds<3, fltp08>& draw_bounds){m_draw_bounds = draw_bounds;}
120 bool isLoaded() const;
125 signals:
135 protected slots:
140 void showContextMenu(const QPoint& pos);
141 protected:
147 protected:
155 };
156}
void resizeEvent(QResizeEvent *event) override
Handles resize events, potentially triggering an image refresh.
Bounds< 2, fltp08 > drawBoundsWGS84() const
Returns the current draw bounds converted to WGS84 coordinates.
void updateAerialImage()
Triggers a refresh of the aerial image based on current bounds and settings.
void setAerialImageMode(AerialImageMode mode)
Sets the aerial image rendering mode (e.g., satellite, hybrid, terrain).
ProgressWidget * m_download_progress
The progress indicator shown during image downloads.
Bounds< 3, fltp08 > m_draw_bounds
The 3D bounding region to render.
UUID m_projection_coordinate_space
The coordinate space used for projection.
void onImageLoadedSignal(FetchReturn success)
Emitted when an aerial image load operation completes.
bool previewBoundsTolerable(QSize size) const
Checks whether the preview bounds are acceptable for the given widget size.
AerialImageView(QWidget *parent=nullptr)
Constructs the AerialImageView widget.
void setCoordinateSpace(const UUID &id)
Sets the coordinate space used for projecting geographic coordinates.
void setLocalBounds(const Bounds< 3, fltp08 > &bounds)
Sets the local bounds defining the area of interest for the aerial image.
void setDrawBounds(const Bounds< 3, fltp08 > &draw_bounds)
Sets the 3D draw bounds for the aerial image region.
FetchReturn
Result codes returned when fetching an aerial image.
@ e_cache_change
The cache changed during the fetch, requiring a retry.
@ e_could_not_fetch
The image could not be retrieved from the service.
@ e_success
The image was fetched successfully.
@ e_invalid_size
The requested image size was invalid or zero.
@ e_no_preview
No preview is available for the current bounds.
AerialImageMode m_image_mode
The current aerial image rendering mode.
void onUserModifiedSignal()
Emitted when the user modifies the aerial image view settings.
void setToNoPreview()
Sets the view to display a "no preview available" placeholder.
AerialImageMode aerialImageMode() const
Returns the current aerial image rendering mode.
UUID m_request_id
The unique identifier for the current fetch request.
FetchReturn updatePreviewImageFromThread()
Fetches and updates the preview image from a background thread.
void showContextMenu(const QPoint &pos)
Displays a context menu at the specified position.
bool isLoaded() const
Checks whether an aerial image has been successfully loaded.
virtual void showEvent(QShowEvent *event) override
Handles show events, initiating an image load if needed.
QSize m_last_preview_size
The size of the last successfully rendered preview.
ImageView * m_image_view
The image view widget displaying the aerial image.
A thread that executes a user-provided callback function concurrently.
Definition BasicThread.h:47
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:54
A widget that shows a raster image or icon.
Definition ImageView.h:44
Serves as the primary program interface for processes to report issues and allows any number of LogSt...
Definition Log.h:50
Displays the progress, either horizontally as a bar or as a round spin dial.
QCustomStackedWidget(QWidget *parent=nullptr)
Constructs a stacked widget.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
The primary namespace for the NDEVR SDK.
AerialImageMode
enum specifying what type of image to fetch.