TwiceAsNice  2019-02-18
Public Slots | Public Member Functions | Properties | Private Slots | Private Member Functions | Private Attributes | List of all members
ScaledSpinBox Class Reference

An integer spinbox with scale support to represent double values Expects a vector of string with the scale labels plus a vector of doubles with the respective scale value. Both vectors must have same size. Max and Min can be also specified. The scale will be accomodated according to these values. e.g. +LABEL=["s", "ms","us", "ns"] +SCALE=[1,0.001, 0.000001, 0.000000001] +MAX=1.5 +MIN=0.01. More...

#include <ScaledSpinBox.h>

Inheritance diagram for ScaledSpinBox:
Inheritance graph
Collaboration diagram for ScaledSpinBox:
Collaboration graph

Public Slots

void slot_setMin (Nice::Double d)
 
void slot_setMax (Nice::Double d)
 
void slot_setStep (Nice::Int step)
 
virtual void slot_setLabels (std::vector< std::string > _vec)
 
void slot_setScale (std::vector< Nice::Double > _scale)
 
void slot_setSignInvert (bool state)
 
void slot_setMin (Nice::Double d)
 
void slot_setMax (Nice::Double d)
 
void slot_setStep (Nice::Int step)
 
virtual void slot_setLabels (std::vector< std::string > _vec)
 
void slot_setScale (std::vector< Nice::Double > _scale)
 
void slot_setSignInvert (bool state)
 
void slot_setMin (Nice::Double d)
 
void slot_setMax (Nice::Double d)
 
void slot_setStep (Nice::Int step)
 
virtual void slot_setLabels (std::vector< std::string > _vec)
 
void slot_setScale (std::vector< Nice::Double > _scale)
 
void slot_setSignInvert (bool state)
 

Public Member Functions

void setHintMsg ()
 
void updateLabels ()
 
void updateSignButton ()
 
 ScaledSpinBox (QWidget *parent, bool _connect=false)
 Constructor. More...
 
void setHintMsg ()
 
void updateLabels ()
 
void updateSignButton ()
 
 ScaledSpinBox (QWidget *parent, bool _connect=false)
 Constructor. More...
 
void setHintMsg ()
 
void updateLabels ()
 
void updateSignButton ()
 
 ScaledSpinBox (QWidget *parent, bool _connect=false)
 Constructor. More...
 
- Public Member Functions inherited from Nice::BridgeItem
void detach (QWidget *_widget)
 
bool getSynchStatus () const
 Get the sync status. More...
 
const QString & getNodeName ()
 
virtual void setState (CompletionState _state)
 Set the state of the widget (either Nice::OK or Nice::Unsynched ). More...
 
virtual void updateGUI (const ::Nice::Any &)
 Update the widgets data field from the connected Property. More...
 
virtual void setLabels (std::vector< std::string > _vec)
 Set the Labels This function has to be implemented in the derived widget class. More...
 
void setLabel (const QString &_text="")
 Set the text label of this widget. More...
 
QString getLabel ()
 
template<typename E >
std::vector< E * > getBridgeItems ()
 Get all widgets which are connected to the same Property like this one. More...
 
virtual void setShowLabels (bool _show)
 Enables to Labels. More...
 
Nice::JointgetNode () const
 Get the connected Joint node. More...
 
Nice::PropertygetProperty () const
 Get the connected Property. More...
 
virtual void getSessionData (Nice::JointPtr &)
 Fills the passed Joint with the internal session data. More...
 
virtual void setSessionData (Nice::JointPtr)
 Set the internal session data from thge passed Joint. More...
 
virtual void connect (const ::Nice::PropertyPtr _p)
 Connects the widget to a Joint or Property. More...
 
void applyReadOnlyActor ()
 
virtual void connect (const ::Nice::JointPtr _j)
 Connects the widget to a Joint or Property. More...
 
void applyBridge ()
 
QString getPropertyNode () const
 Get the path to the connected Joint. More...
 
virtual bool isReadOnly ()
 Checks if an attribute RO (read only) is set to true. More...
 
