-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathelementlist.h
46 lines (41 loc) · 1019 Bytes
/
elementlist.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef ELEMENTLIST_H
#define ELEMENTLIST_H
#include "libda_global.h"
#include <QListWidget>
#include <QDrag>
#include <QMimeData>
#include <QPainter>
LDA_BEGIN_NAMESPACE
class Element;
/**
* @brief ElementList holds QWidgets and derivates, primary for Element[s] from this lib
*/
class LIBDA_SHARED_EXPORT ElementList : public QListWidget
{
Q_OBJECT
public:
explicit ElementList(QWidget *parent = nullptr);
~ElementList();
/**
* @brief Set radius of child widgets
* @param r
*/
void setRadius(int r);
/**
* @brief Add an element to the list
* @param e
*/
void addElement(Element *e);
/**
* @brief This func is here in the case you want to change the radius of an Element as it is private member.
* @param e
* @param r
*/
static void setRadiusOnElement(Element *e, int *r);
protected:
void startDrag(Qt::DropActions supportedActions);
private:
int *m_radius = new int(5);
};
LDA_END_NAMESPACE
#endif // ELEMENTLIST_H