NDEVR
API Documentation
CoordinateProjectionChooser.h
1#pragma once
2#include "Base/Headers/UUID.h"
3#include "Base/Headers/String.h"
4#include "Base/Headers/INIReader.h"
5#include <QWidget>
6namespace Ui
7{
8 class CoordinateProjectionChooserUI;
9}
10class QTableWidget;
11namespace NDEVR
12{
17 class CoordinateProjectionChooser : public QWidget
18 {
19 Q_OBJECT
20 public:
24 CoordinateProjectionChooser(QWidget* parent = nullptr);
28 void setProjection(UUID projection_id);
29
30 signals:
34 void acceptedSignal(const UUID id);
37 protected:
39 void init();
44 void updateSearch(bool finished, bool allow_download = true);
46 void saveINI();
48 void readINI();
57 void setupTable(QTableWidget* widget, const Buffer<UUID>& projections);
63 virtual void showEvent(QShowEvent* event) override;
64 protected slots:
69 void coordinateProjectionTableSelected(int row, int column);
72 private:
73 String m_recent_projections_string;
74 Buffer<UUID> m_recent_projections;
75 protected:
77 Ui::CoordinateProjectionChooserUI* ui;
79 };
80}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
void acceptedSignal(const UUID id)
Emitted when the user accepts a projection selection.
void tabChangedSlot()
Handles tab changes in the chooser widget.
void init()
Initializes the UI components and connections.
virtual void showEvent(QShowEvent *event) override
Handles the show event to refresh data when the widget becomes visible.
void updateSearch(bool finished, bool allow_download=true)
Updates the search results based on the current filter text.
CoordinateProjectionChooser(QWidget *parent=nullptr)
Constructs a CoordinateProjectionChooser widget.
bool m_has_loaded_authorities
Whether projection authority data has been loaded.
void saveINI()
Saves the recent projections list to an INI file.
void setupTable(QTableWidget *widget, const Buffer< UUID > &projections)
Populates a table widget with projection entries.
void canceledSignal()
Emitted when the user cancels the selection.
UUID m_projection
The currently selected projection UUID.
INIFactory getINIFactory()
Creates an INI factory for reading/writing settings.
void coordinateProjectionTableSelected(int row, int column)
Handles selection of a row in the projection table.
Ui::CoordinateProjectionChooserUI * ui
The Qt UI form instance.
void updateTables()
Updates all projection tables with current data.
void readINI()
Reads the recent projections list from an INI file.
void setProjection(UUID projection_id)
Sets the currently selected projection.
Contains methods for easily reading and writing to an INI file including efficient casting,...
Definition INIReader.h:107
The core String class for the NDEVR API.
Definition String.h:95
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.