NDEVR
API Documentation
CoordinateConverterDialog.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: CoordinateConverterDialog
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include "Base/Headers/Buffer.hpp"
35#include "Base/Headers/UUID.h"
36#include "Base/Headers/INIReader.h"
37#include <QWidget>
38namespace Ui
39{
40 class CoordinateConverterEditor;
41}
42class QComboBox;
43class QTableWidget;
44namespace NDEVR
45{
46 class BasicThread;
47 class INIReader;
55 class COORDINATE_PROJECTION_API CoordinateConverterDialog : public QWidget
56 {
57 Q_OBJECT
58 public:
62 CoordinateConverterDialog(QWidget *parent = 0);
68 void resizeEvent(QResizeEvent* event) override;
72 void showAcceptButton(bool show);
78 QSize minimumSizeHint() const override;
82 void setShowChooserCallback(std::function<void(bool show)>& show_chooser_callback);
86 QWidget* chooser();
90 void showSearch(bool show_search);
98 void showVerticalDatumSearch(bool show);
99 protected:
103 virtual void showEvent(QShowEvent *event) override;
104 private:
108 void setEditable(bool is_editable);
112 void setProjection(const UUID& projection);
117 bool event(QEvent* event) override;
118 signals:
123 private:
124 std::function<void(bool show)> m_show_chooser_callback;
125 CoordinateProjectionChooser* m_chooser = nullptr;
126 VerticalDatumChooser* m_vertical_datum_chooser = nullptr;
127 Ui::CoordinateConverterEditor* ui;
128 UUID m_selected_id = Constant<UUID>::Invalid;
129 UUID m_table_selected_id = Constant<UUID>::Invalid;
130 bool m_editable;
131 bool m_is_dirty = false;
132 };
133}
A thread that executes a user-provided callback function concurrently.
Definition BasicThread.h:47
void showSearch(bool show_search)
Shows or hides the projection search panel.
QWidget * chooser()
Gets the coordinate projection chooser widget.
void setupAsPrimary()
Configures this dialog as the primary coordinate projection editor.
QWidget * verticalDatumChooser()
Gets the vertical datum chooser widget.
void showAcceptButton(bool show)
Shows or hides the accept button.
bool event(QEvent *event) override
Handles general events for the dialog.
virtual ~CoordinateConverterDialog()
Destructor.
CoordinateConverterDialog(QWidget *parent=0)
Constructs a CoordinateConverterDialog widget.
void acceptedSignal()
Emitted when the user accepts the coordinate projection settings.
void setShowChooserCallback(std::function< void(bool show)> &show_chooser_callback)
Sets the callback for showing/hiding the projection chooser.
virtual void showEvent(QShowEvent *event) override
Handles the show event to refresh data when the widget becomes visible.
void updatedFromUISignal()
Emitted when the projection settings are updated from the UI.
void showVerticalDatumSearch(bool show)
Shows or hides the vertical datum search panel.
void resizeEvent(QResizeEvent *event) override
Handles resize events to adjust layout.
QSize minimumSizeHint() const override
Gets the minimum size hint for the dialog.
Allows the user to select a coordinate projection from a list of ones available.
Provides a standard way to show table data within the application.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
A dialog that allows the user to select a vertical datum (geoid model) for elevation reference.
The primary namespace for the NDEVR SDK.