mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Added direct access to sections of discrete slider to derived classes.
This commit is contained in:
parent
146409844d
commit
63a8fe7ee8
2 changed files with 6 additions and 0 deletions
|
@ -68,6 +68,10 @@ void DiscreteSlider::setSelectOnPress(bool selectOnPress) {
|
||||||
_selectOnPress = selectOnPress;
|
_selectOnPress = selectOnPress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<DiscreteSlider::Section> &DiscreteSlider::sectionsRef() {
|
||||||
|
return _sections;
|
||||||
|
}
|
||||||
|
|
||||||
void DiscreteSlider::addSection(const QString &label) {
|
void DiscreteSlider::addSection(const QString &label) {
|
||||||
_sections.push_back(Section(label, getLabelStyle()));
|
_sections.push_back(Section(label, getLabelStyle()));
|
||||||
resizeToWidth(width());
|
resizeToWidth(width());
|
||||||
|
|
|
@ -97,6 +97,8 @@ protected:
|
||||||
|
|
||||||
void setSelectOnPress(bool selectOnPress);
|
void setSelectOnPress(bool selectOnPress);
|
||||||
|
|
||||||
|
std::vector<Section> §ionsRef();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void activateCallback();
|
void activateCallback();
|
||||||
virtual const style::TextStyle &getLabelStyle() const = 0;
|
virtual const style::TextStyle &getLabelStyle() const = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue