diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2017-04-28 21:26:53 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2017-05-02 09:34:01 +0000 |
commit | 741d4f5898082f29c6732f16dd57139021545c15 (patch) | |
tree | 92f378c9557fd526f5469d8a4f30ea6563cd52e4 /ui/qt/interface_toolbar.h | |
parent | afb4de370a4c54e08e9367b55ae142414efc6e8f (diff) |
Qt: Interface Toolbar improvements
- Select one of the capturing interfaces when start capture
- Only send user changed control values when start capture
- Don't show hidden interfaces
- Allow a toolbar with no interfaces
- Renamed button role "reset" to "restore"
- Improved control number validation
- Updated documentation
Change-Id: Icc8d04043c95c1f3ef8d7cdc3b251be4471cba0a
Reviewed-on: https://code.wireshark.org/review/21445
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt/interface_toolbar.h')
-rw-r--r-- | ui/qt/interface_toolbar.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ui/qt/interface_toolbar.h b/ui/qt/interface_toolbar.h index ebde37db4d..cdbfb57906 100644 --- a/ui/qt/interface_toolbar.h +++ b/ui/qt/interface_toolbar.h @@ -29,6 +29,7 @@ #include "interface_toolbar_reader.h" #include <QFrame> +#include <QList> #include <QMap> #include <QString> @@ -42,6 +43,7 @@ struct interface_values QThread *reader_thread; int out_fd; QMap<int, QByteArray> value; + QMap<int, bool> value_changed; QMap<int, QList<QByteArray> > list; FunnelTextDialog *log_dialog; QString log_text; @@ -56,11 +58,12 @@ public: explicit InterfaceToolbar(QWidget *parent = 0, const iface_toolbar *toolbar = NULL); ~InterfaceToolbar(); - void startCapture(QString ifname, QString control_in, QString control_out); + void startCapture(GArray *ifaces); void stopCapture(); bool hasInterface(QString ifname); public slots: + void interfaceListChanged(); void controlReceived(QString ifname, int num, int command, QByteArray message); signals: @@ -70,13 +73,13 @@ private slots: void startReaderThread(QString ifname, QString control_in); void updateWidgets(); - void onButtonPressed(); + void onControlButtonPressed(); + void onLogButtonPressed(); + void onHelpButtonPressed(); + void onRestoreButtonPressed(); void onCheckBoxChanged(int state); void onComboBoxChanged(int idx); void onLineEditChanged(); - void onLogButtonPressed(); - void onHelpButtonPressed(); - void onResetButtonPressed(); void closeLog(); |