Default ctors for LED checkbox and LCD spinbox. Fixes for knob.
This commit is contained in:
@@ -35,8 +35,8 @@ class EXPORT LcdWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LcdWidget( QWidget* parent, const QString& name = QString::null );
|
||||
LcdWidget( int numDigits, QWidget* parent, const QString& name = QString::null );
|
||||
|
||||
LcdWidget( int numDigits, const QString& style, QWidget* parent, const QString& name = QString::null );
|
||||
|
||||
virtual ~LcdWidget();
|
||||
@@ -50,6 +50,10 @@ public:
|
||||
update();
|
||||
}
|
||||
|
||||
Q_PROPERTY( int numDigits READ numDigits WRITE setNumDigits )
|
||||
|
||||
inline int numDigits() const { return m_numDigits; }
|
||||
inline void setNumDigits( int n ) { m_numDigits = n; updateSize(); }
|
||||
|
||||
public slots:
|
||||
virtual void setMarginWidth( int _width );
|
||||
@@ -82,6 +86,8 @@ private:
|
||||
int m_numDigits;
|
||||
int m_marginWidth;
|
||||
|
||||
void initUi( const QString& name, const QString &style = QString("19green") ); //!< to be called by ctors
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -66,7 +66,8 @@ class EXPORT knob : public QWidget, public FloatModelView
|
||||
|
||||
Q_PROPERTY(knobTypes knobNum READ knobNum WRITE setknobNum)
|
||||
|
||||
void init( const QString & _name ); //!< to be called by ctors
|
||||
void initUi( const QString & _name ); //!< to be called by ctors
|
||||
void onKnobNumUpdated(); //!< to be called when you updated @a m_knobNum
|
||||
|
||||
public:
|
||||
knob( knobTypes _knob_num, QWidget * _parent = NULL, const QString & _name = QString() );
|
||||
|
||||
@@ -47,6 +47,10 @@ public:
|
||||
ledCheckBox( const QString & _txt, QWidget * _parent,
|
||||
const QString & _name = QString::null,
|
||||
LedColors _color = Yellow );
|
||||
ledCheckBox( QWidget * _parent,
|
||||
const QString & _name = QString::null,
|
||||
LedColors _color = Yellow );
|
||||
|
||||
virtual ~ledCheckBox();
|
||||
|
||||
|
||||
@@ -55,6 +59,9 @@ public:
|
||||
return( m_text );
|
||||
}
|
||||
|
||||
void setText( const QString& s );
|
||||
|
||||
Q_PROPERTY( QString text READ text WRITE setText )
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
@@ -66,6 +73,9 @@ private:
|
||||
|
||||
QString m_text;
|
||||
|
||||
void initUi( LedColors _color ); //!< to be called by ctors
|
||||
void onTextUpdated(); //!< to be called when you updated @a m_text
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user