1 // Copyright (C) 2010-2022 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 : Anthony Geay
21 #ifndef __pqMEDReaderTimesFlagsWidget_h
22 #define __pqMEDReaderTimesFlagsWidget_h
24 #include "pqPropertyWidget.h"
29 class pqMEDReaderTimesFlagsWidget : public pqPropertyWidget
32 typedef pqPropertyWidget Superclass;
35 // Property Qt used to set/get the times steps with the property link
36 Q_PROPERTY(QList< QList< QVariant> > timeSteps READ getTimeSteps WRITE setTimeSteps)
38 // Property Qt used to set the gorup time steps domain with the property link
39 Q_PROPERTY(QList< QList< QVariant> > timeStepsDomain READ getTimeSteps WRITE setTimeStepsDomain)
41 pqMEDReaderTimesFlagsWidget(
42 vtkSMProxy *smproxy, vtkSMProperty *smproperty, QWidget *parentObject = 0);
43 virtual ~pqMEDReaderTimesFlagsWidget();
47 // Signal emited when selected field changed
48 void timeStepsChanged() const;
52 // Slot called when item is changed
53 virtual void onItemChanged() const;
57 // bidrectionnal property link setter/getter
58 virtual QList< QList< QVariant> > getTimeSteps() const;
59 virtual void setTimeSteps(QList< QList< QVariant> > timeSteps);
62 // Update the domain, eg: reload
63 virtual void setTimeStepsDomain(QList< QList< QVariant> > timeSteps);
67 // Called when field status changed and reload the time steps
68 void UpdateTimeSteps();
71 // Called to create the vect widget, on creation or for a reload
72 void CreateTimesVectWidget();
76 // The Vect time widget
77 VectBoolWidget* TimesVectWidget;
80 // The grid layout contian the vect times widget
81 QGridLayout* TimesVectLayout;
84 // Id of current time step, for caching purpose
88 Q_DISABLE_COPY(pqMEDReaderTimesFlagsWidget)