]> sigrok.org Git - pulseview.git/blobdiff - pv/dialogs/connect.hpp
Build fixes for Qt5 Windows/mingw/MXE support.
[pulseview.git] / pv / dialogs / connect.hpp
index ba8339c7cc56d11cd250baa13d12384631ed3cfd..e14972abd47150824dec6d811596df855bcec014 100644 (file)
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef PULSEVIEW_PV_CONNECT_H
-#define PULSEVIEW_PV_CONNECT_H
+#ifndef PULSEVIEW_PV_CONNECT_HPP
+#define PULSEVIEW_PV_CONNECT_HPP
 
 #include <memory>
 
+#include <QCheckBox>
 #include <QComboBox>
 #include <QDialog>
 #include <QDialogButtonBox>
 #include <QFormLayout>
+#include <QHBoxLayout>
 #include <QLineEdit>
+#include <QSpinBox>
 #include <QListWidget>
 #include <QPushButton>
 #include <QVBoxLayout>
 
 namespace sigrok {
-       class Driver;
-       class HardwareDevice;
+class Driver;
+}
+
+namespace pv {
+namespace devices {
+class HardwareDevice;
+}
 }
 
 Q_DECLARE_METATYPE(std::shared_ptr<sigrok::Driver>);
-Q_DECLARE_METATYPE(std::shared_ptr<sigrok::HardwareDevice>);
+Q_DECLARE_METATYPE(std::shared_ptr<pv::devices::HardwareDevice>);
 
 namespace pv {
 
@@ -53,7 +60,7 @@ class Connect : public QDialog
 public:
        Connect(QWidget *parent, pv::DeviceManager &device_manager);
 
-       std::shared_ptr<sigrok::HardwareDevice> get_selected_device() const;
+       std::shared_ptr<devices::HardwareDevice> get_selected_device() const;
 
 private:
        void populate_drivers();
@@ -62,10 +69,11 @@ private:
 
        void unset_connection();
 
-       void set_serial_connection(std::shared_ptr<sigrok::Driver> driver);
-
 private Q_SLOTS:
-       void device_selected(int index);
+       void driver_selected(int index);
+
+       void serial_toggled(bool checked);
+       void tcp_toggled(bool checked);
 
        void scan_pressed();
 
@@ -81,6 +89,11 @@ private:
 
        QComboBox serial_devices_;
 
+       QWidget *tcp_config_;
+       QLineEdit *tcp_host_;
+       QSpinBox *tcp_port_;
+       QCheckBox *tcp_use_vxi_;
+
        QPushButton scan_button_;
        QListWidget device_list_;
 
@@ -90,4 +103,4 @@ private:
 } // namespace dialogs
 } // namespace pv
 
-#endif // PULSEVIEW_PV_CONNECT_H
+#endif // PULSEVIEW_PV_CONNECT_HPP