aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/sequence_dialog.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-11-11 22:00:48 +0000
committerGerald Combs <gerald@wireshark.org>2013-11-11 22:00:48 +0000
commit66bb75dd4eacd671b1320ae7b934fff6caa6d272 (patch)
tree749275e4a4b87a2ad53e7924b4f0a09e090f5aca /ui/qt/sequence_dialog.cpp
parenta33c6a8ced2a867dee2bf217bf2ffef4ab56e3ca (diff)
Sequence / flow diagram updates.
Plumb some controls. Adjust dialog layout. Make sure sequence information is allocated and freed correctly. Remove a debugging statement. svn path=/trunk/; revision=53260
Diffstat (limited to 'ui/qt/sequence_dialog.cpp')
-rw-r--r--ui/qt/sequence_dialog.cpp45
1 files changed, 42 insertions, 3 deletions
diff --git a/ui/qt/sequence_dialog.cpp b/ui/qt/sequence_dialog.cpp
index 2d0f91f036..593e3ab85e 100644
--- a/ui/qt/sequence_dialog.cpp
+++ b/ui/qt/sequence_dialog.cpp
@@ -34,11 +34,8 @@
#include <QDebug>
// To do:
-// - Implement controls
-// - Make reset button "apply"?
// - Save as
// - Add UTF8 to text dump
-// - Fix scroll bar ranges
// - Context menu
// - Selection highlighting
// - Keyboard shortcuts
@@ -76,15 +73,27 @@ SequenceDialog::SequenceDialog(QWidget *parent, capture_file *cf, SequenceType t
connect(sp->yAxis, SIGNAL(rangeChanged(QCPRange)), sp->yAxis2, SLOT(setRange(QCPRange)));
memset (&seq_analysis_, 0, sizeof(seq_analysis_));
+
+ ui->showComboBox->setCurrentIndex(0);
+ ui->addressComboBox->setCurrentIndex(0);
+
+ QComboBox *fcb = ui->flowComboBox;
+ fcb->addItem(ui->actionFlowAny->text(), SEQ_ANALYSIS_ANY);
+ fcb->addItem(ui->actionFlowTcp->text(), SEQ_ANALYSIS_TCP);
+
switch (type) {
case any:
seq_analysis_.type = SEQ_ANALYSIS_ANY;
+ ui->flowComboBox->setCurrentIndex(SEQ_ANALYSIS_ANY);
break;
case tcp:
seq_analysis_.type = SEQ_ANALYSIS_TCP;
+ ui->flowComboBox->setCurrentIndex(SEQ_ANALYSIS_TCP);
break;
case voip:
seq_analysis_.type = SEQ_ANALYSIS_VOIP;
+ ui->flowComboBox->hide();
+ ui->flowLabel->hide();
break;
}
seq_analysis_.all_packets = TRUE;
@@ -291,3 +300,33 @@ void SequenceDialog::on_actionGoToPacket_triggered()
emit goToPacket(packet_num_);
}
}
+
+void SequenceDialog::on_showComboBox_currentIndexChanged(int index)
+{
+ if (index == 0) {
+ seq_analysis_.all_packets = TRUE;
+ } else {
+ seq_analysis_.all_packets = FALSE;
+ }
+
+ if (isVisible()) fillDiagram();
+}
+
+void SequenceDialog::on_flowComboBox_currentIndexChanged(int index)
+{
+ if (index < 0) return;
+ seq_analysis_.type = static_cast<seq_analysis_type>(ui->flowComboBox->itemData(index).toInt());
+
+ if (isVisible()) fillDiagram();
+}
+
+void SequenceDialog::on_addressComboBox_currentIndexChanged(int index)
+{
+ if (index == 0) {
+ seq_analysis_.any_addr = TRUE;
+ } else {
+ seq_analysis_.any_addr = FALSE;
+ }
+
+ if (isVisible()) fillDiagram();
+}