NDEVR
API Documentation
StationEditor.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: StationSetupEditor
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/Editor.h>
35namespace Ui
36{
37 class StationEditorUI;
38}
39namespace NDEVR
40{
41 class QCustomTabWidget;
46 class NDEVR_API StationEditor : public Editor
47 {
48 Q_OBJECT
49 public:
54 StationEditor(QWidget* parent = nullptr);
60 StationEditor(const DynamicPointer<QTDesignObject>& station, QWidget *parent = nullptr);
61 virtual ~StationEditor();
66 virtual void setTarget(const DynamicPointer<QTDesignObject>& object) override;
74 void updateValues() override;
79 void showEditingControls(bool show);
84 void addStationToolWidget(QWidget* widget);
89 EditorShowMode showMode() const override;
99 bool supportsRelative() const;
104 bool isPrismStation() const;
109 bool isInRelativeMode() const;
114 void setHorizontal(bool horizontal) override;
115 public slots:
136 protected:
140 void init();
161 protected:
162 Ui::StationEditorUI* ui;
165 };
166}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:356
Editor(QWidget *parent=nullptr)
Constructs an Editor with no design object target.
A tab widget provides a tab area and a "page area" that is used to display pages related to each tab.
void updateComputedPosition()
Recomputes and displays the computed absolute position from relative data.
bool isInRelativeMode() const
Checks whether the editor is currently in relative positioning mode.
bool isPrismStation() const
Checks whether this station is a prism station type.
void updatePositionFromDialogSlot()
Slot invoked to update the station position from the dialog fields.
void setPositionFromDialog()
Applies the absolute position from the dialog fields to the target station.
void setupForNewTarget()
Configures the editor UI for a newly assigned target.
StationEditor(const DynamicPointer< QTDesignObject > &station, QWidget *parent=nullptr)
Constructs a StationEditor targeting a specific station.
QCustomTabWidget * m_tool_tab_widget
Tab widget containing station tool pages.
void updateFromReferenceCombo()
Slot invoked when the reference combo selection changes.
void setupRelativePosition()
Configures the relative position UI elements based on the current target.
void setHorizontal(bool horizontal) override
Sets the layout orientation of the editor.
void showEditingControls(bool show)
Shows or hides the editing controls in the editor.
void init()
Initializes the editor UI and connects signals.
StationEditor(QWidget *parent=nullptr)
Constructs a StationEditor with no initial target.
void updateRelativePosition()
Refreshes the displayed relative position values.
Ui::StationEditorUI * ui
The auto-generated UI form for the station editor.
void updateValues() override
Refreshes the displayed values from the current target.
Buffer< QWidget * > m_tool_widgets
Custom tool widgets added to the tab area.
void setPrismOffsetSlot()
Slot invoked to apply the prism offset from the UI.
bool supportsRelative() const
Checks whether this station supports relative positioning.
void clearReferenceInformation()
Clears any displayed reference information in the editor.
void updateRelativePositionFromDialog()
Slot invoked to update the relative position from the dialog fields.
Vertex< 3, fltp08 > currentLocation() const
Returns the current 3D location of the station.
EditorShowMode showMode() const override
Returns the preferred show mode for this editor.
virtual void setTarget(const DynamicPointer< QTDesignObject > &object) override
Sets the target design object for this editor.
void setRelativeLocationFromUISlot()
Slot invoked to set the relative location based on the current UI values.
void addStationToolWidget(QWidget *widget)
Adds a custom tool widget to the station editor tab area.
A point in N-dimensional space, used primarily for spatial location information.
Definition Vertex.hpp:44
The primary namespace for the NDEVR SDK.
EditorShowMode
Describes how an Editor should be displayed within the application UI.
Definition Editor.h:48