2 ******************************************************************************
4 * @file mixercurveline.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * @addtogroup GCSPlugins GCS Plugins
8 * @addtogroup UAVObjectWidgetUtils Plugin
10 * @brief Utility plugin for UAVObject to Widget relation management
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 * This is inspired by the elastic nodes and edges demo in the Qt examples
30 * I have reinventing the wheel!
33 #ifndef MIXERCURVELINE_H
34 #define MIXERCURVELINE_H
36 #include <QGraphicsItem>
40 class Edge
: public QGraphicsItem
{
42 Edge(MixerNode
*sourceNode
, MixerNode
*destNode
);
45 MixerNode
*sourceNode() const;
46 void setSourceNode(MixerNode
*node
);
48 MixerNode
*destNode() const;
49 void setDestNode(MixerNode
*node
);
53 enum { Type
= UserType
+ 12 };
60 QRectF
boundingRect() const;
61 void paint(QPainter
*painter
, const QStyleOptionGraphicsItem
*option
, QWidget
*widget
);
64 MixerNode
*source
, *dest
;
71 #endif // MIXERCURVELINE_H