1 // Copyright (C) 2014-2015 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Roman NIKOLAEV
21 /*========================================================================*/
22 #ifndef __pqArraysEditorPropertyWidget_h
23 #define __pqArraysEditorPropertyWidget_h
25 #include <pqPropertyWidget.h>
26 #include <vtkSmartPointer.h>
29 class vtkSMPropertyGroup;
30 class vtkEventQtSlotConnect;
38 /// pqArraysEditorPropertyWidget is the pqPropertyWidget used to edit
39 /// arrays and array's components.
40 class VTK_EXPORT pqArraysEditorPropertyWidget : public pqPropertyWidget {
44 Q_PROPERTY(QList<QVariant> arrayInfo
47 NOTIFY arraysInfoChanged)
49 Q_PROPERTY(QList<QVariant> componentsInfo
51 WRITE setComponentsInfo
52 NOTIFY componentsInfoChanged)
55 typedef pqPropertyWidget Superclass;
57 pqArraysEditorPropertyWidget(vtkSMProxy* proxy, vtkSMPropertyGroup* smgroup, QWidget* parent=0);
58 virtual ~pqArraysEditorPropertyWidget();
60 /// Get/Set the arrays Info
61 QList<QVariant> arraysInfo() const;
62 void setArraysInfo(const QList<QVariant>&);
64 /// Get/Set the arrays Info
65 QList<QVariant> componentsInfo() const;
66 void setComponentsInfo(const QList<QVariant>&);
70 /// Fired when the arrays Info is changes.
71 void arraysInfoChanged();
72 void componentsInfoChanged();
75 /// called whenever the internal model's data changes.
76 void onDataChanged(const QModelIndex& topleft, const QModelIndex& btmright);
77 void onComponentsEdit();
79 /// called whenever the input changed.
80 void onInputDataChanged();
83 void updateArraysList();
87 vtkSmartPointer<vtkSMPropertyGroup> myPropertyGroup;
88 vtkEventQtSlotConnect* myConnection;
89 unsigned long myDataTime;
92 pqArraysModel* myArraysModel;
93 QTableView* myArraysTable;
96 #endif // __pqArraysEditorPropertyWidget_h