summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-01-21 05:29:14 +0000
committerGerald Combs <gerald@wireshark.org>2013-01-21 05:29:14 +0000
commit5fcf513161c40cb51b0742e874636b98f00b1398 (patch)
tree4e80aef24962ee00c8b6b0bb97d21499ccc508c2
parent3f3040b345bfb769c7dfd768ac27983c45872bf3 (diff)
downloadwireshark-5fcf513161c40cb51b0742e874636b98f00b1398.tar.gz
Add an initial layout preference pane. Set SVN properties.
svn path=/trunk/; revision=47190
-rw-r--r--image/layout.qrc10
-rw-r--r--ui/qt/CMakeLists.txt3
-rw-r--r--ui/qt/Makefile.am2
-rw-r--r--ui/qt/Makefile.common3
-rw-r--r--ui/qt/QtShark.pro12
-rw-r--r--ui/qt/layout_preferences_frame.cpp257
-rw-r--r--ui/qt/layout_preferences_frame.h80
-rw-r--r--ui/qt/layout_preferences_frame.ui363
-rw-r--r--ui/qt/main_window_preferences_frame.cpp2
-rw-r--r--ui/qt/main_window_preferences_frame.h2
-rw-r--r--ui/qt/preferences_dialog.cpp3
-rw-r--r--ui/qt/preferences_dialog.ui11
12 files changed, 738 insertions, 10 deletions
diff --git a/image/layout.qrc b/image/layout.qrc
new file mode 100644
index 0000000000..6843733966
--- /dev/null
+++ b/image/layout.qrc
@@ -0,0 +1,10 @@
+<RCC>
+ <qresource prefix="/layout">
+ <file>layout_1.png</file>
+ <file>layout_2.png</file>
+ <file>layout_3.png</file>
+ <file>layout_4.png</file>
+ <file>layout_5.png</file>
+ <file>layout_6.png</file>
+ </qresource>
+</RCC>
diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt
index 15ffd0a739..11ca4a7a15 100644
--- a/ui/qt/CMakeLists.txt
+++ b/ui/qt/CMakeLists.txt
@@ -40,6 +40,7 @@ set(QTSHARK_H_SRC
import_text_dialog.h
interface_tree.h
label_stack.h
+ layout_preferences_frame.h
main_status_bar.h
main_welcome.h
main_window.h
@@ -86,6 +87,7 @@ set(QTSHARK_CPP_SRC
import_text_dialog.cpp
interface_tree.cpp
label_stack.cpp
+ layout_preferences_frame.cpp
main.cpp
main_status_bar.cpp
main_welcome.cpp
@@ -123,6 +125,7 @@ set(QTSHARK_UI
export_object_dialog.ui
file_set_dialog.ui
import_text_dialog.ui
+ layout_preferences_frame.ui
main_welcome.ui
main_window.ui
main_window_preferences_frame.ui
diff --git a/ui/qt/Makefile.am b/ui/qt/Makefile.am
index 3ca2b4900a..66ac1c2869 100644
--- a/ui/qt/Makefile.am
+++ b/ui/qt/Makefile.am
@@ -89,6 +89,8 @@ file_set_dialog.cpp file_set_dialog.h: ui_file_set_dialog.h
import_text_dialog.cpp import_text_dialog.h: ui_import_text_dialog.h
+layout_preferences_frame.cpp layout_preferences_frame.h: ui_layout_preferences_frame.h
+
main_welcome.cpp main_welcome.h: ui_main_welcome.h
main_window.cpp main_window.h: ui_main_window.h
diff --git a/ui/qt/Makefile.common b/ui/qt/Makefile.common
index 21874903fb..ff22380158 100644
--- a/ui/qt/Makefile.common
+++ b/ui/qt/Makefile.common
@@ -34,6 +34,7 @@ GENERATED_NODIST_HEADER_FILES = \
ui_export_object_dialog.h \
ui_file_set_dialog.h \
ui_import_text_dialog.h \
+ ui_layout_preferences_frame.h \
ui_main_welcome.h \
ui_main_window.h \
ui_main_window_preferences_frame.h \
@@ -96,6 +97,7 @@ MOC_HDRS = \
import_text_dialog.h \
interface_tree.h \
label_stack.h \
+ layout_preferences_frame.h \
main_status_bar.h \
main_welcome.h \
main_window.h \
@@ -179,6 +181,7 @@ WIRESHARK_QT_SRC = \
import_text_dialog.cpp \
interface_tree.cpp \
label_stack.cpp \
+ layout_preferences_frame.cpp \
main.cpp \
main_status_bar.cpp \
main_welcome.cpp \
diff --git a/ui/qt/QtShark.pro b/ui/qt/QtShark.pro
index 4407aff530..03a3ccd68d 100644
--- a/ui/qt/QtShark.pro
+++ b/ui/qt/QtShark.pro
@@ -194,7 +194,8 @@ FORMS += main_window.ui \
time_shift_dialog.ui \
profile_dialog.ui \
preferences_dialog.ui \
- main_window_preferences_frame.ui
+ main_window_preferences_frame.ui \
+ layout_preferences_frame.ui
win32 { ## These should be in config.pri ??
!isEmpty(PORTAUDIO_DIR) {
@@ -229,7 +230,8 @@ HEADERS += $$HEADERS_WS_C \
tango_colors.h \
profile_dialog.h \
preferences_dialog.h \
- main_window_preferences_frame.h
+ main_window_preferences_frame.h \
+ layout_preferences_frame.h
win32 {
OBJECTS_WS_C = $$SOURCES_WS_C
@@ -339,7 +341,8 @@ RESOURCES += \
../../image/status.qrc \
../../image/toolbar.qrc \
welcome.qrc \
- i18n.qrc
+ i18n.qrc \
+ ../../image/layout.qrc
TRANSLATIONS = \
qtshark_de.ts \
@@ -449,4 +452,5 @@ SOURCES += \
wireshark_application.cpp \
profile_dialog.cpp \
preferences_dialog.cpp \
- main_window_preferences_frame.cpp
+ main_window_preferences_frame.cpp \
+ layout_preferences_frame.cpp
diff --git a/ui/qt/layout_preferences_frame.cpp b/ui/qt/layout_preferences_frame.cpp
new file mode 100644
index 0000000000..21da0ca2b4
--- /dev/null
+++ b/ui/qt/layout_preferences_frame.cpp
@@ -0,0 +1,257 @@
+/* layout_preferences_frame.cpp
+ *
+ * $Id$
+ *
+ * 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.
+ */
+
+#include "layout_preferences_frame.h"
+#include "ui_layout_preferences_frame.h"
+
+#include <QAbstractButton>
+#include <QToolButton>
+#include <QRadioButton>
+
+#include <QDebug>
+#include <epan/prefs-int.h>
+
+LayoutPreferencesFrame::LayoutPreferencesFrame(QWidget *parent) :
+ QFrame(parent),
+ ui(new Ui::LayoutPreferencesFrame)
+{
+ ui->setupUi(this);
+
+ pref_layout_type_ = prefFromPrefPtr(&prefs.gui_layout_type);
+ pref_layout_content_1_ = prefFromPrefPtr(&prefs.gui_layout_content_1);
+ pref_layout_content_2_ = prefFromPrefPtr(&prefs.gui_layout_content_2);
+ pref_layout_content_3_ = prefFromPrefPtr(&prefs.gui_layout_content_3);
+
+}
+
+LayoutPreferencesFrame::~LayoutPreferencesFrame()
+{
+ delete ui;
+}
+
+void LayoutPreferencesFrame::showEvent(QShowEvent *evt)
+{
+ Q_UNUSED(evt);
+ updateWidgets();
+}
+
+void LayoutPreferencesFrame::updateWidgets()
+{
+ switch (pref_layout_type_->stashed_val.uint) {
+ case layout_type_5:
+ ui->layout5ToolButton->setChecked(true);
+ break;
+ case layout_type_2:
+ ui->layout2ToolButton->setChecked(true);
+ break;
+ case layout_type_1:
+ ui->layout1ToolButton->setChecked(true);
+ break;
+ case layout_type_4:
+ ui->layout4ToolButton->setChecked(true);
+ break;
+ case layout_type_3:
+ ui->layout3ToolButton->setChecked(true);
+ break;
+ case layout_type_6:
+ ui->layout6ToolButton->setChecked(true);
+ break;
+ }
+
+ switch (pref_layout_content_1_->stashed_val.enumval) {
+ case layout_pane_content_plist:
+ ui->pane1PacketListRadioButton->setChecked(true);
+ break;
+ case layout_pane_content_pdetails:
+ ui->pane1PacketDetailsRadioButton->setChecked(true);
+ break;
+ case layout_pane_content_pbytes:
+ ui->pane1PacketBytesRadioButton->setChecked(true);
+ break;
+ case layout_pane_content_none:
+ ui->pane1NoneRadioButton->setChecked(true);
+ break;
+ }
+
+ switch (pref_layout_content_2_->stashed_val.enumval) {
+ case layout_pane_content_plist:
+ ui->pane2PacketListRadioButton->setChecked(true);
+ break;
+ case layout_pane_content_pdetails:
+ ui->pane2PacketDetailsRadioButton->setChecked(true);
+ break;
+ case layout_pane_content_pbytes:
+ ui->pane2PacketBytesRadioButton->setChecked(true);
+ break;
+ case layout_pane_content_none:
+ ui->pane2NoneRadioButton->setChecked(true);
+ break;
+ }
+
+ switch (pref_layout_content_3_->stashed_val.enumval) {
+ case layout_pane_content_plist:
+ ui->pane3PacketListRadioButton->setChecked(true);
+ break;
+ case layout_pane_content_pdetails:
+ ui->pane3PacketDetailsRadioButton->setChecked(true);
+ break;
+ case layout_pane_content_pbytes:
+ ui->pane3PacketBytesRadioButton->setChecked(true);
+ break;
+ case layout_pane_content_none:
+ ui->pane3NoneRadioButton->setChecked(true);
+ break;
+ }
+}
+
+void LayoutPreferencesFrame::on_layout5ToolButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_type_->stashed_val.uint = layout_type_5;
+}
+
+void LayoutPreferencesFrame::on_layout2ToolButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_type_->stashed_val.uint = layout_type_2;
+}
+
+void LayoutPreferencesFrame::on_layout1ToolButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_type_->stashed_val.uint = layout_type_1;
+}
+
+void LayoutPreferencesFrame::on_layout4ToolButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_type_->stashed_val.uint = layout_type_4;
+}
+
+void LayoutPreferencesFrame::on_layout3ToolButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_type_->stashed_val.uint = layout_type_3;
+}
+
+void LayoutPreferencesFrame::on_layout6ToolButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_type_->stashed_val.uint = layout_type_6;
+}
+
+void LayoutPreferencesFrame::on_pane1PacketListRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_1_->stashed_val.enumval = layout_pane_content_plist;
+}
+
+void LayoutPreferencesFrame::on_pane1PacketDetailsRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_1_->stashed_val.enumval = layout_pane_content_pdetails;
+}
+
+void LayoutPreferencesFrame::on_pane1PacketBytesRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_1_->stashed_val.enumval = layout_pane_content_pbytes;
+}
+
+void LayoutPreferencesFrame::on_pane1NoneRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_1_->stashed_val.enumval = layout_pane_content_none;
+}
+
+void LayoutPreferencesFrame::on_pane2PacketListRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_2_->stashed_val.enumval = layout_pane_content_plist;
+}
+
+void LayoutPreferencesFrame::on_pane2PacketDetailsRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_2_->stashed_val.enumval = layout_pane_content_pdetails;
+}
+
+void LayoutPreferencesFrame::on_pane2PacketBytesRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_2_->stashed_val.enumval = layout_pane_content_pbytes;
+}
+
+void LayoutPreferencesFrame::on_pane2NoneRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_2_->stashed_val.enumval = layout_pane_content_none;
+}
+
+void LayoutPreferencesFrame::on_pane3PacketListRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_3_->stashed_val.enumval = layout_pane_content_plist;
+}
+
+void LayoutPreferencesFrame::on_pane3PacketDetailsRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_3_->stashed_val.enumval = layout_pane_content_pdetails;
+}
+
+void LayoutPreferencesFrame::on_pane3PacketBytesRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_3_->stashed_val.enumval = layout_pane_content_pbytes;
+}
+
+void LayoutPreferencesFrame::on_pane3NoneRadioButton_toggled(bool checked)
+{
+ if (!checked) return;
+ pref_layout_content_3_->stashed_val.enumval = layout_pane_content_none;
+}
+
+
+void LayoutPreferencesFrame::on_restoreButtonBox_clicked(QAbstractButton *button)
+{
+ Q_UNUSED(button);
+ pref_layout_type_->stashed_val.uint = pref_layout_type_->default_val.uint;
+ pref_layout_content_1_->stashed_val.enumval = pref_layout_content_1_->default_val.enumval;
+ pref_layout_content_2_->stashed_val.enumval = pref_layout_content_2_->default_val.enumval;
+ pref_layout_content_3_->stashed_val.enumval = pref_layout_content_3_->default_val.enumval;
+ updateWidgets();
+}
+
+/*
+ * 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:
+ */
diff --git a/ui/qt/layout_preferences_frame.h b/ui/qt/layout_preferences_frame.h
new file mode 100644
index 0000000000..9d593f1480
--- /dev/null
+++ b/ui/qt/layout_preferences_frame.h
@@ -0,0 +1,80 @@
+/* layout_preferences_frame.h
+ *
+ * $Id$
+ *
+ * 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 LAYOUT_PREFERENCES_FRAME_H
+#define LAYOUT_PREFERENCES_FRAME_H
+
+#include "preferences_dialog.h"
+
+#include <QFrame>
+#include <QAbstractButton>
+
+namespace Ui {
+class LayoutPreferencesFrame;
+}
+
+class LayoutPreferencesFrame : public QFrame
+{
+ Q_OBJECT
+
+public:
+ explicit LayoutPreferencesFrame(QWidget *parent = 0);
+ ~LayoutPreferencesFrame();
+
+protected:
+ void showEvent(QShowEvent *evt);
+
+private:
+ Ui::LayoutPreferencesFrame *ui;
+
+ pref_t *pref_layout_type_;
+ pref_t *pref_layout_content_1_;
+ pref_t *pref_layout_content_2_;
+ pref_t *pref_layout_content_3_;
+
+ void updateWidgets();
+
+private slots:
+ void on_layout5ToolButton_toggled(bool checked);
+ void on_layout2ToolButton_toggled(bool checked);
+ void on_layout1ToolButton_toggled(bool checked);
+ void on_layout4ToolButton_toggled(bool checked);
+ void on_layout3ToolButton_toggled(bool checked);
+ void on_layout6ToolButton_toggled(bool checked);
+ void on_pane1PacketListRadioButton_toggled(bool checked);
+ void on_pane1PacketDetailsRadioButton_toggled(bool checked);
+ void on_pane1PacketBytesRadioButton_toggled(bool checked);
+ void on_pane1NoneRadioButton_toggled(bool checked);
+ void on_pane2PacketListRadioButton_toggled(bool checked);
+ void on_pane2PacketDetailsRadioButton_toggled(bool checked);
+ void on_pane2PacketBytesRadioButton_toggled(bool checked);
+ void on_pane2NoneRadioButton_toggled(bool checked);
+ void on_pane3PacketListRadioButton_toggled(bool checked);
+ void on_pane3PacketDetailsRadioButton_toggled(bool checked);
+ void on_pane3PacketBytesRadioButton_toggled(bool checked);
+ void on_pane3NoneRadioButton_toggled(bool checked);
+ void on_restoreButtonBox_clicked(QAbstractButton *button);
+
+};
+
+#endif // LAYOUT_PREFERENCES_FRAME_H
diff --git a/ui/qt/layout_preferences_frame.ui b/ui/qt/layout_preferences_frame.ui
new file mode 100644
index 0000000000..edd5abbb60
--- /dev/null
+++ b/ui/qt/layout_preferences_frame.ui
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>LayoutPreferencesFrame</class>
+ <widget class="QFrame" name="LayoutPreferencesFrame">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>414</width>
+ <height>259</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Frame</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QToolButton" name="layout5ToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../../image/layout.qrc">
+ <normaloff>:/layout/layout_5.png</normaloff>:/layout/layout_5.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">layoyutButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="layout2ToolButton">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../../image/layout.qrc">
+ <normaloff>:/layout/layout_2.png</normaloff>:/layout/layout_2.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">layoyutButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="layout1ToolButton">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../../image/layout.qrc">
+ <normaloff>:/layout/layout_1.png</normaloff>:/layout/layout_1.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">layoyutButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="layout4ToolButton">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../../image/layout.qrc">
+ <normaloff>:/layout/layout_4.png</normaloff>:/layout/layout_4.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">layoyutButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="layout3ToolButton">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../../image/layout.qrc">
+ <normaloff>:/layout/layout_3.png</normaloff>:/layout/layout_3.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">layoyutButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="layout6ToolButton">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../../image/layout.qrc">
+ <normaloff>:/layout/layout_6.png</normaloff>:/layout/layout_6.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">layoyutButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Pane 1:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane1PacketListRadioButton">
+ <property name="text">
+ <string>Packet List</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane1ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane1PacketDetailsRadioButton">
+ <property name="text">
+ <string>Packet Details</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane1ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane1PacketBytesRadioButton">
+ <property name="text">
+ <string>Packet Bytes</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane1ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane1NoneRadioButton">
+ <property name="text">
+ <string>None</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane1ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Pane 2:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane2PacketListRadioButton">
+ <property name="text">
+ <string>Packet List</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane2ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane2PacketDetailsRadioButton">
+ <property name="text">
+ <string>Packet Details</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane2ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane2PacketBytesRadioButton">
+ <property name="text">
+ <string>Packet Bytes</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane2ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane2NoneRadioButton">
+ <property name="text">
+ <string>None</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane2ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Pane 3:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane3PacketListRadioButton">
+ <property name="text">
+ <string>Packet List</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane3ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane3PacketDetailsRadioButton">
+ <property name="text">
+ <string>Packet Details</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane3ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane3PacketBytesRadioButton">
+ <property name="text">
+ <string>Packet Bytes</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane3ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="pane3NoneRadioButton">
+ <property name="text">
+ <string>None</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">pane3ButtonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>68</width>
+ <height>13</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="restoreButtonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::RestoreDefaults</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="../../image/layout.qrc"/>
+ </resources>
+ <connections/>
+ <buttongroups>
+ <buttongroup name="layoyutButtonGroup"/>
+ <buttongroup name="pane2ButtonGroup"/>
+ <buttongroup name="pane3ButtonGroup"/>
+ <buttongroup name="pane1ButtonGroup"/>
+ </buttongroups>
+</ui>
diff --git a/ui/qt/main_window_preferences_frame.cpp b/ui/qt/main_window_preferences_frame.cpp
index d435b03e9c..a2968933ee 100644
--- a/ui/qt/main_window_preferences_frame.cpp
+++ b/ui/qt/main_window_preferences_frame.cpp
@@ -1,6 +1,6 @@
/* main_window_preferences_frame.cpp
*
- * $Id: preferences_dialog.cpp 47142 2013-01-18 01:36:37Z gerald $
+ * $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
diff --git a/ui/qt/main_window_preferences_frame.h b/ui/qt/main_window_preferences_frame.h
index bb9a753ce2..25347383bc 100644
--- a/ui/qt/main_window_preferences_frame.h
+++ b/ui/qt/main_window_preferences_frame.h
@@ -1,6 +1,6 @@
/* main_window_preferences_frame.h
*
- * $Id: preferences_dialog.cpp 47142 2013-01-18 01:36:37Z gerald $
+ * $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
diff --git a/ui/qt/preferences_dialog.cpp b/ui/qt/preferences_dialog.cpp
index 9fb2d6ca69..4c12ff52c4 100644
--- a/ui/qt/preferences_dialog.cpp
+++ b/ui/qt/preferences_dialog.cpp
@@ -160,6 +160,7 @@ module_prefs_clean_stash(module_t *module, gpointer unused)
// Preference tree items
const int appearance_item_ = 0;
+const int layout_item_ = 1;
const int protocols_item_ = 4;
const int statistics_item_ = 5;
const int advanced_item_ = 6;
@@ -176,6 +177,8 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) :
QTreeWidgetItem tmp_item; // Adding pre-populated top-level items is much faster
prefs_modules_foreach_submodules(NULL, fill_advanced_prefs, (gpointer) &tmp_item);
+ // Some classes depend on pref_ptr_to_pref_ so this MUST be called after
+ // fill_advanced_prefs.
pd_ui_->setupUi(this);
pd_ui_->advancedTree->invisibleRootItem()->addChildren(tmp_item.takeChildren());
QTreeWidgetItemIterator pref_it(pd_ui_->advancedTree, QTreeWidgetItemIterator::NoChildren);
diff --git a/ui/qt/preferences_dialog.ui b/ui/qt/preferences_dialog.ui
index ed5ed9caf8..925139c59e 100644
--- a/ui/qt/preferences_dialog.ui
+++ b/ui/qt/preferences_dialog.ui
@@ -45,9 +45,6 @@
<property name="text">
<string>Layout</string>
</property>
- <property name="flags">
- <set>ItemIsDragEnabled|ItemIsUserCheckable</set>
- </property>
</item>
<item>
<property name="text">
@@ -123,7 +120,7 @@
<number>0</number>
</property>
<widget class="MainWindowPreferencesFrame" name="appearanceFrame"/>
- <widget class="QFrame" name="layoutFrame"/>
+ <widget class="LayoutPreferencesFrame" name="layoutFrame"/>
<widget class="QFrame" name="columnFrame"/>
<widget class="QFrame" name="fontandcolorFrame"/>
<widget class="QFrame" name="captureFrame"/>
@@ -211,6 +208,12 @@
<header>main_window_preferences_frame.h</header>
<container>1</container>
</customwidget>
+ <customwidget>
+ <class>LayoutPreferencesFrame</class>
+ <extends>QFrame</extends>
+ <header>layout_preferences_frame.h</header>
+ <container>1</container>
+ </customwidget>
</customwidgets>
<resources/>
<connections>