X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdialogs%2Fconnect.hpp;h=d9cf0a53cfc689b3142b64ae4d078b2a3b0ed7fc;hp=0cb50fbff060edd6bcb6c4c5e554a19ca18fb0fd;hb=b5940cf0ef30b3519389da8c8768aee4d4424415;hpb=26f209b713171014a4f6dc3546b64bf691727cfd diff --git a/pv/dialogs/connect.hpp b/pv/dialogs/connect.hpp index 0cb50fbf..d9cf0a53 100644 --- a/pv/dialogs/connect.hpp +++ b/pv/dialogs/connect.hpp @@ -14,8 +14,7 @@ * 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_HPP @@ -23,17 +22,20 @@ #include +#include #include #include #include #include #include #include -#include #include #include +#include #include +using std::shared_ptr; + namespace sigrok { class Driver; } @@ -44,8 +46,8 @@ class HardwareDevice; } } -Q_DECLARE_METATYPE(std::shared_ptr); -Q_DECLARE_METATYPE(std::shared_ptr); +Q_DECLARE_METATYPE(shared_ptr); +Q_DECLARE_METATYPE(shared_ptr); namespace pv { @@ -60,20 +62,20 @@ class Connect : public QDialog public: Connect(QWidget *parent, pv::DeviceManager &device_manager); - std::shared_ptr get_selected_device() const; + shared_ptr get_selected_device() const; private: void populate_drivers(); - void populate_serials(std::shared_ptr driver); + void populate_serials(shared_ptr driver); void unset_connection(); - void set_serial_connection(std::shared_ptr driver); - void set_tcp_connection(std::shared_ptr 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(); @@ -89,10 +91,10 @@ private: QComboBox serial_devices_; - QWidget tcp_endpoint_; - QHBoxLayout tcp_endpoint_layout_; - QLineEdit tcp_host_; - QSpinBox tcp_port_; + QWidget *tcp_config_; + QLineEdit *tcp_host_; + QSpinBox *tcp_port_; + QCheckBox *tcp_use_vxi_; QPushButton scan_button_; QListWidget device_list_;