tilde~
Puredata Qt-based GUI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
UIArray.h
Go to the documentation of this file.
1 // (c) 2017 Alex Nadzharov
2 // License: GPL3
3 
4 #ifndef CM_ARRAY_H
5 #define CM_ARRAY_H
6 
7 #include <QGraphicsView>
8 #include <QLineEdit>
9 #include <QMainWindow>
10 #include <QtGui>
11 
12 #include "Port.h"
13 #include "UIBox.h"
14 #include "UIObject.h"
15 
16 #include "UIArrayEditor.h"
17 
18 #include "CanvasView.h"
19 
20 // XPD-TODO
21 class ServerArray;
22 
23 namespace tilde {
24 
27 class UIArray : public UIBox {
28 
29  Q_OBJECT
30 
31 private:
33  QString _arrayName;
34  int _arraySize;
35 
36  // XPD-TODO
37  // ServerArray* _array;
38 
39  void createServerArray();
40 
41 public:
42  explicit UIArray();
43 
44  static UIObject* createObj(QString data);
45 
46  virtual void initProperties();
47 
48  virtual void paint(QPainter* p, const QStyleOptionGraphicsItem* option, QWidget*);
49 
50  void mousePressEvent(QGraphicsSceneMouseEvent* ev);
51  void mouseReleaseEvent(QGraphicsSceneMouseEvent*);
52  void mouseMoveEvent(QGraphicsSceneMouseEvent* event);
53 
54  void fromQString(QString message);
55 
56  virtual void sync();
57 
58 signals:
59 
60  void mouseMoved();
61  void rightClicked();
62 };
63 }
64 
65 #endif // CM_BOX_H
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
mouse move
Definition: UIArray.cpp:155
void rightClicked()
void mousePressEvent(QGraphicsSceneMouseEvent *ev)
paint event
Definition: UIArray.cpp:111
Array Editor QWidget.
Definition: UIArrayEditor.h:22
gui object: array box (ui.array)
Definition: UIArray.h:27
virtual void sync()
Definition: UIArray.cpp:221
virtual void paint(QPainter *p, const QStyleOptionGraphicsItem *option, QWidget *)
UIObject properties
Definition: UIArray.cpp:70
virtual void initProperties()
Definition: UIArray.cpp:62
static UIObject * createObj(QString data)
Definition: UIArray.cpp:29
UIArray()
Definition: UIArray.cpp:14
void mouseReleaseEvent(QGraphicsSceneMouseEvent *)
mouse up
Definition: UIArray.cpp:149
Definition: UIObject.h:44
void fromQString(QString message)
template
Definition: UIArray.cpp:174
Definition: g_canvas.h:89
gui object: standard object box
Definition: UIBox.h:46