position_reference_property.cpp
Go to the documentation of this file.
1 /* Copyright 2014 Gareth Cross, 2018-2019 TomTom N.V.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7 http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License. */
14 
16 
17 namespace rviz
18 {
19 const QString PositionReferenceProperty::FIX_MSG_STRING = "<NavSatFix Message>";
20 
22  const QString& name, const QString& default_value, const QString& description, Property* parent,
23  FrameManager* frame_manager, const char* changed_slot, QObject* receiver)
24  : TfFrameProperty(name, default_value, description, parent, frame_manager, true, changed_slot, receiver)
25 {
26  connect(this, SIGNAL(requestOptions(EditableEnumProperty*)), this, SLOT(adjustOptionsList()));
27 }
28 
30 {
31  // This function expects that TfFrameProperty::fillFrameList() has already run
32  strings_.push_front(FIX_MSG_STRING);
33 }
34 
36 {
37  const auto& frame = TfFrameProperty::getFrame();
38  if (frame == FIX_MSG_STRING)
39  return "";
40  return frame;
41 }
42 
44 {
45  return getFrame().toStdString();
46 }
47 
49 {
50  if (getValue().toString() == FIX_MSG_STRING)
51  {
53  }
54  else
55  {
57  }
58 }
59 
60 }
rviz::FrameManager
rviz::PositionReferenceProperty::getPositionReferenceType
PositionReferenceType getPositionReferenceType() const
Definition: position_reference_property.cpp:48
rviz::PositionReferenceProperty::getFrame
QString getFrame() const
Definition: position_reference_property.cpp:35
rviz::EditableEnumProperty::strings_
QStringList strings_
rviz::EditableEnumProperty
description
description
rviz::PositionReferenceProperty::FIX_MSG_STRING
static const QString FIX_MSG_STRING
Definition: position_reference_property.h:41
rviz::Property::getValue
virtual QVariant getValue() const
rviz::PositionReferenceType::NAV_SAT_FIX_MESSAGE
@ NAV_SAT_FIX_MESSAGE
rviz::Property
rviz
rviz::PositionReferenceProperty::PositionReferenceProperty
PositionReferenceProperty(const QString &name=QString(), const QString &default_value=QString(), const QString &description=QString(), Property *parent=nullptr, FrameManager *frame_manager=nullptr, const char *changed_slot=nullptr, QObject *receiver=nullptr)
Definition: position_reference_property.cpp:21
rviz::PositionReferenceType
PositionReferenceType
Which reference should be used for determining position.
Definition: position_reference.h:23
rviz::TfFrameProperty
rviz::TfFrameProperty::getFrame
QString getFrame() const
default_value
def default_value(type_)
rviz::PositionReferenceProperty::adjustOptionsList
void adjustOptionsList()
Definition: position_reference_property.cpp:29
rviz::PositionReferenceType::TF_FRAME
@ TF_FRAME
rviz::PositionReferenceProperty::getFrameStd
std::string getFrameStd() const
Definition: position_reference_property.cpp:43
rviz::EditableEnumProperty::requestOptions
void requestOptions(EditableEnumProperty *property_in_need_of_options)
position_reference_property.h


rviz_satellite
Author(s): Gareth Cross , Andre Schröder
autogenerated on Thu May 4 2023 02:47:22