Slicer  4.11
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;
22 
25 {
26  Q_OBJECT
27 
28 public:
31 
32  const char * GetID() { return this->m_id; }
33 
34 
35  void updateTextFromTable(QString text);
36  void updateValue(QString valueString);
37 
38  void saveStateForUndo(vtkMRMLNode* node);
39  void undo(vtkMRMLNode* node);
40  void SetButtonText(int type);
41  void updateLockUnlockStatus(bool isLock);
42 
43  static void formatValueToChar(const char* format, std::vector<double> vv, QString &valueString );
44 
47  void getAllColor(QColor &qcolor);
49  void updateAllColorButton();
50 
54  void setColorOnAnnotationDisplayNodes(const char *id, QColor qcolor);
55 
56 protected:
58  void updateTypeLabelText();
60  void updateIDLabelText();
62  void updateNameText();
63 protected slots:
64 
65  void onNameLineEditChanged();
68  void onAllColorChanged(QColor qcolor);
70  void onHierarchyPointSizeChanged(double value);
74  void onHierarchyTextScaleChanged(double value);
78  void onHierarchyPointGlyphChanged(QString value);
81 
82 
86 
87  void onCoordinateChanged(QString text);
88 
89  void onPointsTableWidgetChanged(QTableWidgetItem *tableItem);
90  void onPointColorChanged(QColor qcolor);
91  void onPointSelectedColorChanged(QColor qcolor);
92  void onPointSizeChanged(double value);
93  void onPointOpacityChanged(double value);
94  void onPointAmbientChanged(double value);
95  void onPointDiffuseChanged(double value);
96  void onPointSpecularChanged(double value);
97  void onPointGlyphChanged(QString value);
98  void onLineColorChanged(QColor qcolor);
99  void onLineSelectedColorChanged(QColor qcolor);
100  void onLineWidthChanged(double value);
101  void onLineLabelPositionChanged(double value);
102  void onLineLabelVisibilityStateChanged(int state);
104  void onLineMaxTicksChanged(double value);
105  void onLineOpacityChanged(double value);
106  void onLineAmbientChanged(double value);
107  void onLineDiffuseChanged(double value);
108  void onLineSpecularChanged(double value);
109 
111  void onTextChanged();
112  void onRASCoordinatesChanged(double *coords);
113  void onDialogRejected();
114  void onDialogAccepted();
115  void onTextUnselectedColorChanged(QColor qcolor);
116  void onTextSelectedColorChanged(QColor qcolor);
117  void onTextScaleChanged(double value);
118  void onTextOpacityChanged(double value);
119  void onTextVisibilityChanged(bool value);
120 
123 
124 
125 signals:
126  void coordinateChanged(QString, char*);
127  void textChanged();
128  void textChanged(const QString &);
129  void dialogRejected();
130  void dialogAccepted();
131  void doublePropertyChanged(double, char*, int);
132  void colorPropertyChanged(QColor, char*, int);
133  void itemChanged(QTableWidgetItem *);
134  void coordinatesChanged(double*);
135 
136 private:
137 
138  void saveLinesNode(vtkMRMLAnnotationLinesNode* node);
139  void saveControlPoints(vtkMRMLAnnotationControlPointsNode* node);
140  void saveAnnotationNode(vtkMRMLAnnotationNode* node);
141  void undoLinesNode(vtkMRMLAnnotationLinesNode* node);
142  void undoControlPoints(vtkMRMLAnnotationControlPointsNode* node);
143  void undoAnnotationNode(vtkMRMLAnnotationNode* node);
144 
145  // approved code starts here
146  Ui::qSlicerAnnotationModulePropertyDialog ui;
147 
148  vtkStdString m_id;
150 
151  // create the slot and signal connections
152  void createConnection();
153 
154  // initialize the GUI in respect to values from the logic
155  void initialize();
156 
157  // lock/unlock the complete interface
158  void lockUnlockInterface(bool lock);
159 };
160 
161 #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)