3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 /* Derived from gtk/filter_utils.h */
24 #ifndef FILTER_ACTION_H
25 #define FILTER_ACTION_H
27 #include "ui/utf8_entities.h"
31 class FilterAction : public QAction
46 /* Action type - says what to do with the filter */
56 /* Action direction */
57 enum ActionDirection {
58 ActionDirectionAToFromB,
60 ActionDirectionAFromB,
61 ActionDirectionAToFromAny,
62 ActionDirectionAToAny,
63 ActionDirectionAFromAny,
64 ActionDirectionAnyToFromB,
65 ActionDirectionAnyToB,
66 ActionDirectionAnyFromB
69 explicit FilterAction(QObject *parent, Action action, ActionType type, ActionDirection direction);
70 explicit FilterAction(QObject *parent, Action action, ActionType type);
71 explicit FilterAction(QObject *parent, Action action);
73 Action action() { return action_; }
74 static const QList<Action> actions();
75 static const QString actionName(Action action);
77 ActionType actionType() { return type_; }
78 static const QList<ActionType> actionTypes(Action filter_action = ActionApply);
79 static const QString actionTypeName(ActionType type);
81 ActionDirection actionDirection() { return direction_; }
82 static const QList<ActionDirection> actionDirections();
83 static const QString actionDirectionName(ActionDirection direction);
92 ActionDirection direction_;
96 #endif // FILTER_ACTION_H
104 * indent-tabs-mode: nil
107 * ex: set shiftwidth=4 tabstop=8 expandtab:
108 * :indentSize=4:tabSize=8:noTabs=true: