NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
slider_property.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 #ifndef LOCALIZATION_RVIZ_PLUGINS_SLIDER_PROPERTY_H // NOLINT
19 #define LOCALIZATION_RVIZ_PLUGINS_SLIDER_PROPERTY_H // NOLINT
20 
21 #include <rviz/properties/property.h>
22 
23 #include <QSlider>
24 
25 namespace rviz {
26 class SliderProperty : public Property {
27  Q_OBJECT
28  public:
29  SliderProperty(const QString& name = QString(), const int default_value = 0, const QString& description = QString(),
30  Property* parent = nullptr, const char* changed_slot = nullptr, QObject* receiver = nullptr);
31 
32  QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option) override;
33 
34  void setMaximum(const int max);
35 
36  void setMinimum(const int min);
37 
38  int getInt() const;
39 
40  public Q_SLOTS: // NOLINT
41  void setValue(const int value);
42 
43  Q_SIGNALS:
44 
45  protected:
46  QSlider* slider_;
47  int max_;
48  int min_;
49  int value_;
50 };
51 
52 } // end namespace rviz
53 
54 #endif // LOCALIZATION_RVIZ_PLUGINS_SLIDER_PROPERTY_H // NOLINT
rviz::SliderProperty::slider_
QSlider * slider_
Definition: slider_property.h:46
rviz::SliderProperty::min_
int min_
Definition: slider_property.h:48
rviz::SliderProperty::createEditor
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option) override
Definition: slider_property.cc:25
rviz::SliderProperty::value_
int value_
Definition: slider_property.h:49
name
std::string name
Definition: eps_simulator.cc:48
rviz
Definition: trajectory_display.h:32
rviz::SliderProperty::getInt
int getInt() const
Definition: slider_property.cc:39
rviz::SliderProperty
Definition: slider_property.h:26
rviz::SliderProperty::setValue
void setValue(const int value)
Definition: slider_property.cc:33
rviz::SliderProperty::setMinimum
void setMinimum(const int min)
Definition: slider_property.cc:37
rviz::SliderProperty::SliderProperty
SliderProperty(const QString &name=QString(), const int default_value=0, const QString &description=QString(), Property *parent=nullptr, const char *changed_slot=nullptr, QObject *receiver=nullptr)
Definition: slider_property.cc:21
rviz::SliderProperty::setMaximum
void setMaximum(const int max)
Definition: slider_property.cc:35
rviz::SliderProperty::max_
int max_
Definition: slider_property.h:47