-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathVertexList.h
49 lines (41 loc) · 1.02 KB
/
VertexList.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
47
48
49
//
// Created by Андрей Москалёв on 21.10.2019.
//
#ifndef TREESPRESENTATION_VERTEXLIST_H
#define TREESPRESENTATION_VERTEXLIST_H
#include <QWidget>
#include <QVBoxLayout>
#include <QToolButton>
#include <QLabel>
#include <vector>
#include <QListWidget>
#include <QLineEdit>
#include <QDebug>
class VertexListItem : public QWidget {
Q_OBJECT
public:
explicit VertexListItem(int value, QListWidget * list, QWidget * parent = nullptr);
~VertexListItem() override = default;
int value;
void remove();
QListWidget * list;
signals:
void removedItem();
private:
QHBoxLayout * mainHBoxLayout;
};
class VertexList : public QWidget {
Q_OBJECT
public:
explicit VertexList(QWidget * parent = nullptr);
~VertexList() override = default;
bool add(int vToAdd);
int itemsCount();
void removeProxy();
bool remove(int key);
std::vector<VertexListItem *> getItems();
QListWidget * mainList;
signals:
void removedItem(int key);
};
#endif //TREESPRESENTATION_VERTEXLIST_H