Updated the program version tag, added ability to delete entries in the sequence in the playback window.

This commit is contained in:
Collin Kidder
2015-06-23 21:59:03 -04:00
parent 3aa2c42cf0
commit 37f30116e7
4 changed files with 35 additions and 1 deletions
+26
View File
@@ -50,6 +50,7 @@ FramePlaybackWindow::FramePlaybackWindow(QVector<CANFrame> *frames, SerialWorker
connect(ui->btnStepForward, SIGNAL(clicked(bool)), this, SLOT(btnFwdOneClick()));
connect(ui->btnSelectAll, SIGNAL(clicked(bool)), this, SLOT(btnSelectAllClick()));
connect(ui->btnSelectNone, SIGNAL(clicked(bool)), this, SLOT(btnSelectNoneClick()));
connect(ui->btnDelete, SIGNAL(clicked(bool)), this, SLOT(btnDeleteCurrSeq()));
connect(ui->spinPlaySpeed, SIGNAL(valueChanged(int)), this, SLOT(changePlaybackSpeed(int)));
//connect(ui->cbLoop, SIGNAL(clicked(bool)), this, SLOT(changeLooping(bool)));
connect(ui->comboCANBus, SIGNAL(currentIndexChanged(int)), this, SLOT(changeSendingBus(int)));
@@ -159,6 +160,31 @@ void FramePlaybackWindow::fillIDHash(SequenceItem &item)
}
}
void FramePlaybackWindow::btnDeleteCurrSeq()
{
if (currentSeqNum == -1) return;
if (playbackActive)
{
playbackActive = false;
playbackTimer->stop();
}
seqItems.removeAt(currentSeqNum);
ui->tblSequence->removeRow(currentSeqNum);
if (seqItems.count() > 0)
{
currentSeqNum = 0;
currentSeqItem = &seqItems[currentSeqNum];
}
else
{
currentSeqNum = -1;
currentSeqItem = NULL;
}
updateFrameLabel();
}
void FramePlaybackWindow::btnLoadFile()
{
QString filename;