Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerAnnotationModulePropertyDialogWIP.h
Go to the documentation of this file.
1 #ifndef __qSlicerAnnotationModulePropertyDialog_h
2 #define __qSlicerAnnotationModulePropertyDialog_h
3 
4 #include <QLineEdit>
5 #include "ui_qSlicerAnnotationModulePropertyDialogNew.h"
6 
8 
9 #include "vtkStdString.h"
10 
15 class vtkMRMLNode;
21 
23 class qSlicerAnnotationModulePropertyDialog : public QDialog
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 TurnColorArrayToQColor(double* color, QColor &qcolor);
43  static void TurnQColorToColorArray(double* color, QColor &qcolor);
44  static void FormatValueToChar(const char* format, std::vector<double> vv, QString &valueString );
45 
46 
47 protected:
48 
49 protected slots:
50 
51  void onCoordinateChanged(QString text);
52 
53  //void onPointsTableWidgetChanged(QTableWidgetItem *tableItem);
54  void onPointColorChanged(QColor qcolor);
55  void onPointSelectedColorChanged(QColor qcolor);
56  void onPointSizeChanged(double value);
57  void onPointOpacityChanged(double value);
58  void onPointAmbientChanged(double value);
59  void onPointDiffuseChanged(double value);
60  void onPointSpecularChanged(double value);
61  void onPointGlyphChanged(QString value);
62  void onLineColorChanged(QColor qcolor);
63  void onLineSelectedColorChanged(QColor qcolor);
64  void onLineWidthChanged(double value);
65  void onLineLabelPositionChanged(double value);
66  void onLineLabelVisibilityStateChanged(int state);
68  void onLineMaxTicksChanged(double value);
69  void onLineOpacityChanged(double value);
70  void onLineAmbientChanged(double value);
71  void onLineDiffuseChanged(double value);
72  void onLineSpecularChanged(double value);
73 
74  void onTextChanged();
75  void onDialogRejected();
76  void onDialogAccepted();
77  void onTextUnselectedColorChanged(QColor qcolor);
78  void onTextSelectedColorChanged(QColor qcolor);
79  void onTextScaleChanged(double value);
80  void onTextOpacityChanged(double value);
81 
84 
85 
86 signals:
87  void coordinateChanged(QString, char*);
88  void textChanged();
89  void textChanged(const QString &);
90  void dialogRejected();
91  void dialogAccepted();
92  void doublePropertyChanged(double, char*, int);
93  void colorPropertyChanged(QColor, char*, int);
94  //void itemChanged(QTableWidgetItem *);
95 
96 private:
97 
98  void SaveLinesNode(vtkMRMLAnnotationLinesNode* node);
99  void SaveControlPoints(vtkMRMLAnnotationControlPointsNode* node);
100  void SaveAnnotationNode(vtkMRMLAnnotationNode* node);
101  void UndoLinesNode(vtkMRMLAnnotationLinesNode* node);
102  void UndoControlPoints(vtkMRMLAnnotationControlPointsNode* node);
103  void UndoAnnotationNode(vtkMRMLAnnotationNode* node);
104 
105  // approved code starts here
106  Ui::qSlicerAnnotationModulePropertyDialogNew ui;
107 
108  vtkStdString m_id;
110 
111  // create the slot and signal connections
112  void createConnection();
113 
114  // initialize the GUI in respect to values from the logic
115  void initialize();
116 
117  // lock/unlock the complete interface
118  void lockUnlockInterface(bool lock);
119 };
120 
121 #endif
void updateValue(QString valueString)
void onLineSpecularChanged(double value)
void onLineLabelVisibilityStateChanged(int state)
qSlicerAnnotationModulePropertyDialog(const char *id, vtkSlicerAnnotationModuleLogic *logic)
void onPointSpecularChanged(double value)
void onPointColorChanged(QColor qcolor)
static void TurnColorArrayToQColor(double *color, QColor &qcolor)
void onTextUnselectedColorChanged(QColor qcolor)
void onPointDiffuseChanged(double value)
static void TurnQColorToColorArray(double *color, QColor &qcolor)
void onTextSelectedColorChanged(QColor qcolor)
void onPointGlyphChanged(QString value)
void SaveStateForUndo(vtkMRMLNode *node)
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 coordinateChanged(QString, char *)
static void FormatValueToChar(const char *format, std::vector< double > vv, QString &valueString)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
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)