StateMimeData.h
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarX::
17 * @author Mirko Waechter ( mirko.waechter at kit dot edu)
18 * @date 2014
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
25 #include "State.h"
26 #include <QMimeData>
27 
28 namespace armarx
29 {
30  /**
31  * @brief The AbstractStateMimeData class is used to transport state data from
32  * the treeview to the stateview and is implemented in the editor plugin.
33  * isInSameGroup is abstract because it can only be implemented in the editor plugin,
34  * because the states do not know anything about statechart groups.
35  */
36  class AbstractStateMimeData : public QMimeData
37  {
38  Q_OBJECT
39  public:
41 
42  // QMimeData interface
43 
44  bool hasFormat(const QString& mimetype) const override;
45  QStringList formats() const override;
46 
49 
50  const QString& getProxyName() const;
51  void setProxyName(const QString& value);
52  virtual bool isInSameGroup(statechartmodel::StatePtr state) const = 0;
53  virtual bool isPublic() const = 0;
54  protected:
55  QVariant retrieveData(const QString& mimetype, QVariant::Type preferredType) const override;
57  QString proxyName;
58 
59  };
60 
61 }
62 
armarx::AbstractStateMimeData
The AbstractStateMimeData class is used to transport state data from the treeview to the stateview an...
Definition: StateMimeData.h:36
armarx::AbstractStateMimeData::isInSameGroup
virtual bool isInSameGroup(statechartmodel::StatePtr state) const =0
armarx::AbstractStateMimeData::formats
QStringList formats() const override
Definition: StateMimeData.cpp:46
armarx::AbstractStateMimeData::hasFormat
bool hasFormat(const QString &mimetype) const override
Definition: StateMimeData.cpp:35
armarx::AbstractStateMimeData::setProxyName
void setProxyName(const QString &value)
Definition: StateMimeData.cpp:73
armarx::AbstractStateMimeData::getState
statechartmodel::StatePtr getState() const
Definition: StateMimeData.cpp:78
armarx::AbstractStateMimeData::setState
void setState(const statechartmodel::StatePtr &value)
Definition: StateMimeData.cpp:83
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
armarx::AbstractStateMimeData::getProxyName
const QString & getProxyName() const
Definition: StateMimeData.cpp:68
armarx::AbstractStateMimeData::AbstractStateMimeData
AbstractStateMimeData(statechartmodel::StatePtr state)
Definition: StateMimeData.cpp:29
armarx::aron::similarity::FloatSimilarity::Type
Type
The Type enum.
Definition: FloatSimilarity.h:8
armarx::AbstractStateMimeData::retrieveData
QVariant retrieveData(const QString &mimetype, QVariant::Type preferredType) const override
Definition: StateMimeData.cpp:51
armarx::AbstractStateMimeData::proxyName
QString proxyName
Definition: StateMimeData.h:57
armarx::AbstractStateMimeData::isPublic
virtual bool isPublic() const =0
armarx::statechartmodel::StatePtr
std::shared_ptr< State > StatePtr
Definition: State.h:46
State.h
armarx::AbstractStateMimeData::state
statechartmodel::StatePtr state
Definition: StateMimeData.h:56
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28