##

UserCmdHistory.hh
Go to the documentation of this file.
/*
* Copyright (C) 2015 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_USERCOMMANDHISTORY_HH_
#define _GAZEBO_GUI_USERCOMMANDHISTORY_HH_
#include <string>
#include <utility>
#include <vector>
#include "gazebo/msgs/MessageTypes.hh"
#include "gazebo/gui/qt.h"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
class UserCmdHistoryPrivate;
class GZ_GUI_VISIBLE UserCmdHistory : public QObject
{
Q_OBJECT
public: UserCmdHistory();
public: virtual ~UserCmdHistory();
public: void SetActive(const bool _active);
public: bool Active() const;
signals: void StatsSignal();
private slots: void OnUndo();
private slots: virtual void OnUndoCommand(QAction *_action);
private slots: void OnUndoHovered(QAction *_action);
private slots: virtual void OnUndoCmdHistory();
private slots: void OnRedo();
private slots: virtual void OnRedoCommand(QAction *_action);
private slots: void OnRedoHovered(QAction *_action);
private slots: virtual void OnRedoCmdHistory();
private: virtual void OnCmdHistory(const bool _undo);
private: virtual bool HasUndo() const;
private: virtual bool HasRedo() const;
private: virtual std::vector<std::pair<unsigned int, std::string>>
Cmds(const bool _undo) const;
private slots: void OnStatsSlot();
private: void OnUserCmdStatsMsg(ConstUserCmdStatsPtr &_msg);
private: UserCmdHistoryPrivate *dataPtr;
};
}
}
#endif
gazebo::gui::UserCmdHistory::~UserCmdHistory
virtual ~UserCmdHistory()
Destructor.
gazebo::gui::UserCmdHistory
Class which manages user commands in the client side.
Definition: UserCmdHistory.hh:36
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
system.hh
gazebo::gui::UserCmdHistory::StatsSignal
void StatsSignal()
gazebo::gui::UserCmdHistory::Active
bool Active() const
Get whether the widget is active or not.
gazebo::gui::UserCmdHistory::SetActive
void SetActive(const bool _active)
Set whether the widget is active or not.
gazebo::gui::UserCmdHistory::UserCmdHistory
UserCmdHistory()
Constructor.
gui
gui
Definition: KeyEventHandler.hh:29