comparison main/MainWindow.cpp @ 985:0359493998b8 osx-retina

Merge from default branch
author Chris Cannam
date Wed, 10 Jun 2015 13:38:02 +0100
parents 80c5d98399ec 9ae8a300cf7f
children 8d45d6412ca6
comparison
equal deleted inserted replaced
982:9fbd599b4e3a 985:0359493998b8
563 connect(action, SIGNAL(triggered()), this, SLOT(importLayer())); 563 connect(action, SIGNAL(triggered()), this, SLOT(importLayer()));
564 connect(this, SIGNAL(canImportLayer(bool)), action, SLOT(setEnabled(bool))); 564 connect(this, SIGNAL(canImportLayer(bool)), action, SLOT(setEnabled(bool)));
565 m_keyReference->registerShortcut(action); 565 m_keyReference->registerShortcut(action);
566 menu->addAction(action); 566 menu->addAction(action);
567 567
568 action = new QAction(tr("Export Annotation Layer..."), this); 568 action = new QAction(tr("Export Annotation La&yer..."), this);
569 action->setShortcut(tr("Ctrl+Y"));
569 action->setStatusTip(tr("Export layer data to a file")); 570 action->setStatusTip(tr("Export layer data to a file"));
570 connect(action, SIGNAL(triggered()), this, SLOT(exportLayer())); 571 connect(action, SIGNAL(triggered()), this, SLOT(exportLayer()));
571 connect(this, SIGNAL(canExportLayer(bool)), action, SLOT(setEnabled(bool))); 572 connect(this, SIGNAL(canExportLayer(bool)), action, SLOT(setEnabled(bool)));
573 m_keyReference->registerShortcut(action);
572 menu->addAction(action); 574 menu->addAction(action);
573 575
574 menu->addSeparator(); 576 menu->addSeparator();
575 577
576 action = new QAction(tr("Export Image File..."), this); 578 action = new QAction(tr("Export Image File..."), this);
4288 void 4290 void
4289 MainWindow::modelGenerationFailed(QString transformName, QString message) 4291 MainWindow::modelGenerationFailed(QString transformName, QString message)
4290 { 4292 {
4291 emit hideSplash(); 4293 emit hideSplash();
4292 4294
4295 QString quoted;
4296 if (transformName != "") {
4297 quoted = QString("\"%1\" ").arg(transformName);
4298 }
4299
4293 if (message != "") { 4300 if (message != "") {
4294 4301
4295 QMessageBox::warning 4302 QMessageBox::warning
4296 (this, 4303 (this,
4297 tr("Failed to generate layer"), 4304 tr("Failed to generate layer"),
4298 tr("<b>Layer generation failed</b><p>Failed to generate derived layer.<p>The layer transform \"%1\" failed:<p>%2") 4305 tr("<b>Layer generation failed</b><p>Failed to generate derived layer.<p>The layer transform %1failed:<p>%2")
4299 .arg(transformName).arg(message), 4306 .arg(quoted).arg(message),
4300 QMessageBox::Ok); 4307 QMessageBox::Ok);
4301 } else { 4308 } else {
4302 QMessageBox::warning 4309 QMessageBox::warning
4303 (this, 4310 (this,
4304 tr("Failed to generate layer"), 4311 tr("Failed to generate layer"),
4305 tr("<b>Layer generation failed</b><p>Failed to generate a derived layer.<p>The layer transform \"%1\" failed.<p>No error information is available.") 4312 tr("<b>Layer generation failed</b><p>Failed to generate a derived layer.<p>The layer transform %1failed.<p>No error information is available.")
4306 .arg(transformName), 4313 .arg(quoted),
4307 QMessageBox::Ok); 4314 QMessageBox::Ok);
4308 } 4315 }
4309 } 4316 }
4310 4317
4311 void 4318 void