void SequenceDialog::on_flowComboBox_currentIndexChanged(int index) { if (!sainfo_ || sainfo_->type == SEQ_ANALYSIS_VOIP || index < 0) return; sainfo_->type = static_cast<seq_analysis_type>(ui->flowComboBox->itemData(index).toInt()); fillDiagram(); }
void SequenceDialog::on_flowComboBox_activated(int index) { if (!info_->sainfo() || info_->sainfo()->type == SEQ_ANALYSIS_VOIP || index < 0) return; info_->sainfo()->type = static_cast<seq_analysis_type>(ui->flowComboBox->itemData(index).toInt()); fillDiagram(); }
void SequenceDialog::on_addressComboBox_currentIndexChanged(int index) { if (index == 0) { seq_analysis_.any_addr = TRUE; } else { seq_analysis_.any_addr = FALSE; } fillDiagram(); }
void SequenceDialog::on_showComboBox_currentIndexChanged(int index) { if (index == 0) { seq_analysis_.all_packets = TRUE; } else { seq_analysis_.all_packets = FALSE; } fillDiagram(); }
void SequenceDialog::on_addressComboBox_currentIndexChanged(int index) { if (!sainfo_) return; if (index == 0) { sainfo_->any_addr = TRUE; } else { sainfo_->any_addr = FALSE; } fillDiagram(); }
void SequenceDialog::on_showComboBox_currentIndexChanged(int index) { if (!sainfo_) return; if (index == 0) { sainfo_->all_packets = TRUE; } else { sainfo_->all_packets = FALSE; } fillDiagram(); }
void SequenceDialog::on_addressComboBox_activated(int index) { if (!info_->sainfo()) return; if (index == 0) { info_->sainfo()->any_addr = TRUE; } else { info_->sainfo()->any_addr = FALSE; } fillDiagram(); }
void SequenceDialog::on_showComboBox_activated(int index) { if (!info_->sainfo()) return; if (index == 0) { info_->sainfo()->all_packets = TRUE; } else { info_->sainfo()->all_packets = FALSE; } fillDiagram(); }
void LBMUIMFlowDialog::on_showComboBox_currentIndexChanged(int index) { if (index == 0) { m_sequence_analysis.all_packets = TRUE; } else { m_sequence_analysis.all_packets = FALSE; } fillDiagram(); }
SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, seq_analysis_info_t *sainfo) : WiresharkDialog(parent, cf), ui(new Ui::SequenceDialog), sainfo_(sainfo), num_items_(0), packet_num_(0), node_label_w_(20) { ui->setupUi(this); QCustomPlot *sp = ui->sequencePlot; setWindowSubtitle(sainfo ? tr("Call Flow") : tr("Flow")); if (!sainfo_) { sainfo_ = sequence_analysis_info_new(); sainfo_->type = SEQ_ANALYSIS_ANY; sainfo_->all_packets = TRUE; } else { num_items_ = sequence_analysis_get_nodes(sainfo_); } seq_diagram_ = new SequenceDiagram(sp->yAxis, sp->xAxis2, sp->yAxis2); sp->addPlottable(seq_diagram_); sp->axisRect()->setRangeDragAxes(sp->xAxis2, sp->yAxis); sp->xAxis->setVisible(false); sp->xAxis->setPadding(0); sp->xAxis->setLabelPadding(0); sp->xAxis->setTickLabelPadding(0); sp->xAxis2->setVisible(true); sp->yAxis2->setVisible(true); one_em_ = QFontMetrics(sp->yAxis->labelFont()).height(); ui->horizontalScrollBar->setSingleStep(100 / one_em_); ui->verticalScrollBar->setSingleStep(100 / one_em_); sp->setInteractions(QCP::iRangeDrag); ui->gridLayout->setSpacing(0); connect(sp->yAxis, SIGNAL(rangeChanged(QCPRange)), sp->yAxis2, SLOT(setRange(QCPRange))); ctx_menu_.addAction(ui->actionReset); ctx_menu_.addSeparator(); ctx_menu_.addAction(ui->actionMoveRight10); ctx_menu_.addAction(ui->actionMoveLeft10); ctx_menu_.addAction(ui->actionMoveUp10); ctx_menu_.addAction(ui->actionMoveDown10); ctx_menu_.addAction(ui->actionMoveRight1); ctx_menu_.addAction(ui->actionMoveLeft1); ctx_menu_.addAction(ui->actionMoveUp1); ctx_menu_.addAction(ui->actionMoveDown1); ctx_menu_.addSeparator(); ctx_menu_.addAction(ui->actionGoToPacket); ui->showComboBox->blockSignals(true); ui->showComboBox->setCurrentIndex(0); ui->showComboBox->blockSignals(false); ui->addressComboBox->blockSignals(true); ui->addressComboBox->setCurrentIndex(0); ui->addressComboBox->blockSignals(false); QComboBox *fcb = ui->flowComboBox; fcb->addItem(ui->actionFlowAny->text(), SEQ_ANALYSIS_ANY); fcb->addItem(ui->actionFlowTcp->text(), SEQ_ANALYSIS_TCP); ui->flowComboBox->blockSignals(true); ui->flowComboBox->setCurrentIndex(sainfo_->type); if (sainfo_->type == SEQ_ANALYSIS_VOIP) { ui->controlFrame->hide(); } else { ui->flowComboBox->blockSignals(false); } QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save); save_bt->setText(tr("Save As" UTF8_HORIZONTAL_ELLIPSIS)); // XXX Use recent settings instead resize(parent.width(), parent.height() * 4 / 5); connect(ui->horizontalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(hScrollBarChanged(int))); connect(ui->verticalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(vScrollBarChanged(int))); connect(sp->xAxis2, SIGNAL(rangeChanged(QCPRange)), this, SLOT(xAxisChanged(QCPRange))); connect(sp->yAxis, SIGNAL(rangeChanged(QCPRange)), this, SLOT(yAxisChanged(QCPRange))); connect(sp, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(diagramClicked(QMouseEvent*))); connect(sp, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(mouseMoved(QMouseEvent*))); connect(sp, SIGNAL(mouseRelease(QMouseEvent*)), this, SLOT(mouseReleased(QMouseEvent*))); connect(this, SIGNAL(goToPacket(int)), seq_diagram_, SLOT(setSelectedPacket(int))); disconnect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); fillDiagram(); }
SequenceDialog::SequenceDialog(QWidget *parent, capture_file *cf, SequenceType type) : QDialog(parent), ui(new Ui::SequenceDialog), cap_file_(cf), num_items_(0), packet_num_(0), node_label_w_(20) { ui->setupUi(this); QCustomPlot *sp = ui->sequencePlot; seq_diagram_ = new SequenceDiagram(sp->yAxis, sp->xAxis2, sp->yAxis2); sp->addPlottable(seq_diagram_); sp->axisRect()->setRangeDragAxes(sp->xAxis2, sp->yAxis); sp->xAxis->setVisible(false); sp->xAxis->setPadding(0); sp->xAxis->setLabelPadding(0); sp->xAxis->setTickLabelPadding(0); sp->xAxis2->setVisible(true); sp->yAxis2->setVisible(true); one_em_ = QFontMetrics(sp->yAxis->labelFont()).height(); ui->horizontalScrollBar->setSingleStep(100 / one_em_); ui->verticalScrollBar->setSingleStep(100 / one_em_); sp->setInteractions(QCP::iRangeDrag); ui->gridLayout->setSpacing(0); connect(sp->yAxis, SIGNAL(rangeChanged(QCPRange)), sp->yAxis2, SLOT(setRange(QCPRange))); ctx_menu_.addAction(ui->actionReset); ctx_menu_.addSeparator(); ctx_menu_.addAction(ui->actionMoveRight10); ctx_menu_.addAction(ui->actionMoveLeft10); ctx_menu_.addAction(ui->actionMoveUp10); ctx_menu_.addAction(ui->actionMoveDown10); ctx_menu_.addAction(ui->actionMoveRight1); ctx_menu_.addAction(ui->actionMoveLeft1); ctx_menu_.addAction(ui->actionMoveUp1); ctx_menu_.addAction(ui->actionMoveDown1); ctx_menu_.addSeparator(); ctx_menu_.addAction(ui->actionGoToPacket); memset (&seq_analysis_, 0, sizeof(seq_analysis_)); ui->showComboBox->blockSignals(true); ui->showComboBox->setCurrentIndex(0); ui->showComboBox->blockSignals(false); ui->addressComboBox->blockSignals(true); ui->addressComboBox->setCurrentIndex(0); ui->addressComboBox->blockSignals(false); QComboBox *fcb = ui->flowComboBox; fcb->addItem(ui->actionFlowAny->text(), SEQ_ANALYSIS_ANY); fcb->addItem(ui->actionFlowTcp->text(), SEQ_ANALYSIS_TCP); ui->flowComboBox->blockSignals(true); 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; } ui->flowComboBox->blockSignals(false); seq_analysis_.all_packets = TRUE; QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save); save_bt->setText(tr("Save As...")); // XXX Use recent settings instead if (parent) { resize(parent->width(), parent->height() * 4 / 5); } connect(ui->horizontalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(hScrollBarChanged(int))); connect(ui->verticalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(vScrollBarChanged(int))); connect(sp->xAxis2, SIGNAL(rangeChanged(QCPRange)), this, SLOT(xAxisChanged(QCPRange))); connect(sp->yAxis, SIGNAL(rangeChanged(QCPRange)), this, SLOT(yAxisChanged(QCPRange))); connect(sp, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(diagramClicked(QMouseEvent*))); connect(sp, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(mouseMoved(QMouseEvent*))); connect(sp, SIGNAL(mouseRelease(QMouseEvent*)), this, SLOT(mouseReleased(QMouseEvent*))); connect(this, SIGNAL(goToPacket(int)), seq_diagram_, SLOT(setSelectedPacket(int))); disconnect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); 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()); fillDiagram(); }
void SequenceDialog::showEvent(QShowEvent *) { QTimer::singleShot(0, this, SLOT(fillDiagram())); }
LBMUIMFlowDialog::LBMUIMFlowDialog(QWidget * parent, capture_file * cfile) : QDialog(parent), m_ui(new Ui::LBMUIMFlowDialog), m_capture_file(cfile), m_num_items(0), m_packet_num(0), m_node_label_width(20) { m_ui->setupUi(this); QCustomPlot * sp = m_ui->sequencePlot; m_sequence_diagram = new SequenceDiagram(sp->yAxis, sp->xAxis2, sp->yAxis2); sp->addPlottable(m_sequence_diagram); sp->axisRect()->setRangeDragAxes(sp->xAxis2, sp->yAxis); sp->xAxis->setVisible(false); sp->xAxis->setPadding(0); sp->xAxis->setLabelPadding(0); sp->xAxis->setTickLabelPadding(0); sp->xAxis2->setVisible(true); sp->yAxis2->setVisible(true); m_one_em = QFontMetrics(sp->yAxis->labelFont()).height(); m_ui->horizontalScrollBar->setSingleStep(100 / m_one_em); m_ui->verticalScrollBar->setSingleStep(100 / m_one_em); sp->setInteractions(QCP::iRangeDrag); m_ui->gridLayout->setSpacing(0); connect(sp->yAxis, SIGNAL(rangeChanged(QCPRange)), sp->yAxis2, SLOT(setRange(QCPRange))); m_context_menu.addAction(m_ui->actionReset); m_context_menu.addSeparator(); m_context_menu.addAction(m_ui->actionMoveRight10); m_context_menu.addAction(m_ui->actionMoveLeft10); m_context_menu.addAction(m_ui->actionMoveUp10); m_context_menu.addAction(m_ui->actionMoveDown10); m_context_menu.addAction(m_ui->actionMoveRight1); m_context_menu.addAction(m_ui->actionMoveLeft1); m_context_menu.addAction(m_ui->actionMoveUp1); m_context_menu.addAction(m_ui->actionMoveDown1); m_context_menu.addSeparator(); m_context_menu.addAction(m_ui->actionGoToPacket); memset(&m_sequence_analysis, 0, sizeof(m_sequence_analysis)); m_ui->showComboBox->blockSignals(true); m_ui->showComboBox->setCurrentIndex(0); m_ui->showComboBox->blockSignals(false); m_sequence_analysis.all_packets = TRUE; m_sequence_analysis.any_addr = TRUE; QPushButton * save_bt = m_ui->buttonBox->button(QDialogButtonBox::Save); save_bt->setText(tr("Save As" UTF8_HORIZONTAL_ELLIPSIS)); // XXX Use recent settings instead if (parent) { resize(parent->width(), parent->height() * 4 / 5); } connect(m_ui->horizontalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(hScrollBarChanged(int))); connect(m_ui->verticalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(vScrollBarChanged(int))); connect(sp->xAxis2, SIGNAL(rangeChanged(QCPRange)), this, SLOT(xAxisChanged(QCPRange))); connect(sp->yAxis, SIGNAL(rangeChanged(QCPRange)), this, SLOT(yAxisChanged(QCPRange))); connect(sp, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(diagramClicked(QMouseEvent*))); connect(sp, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(mouseMoved(QMouseEvent*))); connect(sp, SIGNAL(mouseRelease(QMouseEvent*)), this, SLOT(mouseReleased(QMouseEvent*))); connect(this, SIGNAL(goToPacket(int)), m_sequence_diagram, SLOT(setSelectedPacket(int))); disconnect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); fillDiagram(); }