projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix item dragging
[pulseview.git]
/
pv
/
dialogs
/
connect.hpp
diff --git
a/pv/dialogs/connect.hpp
b/pv/dialogs/connect.hpp
index b46da06fdfc28ce55645323750b94e5a95dc7a69..914c58783ee3693b87ed6b7c2a3232c0eb119a62 100644
(file)
--- a/
pv/dialogs/connect.hpp
+++ b/
pv/dialogs/connect.hpp
@@
-14,31
+14,40
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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_H
PP
+#define PULSEVIEW_PV_CONNECT_H
PP
#include <memory>
#include <memory>
+#include <QCheckBox>
#include <QComboBox>
#include <QDialog>
#include <QDialogButtonBox>
#include <QFormLayout>
#include <QComboBox>
#include <QDialog>
#include <QDialogButtonBox>
#include <QFormLayout>
+#include <QHBoxLayout>
#include <QLineEdit>
#include <QListWidget>
#include <QPushButton>
#include <QLineEdit>
#include <QListWidget>
#include <QPushButton>
+#include <QSpinBox>
#include <QVBoxLayout>
#include <QVBoxLayout>
+using std::shared_ptr;
+
namespace sigrok {
namespace sigrok {
- class Driver;
- class HardwareDevice;
+class Driver;
+}
+
+namespace pv {
+namespace devices {
+class HardwareDevice;
+}
}
}
-Q_DECLARE_METATYPE(s
td::s
hared_ptr<sigrok::Driver>);
-Q_DECLARE_METATYPE(s
td::shared_ptr<sigrok
::HardwareDevice>);
+Q_DECLARE_METATYPE(shared_ptr<sigrok::Driver>);
+Q_DECLARE_METATYPE(s
hared_ptr<pv::devices
::HardwareDevice>);
namespace pv {
namespace pv {
@@
-53,17
+62,20
@@
class Connect : public QDialog
public:
Connect(QWidget *parent, pv::DeviceManager &device_manager);
public:
Connect(QWidget *parent, pv::DeviceManager &device_manager);
- s
td::shared_ptr<sigrok
::HardwareDevice> get_selected_device() const;
+ s
hared_ptr<devices
::HardwareDevice> get_selected_device() const;
private:
void populate_drivers();
private:
void populate_drivers();
- void
unset_connection(
);
+ void
populate_serials(shared_ptr<sigrok::Driver> driver
);
- void
set_serial
_connection();
+ void
unset
_connection();
private Q_SLOTS:
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();
void scan_pressed();
@@
-77,7
+89,12
@@
private:
QComboBox drivers_;
QComboBox drivers_;
- QLineEdit serial_device_;
+ QComboBox serial_devices_;
+
+ QWidget *tcp_config_;
+ QLineEdit *tcp_host_;
+ QSpinBox *tcp_port_;
+ QComboBox *tcp_protocol_;
QPushButton scan_button_;
QListWidget device_list_;
QPushButton scan_button_;
QListWidget device_list_;
@@
-88,4
+105,4
@@
private:
} // namespace dialogs
} // namespace pv
} // namespace dialogs
} // namespace pv
-#endif // PULSEVIEW_PV_CONNECT_H
+#endif // PULSEVIEW_PV_CONNECT_H
PP