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 #include "ui_MEDReaderTimeModeWidget.h"
22 #include "pqMEDReaderTimeModeWidget.h"
24 #include "pqCoreUtilities.h"
25 //-----------------------------------------------------------------------------
27 class pqMEDReaderTimeModeWidget::pqInternals : public Ui::MEDReaderTimeModeWidget
30 pqInternals(pqMEDReaderTimeModeWidget* self)
36 //-----------------------------------------------------------------------------
37 pqMEDReaderTimeModeWidget::pqMEDReaderTimeModeWidget(
38 vtkSMProxy *smproxy, vtkSMProperty *smproperty, QWidget *parentObject)
39 : Superclass(smproxy, parentObject), Internals(new pqMEDReaderTimeModeWidget::pqInternals(this))
41 this->setShowLabel(false);
42 this->ModeEnabled = false;
44 this->addPropertyLink(this, "ModeEnabled" , SIGNAL(modeEnabled(bool)), smproperty);
45 QObject::connect(this->Internals->modeMode, SIGNAL(toggled(bool)),
46 this, SLOT(setModeEnabled(bool)));
49 //-----------------------------------------------------------------------------
50 pqMEDReaderTimeModeWidget::~pqMEDReaderTimeModeWidget()
54 //-----------------------------------------------------------------------------
55 bool pqMEDReaderTimeModeWidget::isModeEnabled() const
57 return this->ModeEnabled;
60 //-----------------------------------------------------------------------------
61 void pqMEDReaderTimeModeWidget::setModeEnabled(bool enable)
63 this->ModeEnabled = enable;
64 this->Internals->modeMode->setChecked(enable);
65 this->Internals->stdMode->setChecked(!enable);
66 emit modeEnabled(enable);