virtual void setPropertyNode (QString _nodeName)
 Set the relative path to the displayed Property from the connected Joint. More...
 
void setSynchStatus (bool _on)
 Set the current sync state. More...
 
void setUserConfirmationStatus (bool _on)
 
virtual void setLock (const bool &_locked)
 
void disconnect ()
 Disconnects the widget from the connected Joint or Property. More...
 
void detach (QWidget *_widget)
 
bool getSynchStatus () const
 Get the sync status. More...
 
const QString & getNodeName ()
 
virtual void setState (CompletionState _state)
 Set the state of the widget (either Nice::OK or Nice::Unsynched ). More...
 
virtual void updateGUI (const ::Nice::Any &)
 Update the widgets data field from the connected Property. More...
 
virtual void setLabels (std::vector< std::string > _vec)
 Set the Labels This function has to be implemented in the derived widget class. More...
 
void setLabel (const QString &_text="")
 Set the text label of this widget. More...
 
QString getLabel ()
 
template<typename E >
std::vector< E * > getBridgeItems ()
 Get all widgets which are connected to the same Property like this one. More...
 
virtual void setShowLabels (bool _show)
 Enables to Labels. More...
 
Nice::JointgetNode () const
 Get the connected Joint node. More...
 
Nice::PropertygetProperty () const
 Get the connected Property. More...
 
virtual void getSessionData (Nice::JointPtr &)
 Fills the passed Joint with the internal session data. More...
 
virtual void setSessionData (Nice::JointPtr)
 Set the internal session data from thge passed Joint. More...
 
virtual void connect (const ::Nice::PropertyPtr _p)
 Connects the widget to a Joint or Property. More...
 
void applyReadOnlyActor ()
 
virtual void connect (const ::Nice::JointPtr _j)
 Connects the widget to a Joint or Property. More...
 
void applyBridge ()
 
QString getPropertyNode () const
 Get the path to the connected Joint. More...
 
virtual bool isReadOnly ()
 Checks if an attribute RO (read only) is set to true. More...
 
virtual void setPropertyNode (QString _nodeName)
 Set the relative path to the displayed Property from the connected Joint. More...
 
void setSynchStatus (bool _on)
 Set the current sync state. More...
 
void setUserConfirmationStatus (bool _on)
 
virtual void setLock (const bool &_locked)
 
void disconnect ()
 Disconnects the widget from the connected Joint or Property. More...
 
void detach (QWidget *_widget)
 
bool getSynchStatus () const
 Get the sync status. More...
 
const QString & getNodeName ()
 
virtual void setState (CompletionState _state)
 Set the state of the widget (either Nice::OK or Nice::Unsynched ). More...
 
virtual void updateGUI (const ::Nice::Any &)
 Update the widgets data field from the connected Property. More...
 
virtual void setLabels (std::vector< std::string > _vec)
 Set the Labels This function has to be implemented in the derived widget class. More...
 
void setLabel (const QString &_text="")
 Set the text label of this widget. More...
 
QString getLabel ()
 
template<typename E >
std::vector< E * > getBridgeItems ()
 Get all widgets which are connected to the same Property like this one. More...
 
virtual void setShowLabels (bool _show)
 Enables to Labels. More...
 
Nice::JointgetNode () const
 Get the connected Joint node. More...
 
Nice::PropertygetProperty () const
 Get the connected Property. More...
 
virtual void getSessionData (Nice::JointPtr &)
 Fills the passed Joint with the internal session data. More...
 
virtual void setSessionData (Nice::JointPtr)
 Set the internal session data from thge passed Joint. More...
 
virtual void connect (const ::Nice::PropertyPtr _p)
 Connects the widget to a Joint or Property. More...
 
void applyReadOnlyActor ()
 
virtual void connect (const ::Nice::JointPtr _j)
 Connects the widget to a Joint or Property. More...
 
void applyBridge ()
 
QString getPropertyNode () const
 Get the path to the connected Joint. More...
 
