Fix preferences dialog.
[dhcpcd-ui] / src / dhcpcd-qt / dhcpcd-preferences.h
index 55dd2d27a10d0b3e0eebaef7d324faf6de06e20a..c90e92dc6efec8c4a91173c4bdbec3b70c77480f 100644 (file)
 
 #include <QDialog>
 
 
 #include <QDialog>
 
+#include "dhcpcd.h"
+
 class DhcpcdQt;
 class DhcpcdQt;
+class QCheckBox;
+class QComboBox;
 class QLabel;
 class QLabel;
+class QLineEdit;
+class QPushButton;
 
 class DhcpcdPreferences : public QDialog
 {
 
 class DhcpcdPreferences : public QDialog
 {
@@ -38,13 +44,44 @@ class DhcpcdPreferences : public QDialog
 
 public:
        DhcpcdPreferences(DhcpcdQt *parent = 0);
 
 public:
        DhcpcdPreferences(DhcpcdQt *parent = 0);
+       ~DhcpcdPreferences();
 
 protected:
        void closeEvent(QCloseEvent *e);
 
 
 protected:
        void closeEvent(QCloseEvent *e);
 
+private slots:
+       void clearConfig();
+       void showConfig();
+       void listBlocks(const QString &txt);
+       void showBlock(const QString &txt);
+       void rebind();
+       void tryClose();
+
 private:
        DhcpcdQt *parent;
 private:
        DhcpcdQt *parent;
-       QLabel *notLabel;
+       QComboBox *what;
+       QComboBox *blocks;
+       char *eBlock;
+       char *eWhat;
+
+       DHCPCD_IF *iface;
+       char *name;
+       DHCPCD_OPTION *config;
+       const char *getString(QLineEdit *le);
+       bool setOption(const char *opt, const char *val, bool *ret);
+       bool makeConfig();
+       bool changedConfig();
+       bool writeConfig(bool *cancel);
+       bool tryRebind(const char *ifname);
+
+       QCheckBox *autoConf;
+       QWidget *ipSetup;
+       QLineEdit *ip;
+       QLineEdit *router;
+       QLineEdit *rdnss;
+       QLineEdit *dnssl;
+
+       QPushButton *clear;
 };
 
 #endif
 };
 
 #endif