Add filter color preferences to the Qt UI similar to r50203. Fixes bug
[metze/wireshark/wip.git] / ui / qt / font_color_preferences_frame.h
1 /* font_color_preferences_frame.h
2  *
3  * $Id$
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 1998 Gerald Combs
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23
24 #ifndef FONT_COLOR_PREFERENCES_FRAME_H
25 #define FONT_COLOR_PREFERENCES_FRAME_H
26
27 #include "preferences_dialog.h"
28
29 #include <QFrame>
30 #include <QFont>
31
32 namespace Ui {
33 class FontColorPreferencesFrame;
34 }
35
36 class FontColorPreferencesFrame : public QFrame
37 {
38     Q_OBJECT
39     
40 public:
41     explicit FontColorPreferencesFrame(QWidget *parent = 0);
42     ~FontColorPreferencesFrame();
43     
44 protected:
45     void showEvent(QShowEvent *evt);
46
47 private:
48     Ui::FontColorPreferencesFrame *ui;
49
50     pref_t *pref_qt_gui_font_name_;
51     pref_t *pref_marked_fg_;
52     pref_t *pref_marked_bg_;
53     pref_t *pref_ignored_fg_;
54     pref_t *pref_ignored_bg_;
55     pref_t *pref_client_fg_;
56     pref_t *pref_client_bg_;
57     pref_t *pref_server_fg_;
58     pref_t *pref_server_bg_;
59     pref_t *pref_valid_fg_;
60     pref_t *pref_valid_bg_;
61     pref_t *pref_invalid_fg_;
62     pref_t *pref_invalid_bg_;
63     pref_t *pref_deprecated_fg_;
64     pref_t *pref_deprecated_bg_;
65     QFont cur_font_;
66
67     void updateWidgets();
68     void changeColor(pref_t *pref);
69
70 private slots:
71     void on_fontPushButton_clicked();
72
73     void on_markedFGPushButton_clicked();
74     void on_markedBGPushButton_clicked();
75     void on_ignoredFGPushButton_clicked();
76     void on_ignoredBGPushButton_clicked();
77     void on_clientFGPushButton_clicked();
78     void on_clientBGPushButton_clicked();
79     void on_serverFGPushButton_clicked();
80     void on_serverBGPushButton_clicked();
81     void on_validFilterBGPushButton_clicked();
82     void on_invalidFilterBGPushButton_clicked();
83     void on_deprecatedFilterBGPushButton_clicked();
84 };
85
86 #endif // FONT_COLOR_PREFERENCES_FRAME_H