FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
qtgui::AbstractLengthEditor Class Referenceabstract

Abstract base class for all length ([L]) editors that are aware of the current measurement system (metric or imperial) More...

#include <qttools/gui/abstract_length_editor.h>

Inheritance diagram for qtgui::AbstractLengthEditor:
qtgui::AbstractQuantityEditor qtgui::LengthDoubleSpinBox

Public Types

enum  MetricUnit { MeterUnit, CentimeterUnit, MillimeterUnit }
 
enum  ImperialUnit { InchUnit, FootUnit, YardUnit }
 

Public Member Functions

 AbstractLengthEditor ()
 
double qtyValue () const Q_DECL_OVERRIDE
 
void setQtyValue (double v) Q_DECL_OVERRIDE
 
virtual double length () const =0
 Length in millimeter (mm) More...
 
virtual void setLength (double v)=0
 Set the length in millimeter (mm) to be edited. More...
 
MetricUnit preferredMetricUnit () const
 
virtual void setPreferredMetricUnit (MetricUnit unit)
 
ImperialUnit preferredImperialUnit () const
 
virtual void setPreferredImperialUnit (ImperialUnit unit)
 
- Public Member Functions inherited from qtgui::AbstractQuantityEditor
 AbstractQuantityEditor ()
 
virtual ~AbstractQuantityEditor ()
 
virtual void updateEditor (QLocale::MeasurementSystem newSys)
 

Static Public Member Functions

static QVector< MetricUnitallMetricUnits ()
 
static QVector< ImperialUnitallImperialUnits ()
 
static QString unitText (MetricUnit unit)
 
static QString unitText (ImperialUnit unit)
 
static double asMetricLength (double len, MetricUnit unit)
 
static double asImperialLength (double len, ImperialUnit unit)
 

Additional Inherited Members

- Protected Member Functions inherited from qtgui::AbstractQuantityEditor
QLocale::MeasurementSystem measurementSystem () const
 

Detailed Description

Abstract base class for all length ([L]) editors that are aware of the current measurement system (metric or imperial)

length() and setLength() use values in millimeter (mm).

Member Enumeration Documentation

Enumerator
InchUnit 
FootUnit 
YardUnit 
Enumerator
MeterUnit 
CentimeterUnit 
MillimeterUnit 

Constructor & Destructor Documentation

qtgui::AbstractLengthEditor::AbstractLengthEditor ( )

Member Function Documentation

QVector< AbstractLengthEditor::ImperialUnit > qtgui::AbstractLengthEditor::allImperialUnits ( )
static
QVector< AbstractLengthEditor::MetricUnit > qtgui::AbstractLengthEditor::allMetricUnits ( )
static
double qtgui::AbstractLengthEditor::asImperialLength ( double  len,
ImperialUnit  unit 
)
static
double qtgui::AbstractLengthEditor::asMetricLength ( double  len,
MetricUnit  unit 
)
static
double qtgui::AbstractLengthEditor::length ( ) const
pure virtual

Length in millimeter (mm)

Implemented in qtgui::LengthDoubleSpinBox.

AbstractLengthEditor::ImperialUnit qtgui::AbstractLengthEditor::preferredImperialUnit ( ) const

Length unit used when the imperial measurement system is currently active

AbstractLengthEditor::MetricUnit qtgui::AbstractLengthEditor::preferredMetricUnit ( ) const

Length unit used when the metric measurement system is currently active

double qtgui::AbstractLengthEditor::qtyValue ( ) const
virtual
void qtgui::AbstractLengthEditor::setLength ( double  v)
pure virtual

Set the length in millimeter (mm) to be edited.

Implemented in qtgui::LengthDoubleSpinBox.

void qtgui::AbstractLengthEditor::setPreferredImperialUnit ( ImperialUnit  unit)
virtual

Set the length unit to be used when the imperial measurement system is currently active

void qtgui::AbstractLengthEditor::setPreferredMetricUnit ( MetricUnit  unit)
virtual

Set the length unit to be used when the metric measurement system is currently active

void qtgui::AbstractLengthEditor::setQtyValue ( double  v)
virtual
QString qtgui::AbstractLengthEditor::unitText ( MetricUnit  unit)
static
QString qtgui::AbstractLengthEditor::unitText ( ImperialUnit  unit)
static

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