tilde~
Puredata Qt-based GUI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
UIToggle.h
Go to the documentation of this file.
1 // (c) 2017 Alex Nadzharov
2 // License: GPL3
3 
4 #ifndef CMO_TOGGLE_H
5 #define CMO_TOGGLE_H
6 
7 #include <qlineedit.h>
8 
9 #include "Port.h"
10 #include "UIObject.h"
11 
12 #include <QGraphicsView>
13 
14 namespace tilde {
15 
19 class UIToggle : public UIObject {
20  Q_OBJECT
21 
22 private:
23  bool _clicked;
24  bool _value;
25 
26 public:
27  explicit UIToggle();
28 
29  static UIObject* createObj(QString data);
30 
31  void initProperties();
32 
33  virtual void paint(QPainter* p, const QStyleOptionGraphicsItem* option, QWidget*);
34  void resizeEvent();
35 
36  // ---------------------------------------------------------------
37 
38  void objectPressEvent(QGraphicsSceneMouseEvent* ev);
39 
40  // ---------------------------------------------------------------
41 
42  void setPdMessage(QString message);
43 
44  //static void updateUI(void* uiobj, ceammc::AtomList msg);
45  void updateUI(t_cpd_list* list);
46 };
47 }
48 
49 #endif // CMO_MSG_H
void updateUI(t_cpd_list *list)
Definition: UIToggle.cpp:132
void objectPressEvent(QGraphicsSceneMouseEvent *ev)
Definition: UIToggle.cpp:79
void initProperties()
Definition: UIToggle.cpp:38
gui object: toggle (ui.toggle)
Definition: UIToggle.h:19
void resizeEvent()
Definition: UIToggle.cpp:70
UIToggle()
Definition: UIToggle.cpp:17
static UIObject * createObj(QString data)
Definition: UIToggle.cpp:29
Definition: UIObject.h:44
virtual void paint(QPainter *p, const QStyleOptionGraphicsItem *option, QWidget *)
UIObject properties
Definition: UIToggle.cpp:45
void setPdMessage(QString message)
Definition: UIToggle.cpp:112