virtual bool isReadOnly ()
 Checks if an attribute RO (read only) is set to true. More...
 
virtual void setPropertyNode (QString _nodeName)
 Set the relative path to the displayed Property from the connected Joint. More...
 
void setSynchStatus (bool _on)
 Set the current sync state. More...
 
void setUserConfirmationStatus (bool _on)
 
virtual void setLock (const bool &_locked)
 
void disconnect ()
 Disconnects the widget from the connected Joint or Property. More...
 

Properties

QString PropertyNode
 
bool AutoSynch
 

Private Slots

void set ()
 
void setSpinBox ()
 
void invertSign ()
 
void set ()
 
void setSpinBox ()
 
void invertSign ()
 
void set ()
 
void setSpinBox ()
 
void invertSign ()
 

Private Member Functions

virtual void updateGUI (const Nice::Any &_val)
 
virtual void initSlots ()
 
virtual void updateGUI (const Nice::Any &_val)
 
virtual void initSlots ()
 
virtual void updateGUI (const Nice::Any &_val)
 
virtual void initSlots ()
 

Private Attributes

Ui::ScaledSpinBoxUIm_scaledSpinBox
 
std::vector< std::string > m_labels
 
std::vector< double > m_scale
 
double m_value
 
double m_min
 
double m_max
 
Nice::Int m_step
 
std::string m_unit
 
unsigned int m_referenceIndex
 
bool m_hiddeSignInvertButton
 

Additional Inherited Members

- Public Attributes inherited from Nice::BridgeItem
QGroupBox * m_container
 
bool m_locked
 
- Static Public Attributes inherited from Nice::BridgeItem
static std::map< CompletionState, QString > * s_palette = 0
 
- Protected Member Functions inherited from Nice::BridgeItem
template<typename E >
void set (const E &_value)
 Set the value from the derived widget to the Property. More...
 
void init (QWidget *_widget)
 Initialize the widget. More...
 
 BridgeItem ()
 Constructor. More...
 
virtual ~BridgeItem ()
 Destructor. More...
 
void setWidgetName ()
 
virtual void initAttributes ()
 virtual function is called after connecting to a property. More...
 
CompletionState getState ()
 Get the current state of the widget. More...
 
void resetGUI ()
 Update the widgets data field from the connected Property. More...
 
virtual int requestUserConfirmation ()
 
virtual void trySetFocus ()
 
void setBuffered (bool _buf)
 
virtual void set ()
 Slot is called when the date of the widget is changed. More...
 
virtual void updateProperty ()
 Set the gui value to the Property. More...
 
template<typename E >
void set (const E &_value)
 Set the value from the derived widget to the Property. More...
 
void init (QWidget *_widget)
 Initialize the widget. More...
 
 BridgeItem ()
 Constructor. More...
 
virtual ~BridgeItem ()
 Destructor. More...
 
void setWidgetName ()
 
virtual void initAttributes ()
 virtual function is called after connecting to a property. More...
 
CompletionState getState ()
 Get the current state of the widget. More...
 
void resetGUI ()
 Update the widgets data field from the connected Property. More...
 
virtual int requestUserConfirmation ()
 
virtual void trySetFocus ()
 
void setBuffered (bool _buf)
 
virtual void set ()
 Slot is called when the date of the widget is changed. More...
 
virtual void updateProperty ()
 Set the gui value to the Property. More...
 
template<typename E >
void set (const E &_value)
 Set the value from the derived widget to the Property. More...
 
void init (QWidget *_widget)
 Initialize the widget. More...
 
 BridgeItem ()
 Constructor. More...
 
virtual ~BridgeItem ()
 Destructor. More...
 
void setWidgetName ()
 
virtual void initAttributes ()
 virtual function is called after connecting to a property. More...
 
CompletionState getState ()
 Get the current state of the widget. More...
 
void resetGUI ()
 Update the widgets data field from the connected Property. More...
 
virtual int requestUserConfirmation ()
 
virtual void trySetFocus ()
 
void setBuffered (bool _buf)
 
