1
/****************************************************************************
2
Copyright (C) 2010 Laszlo Simon <laszlo.simon@gmail.com>
3
Esthefan Maleki <illusions.hu@gmail.com>
4
This file is part of the SOUNDBOX project.
6
SOUNDBOX is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation version 3 of the License.
10
SOUNDBOX is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with SOUNDBOX. If not, see <http://www.gnu.org/licenses/>.
18
See http://www.illusions.hu for further details.
19
*****************************************************************************/
30
#include <QMouseEvent>
31
#include "co_connectarray.h"
33
#include "co_flowsheet.h"
35
// class for operator unit elements on the flowsheet
41
int Left,Top,Width,Height;
46
// removes the unit from the flowsheet
47
void DeleteClick(QObject Sender);
50
void FlipClick(QObject Sender);
52
// rotates the unit by 90 degrees clockwise
53
void cw90Click(QObject Sender);
55
// rotates the unit by 90 degrees counter clock wise
56
void ccw90Click(QObject Sender);
58
// rotates the unit by 180 degress
59
void rot180click(QObject Sender);
61
void knotsAlign(void);
63
void setBoundSize(int l,t,w,h);
64
void FindActiveTap(int x,y);
68
// sets the size of the bounding rectangle
69
void setSize(int w,h);
71
// recalculates the coordinates
72
void CoordReCalc(int &x,&y);
74
void drawElipse(int x,y,R);
76
void drawRectangle(int x0,y0,x1,y1);
77
void drawline(int x0,y0,x1,y1);
78
void drawRender(QCanvas Canvas);
80
void MouseDown(TMouseButton Button, TShiftState Shift: int X, Y);
81
void MouseUp(TMouseButton Button, TShiftState Shift: int X, Y);
82
void MouseMove(TShiftState Shift, int X, Y);
94
// 1 - upward / felfel�
95
// 2 - rightward / jobbra
96
// 3 - downwards / lefel�
97
// 4 - leftward // balra
106
QPopupMenu popupmenu;
108
onDrawClick : procedure(Sender : TObject; x,y : integer) of object;
110
QMouseEvent onMouseDown;
111
QMouseEvent onMouseUp;
112
QMouseMoveEvent onMouseMove;
114
TGUnit(TGConnectArray ts, QString n, int SN,ZF, TWinControl parent);
116
void paint(QCanvas canvas); // virtual;
118
void draw(QCanvas canvas);
120
// returns if the mouse is over the unit
121
bool isOvered(QPoint mouseCord);
125
bool Drop(TGJoint source);
127
void unConnect(TGJoint p);
b'\\ No newline at end of file'