Rename a lot of classes

* aboutDialog -> AboutDialog
* bbEditor -> BBEditor
* exportProjectDialog -> ExportProjectDialog
* setupDialog -> SetupDialog
* stringPairDrag -> StringPairDrag
This commit is contained in:
Lukas W
2014-11-26 10:39:02 +01:00
parent 7d4f179b4b
commit 95798da9d0
35 changed files with 177 additions and 177 deletions

View File

@@ -1,5 +1,5 @@
/*
* AboutDialog.h - declaration of class aboutDialog
* AboutDialog.h - declaration of class AboutDialog
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -31,10 +31,10 @@
#include "ui_about_dialog.h"
class aboutDialog : public QDialog, public Ui::AboutDialog
class AboutDialog : public QDialog, public Ui::AboutDialog
{
public:
aboutDialog( void );
AboutDialog( void );
} ;

View File

@@ -34,12 +34,12 @@ class ComboBox;
class ToolButton;
class bbEditor : public TrackContainerView
class BBEditor : public TrackContainerView
{
Q_OBJECT
public:
bbEditor( BBTrackContainer * _tc );
virtual ~bbEditor();
BBEditor( BBTrackContainer * _tc );
virtual ~BBEditor();
virtual inline bool fixedTCOs() const
{

View File

@@ -74,7 +74,7 @@ private:
ComboBoxModel m_bbComboBoxModel;
friend class bbEditor;
friend class BBEditor;
} ;

View File

@@ -34,7 +34,7 @@
#include "export.h"
class AutomationEditor;
class bbEditor;
class BBEditor;
class BBTrackContainer;
class DummyTrackContainer;
class FxMixer;
@@ -113,7 +113,7 @@ public:
return s_songEditor;
}
static bbEditor * getBBEditor()
static BBEditor * getBBEditor()
{
return s_bbEditor;
}
@@ -189,7 +189,7 @@ private:
static FxMixerView * s_fxMixerView;
static SongEditor* s_songEditor;
static AutomationEditor * s_automationEditor;
static bbEditor * s_bbEditor;
static BBEditor * s_bbEditor;
static PianoRoll* s_pianoRoll;
static ProjectNotes * s_projectNotes;
static Ladspa2LMMS * s_ladspaManager;

View File

@@ -1,5 +1,5 @@
/*
* ExportProjectDialog.h - declaration of class exportProjectDialog which is
* ExportProjectDialog.h - declaration of class ExportProjectDialog which is
* responsible for exporting project
*
* Copyright (c) 2004-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
@@ -34,12 +34,12 @@
#include "ProjectRenderer.h"
class exportProjectDialog : public QDialog, public Ui::ExportProjectDialog
class ExportProjectDialog : public QDialog, public Ui::ExportProjectDialog
{
Q_OBJECT
public:
exportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export );
virtual ~exportProjectDialog();
ExportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export );
virtual ~ExportProjectDialog();
protected:

View File

@@ -138,7 +138,7 @@ private:
int m_steps;
friend class PatternView;
friend class bbEditor;
friend class BBEditor;
signals:

View File

@@ -41,7 +41,7 @@ class QSlider;
class TabBar;
class setupDialog : public QDialog
class SetupDialog : public QDialog
{
Q_OBJECT
public:
@@ -54,8 +54,8 @@ public:
MidiSettings
} ;
setupDialog( ConfigTabs _tab_to_open = GeneralSettings );
virtual ~setupDialog();
SetupDialog( ConfigTabs _tab_to_open = GeneralSettings );
virtual ~SetupDialog();
protected slots:

View File

@@ -1,5 +1,5 @@
/*
* StringPairDrag.h - class stringPairDrag which provides general support
* StringPairDrag.h - class StringPairDrag which provides general support
* for drag'n'drop of string-pairs
*
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
@@ -36,12 +36,12 @@
class QPixmap;
class EXPORT stringPairDrag : public QDrag
class EXPORT StringPairDrag : public QDrag
{
public:
stringPairDrag( const QString & _key, const QString & _value,
StringPairDrag( const QString & _key, const QString & _value,
const QPixmap & _icon, QWidget * _w );
~stringPairDrag();
~StringPairDrag();
static bool processDragEnterEvent( QDragEnterEvent * _dee,
const QString & _allowed_keys );

View File

@@ -605,10 +605,10 @@ AudioFileProcessorView::~AudioFileProcessorView()
void AudioFileProcessorView::dragEnterEvent( QDragEnterEvent * _dee )
{
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
if( _dee->mimeData()->hasFormat( StringPairDrag::mimeType() ) )
{
QString txt = _dee->mimeData()->data(
stringPairDrag::mimeType() );
StringPairDrag::mimeType() );
if( txt.section( ':', 0, 0 ) == QString( "tco_%1" ).arg(
Track::SampleTrack ) )
{
@@ -634,8 +634,8 @@ void AudioFileProcessorView::dragEnterEvent( QDragEnterEvent * _dee )
void AudioFileProcessorView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString value = StringPairDrag::decodeValue( _de );
if( type == "samplefile" )
{
castModel<audioFileProcessor>()->setAudioFile( value );

View File

@@ -588,10 +588,10 @@ void PatmanView::updateFilename( void )
void PatmanView::dragEnterEvent( QDragEnterEvent * _dee )
{
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
if( _dee->mimeData()->hasFormat( StringPairDrag::mimeType() ) )
{
QString txt = _dee->mimeData()->data(
stringPairDrag::mimeType() );
StringPairDrag::mimeType() );
if( txt.section( ':', 0, 0 ) == "samplefile" )
{
_dee->acceptProposedAction();
@@ -612,8 +612,8 @@ void PatmanView::dragEnterEvent( QDragEnterEvent * _dee )
void PatmanView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString value = StringPairDrag::decodeValue( _de );
if( type == "samplefile" )
{
m_pi->setFile( value );

View File

@@ -791,10 +791,10 @@ void VestigeInstrumentView::noteOffAll( void )
void VestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee )
{
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
if( _dee->mimeData()->hasFormat( StringPairDrag::mimeType() ) )
{
QString txt = _dee->mimeData()->data(
stringPairDrag::mimeType() );
StringPairDrag::mimeType() );
if( txt.section( ':', 0, 0 ) == "vstplugin" )
{
_dee->acceptProposedAction();
@@ -815,8 +815,8 @@ void VestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee )
void VestigeInstrumentView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString value = StringPairDrag::decodeValue( _de );
if( type == "vstplugin" )
{
m_vi->loadFile( value );
@@ -1105,10 +1105,10 @@ void manageVestigeInstrumentView::setParameter( void )
void manageVestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee )
{
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
if( _dee->mimeData()->hasFormat( StringPairDrag::mimeType() ) )
{
QString txt = _dee->mimeData()->data(
stringPairDrag::mimeType() );
StringPairDrag::mimeType() );
if( txt.section( ':', 0, 0 ) == "vstplugin" )
{
_dee->acceptProposedAction();
@@ -1129,8 +1129,8 @@ void manageVestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee )
void manageVestigeInstrumentView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString value = StringPairDrag::decodeValue( _de );
if( type == "vstplugin" )
{
m_vi->loadFile( value );

View File

@@ -571,10 +571,10 @@ ZynAddSubFxView::~ZynAddSubFxView()
void ZynAddSubFxView::dragEnterEvent( QDragEnterEvent * _dee )
{
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
if( _dee->mimeData()->hasFormat( StringPairDrag::mimeType() ) )
{
QString txt = _dee->mimeData()->data(
stringPairDrag::mimeType() );
StringPairDrag::mimeType() );
if( txt.section( ':', 0, 0 ) == "pluginpresetfile" )
{
_dee->acceptProposedAction();
@@ -595,8 +595,8 @@ void ZynAddSubFxView::dragEnterEvent( QDragEnterEvent * _dee )
void ZynAddSubFxView::dropEvent( QDropEvent * _de )
{
const QString type = stringPairDrag::decodeKey( _de );
const QString value = stringPairDrag::decodeValue( _de );
const QString type = StringPairDrag::decodeKey( _de );
const QString value = StringPairDrag::decodeValue( _de );
if( type == "pluginpresetfile" )
{
castModel<ZynAddSubFxInstrument>()->loadFile( value );

View File

@@ -57,7 +57,7 @@ BBTrackContainer * Engine::s_bbTrackContainer = NULL;
Song * Engine::s_song = NULL;
SongEditor* Engine::s_songEditor = NULL;
AutomationEditor * Engine::s_automationEditor = NULL;
bbEditor * Engine::s_bbEditor = NULL;
BBEditor * Engine::s_bbEditor = NULL;
PianoRoll* Engine::s_pianoRoll = NULL;
ProjectNotes * Engine::s_projectNotes = NULL;
ProjectJournal * Engine::s_projectJournal = NULL;
@@ -97,7 +97,7 @@ void Engine::init( const bool _has_gui )
s_fxMixerView = new FxMixerView;
s_controllerRackView = new ControllerRackView;
s_projectNotes = new ProjectNotes;
s_bbEditor = new bbEditor( s_bbTrackContainer );
s_bbEditor = new BBEditor( s_bbTrackContainer );
s_pianoRoll = new PianoRoll;
s_automationEditor = new AutomationEditor;

View File

@@ -1221,7 +1221,7 @@ void Song::exportProject(bool multiExport)
}
const QString export_file_name = efd.selectedFiles()[0] + suffix;
exportProjectDialog epd( export_file_name, Engine::mainWindow(), multiExport );
ExportProjectDialog epd( export_file_name, Engine::mainWindow(), multiExport );
epd.exec();
}
}

View File

@@ -446,7 +446,7 @@ void trackContentObjectView::dragEnterEvent( QDragEnterEvent * _dee )
}
else
{
stringPairDrag::processDragEnterEvent( _dee, "tco_" +
StringPairDrag::processDragEnterEvent( _dee, "tco_" +
QString::number( m_tco->getTrack()->type() ) );
}
}
@@ -465,8 +465,8 @@ void trackContentObjectView::dragEnterEvent( QDragEnterEvent * _dee )
*/
void trackContentObjectView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString value = StringPairDrag::decodeValue( _de );
// Track must be the same type to paste into
if( type != ( "tco_" + QString::number( m_tco->getTrack()->type() ) ) )
@@ -628,7 +628,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me )
128, 128,
Qt::KeepAspectRatio,
Qt::SmoothTransformation );
new stringPairDrag( QString( "tco_%1" ).arg(
new StringPairDrag( QString( "tco_%1" ).arg(
m_tco->getTrack()->type() ),
dataFile.toString(), thumbnail, this );
}
@@ -750,7 +750,7 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me )
128, 128,
Qt::KeepAspectRatio,
Qt::SmoothTransformation );
new stringPairDrag( QString( "tco_%1" ).arg(
new StringPairDrag( QString( "tco_%1" ).arg(
m_tco->getTrack()->type() ),
dataFile.toString(), thumbnail, this );
}
@@ -881,7 +881,7 @@ void trackContentObjectView::mouseReleaseEvent( QMouseEvent * _me )
{
// If the CopySelection was chosen as the action due to mouse movement,
// it will have been cleared. At this point Toggle is the desired action.
// An active stringPairDrag will prevent this method from being called,
// An active StringPairDrag will prevent this method from being called,
// so a real CopySelection would not have occurred.
if( m_action == CopySelection ||
( m_action == ToggleSelected && mouseMovedDistance( _me, 2 ) == false ) )
@@ -1245,7 +1245,7 @@ void trackContentWidget::dragEnterEvent( QDragEnterEvent * _dee )
}
else
{
stringPairDrag::processDragEnterEvent( _dee, "tco_" +
StringPairDrag::processDragEnterEvent( _dee, "tco_" +
QString::number( getTrack()->type() ) );
}
}
@@ -1261,8 +1261,8 @@ void trackContentWidget::dragEnterEvent( QDragEnterEvent * _dee )
bool trackContentWidget::canPasteSelection( MidiTime tcoPos, const QMimeData * mimeData )
{
Track * t = getTrack();
QString type = stringPairDrag::decodeMimeKey( mimeData );
QString value = stringPairDrag::decodeMimeValue( mimeData );
QString type = StringPairDrag::decodeMimeKey( mimeData );
QString value = StringPairDrag::decodeMimeValue( mimeData );
// We can only paste into tracks of the same type
if( type != ( "tco_" + QString::number( t->type() ) ) ||
@@ -1335,8 +1335,8 @@ bool trackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de )
return false;
}
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString value = StringPairDrag::decodeValue( _de );
getTrack()->addJournalCheckPoint();
@@ -1642,7 +1642,7 @@ void trackOperationsWidget::mousePressEvent( QMouseEvent * _me )
{
DataFile dataFile( DataFile::DragNDropData );
m_trackView->getTrack()->saveState( dataFile, dataFile.content() );
new stringPairDrag( QString( "track_%1" ).arg(
new StringPairDrag( QString( "track_%1" ).arg(
m_trackView->getTrack()->type() ),
dataFile.toString(), QPixmap::grabWidget(
m_trackView->getTrackSettingsWidget() ),
@@ -2511,7 +2511,7 @@ void trackView::modelChanged()
*/
void trackView::dragEnterEvent( QDragEnterEvent * _dee )
{
stringPairDrag::processDragEnterEvent( _dee, "track_" +
StringPairDrag::processDragEnterEvent( _dee, "track_" +
QString::number( m_track->type() ) );
}
@@ -2528,8 +2528,8 @@ void trackView::dragEnterEvent( QDragEnterEvent * _dee )
*/
void trackView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString value = StringPairDrag::decodeValue( _de );
if( type == ( "track_" + QString::number( m_track->type() ) ) )
{
// value contains our XML-data so simply create a

View File

@@ -51,8 +51,8 @@ AudioFileDevice::AudioFileDevice( const sample_rate_t _sample_rate,
if( m_outputFile.open( QFile::WriteOnly | QFile::Truncate ) == false )
{
QMessageBox::critical( NULL,
exportProjectDialog::tr( "Could not open file" ),
exportProjectDialog::tr( "Could not open file %1 "
ExportProjectDialog::tr( "Could not open file" ),
ExportProjectDialog::tr( "Could not open file %1 "
"for writing.\nPlease make "
"sure you have write-"
"permission to the file and "

View File

@@ -32,7 +32,7 @@
aboutDialog::aboutDialog() :
AboutDialog::AboutDialog() :
QDialog( Engine::mainWindow() ),
Ui::AboutDialog()
{

View File

@@ -146,7 +146,7 @@ void AutomatableModelView::mousePressEvent( QMouseEvent* event )
{
if( event->button() == Qt::LeftButton && event->modifiers() & Qt::ControlModifier )
{
new stringPairDrag( "automatable_model", QString::number( modelUntyped()->id() ), QPixmap(), widget() );
new StringPairDrag( "automatable_model", QString::number( modelUntyped()->id() ), QPixmap(), widget() );
event->accept();
}
else if( event->button() == Qt::MidButton )

View File

@@ -361,7 +361,7 @@ void AutomationPatternView::paintEvent( QPaintEvent * )
void AutomationPatternView::dragEnterEvent( QDragEnterEvent * _dee )
{
stringPairDrag::processDragEnterEvent( _dee, "automatable_model" );
StringPairDrag::processDragEnterEvent( _dee, "automatable_model" );
if( !_dee->isAccepted() )
{
trackContentObjectView::dragEnterEvent( _dee );
@@ -373,8 +373,8 @@ void AutomationPatternView::dragEnterEvent( QDragEnterEvent * _dee )
void AutomationPatternView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString val = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString val = StringPairDrag::decodeValue( _de );
if( type == "automatable_model" )
{
AutomatableModel * mod = dynamic_cast<AutomatableModel *>(

View File

@@ -43,7 +43,7 @@
bbEditor::bbEditor( BBTrackContainer* tc ) :
BBEditor::BBEditor( BBTrackContainer* tc ) :
TrackContainerView( tc ),
m_bbtc( tc )
{
@@ -154,15 +154,15 @@ bbEditor::bbEditor( BBTrackContainer* tc ) :
bbEditor::~bbEditor()
BBEditor::~BBEditor()
{
}
void bbEditor::dropEvent( QDropEvent * de )
void BBEditor::dropEvent( QDropEvent * de )
{
QString type = stringPairDrag::decodeKey( de );
QString value = stringPairDrag::decodeValue( de );
QString type = StringPairDrag::decodeKey( de );
QString value = StringPairDrag::decodeValue( de );
if( type.left( 6 ) == "track_" )
{
@@ -181,7 +181,7 @@ void bbEditor::dropEvent( QDropEvent * de )
}
void bbEditor::removeBBView( int _bb )
void BBEditor::removeBBView( int _bb )
{
foreach( trackView* view, trackViews() )
{
@@ -192,7 +192,7 @@ void bbEditor::removeBBView( int _bb )
void bbEditor::setPauseIcon( bool pause )
void BBEditor::setPauseIcon( bool pause )
{
if( pause == true )
{
@@ -207,7 +207,7 @@ void bbEditor::setPauseIcon( bool pause )
void bbEditor::play()
void BBEditor::play()
{
if( Engine::getSong()->playMode() != Song::Mode_PlayBB )
{
@@ -222,7 +222,7 @@ void bbEditor::play()
void bbEditor::stop()
void BBEditor::stop()
{
Engine::getSong()->stop();
}
@@ -230,7 +230,7 @@ void bbEditor::stop()
void bbEditor::updatePosition()
void BBEditor::updatePosition()
{
//realignTracks();
emit positionChanged( m_currentPosition );
@@ -239,7 +239,7 @@ void bbEditor::updatePosition()
void bbEditor::addAutomationTrack()
void BBEditor::addAutomationTrack()
{
(void) Track::create( Track::AutomationTrack, model() );
}
@@ -247,7 +247,7 @@ void bbEditor::addAutomationTrack()
void bbEditor::addSteps()
void BBEditor::addSteps()
{
TrackContainer::TrackList tl = model()->tracks();
@@ -265,7 +265,7 @@ void bbEditor::addSteps()
void bbEditor::removeSteps()
void BBEditor::removeSteps()
{
TrackContainer::TrackList tl = model()->tracks();
@@ -283,7 +283,7 @@ void bbEditor::removeSteps()
void bbEditor::keyPressEvent( QKeyEvent * _ke )
void BBEditor::keyPressEvent( QKeyEvent * _ke )
{
if ( _ke->key() == Qt::Key_Space )
{

View File

@@ -34,7 +34,7 @@
#include "bb_track.h"
exportProjectDialog::exportProjectDialog( const QString & _file_name,
ExportProjectDialog::ExportProjectDialog( const QString & _file_name,
QWidget * _parent, bool multi_export=false ) :
QDialog( _parent ),
Ui::ExportProjectDialog(),
@@ -86,7 +86,7 @@ exportProjectDialog::exportProjectDialog( const QString & _file_name,
exportProjectDialog::~exportProjectDialog()
ExportProjectDialog::~ExportProjectDialog()
{
for( RenderVector::ConstIterator it = m_renderers.begin();
@@ -99,7 +99,7 @@ exportProjectDialog::~exportProjectDialog()
void exportProjectDialog::reject()
void ExportProjectDialog::reject()
{
for( RenderVector::ConstIterator it = m_renderers.begin(); it != m_renderers.end(); ++it )
{
@@ -115,7 +115,7 @@ void exportProjectDialog::reject()
void exportProjectDialog::accept()
void ExportProjectDialog::accept()
{
// If more to render, kick off next render job
if( m_renderers.isEmpty() == false )
@@ -140,7 +140,7 @@ void exportProjectDialog::accept()
void exportProjectDialog::closeEvent( QCloseEvent * _ce )
void ExportProjectDialog::closeEvent( QCloseEvent * _ce )
{
for( RenderVector::ConstIterator it = m_renderers.begin(); it != m_renderers.end(); ++it )
{
@@ -159,7 +159,7 @@ void exportProjectDialog::closeEvent( QCloseEvent * _ce )
void exportProjectDialog::popRender()
void ExportProjectDialog::popRender()
{
if( m_multiExport && m_tracksToRender.isEmpty() == false )
{
@@ -189,7 +189,7 @@ void exportProjectDialog::popRender()
void exportProjectDialog::multiRender()
void ExportProjectDialog::multiRender()
{
m_dirName = m_fileName;
QString path = QDir(m_fileName).filePath("text.txt");
@@ -246,7 +246,7 @@ void exportProjectDialog::multiRender()
ProjectRenderer* exportProjectDialog::prepRender()
ProjectRenderer* ExportProjectDialog::prepRender()
{
Mixer::qualitySettings qs =
Mixer::qualitySettings(
@@ -270,7 +270,7 @@ ProjectRenderer* exportProjectDialog::prepRender()
void exportProjectDialog::render( ProjectRenderer* renderer )
void ExportProjectDialog::render( ProjectRenderer* renderer )
{
if( renderer->isReady() )
@@ -290,7 +290,7 @@ void exportProjectDialog::render( ProjectRenderer* renderer )
void exportProjectDialog::startBtnClicked()
void ExportProjectDialog::startBtnClicked()
{
m_ft = ProjectRenderer::NumFileFormats;
@@ -335,7 +335,7 @@ void exportProjectDialog::startBtnClicked()
void exportProjectDialog::updateTitleBar( int _prog )
void ExportProjectDialog::updateTitleBar( int _prog )
{
Engine::mainWindow()->setWindowTitle(
tr( "Rendering: %1%" ).arg( _prog ) );

View File

@@ -474,29 +474,29 @@ void FileBrowserTreeWidget::mouseMoveEvent( QMouseEvent * me )
switch( f->type() )
{
case FileItem::PresetFile:
new stringPairDrag( f->handling() == FileItem::LoadAsPreset ?
new StringPairDrag( f->handling() == FileItem::LoadAsPreset ?
"presetfile" : "pluginpresetfile",
f->fullName(),
embed::getIconPixmap( "preset_file" ), this );
break;
case FileItem::SampleFile:
new stringPairDrag( "samplefile", f->fullName(),
new StringPairDrag( "samplefile", f->fullName(),
embed::getIconPixmap( "sample_file" ), this );
break;
case FileItem::SoundFontFile:
new stringPairDrag( "soundfontfile", f->fullName(),
new StringPairDrag( "soundfontfile", f->fullName(),
embed::getIconPixmap( "soundfont_file" ), this );
break;
case FileItem::VstPluginFile:
new stringPairDrag( "vstpluginfile", f->fullName(),
new StringPairDrag( "vstpluginfile", f->fullName(),
embed::getIconPixmap( "vst_plugin_file" ), this );
break;
case FileItem::MidiFile:
// don't allow dragging FLP-files as FLP import filter clears project
// without asking
// case fileItem::FlpFile:
new stringPairDrag( "importedproject", f->fullName(),
new StringPairDrag( "importedproject", f->fullName(),
embed::getIconPixmap( "midi_file" ), this );
break;

View File

@@ -519,14 +519,14 @@ void MainWindow::finalize()
{
ConfigManager::inst()->setValue( "app", "configured", "1" );
// no, so show it that user can setup everything
setupDialog sd;
SetupDialog sd;
sd.exec();
}
// look whether mixer could use a audio-interface beside AudioDummy
else if( Engine::mixer()->audioDevName() == AudioDummy::name() )
{
// no, so we offer setup-dialog with audio-settings...
setupDialog sd( setupDialog::AudioSettings );
SetupDialog sd( SetupDialog::AudioSettings );
sd.exec();
}
}
@@ -834,7 +834,7 @@ bool MainWindow::saveProjectAsNewVersion()
void MainWindow::showSettingsDialog()
{
setupDialog sd;
SetupDialog sd;
sd.exec();
}
@@ -843,7 +843,7 @@ void MainWindow::showSettingsDialog()
void MainWindow::aboutLMMS()
{
aboutDialog().exec();
AboutDialog().exec();
}

View File

@@ -482,7 +482,7 @@ void PianoView::mousePressEvent( QMouseEvent * _me )
{
if( _me->modifiers() & Qt::ControlModifier )
{
new stringPairDrag( "automatable_model",
new StringPairDrag( "automatable_model",
QString::number( m_piano->instrumentTrack()->baseNoteModel()->id() ),
QPixmap(), this );
_me->accept();

View File

@@ -211,7 +211,7 @@ void PluginDescWidget::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton )
{
new stringPairDrag( "instrument", m_pluginDescriptor.name,
new StringPairDrag( "instrument", m_pluginDescriptor.name,
m_logo, this );
leaveEvent( _me );
}

View File

@@ -84,7 +84,7 @@ inline void labelWidget( QWidget * _w, const QString & _txt )
setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :
m_bufferSize( ConfigManager::inst()->value( "mixer",
"framesperaudiobuffer" ).toInt() ),
m_toolTips( !ConfigManager::inst()->value( "tooltips",
@@ -782,7 +782,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
setupDialog::~setupDialog()
SetupDialog::~SetupDialog()
{
Engine::projectJournal()->setJournalling( true );
}
@@ -790,7 +790,7 @@ setupDialog::~setupDialog()
void setupDialog::accept()
void SetupDialog::accept()
{
ConfigManager::inst()->setValue( "mixer", "framesperaudiobuffer",
QString::number( m_bufferSize ) );
@@ -870,7 +870,7 @@ void setupDialog::accept()
void setupDialog::setBufferSize( int _value )
void SetupDialog::setBufferSize( int _value )
{
const int step = DEFAULT_BUFFER_SIZE / 64;
if( _value > step && _value % step )
@@ -903,7 +903,7 @@ void setupDialog::setBufferSize( int _value )
void setupDialog::resetBufSize()
void SetupDialog::resetBufSize()
{
setBufferSize( DEFAULT_BUFFER_SIZE / 64 );
}
@@ -911,7 +911,7 @@ void setupDialog::resetBufSize()
void setupDialog::displayBufSizeHelp()
void SetupDialog::displayBufSizeHelp()
{
QWhatsThis::showText( QCursor::pos(),
tr( "Here you can setup the internal buffer-size "
@@ -926,7 +926,7 @@ void setupDialog::displayBufSizeHelp()
void setupDialog::toggleToolTips( bool _enabled )
void SetupDialog::toggleToolTips( bool _enabled )
{
m_toolTips = _enabled;
}
@@ -934,7 +934,7 @@ void setupDialog::toggleToolTips( bool _enabled )
void setupDialog::toggleWarnAfterSetup( bool _enabled )
void SetupDialog::toggleWarnAfterSetup( bool _enabled )
{
m_warnAfterSetup = _enabled;
}
@@ -942,7 +942,7 @@ void setupDialog::toggleWarnAfterSetup( bool _enabled )
void setupDialog::toggleDisplaydBV( bool _enabled )
void SetupDialog::toggleDisplaydBV( bool _enabled )
{
m_displaydBV = _enabled;
}
@@ -950,7 +950,7 @@ void setupDialog::toggleDisplaydBV( bool _enabled )
void setupDialog::toggleMMPZ( bool _enabled )
void SetupDialog::toggleMMPZ( bool _enabled )
{
m_MMPZ = _enabled;
}
@@ -958,7 +958,7 @@ void setupDialog::toggleMMPZ( bool _enabled )
void setupDialog::toggleHQAudioDev( bool _enabled )
void SetupDialog::toggleHQAudioDev( bool _enabled )
{
m_hqAudioDev = _enabled;
}
@@ -966,14 +966,14 @@ void setupDialog::toggleHQAudioDev( bool _enabled )
void setupDialog::toggleSmoothScroll( bool _enabled )
void SetupDialog::toggleSmoothScroll( bool _enabled )
{
m_smoothScroll = _enabled;
}
void setupDialog::toggleAutoSave( bool _enabled )
void SetupDialog::toggleAutoSave( bool _enabled )
{
m_enableAutoSave = _enabled;
}
@@ -983,7 +983,7 @@ void setupDialog::toggleAutoSave( bool _enabled )
void setupDialog::toggleCompactTrackButtons( bool _enabled )
void SetupDialog::toggleCompactTrackButtons( bool _enabled )
{
m_compactTrackButtons = _enabled;
}
@@ -992,36 +992,36 @@ void setupDialog::toggleCompactTrackButtons( bool _enabled )
void setupDialog::toggleSyncVSTPlugins( bool _enabled )
void SetupDialog::toggleSyncVSTPlugins( bool _enabled )
{
m_syncVSTPlugins = _enabled;
}
void setupDialog::toggleAnimateAFP( bool _enabled )
void SetupDialog::toggleAnimateAFP( bool _enabled )
{
m_animateAFP = _enabled;
}
void setupDialog::toggleNoteLabels( bool en )
void SetupDialog::toggleNoteLabels( bool en )
{
m_printNoteLabels = en;
}
void setupDialog::toggleDisplayWaveform( bool en )
void SetupDialog::toggleDisplayWaveform( bool en )
{
m_displayWaveform = en;
}
void setupDialog::toggleDisableAutoquit( bool en )
void SetupDialog::toggleDisableAutoquit( bool en )
{
m_disableAutoQuit = en;
}
void setupDialog::toggleOneInstrumentTrackWindow( bool _enabled )
void SetupDialog::toggleOneInstrumentTrackWindow( bool _enabled )
{
m_oneInstrumentTrackWindow = _enabled;
}
@@ -1030,7 +1030,7 @@ void setupDialog::toggleOneInstrumentTrackWindow( bool _enabled )
void setupDialog::openWorkingDir()
void SetupDialog::openWorkingDir()
{
QString new_dir = FileDialog::getExistingDirectory( this,
tr( "Choose LMMS working directory" ), m_workingDir );
@@ -1043,7 +1043,7 @@ void setupDialog::openWorkingDir()
void setupDialog::setWorkingDir( const QString & _wd )
void SetupDialog::setWorkingDir( const QString & _wd )
{
m_workingDir = _wd;
}
@@ -1051,7 +1051,7 @@ void setupDialog::setWorkingDir( const QString & _wd )
void setupDialog::openVSTDir()
void SetupDialog::openVSTDir()
{
QString new_dir = FileDialog::getExistingDirectory( this,
tr( "Choose your VST-plugin directory" ),
@@ -1065,7 +1065,7 @@ void setupDialog::openVSTDir()
void setupDialog::setVSTDir( const QString & _vd )
void SetupDialog::setVSTDir( const QString & _vd )
{
m_vstDir = _vd;
}
@@ -1073,7 +1073,7 @@ void setupDialog::setVSTDir( const QString & _vd )
void setupDialog::openArtworkDir()
void SetupDialog::openArtworkDir()
{
QString new_dir = FileDialog::getExistingDirectory( this,
tr( "Choose artwork-theme directory" ),
@@ -1087,7 +1087,7 @@ void setupDialog::openArtworkDir()
void setupDialog::setArtworkDir( const QString & _ad )
void SetupDialog::setArtworkDir( const QString & _ad )
{
m_artworkDir = _ad;
}
@@ -1095,7 +1095,7 @@ void setupDialog::setArtworkDir( const QString & _ad )
void setupDialog::openFLDir()
void SetupDialog::openFLDir()
{
QString new_dir = FileDialog::getExistingDirectory( this,
tr( "Choose FL Studio installation directory" ),
@@ -1109,7 +1109,7 @@ void setupDialog::openFLDir()
void setupDialog::openLADSPADir()
void SetupDialog::openLADSPADir()
{
QString new_dir = FileDialog::getExistingDirectory( this,
tr( "Choose LADSPA plugin directory" ),
@@ -1131,7 +1131,7 @@ void setupDialog::openLADSPADir()
void setupDialog::openSTKDir()
void SetupDialog::openSTKDir()
{
#ifdef LMMS_HAVE_STK
QString new_dir = FileDialog::getExistingDirectory( this,
@@ -1147,7 +1147,7 @@ void setupDialog::openSTKDir()
void setupDialog::openDefaultSoundfont()
void SetupDialog::openDefaultSoundfont()
{
#ifdef LMMS_HAVE_FLUIDSYNTH
QString new_file = FileDialog::getOpenFileName( this,
@@ -1164,7 +1164,7 @@ void setupDialog::openDefaultSoundfont()
void setupDialog::openBackgroundArtwork()
void SetupDialog::openBackgroundArtwork()
{
QList<QByteArray> fileTypesList = QImageReader::supportedImageFormats();
QString fileTypes;
@@ -1196,7 +1196,7 @@ void setupDialog::openBackgroundArtwork()
void setupDialog::setFLDir( const QString & _fd )
void SetupDialog::setFLDir( const QString & _fd )
{
m_flDir = _fd;
}
@@ -1204,7 +1204,7 @@ void setupDialog::setFLDir( const QString & _fd )
void setupDialog::setLADSPADir( const QString & _fd )
void SetupDialog::setLADSPADir( const QString & _fd )
{
m_ladDir = _fd;
}
@@ -1212,7 +1212,7 @@ void setupDialog::setLADSPADir( const QString & _fd )
void setupDialog::setSTKDir( const QString & _fd )
void SetupDialog::setSTKDir( const QString & _fd )
{
#ifdef LMMS_HAVE_STK
m_stkDir = _fd;
@@ -1222,7 +1222,7 @@ void setupDialog::setSTKDir( const QString & _fd )
void setupDialog::setDefaultSoundfont( const QString & _sf )
void SetupDialog::setDefaultSoundfont( const QString & _sf )
{
#ifdef LMMS_HAVE_FLUIDSYNTH
m_defaultSoundfont = _sf;
@@ -1232,7 +1232,7 @@ void setupDialog::setDefaultSoundfont( const QString & _sf )
void setupDialog::setBackgroundArtwork( const QString & _ba )
void SetupDialog::setBackgroundArtwork( const QString & _ba )
{
#ifdef LMMS_HAVE_FLUIDSYNTH
m_backgroundArtwork = _ba;
@@ -1242,7 +1242,7 @@ void setupDialog::setBackgroundArtwork( const QString & _ba )
void setupDialog::audioInterfaceChanged( const QString & _iface )
void SetupDialog::audioInterfaceChanged( const QString & _iface )
{
for( AswMap::iterator it = m_audioIfaceSetupWidgets.begin();
it != m_audioIfaceSetupWidgets.end(); ++it )
@@ -1256,7 +1256,7 @@ void setupDialog::audioInterfaceChanged( const QString & _iface )
void setupDialog::displayAudioHelp()
void SetupDialog::displayAudioHelp()
{
QWhatsThis::showText( QCursor::pos(),
tr( "Here you can select your preferred "
@@ -1272,7 +1272,7 @@ void setupDialog::displayAudioHelp()
void setupDialog::midiInterfaceChanged( const QString & _iface )
void SetupDialog::midiInterfaceChanged( const QString & _iface )
{
for( MswMap::iterator it = m_midiIfaceSetupWidgets.begin();
it != m_midiIfaceSetupWidgets.end(); ++it )
@@ -1286,7 +1286,7 @@ void setupDialog::midiInterfaceChanged( const QString & _iface )
void setupDialog::displayMIDIHelp()
void SetupDialog::displayMIDIHelp()
{
QWhatsThis::showText( QCursor::pos(),
tr( "Here you can select your preferred "

View File

@@ -1,5 +1,5 @@
/*
* StringPairDrag.cpp - class stringPairDrag which provides general support
* StringPairDrag.cpp - class StringPairDrag which provides general support
* for drag'n'drop of string-pairs and which is the base
* for all drag'n'drop-actions within LMMS
*
@@ -35,7 +35,7 @@
#include "MainWindow.h"
stringPairDrag::stringPairDrag( const QString & _key, const QString & _value,
StringPairDrag::StringPairDrag( const QString & _key, const QString & _value,
const QPixmap & _icon, QWidget * _w ) :
QDrag( _w )
{
@@ -60,7 +60,7 @@ stringPairDrag::stringPairDrag( const QString & _key, const QString & _value,
stringPairDrag::~stringPairDrag()
StringPairDrag::~StringPairDrag()
{
// during a drag, we might have lost key-press-events, so reset
// modifiers of main-win
@@ -73,7 +73,7 @@ stringPairDrag::~stringPairDrag()
bool stringPairDrag::processDragEnterEvent( QDragEnterEvent * _dee,
bool StringPairDrag::processDragEnterEvent( QDragEnterEvent * _dee,
const QString & _allowed_keys )
{
if( !_dee->mimeData()->hasFormat( mimeType() ) )
@@ -93,7 +93,7 @@ bool stringPairDrag::processDragEnterEvent( QDragEnterEvent * _dee,
QString stringPairDrag::decodeMimeKey( const QMimeData * mimeData )
QString StringPairDrag::decodeMimeKey( const QMimeData * mimeData )
{
return( QString( mimeData->data( mimeType() ) ).section( ':', 0, 0 ) );
}
@@ -101,7 +101,7 @@ QString stringPairDrag::decodeMimeKey( const QMimeData * mimeData )
QString stringPairDrag::decodeMimeValue( const QMimeData * mimeData )
QString StringPairDrag::decodeMimeValue( const QMimeData * mimeData )
{
return( QString( mimeData->data( mimeType() ) ).section( ':', 1, -1 ) );
}
@@ -109,7 +109,7 @@ QString stringPairDrag::decodeMimeValue( const QMimeData * mimeData )
QString stringPairDrag::decodeKey( QDropEvent * _de )
QString StringPairDrag::decodeKey( QDropEvent * _de )
{
return decodeMimeKey( _de->mimeData() );
}
@@ -117,7 +117,7 @@ QString stringPairDrag::decodeKey( QDropEvent * _de )
QString stringPairDrag::decodeValue( QDropEvent * _de )
QString StringPairDrag::decodeValue( QDropEvent * _de )
{
return decodeMimeValue( _de->mimeData() );
}

View File

@@ -305,7 +305,7 @@ void TrackContainerView::clearAllTracks()
void TrackContainerView::dragEnterEvent( QDragEnterEvent * _dee )
{
stringPairDrag::processDragEnterEvent( _dee,
StringPairDrag::processDragEnterEvent( _dee,
QString( "presetfile,pluginpresetfile,samplefile,instrument,"
"importedproject,soundfontfile,vstpluginfile,"
"track_%1,track_%2" ).
@@ -318,8 +318,8 @@ void TrackContainerView::dragEnterEvent( QDragEnterEvent * _dee )
void TrackContainerView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString value = StringPairDrag::decodeValue( _de );
if( type == "instrument" )
{
InstrumentTrack * it = dynamic_cast<InstrumentTrack *>(

View File

@@ -129,7 +129,7 @@ void AutomatableButton::mousePressEvent( QMouseEvent * _me )
{
// A group, we must get process it instead
AutomatableModelView* groupView = (AutomatableModelView*)m_group;
new stringPairDrag( "automatable_model",
new StringPairDrag( "automatable_model",
QString::number( groupView->modelUntyped()->id() ),
QPixmap(), widget() );
// TODO: ^^ Maybe use a predefined icon instead of the button they happened to select

View File

@@ -376,7 +376,7 @@ void EnvelopeAndLfoView::mousePressEvent( QMouseEvent * _me )
void EnvelopeAndLfoView::dragEnterEvent( QDragEnterEvent * _dee )
{
stringPairDrag::processDragEnterEvent( _dee,
StringPairDrag::processDragEnterEvent( _dee,
QString( "samplefile,tco_%1" ).arg(
Track::SampleTrack ) );
}
@@ -386,12 +386,12 @@ void EnvelopeAndLfoView::dragEnterEvent( QDragEnterEvent * _dee )
void EnvelopeAndLfoView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString value = StringPairDrag::decodeValue( _de );
if( type == "samplefile" )
{
m_params->m_userWave.setAudioFile(
stringPairDrag::decodeValue( _de ) );
StringPairDrag::decodeValue( _de ) );
m_userLfoBtn->model()->setValue( true );
_de->accept();
}

View File

@@ -393,8 +393,8 @@ void Graph::paintEvent( QPaintEvent * )
void Graph::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString value = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString value = StringPairDrag::decodeValue( _de );
if( type == "samplefile" )
{
@@ -406,7 +406,7 @@ void Graph::dropEvent( QDropEvent * _de )
void Graph::dragEnterEvent( QDragEnterEvent * _dee )
{
if( stringPairDrag::processDragEnterEvent( _dee,
if( StringPairDrag::processDragEnterEvent( _dee,
QString( "samplefile" ) ) == false )
{
_dee->ignore();

View File

@@ -501,7 +501,7 @@ void Knob::toggleScale()
void Knob::dragEnterEvent( QDragEnterEvent * _dee )
{
stringPairDrag::processDragEnterEvent( _dee, "float_value,"
StringPairDrag::processDragEnterEvent( _dee, "float_value,"
"automatable_model" );
}
@@ -510,8 +510,8 @@ void Knob::dragEnterEvent( QDragEnterEvent * _dee )
void Knob::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString val = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString val = StringPairDrag::decodeValue( _de );
if( type == "float_value" )
{
model()->setValue( val.toFloat() );
@@ -563,7 +563,7 @@ void Knob::mousePressEvent( QMouseEvent * _me )
else if( _me->button() == Qt::LeftButton &&
Engine::mainWindow()->isShiftPressed() == true )
{
new stringPairDrag( "float_value",
new StringPairDrag( "float_value",
QString::number( model()->value() ),
QPixmap(), this );
}

View File

@@ -151,7 +151,7 @@ AutomationTrackView::~AutomationTrackView()
void AutomationTrackView::dragEnterEvent( QDragEnterEvent * _dee )
{
stringPairDrag::processDragEnterEvent( _dee, "automatable_model" );
StringPairDrag::processDragEnterEvent( _dee, "automatable_model" );
}
@@ -159,8 +159,8 @@ void AutomationTrackView::dragEnterEvent( QDragEnterEvent * _dee )
void AutomationTrackView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString val = stringPairDrag::decodeValue( _de );
QString type = StringPairDrag::decodeKey( _de );
QString val = StringPairDrag::decodeValue( _de );
if( type == "automatable_model" )
{
AutomatableModel * mod = dynamic_cast<AutomatableModel *>(

View File

@@ -1492,7 +1492,7 @@ void InstrumentTrackWindow::focusInEvent( QFocusEvent* )
void InstrumentTrackWindow::dragEnterEventGeneric( QDragEnterEvent* event )
{
stringPairDrag::processDragEnterEvent( event, "instrument,presetfile,pluginpresetfile" );
StringPairDrag::processDragEnterEvent( event, "instrument,presetfile,pluginpresetfile" );
}
@@ -1508,8 +1508,8 @@ void InstrumentTrackWindow::dragEnterEvent( QDragEnterEvent* event )
void InstrumentTrackWindow::dropEvent( QDropEvent* event )
{
QString type = stringPairDrag::decodeKey( event );
QString value = stringPairDrag::decodeValue( event );
QString type = StringPairDrag::decodeKey( event );
QString value = StringPairDrag::decodeValue( event );
if( type == "instrument" )
{

View File

@@ -267,7 +267,7 @@ void SampleTCOView::contextMenuEvent( QContextMenuEvent * _cme )
void SampleTCOView::dragEnterEvent( QDragEnterEvent * _dee )
{
if( stringPairDrag::processDragEnterEvent( _dee,
if( StringPairDrag::processDragEnterEvent( _dee,
"samplefile,sampledata" ) == false )
{
trackContentObjectView::dragEnterEvent( _dee );
@@ -279,15 +279,15 @@ void SampleTCOView::dragEnterEvent( QDragEnterEvent * _dee )
void SampleTCOView::dropEvent( QDropEvent * _de )
{
if( stringPairDrag::decodeKey( _de ) == "samplefile" )
if( StringPairDrag::decodeKey( _de ) == "samplefile" )
{
m_tco->setSampleFile( stringPairDrag::decodeValue( _de ) );
m_tco->setSampleFile( StringPairDrag::decodeValue( _de ) );
_de->accept();
}
else if( stringPairDrag::decodeKey( _de ) == "sampledata" )
else if( StringPairDrag::decodeKey( _de ) == "sampledata" )
{
m_tco->m_sampleBuffer->loadFromBase64(
stringPairDrag::decodeValue( _de ) );
StringPairDrag::decodeValue( _de ) );
m_tco->updateLength();
update();
_de->accept();