##

EditableLabel.hh
Go to the documentation of this file.
/*
* Copyright (C) 2016 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_GUI_PLOT_EDITABLELABEL_HH_
#define GAZEBO_GUI_PLOT_EDITABLELABEL_HH_
#include <memory>
#include <string>
#include "gazebo/gui/qt.h"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
// Forward declare private data class
class EditableLabelPrivate;
class GZ_GUI_VISIBLE EditableLabel : public QWidget
{
Q_OBJECT
public: EditableLabel(const std::string &_label,
QWidget *_parent = nullptr);
public: ~EditableLabel();
public: std::string Text() const;
protected: virtual void mouseDoubleClickEvent(QMouseEvent *_event);
protected: virtual void keyPressEvent(QKeyEvent *_event);
private slots: void OnEditingFinished();
private: std::unique_ptr<EditableLabelPrivate> dataPtr;
};
}
}
#endif
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::gui::EditableLabel::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QMouseEvent *_event)
Qt mouse double click event.
gazebo::gui::EditableLabel::EditableLabel
EditableLabel(const std::string &_label, QWidget *_parent=nullptr)
Constructor.
system.hh
gazebo::gui::EditableLabel::~EditableLabel
~EditableLabel()
Destructor.
gazebo::gui::EditableLabel
Editable Label.
Definition: EditableLabel.hh:35
gazebo::gui::EditableLabel::keyPressEvent
virtual void keyPressEvent(QKeyEvent *_event)
Qt key press event.
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::EditableLabel::Text
std::string Text() const
Get the string of this label.