Voice dialogs: Unified naming and order of buttons in dialogs
Dialogs has same order of buttons: - dialog specific (Flow Sequence, Find Reverse, Analyze, Reset Diagram) - common voice functions (Prepare Filter, Play Streams) - exports (Copy, Export) - Close of dialog Names were unified: - Copy really copying to clipboard - Save/Export was unified to Export
This commit is contained in:
parent
01151ec332
commit
2e87c27ce1
|
@ -245,8 +245,6 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, rtpstream
|
|||
|
||||
ui->progressFrame->hide();
|
||||
|
||||
player_button_ = RtpPlayerDialog::addPlayerButton(ui->buttonBox);
|
||||
|
||||
stream_ctx_menu_.addAction(ui->actionGoToPacket);
|
||||
stream_ctx_menu_.addAction(ui->actionNextProblem);
|
||||
stream_ctx_menu_.addSeparator();
|
||||
|
@ -330,8 +328,11 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, rtpstream
|
|||
ui->actionSaveReverseAudioSyncFile->setEnabled(false);
|
||||
}
|
||||
|
||||
QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save);
|
||||
QMenu *save_menu = new QMenu(save_bt);
|
||||
player_button_ = RtpPlayerDialog::addPlayerButton(ui->buttonBox);
|
||||
|
||||
QPushButton *export_btn = ui->buttonBox->addButton(tr("Export"), QDialogButtonBox::ActionRole);
|
||||
|
||||
QMenu *save_menu = new QMenu(export_btn);
|
||||
save_menu->addAction(ui->actionSaveAudioUnsync);
|
||||
save_menu->addAction(ui->actionSaveForwardAudioUnsync);
|
||||
save_menu->addAction(ui->actionSaveReverseAudioUnsync);
|
||||
|
@ -349,7 +350,7 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, rtpstream
|
|||
save_menu->addAction(ui->actionSaveReverseCsv);
|
||||
save_menu->addSeparator();
|
||||
save_menu->addAction(ui->actionSaveGraph);
|
||||
save_bt->setMenu(save_menu);
|
||||
export_btn->setMenu(save_menu);
|
||||
|
||||
if (stream_fwd) { // XXX What if stream_fwd == 0 && stream_rev != 0?
|
||||
rtpstream_info_copy_deep(&fwd_statinfo_, stream_fwd);
|
||||
|
|
|
@ -323,7 +323,7 @@
|
|||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close|QDialogButtonBox::Help|QDialogButtonBox::Save</set>
|
||||
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -288,7 +288,7 @@ QPushButton *RtpPlayerDialog::addPlayerButton(QDialogButtonBox *button_box)
|
|||
if (!button_box) return NULL;
|
||||
|
||||
QPushButton *player_button;
|
||||
player_button = button_box->addButton(tr("Play Streams"), QDialogButtonBox::ApplyRole);
|
||||
player_button = button_box->addButton(tr("Play Streams"), QDialogButtonBox::ActionRole);
|
||||
player_button->setIcon(StockIcon("media-playback-start"));
|
||||
return player_button;
|
||||
}
|
||||
|
|
|
@ -249,8 +249,6 @@ RtpStreamDialog::RtpStreamDialog(QWidget &parent, CaptureFile &cf) :
|
|||
setWindowSubtitle(tr("RTP Streams"));
|
||||
ui->streamTreeWidget->installEventFilter(this);
|
||||
|
||||
player_button_ = RtpPlayerDialog::addPlayerButton(ui->buttonBox);
|
||||
|
||||
QMenu *selection_menu = ctx_menu_.addMenu(tr("Select"));
|
||||
selection_menu->addAction(ui->actionSelectAll);
|
||||
selection_menu->addAction(ui->actionSelectNone);
|
||||
|
@ -273,15 +271,17 @@ RtpStreamDialog::RtpStreamDialog(QWidget &parent, CaptureFile &cf) :
|
|||
// Some GTK+ buttons have been left out intentionally in order to
|
||||
// reduce clutter. Do you have a strong and informed opinion about
|
||||
// this? Perhaps you should volunteer to maintain this code!
|
||||
find_reverse_button_ = ui->buttonBox->addButton(ui->actionFindReverse->text(), QDialogButtonBox::ApplyRole);
|
||||
find_reverse_button_ = ui->buttonBox->addButton(ui->actionFindReverse->text(), QDialogButtonBox::ActionRole);
|
||||
find_reverse_button_->setToolTip(ui->actionFindReverse->toolTip());
|
||||
prepare_button_ = ui->buttonBox->addButton(ui->actionPrepareFilter->text(), QDialogButtonBox::ApplyRole);
|
||||
prepare_button_->setToolTip(ui->actionPrepareFilter->toolTip());
|
||||
export_button_ = ui->buttonBox->addButton(tr("Export…"), QDialogButtonBox::ApplyRole);
|
||||
export_button_->setToolTip(ui->actionExportAsRtpDump->toolTip());
|
||||
copy_button_ = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ApplyRole);
|
||||
analyze_button_ = ui->buttonBox->addButton(ui->actionAnalyze->text(), QDialogButtonBox::ApplyRole);
|
||||
analyze_button_ = ui->buttonBox->addButton(ui->actionAnalyze->text(), QDialogButtonBox::ActionRole);
|
||||
analyze_button_->setToolTip(ui->actionAnalyze->toolTip());
|
||||
prepare_button_ = ui->buttonBox->addButton(ui->actionPrepareFilter->text(), QDialogButtonBox::ActionRole);
|
||||
prepare_button_->setToolTip(ui->actionPrepareFilter->toolTip());
|
||||
player_button_ = RtpPlayerDialog::addPlayerButton(ui->buttonBox);
|
||||
copy_button_ = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
|
||||
export_button_ = ui->buttonBox->addButton(tr("Export"), QDialogButtonBox::ActionRole);
|
||||
export_button_->setToolTip(ui->actionExportAsRtpDump->toolTip());
|
||||
|
||||
|
||||
QMenu *copy_menu = new QMenu(copy_button_);
|
||||
QAction *ca;
|
||||
|
|
|
@ -178,8 +178,7 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
|
|||
ui->controlFrame->hide();
|
||||
}
|
||||
|
||||
QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save);
|
||||
save_bt->setText(tr("Save As…"));
|
||||
export_button_ = ui->buttonBox->addButton(tr("Export"), QDialogButtonBox::ActionRole);
|
||||
|
||||
QPushButton *close_bt = ui->buttonBox->button(QDialogButtonBox::Close);
|
||||
if (close_bt) {
|
||||
|
@ -398,7 +397,14 @@ void SequenceDialog::mouseWheeled(QWheelEvent *event)
|
|||
event->accept();
|
||||
}
|
||||
|
||||
void SequenceDialog::on_buttonBox_accepted()
|
||||
void SequenceDialog::on_buttonBox_clicked(QAbstractButton *button)
|
||||
{
|
||||
if (button == export_button_) {
|
||||
exportDiagram();
|
||||
}
|
||||
}
|
||||
|
||||
void SequenceDialog::exportDiagram()
|
||||
{
|
||||
QString file_name, extension;
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
|
|
|
@ -74,8 +74,9 @@ private slots:
|
|||
|
||||
void fillDiagram();
|
||||
void resetView();
|
||||
void exportDiagram();
|
||||
|
||||
void on_buttonBox_accepted();
|
||||
void on_buttonBox_clicked(QAbstractButton *button);
|
||||
void on_actionGoToPacket_triggered();
|
||||
void on_actionGoToNextPacket_triggered() { goToAdjacentPacket(true); }
|
||||
void on_actionGoToPreviousPacket_triggered() { goToAdjacentPacket(false); }
|
||||
|
@ -103,6 +104,7 @@ private:
|
|||
guint32 packet_num_;
|
||||
double one_em_;
|
||||
int sequence_w_;
|
||||
QPushButton *export_button_;
|
||||
QMenu ctx_menu_;
|
||||
QCPItemText *key_text_;
|
||||
QCPItemText *comment_text_;
|
||||
|
|
|
@ -179,7 +179,7 @@
|
|||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close|QDialogButtonBox::Help|QDialogButtonBox::Save</set>
|
||||
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -66,13 +66,13 @@ VoipCallsDialog::VoipCallsDialog(QWidget &parent, CaptureFile &cf, bool all_flow
|
|||
ui->callTreeView->sortByColumn(VoipCallsInfoModel::StartTime, Qt::AscendingOrder);
|
||||
setWindowSubtitle(all_flows ? tr("SIP Flows") : tr("VoIP Calls"));
|
||||
|
||||
prepare_button_ = ui->buttonBox->addButton(tr("Prepare Filter"), QDialogButtonBox::ApplyRole);
|
||||
sequence_button_ = ui->buttonBox->addButton(tr("Flow Sequence"), QDialogButtonBox::ApplyRole);
|
||||
sequence_button_ = ui->buttonBox->addButton(tr("Flow Sequence"), QDialogButtonBox::ActionRole);
|
||||
prepare_button_ = ui->buttonBox->addButton(tr("Prepare Filter"), QDialogButtonBox::ActionRole);
|
||||
player_button_ = RtpPlayerDialog::addPlayerButton(ui->buttonBox);
|
||||
|
||||
connect (ui->todCheckBox, &QAbstractButton::toggled, this, &VoipCallsDialog::switchTimeOfDay);
|
||||
|
||||
copy_button_ = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ApplyRole);
|
||||
copy_button_ = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
|
||||
QMenu *copy_menu = new QMenu(copy_button_);
|
||||
QAction *ca;
|
||||
ca = copy_menu->addAction(tr("as CSV"));
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
|
||||
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in New Issue