CFLinker.h 892 Bytes
Newer Older
1
2
3
4
5
6
#ifndef CFLINKER_H
#define CFLINKER_H

#include "globalDefinitions.h"
#include "crazyFly.h"
#include "crazyFlyZone.h"
7
8
9
#include "ui_mainguiwindow.h"

#include "rosNodeThread.h"
10

11

12
13
14
class CFLinker
{
public:
15
16
17
18
19
20

    struct link {
        int student_id;
        int cf_zone_index;
        std::string cf_name;
    };
21
    explicit CFLinker(Ui::MainGUIWindow* ui, std::vector<crazyFly*> *crazyflies_vector, std::vector<crazyFlyZone*> *crazyfly_zones);
22
23
    ~CFLinker();

24
    void link();
25

26
    void unlink();
27
28

    std::vector<struct link> links;
29

30
31
private:

32
33
34
    // QTableWidget m_p_table;

    Ui::MainGUIWindow* m_ui;
35
36
37
38
39
40
    std::vector<crazyFly*>* m_crazyflies_vector;
    std::vector<crazyFlyZone*>* m_crazyfly_zones;

    int getCFZoneIndexFromName(QString name);
    int getCFIndexFromName(std::string name);
    void addNewRow(int student_id, std::string crazyfly_name, int cf_zone_index);
41
42
43
44
};


#endif