Associated scans are displayed first in a bold font.
[dhcpcd-ui] / src / dhcpcd-qt / dhcpcd-wi.h
index d46c0b3fef0d2300d2e5d5e637a6b3b2c657833d..88ce6de3fcd5dcaa633ba629815a05fc12530007 100644 (file)
 #ifndef DHCPCD_WI_H
 #define DHCPCD_WI_H
 
+#include <QAction>
 #include <QObject>
 
 #include "dhcpcd.h"
 
-class DhcpcdQt;
+class QMenu;
 class QSocketNotifier;
 class QTimer;
+class QWidgetAction;
+
+class DhcpcdQt;
+class DhcpcdSsidMenu;
 
 class DhcpcdWi : public QObject
 {
@@ -45,11 +50,15 @@ public:
        DHCPCD_WPA *getWpa();
 
        DHCPCD_WI_SCAN *getScans();
-       void setScans(DHCPCD_WI_SCAN *scans);
+       bool setScans(DHCPCD_WI_SCAN *scans);
+
+       void createMenu(QMenu *parent);
+       QMenu *createIfMenu(QMenu *parent);
 
 private slots:
        void dispatch();
        void wpaOpen();
+       void connectSsid(DHCPCD_WI_SCAN *scan);
 
 private:
        DhcpcdQt *dhcpcdQt;
@@ -58,6 +67,11 @@ private:
 
        QSocketNotifier *notifier;
        QTimer *retryOpenTimer;
+
+       QMenu *menu;
+       void createMenuItem(QMenu *menu, DHCPCD_WI_SCAN *scan,
+           QAction *before = NULL);
+       void createMenu1(QMenu *parent);
 };
 
 #endif