X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdialogs%2Fconnect.hpp;h=e14972abd47150824dec6d811596df855bcec014;hp=b46da06fdfc28ce55645323750b94e5a95dc7a69;hb=09f55d9665efb3b17ba7de4bae47be6989e884fe;hpb=2acdb232d6bb452cfdfaea3ef5218fb4da592329 diff --git a/pv/dialogs/connect.hpp b/pv/dialogs/connect.hpp index b46da06f..e14972ab 100644 --- a/pv/dialogs/connect.hpp +++ b/pv/dialogs/connect.hpp @@ -14,31 +14,38 @@ * 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 . */ -#ifndef PULSEVIEW_PV_CONNECT_H -#define PULSEVIEW_PV_CONNECT_H +#ifndef PULSEVIEW_PV_CONNECT_HPP +#define PULSEVIEW_PV_CONNECT_HPP #include +#include #include #include #include #include +#include #include +#include #include #include #include namespace sigrok { - class Driver; - class HardwareDevice; +class Driver; +} + +namespace pv { +namespace devices { +class HardwareDevice; +} } Q_DECLARE_METATYPE(std::shared_ptr); -Q_DECLARE_METATYPE(std::shared_ptr); +Q_DECLARE_METATYPE(std::shared_ptr); namespace pv { @@ -53,17 +60,20 @@ class Connect : public QDialog public: Connect(QWidget *parent, pv::DeviceManager &device_manager); - std::shared_ptr get_selected_device() const; + std::shared_ptr get_selected_device() const; private: void populate_drivers(); - void unset_connection(); + void populate_serials(std::shared_ptr driver); - void set_serial_connection(); + void unset_connection(); 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(); @@ -77,7 +87,12 @@ private: QComboBox drivers_; - QLineEdit serial_device_; + QComboBox serial_devices_; + + QWidget *tcp_config_; + QLineEdit *tcp_host_; + QSpinBox *tcp_port_; + QCheckBox *tcp_use_vxi_; QPushButton scan_button_; QListWidget device_list_; @@ -88,4 +103,4 @@ private: } // namespace dialogs } // namespace pv -#endif // PULSEVIEW_PV_CONNECT_H +#endif // PULSEVIEW_PV_CONNECT_HPP