-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWifiSucelja.hpp
48 lines (37 loc) · 1.29 KB
/
WifiSucelja.hpp
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
#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 "nl80211.h"
#include <netlink/netlink.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/ctrl.h>
#include <netlink/addr.h>
#include <sys/types.h>
namespace WifiSucelja {
bool JeBezicni(std::string naziv);
QList<QString> GetSvaSucelja();
bool PostaviUMonitorskiNacin(std::string 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;
};