1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

OP-56: Logging autogenerate default filename

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2514 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
sambas 2011-01-21 18:20:18 +00:00 committed by sambas
parent c803592aae
commit 434fac66fc

View File

@ -371,11 +371,18 @@ void LoggingPlugin::toggleLogging()
{
if(state == IDLE)
{
QFileDialog * fd = new QFileDialog();
/*QFileDialog * fd = new QFileDialog();
fd->setAcceptMode(QFileDialog::AcceptSave);
fd->setNameFilter("OpenPilot Log (*.opl)");
connect(fd, SIGNAL(fileSelected(QString)), this, SLOT(startLogging(QString)));
fd->exec();
fd->exec();*/
QString fileName = QFileDialog::getSaveFileName(NULL, tr("Start Log"),
tr("OP-%0.opl").arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss")),
tr("OpenPilot Log (*.opl)"));
if(!fileName.isEmpty())
startLogging(fileName);
}
else if(state == LOGGING)
{