Slicer  4.8
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;
22 
24 class qSlicerAnnotationModulePropertyDialog : public QDialog
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 TurnColorArrayToQColor(double* color, QColor &qcolor);
44  static void TurnQColorToColorArray(double* color, QColor &qcolor);
45  static void FormatValueToChar(const char* format, std::vector<double> vv, QString &valueString );
46 
47 
48 protected:
49 
50 protected slots:
51 
52  void onCoordinateChanged(QString text);
53 
54  //void onPointsTableWidgetChanged(QTableWidgetItem *tableItem);
55  void onPointColorChanged(QColor qcolor);
56  void onPointSelectedColorChanged(QColor qcolor);
57  void onPointSizeChanged(double value);
58  void onPointOpacityChanged(double value);
59  void onPointAmbientChanged(double value);
60  void onPointDiffuseChanged(double value);
61  void onPointSpecularChanged(double value);
62  void onPointGlyphChanged(QString value);
63  void onLineColorChanged(QColor qcolor);
64  void onLineSelectedColorChanged(QColor qcolor);
65  void onLineWidthChanged(double value);
66  void onLineLabelPositionChanged(double value);
67  void onLineLabelVisibilityStateChanged(int state);
69  void onLineMaxTicksChanged(double value);
70  void onLineOpacityChanged(double value);
71  void onLineAmbientChanged(double value);
72  void onLineDiffuseChanged(double value);
73  void onLineSpecularChanged(double value);
74 
75  void onTextChanged();
76  void onDialogRejected();
77  void onDialogAccepted();
78  void onTextUnselectedColorChanged(QColor qcolor);
79  void onTextSelectedColorChanged(QColor qcolor);
80  void onTextScaleChanged(double value);
81  void onTextOpacityChanged(double value);
82 
85 
86 
87 signals:
88  void coordinateChanged(QString, char*);
89  void textChanged();
90  void textChanged(const QString &);
91  void dialogRejected();
92  void dialogAccepted();
93  void doublePropertyChanged(double, char*, int);
94  void colorPropertyChanged(QColor, char*, int);
95  //void itemChanged(QTableWidgetItem *);
96 
97 private:
98 
99  void SaveLinesNode(vtkMRMLAnnotationLinesNode* node);
100  void SaveControlPoints(vtkMRMLAnnotationControlPointsNode* node);
101  void SaveAnnotationNode(vtkMRMLAnnotationNode* node);
102  void UndoLinesNode(vtkMRMLAnnotationLinesNode* node);
103  void UndoControlPoints(vtkMRMLAnnotationControlPointsNode* node);
104  void UndoAnnotationNode(vtkMRMLAnnotationNode* node);
105 
106  // approved code starts here
107  Ui::qSlicerAnnotationModulePropertyDialogNew ui;
108 
109  vtkStdString m_id;
111 
112  // create the slot and signal connections
113  void createConnection();
114 
115  // initialize the GUI in respect to values from the logic
116  void initialize();
117 
118  // lock/unlock the complete interface
119  void lockUnlockInterface(bool lock);
120 };
121 
122 #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:135
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)