X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdialogs%2Fconnect.hpp;h=fe158740760c2e3964350b9990a95146ec81f86a;hp=a8f793ac1dc3e8f4b73ee9b9f86ead60c19343c6;hb=8845be3c9c7d5aca02fb2efc4038f4735a5242d6;hpb=da30ecb7e72bd2547e524258efa5ec642988b70b diff --git a/pv/dialogs/connect.hpp b/pv/dialogs/connect.hpp index a8f793ac..fe158740 100644 --- a/pv/dialogs/connect.hpp +++ b/pv/dialogs/connect.hpp @@ -14,24 +14,28 @@ * 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 -#define PULSEVIEW_PV_CONNECT_HPP +#ifndef PULSEVIEW_PV_DIALOGS_CONNECT_HPP +#define PULSEVIEW_PV_DIALOGS_CONNECT_HPP #include +#include #include #include #include #include +#include #include #include #include +#include #include +using std::shared_ptr; + namespace sigrok { class Driver; } @@ -42,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 { @@ -58,19 +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); - 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(); @@ -84,7 +89,13 @@ private: QComboBox drivers_; - QComboBox serial_devices_; + QWidget *serial_config_; + QComboBox serial_devices_, serial_baudrate_; + + QWidget *tcp_config_; + QLineEdit *tcp_host_; + QSpinBox *tcp_port_; + QComboBox *tcp_protocol_; QPushButton scan_button_; QListWidget device_list_; @@ -95,4 +106,4 @@ private: } // namespace dialogs } // namespace pv -#endif // PULSEVIEW_PV_CONNECT_HPP +#endif // PULSEVIEW_PV_DIALOGS_CONNECT_HPP