CustomTextKnob.h 798 B

12345678910111213141516171819202122232425262728293031
  1. /* Text customizable knob */
  2. #ifndef CUSTOM_TEXT_KNOB_H
  3. #define CUSTOM_TEXT_KNOB_H
  4. #include "Knob.h"
  5. class LMMS_EXPORT CustomTextKnob : public Knob
  6. {
  7. protected:
  8. inline void setHintText( const QString & _txt_before, const QString & _txt_after ) {} // inaccessible
  9. public:
  10. CustomTextKnob( knobTypes _knob_num, QWidget * _parent = nullptr, const QString & _name = QString(), const QString & _value_text = QString() );
  11. CustomTextKnob( QWidget * _parent = nullptr, const QString & _name = QString(), const QString & _value_text = QString() ); //!< default ctor
  12. CustomTextKnob( const Knob& other ) = delete;
  13. inline void setValueText(const QString & _value_text)
  14. {
  15. m_value_text = _value_text;
  16. }
  17. private:
  18. virtual QString displayValue() const;
  19. protected:
  20. QString m_value_text;
  21. } ;
  22. #endif