Created new painter bug.
This commit is contained in:
@@ -3,19 +3,14 @@
|
||||
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include <bcvalue.h>
|
||||
#include <ui_bcvalueeditor.h>
|
||||
|
||||
class QSlider;
|
||||
class QPushButton;
|
||||
class BCValue;
|
||||
|
||||
struct BCValueEditorParams
|
||||
{
|
||||
int value{0};
|
||||
int min{0};
|
||||
int max{0};
|
||||
};
|
||||
|
||||
class BCValueEditor : public QWidget, private Ui::BCValueEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -25,13 +20,24 @@ public:
|
||||
explicit BCValueEditor(QWidget *parent = nullptr);
|
||||
|
||||
int value() const;
|
||||
void setValueAndRange( const BCValueEditorParams& params );
|
||||
void setValueAndRange( const BCValue::ValueRange& params );
|
||||
|
||||
// helper functions
|
||||
static QRect updateEditorRect( const QRect& rect);
|
||||
static void paintSliderIndicator(QPainter* painter, const QRect& rect, double ratio );
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
void valueChanged(int value);
|
||||
void valueCommited(int value);
|
||||
|
||||
protected:
|
||||
|
||||
static constexpr int cTextBlockOffset = 130;
|
||||
static constexpr int cPaddingRight = 8;
|
||||
static constexpr int cSliderWidth = 117;
|
||||
|
||||
};
|
||||
|
||||
#endif // BCValueEditor_H
|
||||
|
||||
Reference in New Issue
Block a user