# HG changeset patch # User Chris Cannam # Date 1201088314 0 # Node ID e8a7a935128e36a50bb09df40a9f681a21c608f9 # Parent 1000222cd8f1b55358c73652ad7e9b740b84ad12 * add splash screen diff -r 1000222cd8f1 -r e8a7a935128e icons/sv-splash.png Binary file icons/sv-splash.png has changed diff -r 1000222cd8f1 -r e8a7a935128e icons/sv-splash.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icons/sv-splash.svg Wed Jan 23 11:38:34 2008 +0000 @@ -0,0 +1,101 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + SONIC VISUALISER + QUEEN MARY, UNIVERSITY OF LONDON + + diff -r 1000222cd8f1 -r e8a7a935128e main/MainWindow.cpp --- a/main/MainWindow.cpp Wed Jan 09 17:09:44 2008 +0000 +++ b/main/MainWindow.cpp Wed Jan 23 11:38:34 2008 +0000 @@ -921,9 +921,11 @@ for (unsigned int i = 0; i < sizeof(backgroundTypes)/sizeof(backgroundTypes[0]); ++i) { - for (int menuType = 0; menuType <= 1; ++menuType) { // pane, layer - - if (menuType == 0) menu = m_paneMenu; + const int paneMenuType = 0, layerMenuType = 1; + + for (int menuType = paneMenuType; menuType <= layerMenuType; ++menuType) { + + if (menuType == paneMenuType) menu = m_paneMenu; else menu = m_layerMenu; QMenu *submenu = 0; @@ -938,7 +940,7 @@ case LayerFactory::Waveform: icon = il.load("waveform"); mainText = tr("Add &Waveform"); - if (menuType == 0) { + if (menuType == paneMenuType) { shortcutText = tr("W"); tipText = tr("Add a new pane showing a waveform view"); } else { @@ -950,7 +952,7 @@ case LayerFactory::Spectrogram: icon = il.load("spectrogram"); mainText = tr("Add Spectro&gram"); - if (menuType == 0) { + if (menuType == paneMenuType) { shortcutText = tr("G"); tipText = tr("Add a new pane showing a spectrogram"); } else { @@ -961,7 +963,7 @@ case LayerFactory::MelodicRangeSpectrogram: icon = il.load("spectrogram"); mainText = tr("Add &Melodic Range Spectrogram"); - if (menuType == 0) { + if (menuType == paneMenuType) { shortcutText = tr("M"); tipText = tr("Add a new pane showing a spectrogram set up for an overview of note pitches"); } else { @@ -972,7 +974,7 @@ case LayerFactory::PeakFrequencySpectrogram: icon = il.load("spectrogram"); mainText = tr("Add Pea&k Frequency Spectrogram"); - if (menuType == 0) { + if (menuType == paneMenuType) { shortcutText = tr("K"); tipText = tr("Add a new pane showing a spectrogram set up for tracking frequencies"); } else { @@ -983,7 +985,7 @@ case LayerFactory::Spectrum: icon = il.load("spectrum"); mainText = tr("Add Spectr&um"); - if (menuType == 0) { + if (menuType == paneMenuType) { shortcutText = tr("U"); tipText = tr("Add a new pane showing a frequency spectrum"); } else { @@ -995,11 +997,11 @@ } std::vector candidateModels; - if (menuType == 0) { +// if (menuType == paneMenuType) { candidateModels = models; - } else { - candidateModels.push_back(0); - } +// } else { +// candidateModels.push_back(0); +// } for (std::vector::iterator mi = candidateModels.begin(); @@ -1024,22 +1026,22 @@ bool isDefault = (c == 0); bool isOnly = (isDefault && (channels == 1)); - if (menuType == 1) { - if (isDefault) isOnly = true; - else continue; - } - - if (isOnly && (!plural || menuType == 1)) { - - if (menuType == 1 && type != LayerFactory::Waveform) { - action = new QAction(mainText, this); - } else { +// if (menuType == layerMenuType) { +// if (isDefault) isOnly = true; +// else continue; +// } + + if (isOnly && (!plural /*|| menuType == layerMenuType*/)) { + +// if (menuType == layerMenuType && type != LayerFactory::Waveform) { +// action = new QAction(mainText, this); +// } else { action = new QAction(icon, mainText, this); - } +// } action->setShortcut(shortcutText); action->setStatusTip(tipText); - if (menuType == 0) { + if (menuType == paneMenuType) { connect(action, SIGNAL(triggered()), this, SLOT(addPane())); connect(this, SIGNAL(canAddPane(bool)), @@ -1094,7 +1096,7 @@ action->setStatusTip(tipText); - if (menuType == 0) { + if (menuType == paneMenuType) { connect(action, SIGNAL(triggered()), this, SLOT(addPane())); connect(this, SIGNAL(canAddPane(bool)), @@ -3445,7 +3447,7 @@ QString aboutText; aboutText += tr("

