Slicer  5.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerAnnotationModulePropertyDialog.h
Go to the documentation of this file.
1 #ifndef __qSlicerAnnotationModulePropertyDialog_h
2 #define __qSlicerAnnotationModulePropertyDialog_h
3 
4 #include <QLineEdit>
5 #include "ui_qSlicerAnnotationModulePropertyDialog.h"
6 
8 
9 #include "vtkStdString.h"
10 
15 class vtkMRMLNode;
21 
24 {
25  Q_OBJECT
26 
27 public:
30 
31  const char * GetID() { return this->m_id; }
32 
33 
34  void updateTextFromTable(QString text);
35  void updateValue(QString valueString);
36 
37  void saveStateForUndo(vtkMRMLNode* node);
38  void undo(vtkMRMLNode* node);
39  void SetButtonText(int type);
40  void updateLockUnlockStatus(bool isLock);
41 
42  static void formatValueToChar(const char* format, std::vector<double> vv, QString &valueString );
43 
46  void getAllColor(QColor &qcolor);
48  void updateAllColorButton();
49 
53  void setColorOnAnnotationDisplayNodes(const char *id, QColor qcolor);
54 
55 protected:
57  void updateTypeLabelText();
59  void updateIDLabelText();
61  void updateNameText();
62 protected slots:
63 
64  void onNameLineEditChanged();
67  void onAllColorChanged(QColor qcolor);
69  void onHierarchyPointSizeChanged(double value);
73  void onHierarchyTextScaleChanged(double value);
77  void onHierarchyPointGlyphChanged(QString value);
80 
81 
85 
86  void onCoordinateChanged(QString text);
87 
88  void onPointsTableWidgetChanged(QTableWidgetItem *tableItem);
89  void onPointColorChanged(QColor qcolor);
90  void onPointSelectedColorChanged(QColor qcolor);
91  void onPointSizeChanged(double value);
92  void onPointOpacityChanged(double value);
93  void onPointAmbientChanged(double value);
94  void onPointDiffuseChanged(double value);
95  void onPointSpecularChanged(double value);
96  void onPointGlyphChanged(QString value);
97  void onLineColorChanged(QColor qcolor);
98  void onLineSelectedColorChanged(QColor qcolor);
99  void onLineWidthChanged(double value);
100  void onLineLabelPositionChanged(double value);
101  void onLineLabelVisibilityStateChanged(int state);
103  void onLineMaxTicksChanged(double value);
104  void onLineOpacityChanged(double value);
105  void onLineAmbientChanged(double value);
106  void onLineDiffuseChanged(double value);
107  void onLineSpecularChanged(double value);
108 
110  void onTextChanged();
111  void onRASCoordinatesChanged(double *coords);
112  void onDialogRejected();
113  void onDialogAccepted();
114  void onTextUnselectedColorChanged(QColor qcolor);
115  void onTextSelectedColorChanged(QColor qcolor);
116  void onTextScaleChanged(double value);
117  void onTextOpacityChanged(double value);
118  void onTextVisibilityChanged(bool value);
119 
122 
123 
124 signals:
125  void coordinateChanged(QString, char*);
126  void textChanged();
127  void textChanged(const QString &);
128  void dialogRejected();
129  void dialogAccepted();
130  void doublePropertyChanged(double, char*, int);
131  void colorPropertyChanged(QColor, char*, int);
132  void itemChanged(QTableWidgetItem *);
133  void coordinatesChanged(double*);
134 
135 private:
136 
137  void saveLinesNode(vtkMRMLAnnotationLinesNode* node);
138  void saveControlPoints(vtkMRMLAnnotationControlPointsNode* node);
139  void saveAnnotationNode(vtkMRMLAnnotationNode* node);
140  void undoLinesNode(vtkMRMLAnnotationLinesNode* node);
141  void undoControlPoints(vtkMRMLAnnotationControlPointsNode* node);
142  void undoAnnotationNode(vtkMRMLAnnotationNode* node);
143 
144  // approved code starts here
145  Ui::qSlicerAnnotationModulePropertyDialog ui;
146 
147  vtkStdString m_id;
149 
150  // create the slot and signal connections
151  void createConnection();
152 
153  // initialize the GUI in respect to values from the logic
154  void initialize();
155 
156  // lock/unlock the complete interface
157  void lockUnlockInterface(bool lock);
158 };
159 
160 #endif
void updateValue(QString valueString)
void onLineSpecularChanged(double value)
void onHierarchyPointGlyphTypeDefaultButtonClicked()
reset the hierarchy point glyph combo box to default glyph type
void onLineLabelVisibilityStateChanged(int state)
qSlicerAnnotationModulePropertyDialog(const char *id, vtkSlicerAnnotationModuleLogic *logic)
void onPointSpecularChanged(double value)
void onPointColorChanged(QColor qcolor)
void onPointsTableWidgetChanged(QTableWidgetItem *tableItem)
void onHierarchyTextScaleDefaultButtonClicked()
reset the hierarchy text scale slider to default value
void onTextUnselectedColorChanged(QColor qcolor)
void updateTypeLabelText()
update the ui.typeLabel from the node with m_id
void saveStateForUndo(vtkMRMLNode *node)
void onPointDiffuseChanged(double value)
void onHierarchyTextScaleChanged(double value)
change the text size for all annotations in this hierarchy
void onHierarchyPointSizeDefaultButtonClicked()
reset the hierarchy point size slider to default value
void onHierarchyPointSizeChanged(double value)
change point size for all annotations in this hierarchy
void onRASCoordinatesChanged(double *coords)
static void formatValueToChar(const char *format, std::vector< double > vv, QString &valueString)
void onTextSelectedColorChanged(QColor qcolor)
void itemChanged(QTableWidgetItem *)
void updateIDLabelText()
update the ui.idLabel from the node with m_id
void onHierarchyPointGlyphChanged(QString value)
change the glyph type for all annotations in this hierarchy
void onPointGlyphChanged(QString value)
MRML node to represent a fiducial in the Annotations module - deprecated.
void colorPropertyChanged(QColor, char *, int)
void onLineMaxTicksChanged(double value)
void onPointAmbientChanged(double value)
void updateAllColorButton()
use the GetAllColor method and set the all color button
void updateNameText()
update the ui.nameLineEdit from the node with m_id
void coordinateChanged(QString, char *)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
void setColorOnAnnotationDisplayNodes(const char *id, QColor qcolor)
void onLineLabelPositionChanged(double value)
void onLineSelectedColorChanged(QColor qcolor)
void doublePropertyChanged(double, char *, int)
void onPointSelectedColorChanged(QColor qcolor)
void onPointOpacityChanged(double value)
void onLineColorChanged(QColor qcolor)