virtual void set ()
 Slot is called when the date of the widget is changed. More...
 
virtual void updateProperty ()
 Set the gui value to the Property. More...
 
- Protected Attributes inherited from Nice::BridgeItem
bool m_inited
 
CompletionState m_state
 
bool m_autoSynch
 
bool m_isUserConfirmationNeeded
 
Nice::Jointm_root
 
Nice::Propertym_prop
 
WaveBreakerPtr m_breaker
 
bool m_showLabels
 
Nice::I64 m_id
 
QString m_nodeName
 
std::vector< Nice::PropertyPtrm_connectedProps
 

Detailed Description

An integer spinbox with scale support to represent double values Expects a vector of string with the scale labels plus a vector of doubles with the respective scale value. Both vectors must have same size. Max and Min can be also specified. The scale will be accomodated according to these values. e.g. +LABEL=["s", "ms","us", "ns"] +SCALE=[1,0.001, 0.000001, 0.000000001] +MAX=1.5 +MIN=0.01.

Author
Borelli
Version
Date
2012-08-10 11:04:59 AM

Constructor & Destructor Documentation

◆ ScaledSpinBox() [1/3]

ScaledSpinBox::ScaledSpinBox ( QWidget *  parent,
bool  _connect = false 
)

Constructor.

Parameters
parentParent widget.
_connectAutosync activation.

◆ ScaledSpinBox() [2/3]

ScaledSpinBox::ScaledSpinBox ( QWidget *  parent,
bool  _connect = false 
)

Constructor.

Parameters
parentParent widget.
_connectAutosync activation.

◆ ScaledSpinBox() [3/3]

ScaledSpinBox::ScaledSpinBox ( QWidget *  parent,
bool  _connect = false 
)

Constructor.

Parameters
parentParent widget.
_connectAutosync activation.

Member Function Documentation

◆ initSlots() [1/3]

void ScaledSpinBox::initSlots ( )
privatevirtual
Parameters

Reimplemented from Nice::BridgeItem.

◆ initSlots() [2/3]

virtual void ScaledSpinBox::initSlots ( )
privatevirtual
Parameters

Reimplemented from Nice::BridgeItem.

◆ initSlots() [3/3]

virtual void ScaledSpinBox::initSlots ( )
privatevirtual
Parameters

Reimplemented from Nice::BridgeItem.

◆ invertSign [1/3]

void ScaledSpinBox::invertSign ( )
privateslot

◆ invertSign [2/3]

void ScaledSpinBox::invertSign ( )
privateslot

◆ invertSign [3/3]

void ScaledSpinBox::invertSign ( )
privateslot

◆ set [1/3]

void ScaledSpinBox::set ( )
privateslot
Parameters

◆ set [2/3]

void ScaledSpinBox::set ( )
privateslot
Parameters

◆ set [3/3]

void ScaledSpinBox::set ( )
privateslot
Parameters

◆ setHintMsg() [1/3]

void ScaledSpinBox::setHintMsg ( )
Parameters

◆ setHintMsg() [2/3]

void ScaledSpinBox::setHintMsg ( )
Parameters

◆ setHintMsg() [3/3]

void ScaledSpinBox::setHintMsg ( )
Parameters

◆ setSpinBox [1/3]

void ScaledSpinBox::setSpinBox ( )
privateslot

◆ setSpinBox [2/3]

void ScaledSpinBox::setSpinBox ( )
privateslot

◆ setSpinBox [3/3]

void ScaledSpinBox::setSpinBox ( )
privateslot

◆ slot_setLabels [1/3]

virtual void ScaledSpinBox::slot_setLabels ( std::vector< std::string >  _vec)
virtualslot
Parameters

◆ slot_setLabels [2/3]

virtual void ScaledSpinBox::slot_setLabels ( std::vector< std::string >  _vec)
virtualslot
Parameters

◆ slot_setLabels [3/3]

void ScaledSpinBox::slot_setLabels ( std::vector< std::string >  _vec)
virtualslot
Parameters

◆ slot_setMax [1/3]

