comparison main/MainWindow.cpp @ 138:834ff910e3d2

* More icons, distinguish between icons for open session/audio and general open
author Chris Cannam
date Mon, 30 Apr 2007 14:07:21 +0000
parents 006c90387f40
children 56c00f977cac
comparison
equal deleted inserted replaced
137:006c90387f40 138:834ff910e3d2
421 action->setShortcut(tr("Ctrl+N")); 421 action->setShortcut(tr("Ctrl+N"));
422 action->setStatusTip(tr("Abandon the current Sonic Visualiser session and start a new one")); 422 action->setStatusTip(tr("Abandon the current Sonic Visualiser session and start a new one"));
423 connect(action, SIGNAL(triggered()), this, SLOT(newSession())); 423 connect(action, SIGNAL(triggered()), this, SLOT(newSession()));
424 menu->addAction(action); 424 menu->addAction(action);
425 toolbar->addAction(action); 425 toolbar->addAction(action);
426 426
427 icon = QIcon(":icons/fileopen.png"); 427 icon = QIcon(":icons/fileopensession.png");
428 icon.addFile(":icons/fileopen-22.png");
429
430 action = new QAction(icon, tr("&Open Session..."), this); 428 action = new QAction(icon, tr("&Open Session..."), this);
431 action->setShortcut(tr("Ctrl+O")); 429 action->setShortcut(tr("Ctrl+O"));
432 action->setStatusTip(tr("Open a previously saved Sonic Visualiser session file")); 430 action->setStatusTip(tr("Open a previously saved Sonic Visualiser session file"));
433 connect(action, SIGNAL(triggered()), this, SLOT(openSession())); 431 connect(action, SIGNAL(triggered()), this, SLOT(openSession()));
434 menu->addAction(action); 432 menu->addAction(action);
433
434 icon = QIcon(":icons/fileopen.png");
435 icon.addFile(":icons/fileopen-22.png");
435 436
436 action = new QAction(icon, tr("&Open..."), this); 437 action = new QAction(icon, tr("&Open..."), this);
437 action->setStatusTip(tr("Open a session file, audio file, or layer")); 438 action->setStatusTip(tr("Open a session file, audio file, or layer"));
438 connect(action, SIGNAL(triggered()), this, SLOT(openSomething())); 439 connect(action, SIGNAL(triggered()), this, SLOT(openSomething()));
439 toolbar->addAction(action); 440 toolbar->addAction(action);
456 menu->addAction(action); 457 menu->addAction(action);
457 toolbar->addAction(action); 458 toolbar->addAction(action);
458 459
459 menu->addSeparator(); 460 menu->addSeparator();
460 461
461 action = new QAction(tr("&Import Audio File..."), this); 462 icon = QIcon(":icons/fileopenaudio.png");
463 action = new QAction(icon, tr("&Import Audio File..."), this);
462 action->setShortcut(tr("Ctrl+I")); 464 action->setShortcut(tr("Ctrl+I"));
463 action->setStatusTip(tr("Import an existing audio file")); 465 action->setStatusTip(tr("Import an existing audio file"));
464 connect(action, SIGNAL(triggered()), this, SLOT(importAudio())); 466 connect(action, SIGNAL(triggered()), this, SLOT(importAudio()));
465 menu->addAction(action); 467 menu->addAction(action);
466 468
707 action->setStatusTip(tr("Restore the zoom level to the default")); 709 action->setStatusTip(tr("Restore the zoom level to the default"));
708 connect(action, SIGNAL(triggered()), this, SLOT(zoomDefault())); 710 connect(action, SIGNAL(triggered()), this, SLOT(zoomDefault()));
709 connect(this, SIGNAL(canZoom(bool)), action, SLOT(setEnabled(bool))); 711 connect(this, SIGNAL(canZoom(bool)), action, SLOT(setEnabled(bool)));
710 menu->addAction(action); 712 menu->addAction(action);
711 713
712 action = new QAction(tr("Zoom to &Fit"), this); 714 action = new QAction(QIcon(":/icons/zoom-fit.png"),
715 tr("Zoom to &Fit"), this);
713 action->setStatusTip(tr("Zoom to show the whole file")); 716 action->setStatusTip(tr("Zoom to show the whole file"));
714 connect(action, SIGNAL(triggered()), this, SLOT(zoomToFit())); 717 connect(action, SIGNAL(triggered()), this, SLOT(zoomToFit()));
715 connect(this, SIGNAL(canZoom(bool)), action, SLOT(setEnabled(bool))); 718 connect(this, SIGNAL(canZoom(bool)), action, SLOT(setEnabled(bool)));
716 menu->addAction(action); 719 menu->addAction(action);
717 720
996 else continue; 999 else continue;
997 } 1000 }
998 1001
999 if (isOnly && (!plural || menuType == 1)) { 1002 if (isOnly && (!plural || menuType == 1)) {
1000 1003
1001 if (type != LayerFactory::Waveform) { 1004 if (menuType == 1 && type != LayerFactory::Waveform) {
1002 action = new QAction(mainText, this); 1005 action = new QAction(mainText, this);
1003 } else { 1006 } else {
1004 action = new QAction(icon, mainText, this); 1007 action = new QAction(icon, mainText, this);
1005 } 1008 }
1006 1009
1341 if (m_mainMenusCreated) return; 1344 if (m_mainMenusCreated) return;
1342 1345
1343 QMenu *menu = menuBar()->addMenu(tr("&Help")); 1346 QMenu *menu = menuBar()->addMenu(tr("&Help"));
1344 menu->setTearOffEnabled(true); 1347 menu->setTearOffEnabled(true);
1345 1348
1346 QAction *action = new QAction(tr("&Help Reference"), this); 1349 QAction *action = new QAction(QIcon(":icons/help.png"),
1350 tr("&Help Reference"), this);
1347 action->setStatusTip(tr("Open the Sonic Visualiser reference manual")); 1351 action->setStatusTip(tr("Open the Sonic Visualiser reference manual"));
1348 connect(action, SIGNAL(triggered()), this, SLOT(help())); 1352 connect(action, SIGNAL(triggered()), this, SLOT(help()));
1349 menu->addAction(action); 1353 menu->addAction(action);
1350 1354
1351 action = new QAction(tr("Sonic Visualiser on the &Web"), this); 1355 action = new QAction(tr("Sonic Visualiser on the &Web"), this);