Mapper  0.9.0
API documentation
Public Types | Public Member Functions | List of all members
OpenOrienteering::CRSTemplates::IntRangeParameter Class Reference

CRSTemplate integer parameter, with values from an integer range. More...

#include <crs_template_implementation.h>

Inheritance diagram for OpenOrienteering::CRSTemplates::IntRangeParameter:
Inheritance graph
[legend]
Collaboration diagram for OpenOrienteering::CRSTemplates::IntRangeParameter:
Collaboration graph
[legend]

Public Types

using OutputList = std::vector< std::pair< int, int > >
 
- Public Types inherited from OpenOrienteering::CRSTemplateParameter
using WidgetObserver = CRSParameterWidgetObserver
 

Public Member Functions

 IntRangeParameter (const QString &id, const QString &name, int min_value, int max_value)
 
 IntRangeParameter (const QString &id, const QString &name, int min_value, int max_value, OutputList &&outputs)
 
QWidgetcreateEditor (WidgetObserver &observer) const override
 Creates a widget which can be used to edit the value. More...
 
std::vector< QStringspecValues (const QString &edit_value) const override
 Return a list of actual specification parameters values from a value in storage format. More...
 
QString value (const QWidget *edit_widget) const override
 Return the widget's value(s) in form of a single string. More...
 
void setValue (QWidget *edit_widget, const QString &value) override
 Sets the widget to a stored value. More...
 
- Public Member Functions inherited from OpenOrienteering::CRSTemplateParameter
 CRSTemplateParameter (const QString &id, const QString &name)
 Constructs a new parameter with the given identifier and name. More...
 
 CRSTemplateParameter (const CRSTemplateParameter &)=delete
 
 CRSTemplateParameter (CRSTemplateParameter &&)=delete
 
virtual ~CRSTemplateParameter ()
 Destructor. More...
 
CRSTemplateParameteroperator= (const CRSTemplateParameter &)=delete
 
CRSTemplateParameteroperator= (CRSTemplateParameter &&)=delete
 
QString id () const
 Returns the parameter's permanent unique ID. More...
 
QString name () const
 Returns the parameter's display name. More...
 

Detailed Description

CRSTemplate integer parameter, with values from an integer range.

Member Typedef Documentation

◆ OutputList

using OpenOrienteering::CRSTemplates::IntRangeParameter::OutputList = std::vector< std::pair<int, int> >

Constructor & Destructor Documentation

◆ IntRangeParameter() [1/2]

OpenOrienteering::CRSTemplates::IntRangeParameter::IntRangeParameter ( const QString id,
const QString name,
int  min_value,
int  max_value 
)

◆ IntRangeParameter() [2/2]

OpenOrienteering::CRSTemplates::IntRangeParameter::IntRangeParameter ( const QString id,
const QString name,
int  min_value,
int  max_value,
OutputList &&  outputs 
)

Member Function Documentation

◆ createEditor()

QWidget * OpenOrienteering::CRSTemplates::IntRangeParameter::createEditor ( WidgetObserver widget_observer) const
overridevirtual

Creates a widget which can be used to edit the value.

The widget should be simple in the sense that it can be used as a field in a QFormLayout, together with the parameter's label.

Implements OpenOrienteering::CRSTemplateParameter.

◆ setValue()

void OpenOrienteering::CRSTemplates::IntRangeParameter::setValue ( QWidget edit_widget,
const QString value 
)
overridevirtual

Sets the widget to a stored value.

See also
CRSTemplateParameter::value

Implements OpenOrienteering::CRSTemplateParameter.

◆ specValues()

std::vector< QString > OpenOrienteering::CRSTemplates::IntRangeParameter::specValues ( const QString edit_value) const
overridevirtual

Return a list of actual specification parameters values from a value in storage format.

The default implementation returns a vector which contains just the single edit_value.

Reimplemented from OpenOrienteering::CRSTemplateParameter.

◆ value()

QString OpenOrienteering::CRSTemplates::IntRangeParameter::value ( const QWidget edit_widget) const
overridevirtual

Return the widget's value(s) in form of a single string.

This string can be stored and used for restoring the widget.

See also
CRSTemplateParameter::setValue

Implements OpenOrienteering::CRSTemplateParameter.


The documentation for this class was generated from the following files: