9 #include "uiMeasurementQt/config.hpp" 11 #include <fwData/Landmarks.hpp> 13 #include <fwDataTools/PickingInfo.hpp> 15 #include <fwGui/editor/IEditor.hpp> 21 #include <QPushButton> 23 #include <QTreeWidget> 64 class UIMEASUREMENTQT_CLASS_API
SLandmarks :
public QObject,
78 UIMEASUREMENTQT_API virtual ~
SLandmarks() noexcept;
80 UIMEASUREMENTQT_API virtual
KeyConnectionsMap getAutoConnections() const override;
84 typedef ::
fwRuntime::ConfigurationElement::sptr Configuration;
91 virtual
void starting() override;
98 virtual
void stopping() override;
101 virtual
void updating() override;
103 virtual
void configuring() override;
108 void onColorButton();
111 void onGroupNameEdited(QTreeWidgetItem* item,
int column);
114 void onSelectionChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous);
117 void onSizeChanged(
int newSize);
120 void onOpacityChanged(
int newOpacity);
123 void onVisibilityChanged(
int visibility);
126 void onShapeChanged(const QString& shape);
129 void onAddNewGroup();
132 void onRemoveSelection();
135 void addPickedPoint(::
fwDataTools::PickingInfo pickingInfo);
138 void addPoint(
std::
string groupName);
141 void modifyPoint(
std::
string groupName,
size_t index);
144 void selectPoint(
std::
string groupName,
size_t index);
147 void deselectPoint(
std::
string groupName,
size_t index);
150 void addGroup(
std::
string name);
153 void removeGroup(
std::
string name);
156 void removePoint(
std::
string groupName,
size_t index);
159 void renameGroup(
std::
string oldName,
std::
string newName);
162 void modifyGroup(
std::
string name);
165 bool currentSelection(
std::
string& selection) const;
168 QTreeWidgetItem* getGroupItem(const
std::
string& groupName) const;
171 std::
string generateNewGroupName() const;
174 std::array<
float, 4> generateNewColor();
177 static QColor convertToQColor(const ::
fwData::Landmarks::ColorType& color);
180 static
void setColorButtonIcon(QPushButton* button, const QColor& color);
182 QPointer<QTreeWidget> m_treeWidget;
184 QPointer<QWidget> m_groupEditorWidget;
186 QPointer<QSlider> m_sizeSlider;
188 QPointer<QSlider> m_opacitySlider;
190 QPointer<QCheckBox> m_visibilityCheckbox;
192 QPointer<QComboBox> m_shapeSelector;
194 QPointer<QPushButton> m_newGroupButton;
196 QPointer<QPushButton> m_removeButton;
202 float m_defaultLandmarkSize;
205 float m_defaultLandmarkOpacity;
This class is a helper to define the connections of a service and its data.
Defines the service interface managing the editor service for object.
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Contains the representation of the data objects used in the framework.
This service defines a graphical editor to edit landmarks.