Continues migration with DDS, Common
This commit is contained in:
1 parent
9b15cee841
commit
fa48db111e
668 files changed
+111841
-2
No files matched your search
Executable
+194
@@ -0,0 +1,194 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lts_widgets_export.h"
|
||||
|
||||
|
||||
#include <QSlider>
|
||||
|
||||
namespace LtsWidgets
|
||||
{
|
||||
|
||||
class LtsRangeSliderPrivate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class LTSWIDGETS_EXPORT LtsRangeSlider : public QSlider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(int minimumValue READ minimumValue WRITE setMinimumValue)
|
||||
Q_PROPERTY(int maximumValue READ maximumValue WRITE setMaximumValue)
|
||||
Q_PROPERTY(int minimumPosition READ minimumPosition WRITE setMinimumPosition)
|
||||
Q_PROPERTY(int maximumPosition READ maximumPosition WRITE setMaximumPosition)
|
||||
Q_PROPERTY(bool symmetricMoves READ symmetricMoves WRITE setSymmetricMoves)
|
||||
Q_PROPERTY(QString handleToolTip READ handleToolTip WRITE setHandleToolTip)
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
explicit LtsRangeSlider(Qt::Orientation o, QWidget *parent = nullptr);
|
||||
explicit LtsRangeSlider(QWidget *parent = nullptr)
|
||||
: LtsRangeSlider(Qt::Vertical, parent)
|
||||
{}
|
||||
~LtsRangeSlider();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int minimumValue() const;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int maximumValue() const;
|
||||
|
||||
|
||||
|
||||
|
||||
int minimumPosition() const;
|
||||
void setMinimumPosition(int min);
|
||||
|
||||
|
||||
|
||||
|
||||
int maximumPosition() const;
|
||||
void setMaximumPosition(int max);
|
||||
|
||||
|
||||
|
||||
|
||||
void setPositions(int min, int max);
|
||||
|
||||
|
||||
|
||||
|
||||
bool symmetricMoves() const;
|
||||
void setSymmetricMoves(bool symmetry);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QString handleToolTip() const;
|
||||
void setHandleToolTip(const QString &toolTip);
|
||||
|
||||
|
||||
|
||||
bool isMinimumSliderDown() const;
|
||||
|
||||
|
||||
bool isMaximumSliderDown() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
|
||||
|
||||
void minimumValueChanged(int min);
|
||||
|
||||
|
||||
|
||||
void maximumValueChanged(int max);
|
||||
|
||||
|
||||
void valuesChanged(int min, int max);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void minimumPositionChanged(int min);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void maximumPositionChanged(int max);
|
||||
|
||||
|
||||
|
||||
|
||||
void positionsChanged(int min, int max);
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void setMinimumValue(int min);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void setMaximumValue(int max);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void setValues(int min, int max);
|
||||
|
||||
protected Q_SLOTS:
|
||||
void onRangeChanged(int minimum, int maximum);
|
||||
|
||||
protected:
|
||||
LtsRangeSlider(LtsRangeSliderPrivate *impl, Qt::Orientation o, QWidget *parent = nullptr);
|
||||
|
||||
|
||||
|
||||
void mousePressEvent(QMouseEvent *ev) override;
|
||||
void mouseMoveEvent(QMouseEvent *ev) override;
|
||||
void mouseReleaseEvent(QMouseEvent *ev) override;
|
||||
|
||||
|
||||
|
||||
void paintEvent(QPaintEvent *ev) override;
|
||||
void initMinimumSliderStyleOption(QStyleOptionSlider *option) const;
|
||||
void initMaximumSliderStyleOption(QStyleOptionSlider *option) const;
|
||||
|
||||
|
||||
|
||||
bool event(QEvent *event) override;
|
||||
|
||||
protected:
|
||||
QScopedPointer<LtsRangeSliderPrivate> d_ptr;
|
||||
|
||||
private:
|
||||
Q_DECLARE_PRIVATE(LtsRangeSlider)
|
||||
Q_DISABLE_COPY(LtsRangeSlider)
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user