Merge branch 'stable-1.1'

Conflicts:
	src/core/main.cpp
	src/gui/MainWindow.cpp
This commit is contained in:
Vesa
2014-11-02 07:46:32 +02:00
8 changed files with 504 additions and 454 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 KiB

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -87,6 +87,7 @@ public:
m_controls( this ),
m_originalPluginData( originalPluginData )
{
setName();
}
virtual ~DummyEffect()
@@ -113,7 +114,28 @@ public:
private:
DummyEffectControls m_controls;
const QDomElement m_originalPluginData;
// Parse the display name from the dom
virtual void setName()
{
QDomNodeList keys = originalPluginData().elementsByTagName( "key" );
for( int i = 0; !keys.item( i ).isNull(); ++i )
{
QDomNodeList attributes = keys.item( i ).toElement().elementsByTagName( "attribute" );
for( int j = 0; !attributes.item( j ).isNull(); ++j )
{
QDomElement attribute = attributes.item( j ).toElement();
if( attribute.hasAttribute( "value" ) )
{
QString name = tr("NOT FOUND") + " (" + attribute.attribute( "value" ) + ")";
setDisplayName(name);
return;
}
}
}
}
} ;

View File

@@ -58,9 +58,20 @@ public:
void addSpacingToToolBar( int _size );
// every function that replaces current file (e.g. creates new file,
// opens another file...) has to call this before and may only process
// if this function returns true
///
/// \brief Asks whether changes made to the project are to be saved.
///
/// Opens a dialog giving the user the choice to (a) confirm his choice
/// (such as opening a new file), (b) save the current project before
/// proceeding or (c) cancel the process.
///
/// Every function that replaces the current file (e.g. creates new file,
/// opens another file...) must call this before and may only proceed if
/// this function returns true.
///
/// \return true if the user allows the software to proceed, false if they
/// cancel the action.
///
bool mayChangeProject();

View File

@@ -522,6 +522,8 @@ void sf2Instrument::updateSampleRate()
}
updateReverb();
updateChorus();
updateReverbOn();
updateChorusOn();
}

View File

@@ -423,6 +423,7 @@ int main( int argc, char * * argv )
// recover a file?
QString recoveryFile = ConfigManager::inst()->recoveryFile();
if( QFileInfo(recoveryFile).exists() &&
QMessageBox::question( engine::mainWindow(), MainWindow::tr( "Project recovery" ),
MainWindow::tr( "It looks like the last session did not end properly. "

View File

@@ -754,11 +754,14 @@ void MainWindow::updateRecentlyOpenedProjectsMenu()
void MainWindow::openRecentlyOpenedProject( QAction * _action )
{
const QString & f = _action->text();
setCursor( Qt::WaitCursor );
engine::getSong()->loadProject( f );
ConfigManager::inst()->addRecentlyOpenedProject( f );
setCursor( Qt::ArrowCursor );
if ( mayChangeProject() )
{
const QString & f = _action->text();
setCursor( Qt::WaitCursor );
engine::getSong()->loadProject( f );
configManager::inst()->addRecentlyOpenedProject( f );
setCursor( Qt::ArrowCursor );
}
}

View File

@@ -31,6 +31,7 @@
#include <QWhatsThis>
#include "EffectView.h"
#include "DummyEffect.h"
#include "caption_menu.h"
#include "EffectControls.h"
#include "EffectControlDialog.h"
@@ -51,16 +52,21 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
m_controlView( NULL )
{
setFixedSize( 210, 60 );
m_bypass = new ledCheckBox( "", this );
// Disable effects that are of type "DummyEffect"
bool isEnabled = !dynamic_cast<DummyEffect *>( effect() );
m_bypass = new ledCheckBox( this, "", isEnabled ? ledCheckBox::Green : ledCheckBox::Red );
m_bypass->move( 3, 3 );
m_bypass->setEnabled( isEnabled );
m_bypass->setWhatsThis( tr( "Toggles the effect on or off." ) );
toolTip::add( m_bypass, tr( "On/Off" ) );
m_wetDry = new knob( knobBright_26, this );
m_wetDry->setLabel( tr( "W/D" ) );
m_wetDry->move( 27, 5 );
m_wetDry->setEnabled( isEnabled );
m_wetDry->setHintText( tr( "Wet Level:" ) + " ", "" );
m_wetDry->setWhatsThis( tr( "The Wet/Dry knob sets the ratio between "
"the input signal and the effect signal that "
@@ -70,6 +76,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
m_autoQuit = new TempoSyncKnob( knobBright_26, this );
m_autoQuit->setLabel( tr( "DECAY" ) );
m_autoQuit->move( 60, 5 );
m_autoQuit->setEnabled( isEnabled );
m_autoQuit->setHintText( tr( "Time:" ) + " ", "ms" );
m_autoQuit->setWhatsThis( tr(
"The Decay knob controls how many buffers of silence must pass before the "
@@ -80,6 +87,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
m_gate = new knob( knobBright_26, this );
m_gate->setLabel( tr( "GATE" ) );
m_gate->move( 93, 5 );
m_gate->setEnabled( isEnabled );
m_gate->setHintText( tr( "Gate:" ) + " ", "" );
m_gate->setWhatsThis( tr(
"The Gate knob controls the signal level that is considered to be 'silence' "