About Sonic Visualiser

"); - aboutText += tr("

Sonic Visualiser is a program for viewing and exploring audio data for
semantic music analysis and annotation.

"); + aboutText += tr("

Sonic Visualiser is a program for viewing and exploring audio data for semantic music analysis and annotation.

"); aboutText += tr("

%1 : %2 configuration

") .arg(version) .arg(debug ? tr("Debug") : tr("Release")); @@ -3527,11 +3529,11 @@ #endif aboutText += - "

Sonic Visualiser Copyright © 2005 - 2007 Chris Cannam and
" + "

Sonic Visualiser Copyright © 2005 - 2008 Chris Cannam and " "Queen Mary, University of London.

" - "

This program is free software; you can redistribute it and/or
" - "modify it under the terms of the GNU General Public License as
" - "published by the Free Software Foundation; either version 2 of the
" + "

This program is free software; you can redistribute it and/or " + "modify it under the terms of the GNU General Public License as " + "published by the Free Software Foundation; either version 2 of the " "License, or (at your option) any later version.
See the file " "COPYING included with this distribution for more information.

"; diff -r 1000222cd8f1 -r e8a7a935128e main/main.cpp --- a/main/main.cpp Wed Jan 09 17:09:44 2008 +0000 +++ b/main/main.cpp Wed Jan 23 11:38:34 2008 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -229,6 +230,17 @@ QApplication::setOrganizationDomain("sonicvisualiser.org"); QApplication::setApplicationName(QApplication::tr("Sonic Visualiser")); + QPixmap pixmap(":/icons/sv-splash.png"); + QSplashScreen splash(pixmap); + + QSettings settings; + settings.beginGroup("MainWindow"); + + if (settings.value("showsplash", true).toBool()) { + splash.show(); + application.processEvents(); + } + QIcon icon; int sizes[] = { 16, 22, 24, 32, 48, 64, 128 }; for (int i = 0; i < sizeof(sizes)/sizeof(sizes[0]); ++i) { @@ -277,8 +289,6 @@ if (height < 450) height = available.height() * 2 / 3; if (width > height * 2) width = height * 2; - QSettings settings; - settings.beginGroup("MainWindow"); QSize size = settings.value("size", QSize(width, height)).toSize(); gui->resize(size); if (settings.contains("position")) { @@ -351,6 +361,7 @@ settings.endGroup(); #endif + splash.finish(gui); /* TipDialog tipDialog; diff -r 1000222cd8f1 -r e8a7a935128e sonic-visualiser.qrc --- a/sonic-visualiser.qrc Wed Jan 09 17:09:44 2008 +0000 +++ b/sonic-visualiser.qrc Wed Jan 23 11:38:34 2008 +0000 @@ -77,6 +77,7 @@ icons/sv-48x48.png icons/sv-64x64.png icons/sv-128x128.png + icons/sv-splash.png samples/bass.wav samples/beep.wav samples/bounce.wav