1 /** @file gsGeometryDialog.h
2 
3     @brief This file provides declaration of the gsGeometryDialog for Axel modeler.
4 
5     This file is part of the G+Smo library.
6 
7     This Source Code Form is subject to the terms of the Mozilla Public
8     License, v. 2.0. If a copy of the MPL was not distributed with this
9     file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11     Author(s): A. Mantzaflaris
12 */
13 
14 #pragma once
15 
16 
17 #include <axlGui/axlInspectorObjectFactory.h>
18 #include <axlGui/axlInspectorToolFactory.h>
19 
20 #include "gsAxelPluginExport.h"
21 
22 
23 class dtkAbstractData;
24 class axlAbstractData;
25 class QDialogEditCP;
26 
27 class gsGeometryDialogPrivate;
28 
29 class GSAXELPLUGIN_EXPORT gsGeometryDialog : public axlInspectorObjectInterface
30 {
31     Q_OBJECT
32 
33 public:
34     gsGeometryDialog(QWidget *parent = 0);
35     ~gsGeometryDialog(void);
36 
37     QSize sizeHint(void) const;
38 
39     static bool registered(void);
40 
41     axlAbstractData * data();
42 
43     int selectedCp();
44 
45 signals:
46 
47     void colorChanged(QColor color,  dtkAbstractData *data);
48 
49     void dataChangedByShader(dtkAbstractData *data, QString isophoteShaderXml);
50     void dataChangedByOpacity(dtkAbstractData *data, double opacity);
51 
52     void dataChangedByColor(dtkAbstractData *data, double red, double green, double blue);
53     void dataChangedByGeometry(dtkAbstractData *data);
54 
55     void update(void);
56 
57     void samplingChanged(void);
58 
59     void dataInserted(axlAbstractData* data);
60 
61 public slots:
62     void setData(dtkAbstractData *data);
63 
64     void onColorChanged(QColor color);
65     void onOpacityChanged(int opacity);
66 
67     void onSamplingDataChanged_u(int numSamples);
68     void onSamplingDataChanged_v(int numSamples);
69     void onSamplingDataChanged_w(int numSamples);
70 
71     void onIndexSelected(int i);
72 
73     void openShader(void);
74     void onShaderStateChanged(bool isShader);
75     void onShaderChanged(QString);
76     void onLineEditShaderChanged(QString);
77 
78     void showBasis(void);
79 
80     void saveGeometry(void);
81 
82     void refineGeometry(void);
83 
84     void insertKnot(void);
85 
86     void onEditCP(void);
87 
88 
89     /* Joker
90     void jokerPlay(void);
91     //*/
92 
93     // void onShowCurrentPoint(double u, double v);
94     // void onMoveCurrentPoint(double u, double v);
95     // void onHideCurrentPoint(double u, double v);
96 
97 private:
98     void updateText();
99 
100     void initComboBoxShaderValue(void);
101     void initWidget(void);
102     int initOpacityValue(void);
103     QString initShaderValue(void);
104     QColor initColorValue(void);
105 
106 private:
107 
108     gsGeometryDialogPrivate *d;
109 };
110 
111 axlInspectorObjectInterface *creategsGeometryDialog(void);
112 
113