2
* Copyright (C) 2015 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Pawel Stolowski <pawel.stolowski@canonical.com>
21
#include <unity/scopes/ValueSliderLabels.h>
22
#include <unity/scopes/Variant.h>
33
class ValueSliderLabelsImpl
36
ValueSliderLabelsImpl(std::string const& min_label, std::string const& max_label);
37
ValueSliderLabelsImpl(std::string const& min_label, std::string const& max_label, std::vector<std::pair<double, std::string>> const& extra_labels);
38
ValueSliderLabelsImpl(VariantMap const& var);
39
ValueSliderLabelsImpl(ValueSliderLabelsImpl const&) = default;
41
std::string min_label() const;
42
std::string max_label() const;
43
std::vector<std::pair<double, std::string>> extra_labels() const;
44
VariantMap serialize() const;
45
void deserialize(VariantMap const& var);
47
void validate(double min, double max) const;
50
std::string min_label_;
51
std::string max_label_;
52
std::vector<std::pair<double, std::string>> extra_labels_;