forked from osmocom/wireshark
Qt: Sequence Dialog simplify context menu
And minor UI changes Change-Id: Ieed1e5090c0f5adc6e41b386d9950443b30eb2da Reviewed-on: https://code.wireshark.org/review/34180 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
parent
94f9563f5d
commit
d043439e1c
|
@ -133,7 +133,8 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
|
|||
|
||||
ctx_menu_.addAction(ui->actionZoomIn);
|
||||
ctx_menu_.addAction(ui->actionZoomOut);
|
||||
ctx_menu_.addAction(ui->actionReset);
|
||||
QAction * action = ctx_menu_.addAction(tr("Reset Diagram"), this, SLOT(resetView()));
|
||||
action->setToolTip(tr("Reset the diagram to its initial state."));
|
||||
ctx_menu_.addSeparator();
|
||||
ctx_menu_.addAction(ui->actionMoveRight10);
|
||||
ctx_menu_.addAction(ui->actionMoveLeft10);
|
||||
|
@ -150,6 +151,10 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
|
|||
|
||||
ui->addressComboBox->setCurrentIndex(0);
|
||||
|
||||
QPushButton * btn = ui->buttonBox->addButton(tr("Reset Diagram"), QDialogButtonBox::ActionRole);
|
||||
btn->setToolTip(tr("Reset the diagram to its initial state."));
|
||||
connect(btn, &QPushButton::clicked, this, &SequenceDialog::resetView);
|
||||
|
||||
sequence_items_t item_data;
|
||||
|
||||
item_data.curr_index = 0;
|
||||
|
@ -537,7 +542,7 @@ void SequenceDialog::resetAxes(bool keep_lower)
|
|||
sp->replot(QCustomPlot::rpHint);
|
||||
}
|
||||
|
||||
void SequenceDialog::on_resetButton_clicked()
|
||||
void SequenceDialog::resetView()
|
||||
{
|
||||
resetAxes();
|
||||
}
|
||||
|
@ -629,11 +634,6 @@ void SequenceDialog::on_addressComboBox_activated(int index)
|
|||
fillDiagram();
|
||||
}
|
||||
|
||||
void SequenceDialog::on_actionReset_triggered()
|
||||
{
|
||||
on_resetButton_clicked();
|
||||
}
|
||||
|
||||
void SequenceDialog::on_actionMoveRight10_triggered()
|
||||
{
|
||||
panAxes(10, 0);
|
||||
|
|
|
@ -67,16 +67,15 @@ private slots:
|
|||
void mouseWheeled(QWheelEvent *event);
|
||||
|
||||
void fillDiagram();
|
||||
void resetView();
|
||||
|
||||
void on_buttonBox_accepted();
|
||||
void on_resetButton_clicked();
|
||||
void on_actionGoToPacket_triggered();
|
||||
void on_actionGoToNextPacket_triggered() { goToAdjacentPacket(true); }
|
||||
void on_actionGoToPreviousPacket_triggered() { goToAdjacentPacket(false); }
|
||||
void on_displayFilterCheckBox_toggled(bool checked);
|
||||
void on_flowComboBox_activated(int index);
|
||||
void on_addressComboBox_activated(int index);
|
||||
void on_actionReset_triggered();
|
||||
void on_actionMoveRight10_triggered();
|
||||
void on_actionMoveLeft10_triggered();
|
||||
void on_actionMoveUp10_triggered();
|
||||
|
|
|
@ -106,9 +106,9 @@
|
|||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Only show flows matching the current display filter</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Limit to display filter</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Limit to display filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -170,30 +170,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="resetButton">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in New Issue