2013-01-05 02:30:58 +00:00
|
|
|
/* preferences_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 PREFERENCES_DIALOG_H
|
|
|
|
#define PREFERENCES_DIALOG_H
|
|
|
|
|
2015-01-03 20:52:54 +00:00
|
|
|
#include <config.h>
|
2013-01-07 19:13:03 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include <epan/prefs.h>
|
|
|
|
|
2014-09-23 23:39:52 +00:00
|
|
|
#include "wireshark_application.h"
|
|
|
|
|
2016-02-28 18:23:20 +00:00
|
|
|
#include "geometry_state_dialog.h"
|
2013-01-07 19:13:03 +00:00
|
|
|
#include <QTreeWidgetItem>
|
2015-02-08 20:24:19 +00:00
|
|
|
|
|
|
|
class QComboBox;
|
2013-01-05 02:30:58 +00:00
|
|
|
|
2013-01-19 00:57:57 +00:00
|
|
|
extern pref_t *prefFromPrefPtr(void *pref_ptr);
|
|
|
|
|
2013-01-05 02:30:58 +00:00
|
|
|
namespace Ui {
|
|
|
|
class PreferencesDialog;
|
|
|
|
}
|
|
|
|
|
2016-02-28 18:23:20 +00:00
|
|
|
class PreferencesDialog : public GeometryStateDialog
|
2013-01-05 02:30:58 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2013-01-05 02:30:58 +00:00
|
|
|
public:
|
2015-01-01 19:41:03 +00:00
|
|
|
// This, prefsTree, and stackedWidget must all correspond to each other.
|
|
|
|
enum PreferencesPane {
|
|
|
|
ppAppearance,
|
|
|
|
ppLayout,
|
|
|
|
ppColumn,
|
|
|
|
ppFontAndColor,
|
|
|
|
ppCapture,
|
2017-07-17 17:46:28 +00:00
|
|
|
ppExpert,
|
2015-01-01 19:41:03 +00:00
|
|
|
ppFilterExpressions
|
|
|
|
};
|
|
|
|
|
2015-06-15 01:05:02 +00:00
|
|
|
explicit PreferencesDialog(QWidget *parent = 0);
|
2013-01-05 02:30:58 +00:00
|
|
|
~PreferencesDialog();
|
2015-06-15 01:05:02 +00:00
|
|
|
void setPane(PreferencesPane start_pane);
|
|
|
|
void setPane(const QString module_name);
|
|
|
|
|
2013-01-05 02:30:58 +00:00
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *evt);
|
2013-01-14 22:21:11 +00:00
|
|
|
void keyPressEvent(QKeyEvent *evt);
|
2013-01-05 02:30:58 +00:00
|
|
|
|
|
|
|
private:
|
2013-01-07 19:13:03 +00:00
|
|
|
void updateItem(QTreeWidgetItem &item);
|
|
|
|
|
2013-01-05 02:30:58 +00:00
|
|
|
Ui::PreferencesDialog *pd_ui_;
|
2015-06-15 01:05:02 +00:00
|
|
|
QHash<PreferencesDialog::PreferencesPane, QTreeWidgetItem *>prefs_pane_to_item_;
|
2013-01-14 22:21:11 +00:00
|
|
|
int cur_pref_type_;
|
|
|
|
QLineEdit *cur_line_edit_;
|
|
|
|
QString saved_string_pref_;
|
|
|
|
QComboBox *cur_combo_box_;
|
|
|
|
int saved_combo_idx_;
|
2013-01-07 19:13:03 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_prefsTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
2016-02-12 21:40:05 +00:00
|
|
|
void on_advancedSearchLineEdit_textEdited(const QString &search_re);
|
2013-01-14 22:21:11 +00:00
|
|
|
void lineEditPrefDestroyed();
|
|
|
|
void enumPrefDestroyed();
|
2013-01-07 19:13:03 +00:00
|
|
|
void uintPrefEditingFinished();
|
|
|
|
void enumPrefCurrentIndexChanged(int index);
|
|
|
|
void stringPrefEditingFinished();
|
|
|
|
void rangePrefTextChanged(const QString & text);
|
|
|
|
void rangePrefEditingFinished();
|
2013-01-18 00:50:14 +00:00
|
|
|
|
2013-01-07 19:13:03 +00:00
|
|
|
void on_advancedTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
2013-07-25 23:49:47 +00:00
|
|
|
void on_advancedTree_itemActivated(QTreeWidgetItem *item, int column);
|
2013-01-18 00:50:14 +00:00
|
|
|
|
|
|
|
void on_buttonBox_accepted();
|
2017-06-22 15:34:48 +00:00
|
|
|
void on_buttonBox_rejected();
|
2013-01-18 00:50:14 +00:00
|
|
|
void on_buttonBox_helpRequested();
|
2013-01-05 02:30:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PREFERENCES_DIALOG_H
|