-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWiFiSucelja.h
51 lines (36 loc) · 1.24 KB
/
WiFiSucelja.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
#pragma once
#include <cstdlib>
#include <string>
#include <vector>
#include <QAbstractTableModel>
#include "sys/socket.h"
#include "linux/wireless.h"
#include <linux/if_tun.h>
#include <ifaddrs.h>
#include "string.h"
#include "unistd.h"
#include "sys/ioctl.h"
#include <sys/types.h>
#include "Cvor.h"
#include <QDebug>
#include <mutex>
namespace WifiSucelja {
bool JeBezicni(QString naziv);
QList<QString> GetSvaSucelja();
QList<Cvor> DohvatiCvorove();
bool PostaviUMonitorskiNacin(QString uredaj="");
unsigned int if_nametoindex(const char *ifname);
}
class WifiSuceljeModel : public QAbstractTableModel {
Q_OBJECT
public:
WifiSuceljeModel(QObject *parent = NULL);
//void populateData(std::vector<std::string> _sucelja);
void populateData(QList<QString> _sucelja);
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;
private:
QList<QString> sucelja;
};