NDEVR
API Documentation
CollimatorLogic.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/ImageModel.h>
4#include <NDEVR/ImageModelDialog.h>
5#include <NDEVR/DesignObjectOrientation.h>
6#include <NDEVR/CustomModelLogic.h>
7#include <NDEVR/QTWindowManager.h>
8#include <NDEVR/SceneTreeWidget.h>
9#include <NDEVR/Ribbon.h>
10#include <NDEVR/RibbonSubGroup.h>
11#include <NDEVR/RibbonGroup.h>
12#include <NDEVR/NDEVRRibbon.h>
13#include <NDEVR/SceneTree.h>
14#include <NDEVR/DesignObjectDialog.h>
15#include <NDEVR/StationModel.h>
16#include <NDEVR/QTIconManager.h>
17#include <NDEVR/Button.h>
18#include <NDEVR/QTTools.h>
19namespace NDEVR
20{
34
40 class CollimatorLogic : public CustomModelLogic, public INIInterface
41 {
42 private:
47 CollimatorLogic(QTModelManager* manager);
48 public:
53 bool createdCollimators() const;
58 static CollimatorLogic* Default();
59
65 static CollimatorLogic* Default(QTModelManager* manager);
66
72 static void SetEnabled(bool is_enabled, QTModelManager* manager);
77 virtual bool canBeHandledBySelectionWidget() const override { return false; };
78
83
88 void getINI(INIFactory& factory) override;
89
94 virtual void finishReadingINI(INIFactory&) override;
99 virtual void prepareForINI(INIFactory&) override;
108 const CollimatorSettings* settings() const { return m_collimator_settings; }
113 protected:
119 virtual void setupPropertiesDialog(DesignObjectDialog* dialog, const DynamicPointer<QTDesignObject>& object) override;
120 Model m_last_model;
121 Button* m_play_button = nullptr;
122 StationModel m_station;
123 CollimatorSettings m_collimator_settings[10];
125 bool m_created_collimator = false;
126 };
127}
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
Definition Angle.h:83
A core widget that allows the user to click one of many button types.
Definition Button.h:68
static CollimatorLogic * Default(QTModelManager *manager)
Retrieves the default instance of CollimatorLogic for a specific manager.
bool createdCollimators() const
Checks if collimators have been created.
void setupStation()
Sets up the station model associated with the collimators, which all collimators will be children of.
void initCollimatorSettings()
Initializes the settings for all collimators.
virtual void prepareForINI(INIFactory &) override
Prepares the logic for reading or writing INI settings.
virtual void setupPropertiesDialog(DesignObjectDialog *dialog, const DynamicPointer< QTDesignObject > &object) override
Modifies property dialogs when objects are created.
virtual void finishReadingINI(INIFactory &) override
Finalizes reading INI settings.
void setupCollimators()
Sets up collimators by initializing their settings and configurations.
static void SetEnabled(bool is_enabled, QTModelManager *manager)
Enables or disables collimator logic.
virtual bool canBeHandledBySelectionWidget() const override
Determines if the logic can be handled by a selection widget.
const CollimatorSettings * settings() const
Retrieves the settings for the collimators.
static CollimatorLogic * Default()
Retrieves the default instance of CollimatorLogic.
void getINI(INIFactory &factory) override
Reads INI settings into the given factory.
CustomModelLogic(QTModelManager *manager, const StringView &type_name)
Constructs a CustomModelLogic for a single model type name.
A popup dialog for showing options or information to the user for a particular DesignObject.
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:64
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:356
Contains methods for easily reading and writing to an INI file including efficient casting,...
Definition INIReader.h:107
INIInterface()
Constructs an INIInterface with no default INI file.
A core class that represents a node on model hierarchy.
Definition Model.h:292
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
The core String class for the NDEVR API.
Definition String.h:95
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
Definition Vector.hpp:62
The primary namespace for the NDEVR SDK.
Logic for handling Images in the NDEVR space, including dialogs and imports.
TranslatedString camera_name
Display name of the camera.
Vector< 2, Angle< fltp08 > > position
Angular position of the collimator.
String camera_address
Network address of the camera feed.
Vector< 2, fltp08 > cross_hair_settings
Crosshair position (normalized 0..1).
bool in_use
Whether this collimator is currently active.