void ScaledSpinBox::slot_setMax ( Nice::Double  d)
slot
Parameters

◆ slot_setMax [2/3]

void ScaledSpinBox::slot_setMax ( Nice::Double  d)
slot
Parameters

◆ slot_setMax [3/3]

void ScaledSpinBox::slot_setMax ( Nice::Double  d)
slot
Parameters

◆ slot_setMin [1/3]

void ScaledSpinBox::slot_setMin ( Nice::Double  d)
slot
Parameters

◆ slot_setMin [2/3]

void ScaledSpinBox::slot_setMin ( Nice::Double  d)
slot
Parameters

◆ slot_setMin [3/3]

void ScaledSpinBox::slot_setMin ( Nice::Double  d)
slot
Parameters

◆ slot_setScale [1/3]

void ScaledSpinBox::slot_setScale ( std::vector< Nice::Double _scale)
slot
Parameters

◆ slot_setScale [2/3]

void ScaledSpinBox::slot_setScale ( std::vector< Nice::Double _scale)
slot
Parameters

◆ slot_setScale [3/3]

void ScaledSpinBox::slot_setScale ( std::vector< Nice::Double _scale)
slot
Parameters

◆ slot_setSignInvert [1/3]

void ScaledSpinBox::slot_setSignInvert ( bool  state)
slot

◆ slot_setSignInvert [2/3]

void ScaledSpinBox::slot_setSignInvert ( bool  state)
slot

◆ slot_setSignInvert [3/3]

void ScaledSpinBox::slot_setSignInvert ( bool  state)
slot

◆ slot_setStep [1/3]

void ScaledSpinBox::slot_setStep ( Nice::Int  step)
slot
Parameters

◆ slot_setStep [2/3]

void ScaledSpinBox::slot_setStep ( Nice::Int  step)
slot
Parameters

◆ slot_setStep [3/3]

void ScaledSpinBox::slot_setStep ( Nice::Int  step)
slot
Parameters

◆ updateGUI() [1/3]

virtual void ScaledSpinBox::updateGUI ( const Nice::Any _val)
privatevirtual
Parameters

◆ updateGUI() [2/3]

void ScaledSpinBox::updateGUI ( const Nice::Any _val)
privatevirtual
Parameters

◆ updateGUI() [3/3]

virtual void ScaledSpinBox::updateGUI ( const Nice::Any _val)
privatevirtual
Parameters

◆ updateLabels() [1/3]

void ScaledSpinBox::updateLabels ( )
Parameters

◆ updateLabels() [2/3]

void ScaledSpinBox::updateLabels ( )
Parameters

◆ updateLabels() [3/3]

void ScaledSpinBox::updateLabels ( )
Parameters

◆ updateSignButton() [1/3]

void ScaledSpinBox::updateSignButton ( )

◆ updateSignButton() [2/3]

void ScaledSpinBox::updateSignButton ( )

◆ updateSignButton() [3/3]

void ScaledSpinBox::updateSignButton ( )

Member Data Documentation

◆ m_hiddeSignInvertButton

bool ScaledSpinBox::m_hiddeSignInvertButton
private

◆ m_labels

std::vector< std::string > ScaledSpinBox::m_labels
private

◆ m_max

double ScaledSpinBox::m_max
private

◆ m_min

double ScaledSpinBox::m_min
private

◆ m_referenceIndex

unsigned int ScaledSpinBox::m_referenceIndex
private

◆ m_scale

std::vector< double > ScaledSpinBox::m_scale
private

◆ m_scaledSpinBox

Ui::ScaledSpinBoxUI * ScaledSpinBox::m_scaledSpinBox
private

◆ m_step

Nice::Int ScaledSpinBox::m_step
private

◆ m_unit

std::string ScaledSpinBox::m_unit
private

◆ m_value

double ScaledSpinBox::m_value
private

Property Documentation

◆ AutoSynch

bool ScaledSpinBox::AutoSynch
readwrite

◆ PropertyNode

QString ScaledSpinBox::PropertyNode
readwrite

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