2014-06-24 09:36:51 +00:00
|
|
|
/* manage_interfaces_dialog.h
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MANAGE_INTERFACES_DIALOG_H
|
|
|
|
#define MANAGE_INTERFACES_DIALOG_H
|
|
|
|
|
2015-04-26 17:21:09 +00:00
|
|
|
#include <config.h>
|
2014-08-14 20:20:09 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include "capture_opts.h"
|
|
|
|
|
2016-02-28 18:23:20 +00:00
|
|
|
#include "geometry_state_dialog.h"
|
2014-06-24 09:36:51 +00:00
|
|
|
#include <QStyledItemDelegate>
|
2015-02-08 20:24:19 +00:00
|
|
|
|
|
|
|
class QTreeWidget;
|
|
|
|
class QTreeWidgetItem;
|
|
|
|
class QStandardItemModel;
|
|
|
|
|
|
|
|
class QLineEdit;
|
2014-08-04 11:57:17 +00:00
|
|
|
|
2014-08-14 20:20:09 +00:00
|
|
|
class PathChooserDelegate : public QStyledItemDelegate
|
2014-06-24 09:36:51 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private:
|
2014-08-14 20:20:09 +00:00
|
|
|
QTreeWidget* tree_;
|
|
|
|
mutable QTreeWidgetItem *path_item_;
|
|
|
|
mutable QWidget *path_editor_;
|
|
|
|
mutable QLineEdit *path_le_;
|
2014-06-24 09:36:51 +00:00
|
|
|
|
|
|
|
public:
|
2014-08-14 20:20:09 +00:00
|
|
|
PathChooserDelegate(QObject *parent = 0);
|
|
|
|
~PathChooserDelegate();
|
|
|
|
|
|
|
|
void setTree(QTreeWidget* tree) { tree_ = tree; }
|
2014-06-24 09:36:51 +00:00
|
|
|
|
2014-08-14 20:20:09 +00:00
|
|
|
protected:
|
2014-06-24 09:36:51 +00:00
|
|
|
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
2016-01-23 12:18:30 +00:00
|
|
|
void updateEditorGeometry (QWidget * editor, const QStyleOptionViewItem & option, const QModelIndex & index) const;
|
2014-06-24 09:36:51 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void stopEditor();
|
2014-08-14 20:20:09 +00:00
|
|
|
void browse_button_clicked();
|
2014-06-24 09:36:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ManageInterfacesDialog;
|
|
|
|
}
|
|
|
|
|
2016-02-28 18:23:20 +00:00
|
|
|
class ManageInterfacesDialog : public GeometryStateDialog
|
2014-06-24 09:36:51 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit ManageInterfacesDialog(QWidget *parent = 0);
|
|
|
|
~ManageInterfacesDialog();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::ManageInterfacesDialog *ui;
|
2014-08-14 20:20:09 +00:00
|
|
|
PathChooserDelegate new_pipe_item_delegate_;
|
2014-06-24 09:36:51 +00:00
|
|
|
|
|
|
|
void showPipes();
|
|
|
|
void showLocalInterfaces();
|
2014-08-04 11:57:17 +00:00
|
|
|
void showRemoteInterfaces();
|
2014-08-14 20:20:09 +00:00
|
|
|
void saveLocalHideChanges(QTreeWidgetItem *item);
|
|
|
|
void saveLocalCommentChanges(QTreeWidgetItem *item);
|
|
|
|
#if 0 // Not needed?
|
|
|
|
void checkBoxChanged(QTreeWidgetItem *item);
|
|
|
|
#endif
|
2014-06-24 09:36:51 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void ifsChanged();
|
2014-08-04 11:57:17 +00:00
|
|
|
#ifdef HAVE_PCAP_REMOTE
|
|
|
|
void remoteAdded(GList *rlist, remote_options *roptions);
|
|
|
|
void remoteSettingsChanged(interface_t *iface);
|
|
|
|
#endif
|
2014-06-24 09:36:51 +00:00
|
|
|
|
|
|
|
private slots:
|
2014-08-14 20:20:09 +00:00
|
|
|
void updateWidgets();
|
|
|
|
|
2014-06-24 09:36:51 +00:00
|
|
|
void on_buttonBox_accepted();
|
2014-08-14 20:20:09 +00:00
|
|
|
|
|
|
|
void on_addPipe_clicked();
|
|
|
|
void on_delPipe_clicked();
|
|
|
|
void pipeAccepted();
|
|
|
|
void on_pipeList_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
|
|
|
|
|
|
|
void localAccepted();
|
2016-02-19 18:47:16 +00:00
|
|
|
void localListItemDoubleClicked(QTreeWidgetItem * item, int column);
|
|
|
|
|
2014-08-04 11:57:17 +00:00
|
|
|
#ifdef HAVE_PCAP_REMOTE
|
|
|
|
void on_addRemote_clicked();
|
2014-08-14 20:20:09 +00:00
|
|
|
void on_delRemote_clicked();
|
|
|
|
void remoteAccepted();
|
|
|
|
void on_remoteList_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
|
|
|
void on_remoteList_itemClicked(QTreeWidgetItem *item, int column);
|
2014-08-04 11:57:17 +00:00
|
|
|
void addRemoteInterfaces(GList *rlist, remote_options *roptions);
|
|
|
|
void setRemoteSettings(interface_t *iface);
|
|
|
|
void remoteSelectionChanged(QTreeWidgetItem* item, int col);
|
|
|
|
void on_remoteSettings_clicked();
|
|
|
|
#endif
|
2014-08-14 20:20:09 +00:00
|
|
|
void on_buttonBox_helpRequested();
|
2014-06-24 09:36:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MANAGE_INTERFACES_DIALOG_H
|
|
|
|
|
2014-08-11 06:58:13 +00:00
|
|
|
/*
|
|
|
|
* Editor modelines
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|