HACK: 1. try to match RowsetProperties
[wireshark-wip.git] / ui / qt / column_preferences_frame.h
blob24d1e4e16cdef9c838a25b3fbf75933cbbf101ce
1 /* column_preferences_frame.h
3 * $Id$
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
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.
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.
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.
24 #ifndef COLUMN_PREFERENCES_FRAME_H
25 #define COLUMN_PREFERENCES_FRAME_H
27 #include <QFrame>
28 #include <QComboBox>
29 #include <QTreeWidgetItem>
31 namespace Ui {
32 class ColumnPreferencesFrame;
35 class ColumnPreferencesFrame : public QFrame
37 Q_OBJECT
39 public:
40 explicit ColumnPreferencesFrame(QWidget *parent = 0);
41 ~ColumnPreferencesFrame();
43 void unstash();
45 protected:
46 void keyPressEvent(QKeyEvent *evt);
48 private:
49 Ui::ColumnPreferencesFrame *ui;
51 int cur_column_;
52 QLineEdit *cur_line_edit_;
53 QString saved_col_string_;
54 QComboBox *cur_combo_box_;
55 int saved_combo_idx_;
57 void addColumn(bool visible, const char *title, int fmt, const char *custom_field, int custom_occurrence);
58 void updateWidgets(void);
60 private slots:
61 void on_columnTreeWidget_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
62 void on_columnTreeWidget_itemActivated(QTreeWidgetItem *item, int column);
63 void lineEditDestroyed();
64 void comboDestroyed();
65 void columnTitleEditingFinished();
66 void columnTypeCurrentIndexChanged(int index);
67 void customFieldTextChanged(QString);
68 void customFieldEditingFinished();
69 void customOccurrenceTextChanged(QString);
70 void customOccurrenceEditingFinished();
71 void on_newToolButton_clicked();
72 void on_deleteToolButton_clicked();
75 #endif // COLUMN_PREFERENCES_FRAME_H