2012-01-04 22:13:01 +00:00
|
|
|
/* display_filter_edit.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
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2012-01-04 22:13:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DISPLAYFILTEREDIT_H
|
|
|
|
#define DISPLAYFILTEREDIT_H
|
|
|
|
|
2012-12-05 19:04:59 +00:00
|
|
|
#include <QToolButton>
|
2012-10-08 20:01:59 +00:00
|
|
|
#include "syntax_line_edit.h"
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2012-10-08 20:01:59 +00:00
|
|
|
class DisplayFilterEdit : public SyntaxLineEdit
|
2012-01-04 22:13:01 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2013-11-21 01:28:17 +00:00
|
|
|
explicit DisplayFilterEdit(QWidget *parent = 0, bool plain = true);
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *evt);
|
|
|
|
void resizeEvent(QResizeEvent *);
|
|
|
|
// void focusInEvent(QFocusEvent *evt);
|
|
|
|
// void focusOutEvent(QFocusEvent *evt);
|
|
|
|
|
2012-12-07 01:46:20 +00:00
|
|
|
public slots:
|
|
|
|
void applyDisplayFilter();
|
|
|
|
void displayFilterSuccess(bool success);
|
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
private slots:
|
|
|
|
void checkFilter(const QString &text);
|
2013-02-06 18:22:54 +00:00
|
|
|
void bookmarkClicked();
|
2014-03-11 04:27:50 +00:00
|
|
|
void clearFilter();
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
private:
|
2012-08-23 02:59:31 +00:00
|
|
|
bool plain_;
|
|
|
|
QString empty_filter_message_;
|
|
|
|
QToolButton *bookmark_button_;
|
|
|
|
QToolButton *clear_button_;
|
|
|
|
QToolButton *apply_button_;
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
signals:
|
2012-01-14 00:16:16 +00:00
|
|
|
void pushFilterSyntaxStatus(QString&);
|
|
|
|
void popFilterSyntaxStatus();
|
|
|
|
void pushFilterSyntaxWarning(QString&);
|
2012-12-07 01:46:20 +00:00
|
|
|
void filterPackets(QString& new_filter, bool force);
|
2013-02-06 18:22:54 +00:00
|
|
|
void addBookmark(QString filter);
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DISPLAYFILTEREDIT_H
|
2012-09-04 08:18:31 +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:
|
|
|
|
*/
|