-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOkvir.h
45 lines (34 loc) · 1.06 KB
/
Okvir.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
#pragma once
#include "Paketi.h"
#include <string>
#include <QAbstractTableModel>
#include <QDebug>
struct MAC_Adr{
std::string Adr1;
std::string Adr2;
std::string Adr3;
std::string Adr4;
};
class Okvir{
public:
double Vrijeme;
MAC_Adr MAC;
int JacinaSignala;
std::string VrstaOkvira;
std::vector<QString> macAdrese;
Paket *paket;
};
class OkvirModel : public QAbstractTableModel {
Q_OBJECT
public:
OkvirModel(QObject *parent = NULL);
void populateData(QList<Okvir> okviri);
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
bool dodajOkvir(Okvir okvir, const QModelIndex &parent = QModelIndex());
private:
QList<Okvir> okviri;
};
Q_DECLARE_METATYPE(Okvir);