* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef PULSEVIEW_PV_CONNECT_H
-#define PULSEVIEW_PV_CONNECT_H
+#ifndef PULSEVIEW_PV_CONNECT_HPP
+#define PULSEVIEW_PV_CONNECT_HPP
#include <memory>
#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 {
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();
+ void populate_serials(std::shared_ptr<sigrok::Driver> driver);
+
void unset_connection();
- void set_serial_connection();
+ void set_serial_connection(std::shared_ptr<sigrok::Driver> driver);
private Q_SLOTS:
void device_selected(int index);
QComboBox drivers_;
- QLineEdit serial_device_;
+ QComboBox serial_devices_;
QPushButton scan_button_;
QListWidget device_list_;
} // namespace dialogs
} // namespace pv
-#endif // PULSEVIEW_PV_CONNECT_H
+#endif // PULSEVIEW_PV_CONNECT_HPP