We changed enough of dhcpcd-qt in 2017 to warrant a copyright bump.
[dhcpcd-ui] / src / dhcpcd-qt / dhcpcd-preferences.h
index 55dd2d27a10d0b3e0eebaef7d324faf6de06e20a..c658ca5273c5062ea552579103645648f21c36f6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * dhcpcd-qt
- * Copyright 2014 Roy Marples <roy@marples.name>
+ * Copyright 2014-2017 Roy Marples <roy@marples.name>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #include <QDialog>
 
+#include "dhcpcd.h"
+
 class DhcpcdQt;
+class QCheckBox;
+class QComboBox;
 class QLabel;
+class QLineEdit;
+class QPushButton;
 
 class DhcpcdPreferences : public QDialog
 {
@@ -38,13 +44,45 @@ class DhcpcdPreferences : public QDialog
 
 public:
        DhcpcdPreferences(DhcpcdQt *parent = 0);
+       ~DhcpcdPreferences();
 
 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;
-       QLabel *notLabel;
+       QComboBox *what;
+       QComboBox *blocks;
+       char *eBlock;
+       char *eWhat;
+
+       DHCPCD_IF *iface;
+       char *name;
+       int configIndex;
+       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