AngleSpinBox.hpp   AngleSpinBox.hpp 
skipping to change at line 61 skipping to change at line 61
NormalPlus, //!< positive values have '+' prefix, negati ve values have '-' prefix. NormalPlus, //!< positive values have '+' prefix, negati ve values have '-' prefix.
Longitude, //!< positive values have 'E' prefix, negati ve values have 'W' prefix. Longitude, //!< positive values have 'E' prefix, negati ve values have 'W' prefix.
Latitude, //!< positive values have 'N' prefix, negati ve values have 'S' prefix. Latitude, //!< positive values have 'N' prefix, negati ve values have 'S' prefix.
Unknown Unknown
}; };
AngleSpinBox(QWidget* parent=0, DisplayFormat format=DMSSymbols, Pre fixType prefix=Normal); AngleSpinBox(QWidget* parent=0, DisplayFormat format=DMSSymbols, Pre fixType prefix=Normal);
~AngleSpinBox(); ~AngleSpinBox();
// QAbstractSpinBox virtual members // QAbstractSpinBox virtual members
void stepBy (int steps); virtual void stepBy(int steps);
QValidator::State validate (QString& input, int& pos) const; virtual QValidator::State validate(QString& input, int& pos) const;
//! Get the angle held in the AngleSpinBox //! Get the angle held in the AngleSpinBox
//! @return the angle in radians //! @return the angle in radians
double valueRadians(); double valueRadians();
//! Get the angle held in the AngleSpinBox //! Get the angle held in the AngleSpinBox
//! @return the angle in degrees //! @return the angle in degrees
double valueDegrees(); double valueDegrees();
//! Get the angle held in the AngleSpinBox //! Set the number of decimal places to express float values to (e.g
//! @return the angle as formatted according to the current format a . seconds in DMSLetters format).
nd flags
QString text();
//! Convert a string value to a angle in radians.
//! This function can be used to validate a string as expressing an
angle. Accepted
//! are any formats which the AngleSpinBox understands.
//! @param input the string value to be converted / validated.
//! @param state a pointer to a QValidator::State value which is set
according to the validation.
//! @param prefix the kind of prefix to use for conversion.
//! @return the value of the angle expressed in input in radians.
double stringToDouble(QString input, QValidator::State* state, Prefi
xType prefix=Unknown) const;
//! Set the number of decimal places to express float values to (e.g
. seconds in DMSLetters format)
//! @param places the number of decimal places to use. //! @param places the number of decimal places to use.
void setDecimals(int places) { decimalPlaces = places; } void setDecimals(int places) { decimalPlaces = places; }
//! Set the number of decimal places to express float values to (e.g . seconds in DMSLetters format) //! Get the number of decimal places to express float values to (e.g . seconds in DMSLetters format).
//! @return the number of decimal places used. //! @return the number of decimal places used.
int decimals() { return decimalPlaces; } int decimals() { return decimalPlaces; }
//! Set the display format //! Set the display format.
//! @param format the new format to use //! @param format the new format to use.
void setDisplayFormat(DisplayFormat format) { angleSpinBoxFormat=for mat; formatText(); } void setDisplayFormat(DisplayFormat format) { angleSpinBoxFormat=for mat; formatText(); }
//! Get the current display format //! Get the current display format.
//! @return the current DisplayFormat //! @return the current DisplayFormat.
DisplayFormat displayFormat() { return angleSpinBoxFormat; } DisplayFormat displayFormat() { return angleSpinBoxFormat; }
//! Set the prefix type //! Set the prefix type.
//! @param prefix the new prefix type to use //! @param prefix the new prefix type to use.
void setPrefixType(PrefixType prefix) { currentPrefixType=prefix; fo rmatText(); } void setPrefixType(PrefixType prefix) { currentPrefixType=prefix; fo rmatText(); }
//! Get the current display format //! Get the current display format.
//! @return the current DisplayFormat //! @return the current DisplayFormat.
PrefixType prefixType() { return currentPrefixType; } PrefixType prefixType() { return currentPrefixType; }
public slots: public slots:
void clear(); //! Set the value to default 0 angle.
virtual void clear();
//! Set the value of the spin box in radians. //! Set the value of the spin box in radians.
//! @param radians the value to set, in radians //! @param radians the value to set, in radians.
void setRadians(double radians); void setRadians(double radians);
//! Set the value of the spin box in decimal degrees. //! Set the value of the spin box in decimal degrees.
//! @param degrees the value to set, in decimal degrees //! @param degrees the value to set, in decimal degrees.
void setDegrees(double degrees); void setDegrees(double degrees);
signals: signals:
//! emitted when the value changes. //! Emitted when the value changes.
void valueChanged(); void valueChanged();
protected: protected:
StepEnabled stepEnabled () const; virtual StepEnabled stepEnabled() const;
private slots: private slots:
//! updates radAngle (internal representation of the angle) and call s formatText //! Updates radAngle (internal representation of the angle) and call s formatText
void updateValue(void); void updateValue(void);
private: private:
//! Convert a string value to an angle in radians.
//! This function can be used to validate a string as expressing an
angle. Accepted
//! are any formats which the AngleSpinBox understands.
//! @param input the string value to be converted / validated.
//! @param state a pointer to a QValidator::State value which is set
according to the validation.
//! @param prefix the kind of prefix to use for conversion.
//! @return the value of the angle expressed in input in radians.
double stringToDouble(QString input, QValidator::State* state, Prefi
xType prefix=Unknown) const;
//! @enum AngleSpinboxSection //! @enum AngleSpinboxSection
enum AngleSpinboxSection enum AngleSpinboxSection
{ {
SectionPrefix, //! Section of the S/W or E/ W or +/- SectionPrefix, //! Section of the S/W or E/ W or +/-
SectionDegreesHours, //! Section of the degree or hours SectionDegreesHours, //! Section of the degree or hours
SectionMinutes, //! Section of the minutes ( of degree or of hours) SectionMinutes, //! Section of the minutes ( of degree or of hours)
SectionSeconds, //! Section of the seconds ( of degree or of hours) SectionSeconds, //! Section of the seconds ( of degree or of hours)
SectionNone //! No matching sect ion, e.g. between 2 sections SectionNone //! No matching sect ion, e.g. between 2 sections
}; };
 End of changes. 15 change blocks. 
36 lines changed or deleted 32 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/