forked from rpelorosso/pcb-tracer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSidebar.h
More file actions
42 lines (34 loc) · 1.22 KB
/
Copy pathSidebar.h
File metadata and controls
42 lines (34 loc) · 1.22 KB
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
#ifndef SIDEBAR_H
#define SIDEBAR_H
#include <QDockWidget>
#include <QTabWidget>
#include <QListWidget>
#include <QIcon>
#include "Node.h"
#include "NotesTool.h"
#include "Component.h"
//#include "notes_tool.h"
#include "CommunicationHub.h"
class Sidebar : public QDockWidget {
public:
Sidebar(QWidget* parent = nullptr);
private:
void setupUi();
void addTabsToDockTabs();
void setupConnections();
void onListItemDoubleClicked(QListWidgetItem* item);
std::pair<QListWidgetItem*, int> findItemById(QListWidget* listWidget, const int itemId);
void nodeEventHandler(const Node* node, HubEvent action);
void noteEventHandler(TextNote* note, HubEvent action);
void onSceneCleanHandler(void* data, HubEvent action);
void componentEventHandler(Component* component, HubEvent action);
void addComponentToList(Component* component, QListWidget* listWidget);
void removeComponentFromList(Component* component, QListWidget* listWidget);
void addNoteToList(TextNote* note, QListWidget* listWidget);
void removeNoteFromList(TextNote* note, QListWidget* listWidget);
QTabWidget* m_dockTabs;
QListWidget* m_tab1;
QListWidget* m_tab2;
QListWidget* m_tab3;
};
#endif // SIDEBAR_H