Source
StandardValuePanel(casacore::String paramName, const casacore::RecordInterface& paramRecord);
//# ValuePanel.qo.h: Panel for inputing a data value.
//# Copyright (C) 2008
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//# $Id: $
namespace casa {
class RecordItemPanel;
// Abstract parent class of any panels that accept user input for values.
class ValuePanel : public QWidget {
Q_OBJECT
public:
// Constructor that takes the parameter name and a reference to the
// record detailing its properties.
ValuePanel(casacore::String paramName, const casacore::RecordInterface& paramRecord);
// Destructor.
virtual ~ValuePanel();
// Abstract Methods //
// Returns whether or not the currently inputted value is true or not.
// If invalid, the casacore::String contains the reason(s), newline-separated.
virtual pair<bool, casacore::String> valueIsValid() = 0;
// Returns the type of the current value.
virtual DataType type() = 0;
// Inserts the entered value into the given record with the given name.
virtual void getValue(casacore::String name, casacore::Record& record) = 0;
// Sets the current value to the one given in the record with the given id.