MainWindow: renamed class to match new style
Renamed mainWindow to MainWindow and engine::getMainWindow() to engine::mainWindow(). Additionally reduced some header dependencies.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* main_window.h - declaration of class mainWindow, the main window of LMMS
|
||||
* MainWindow.h - declaration of class MainWindow
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,7 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MAIN_WINDOW_H
|
||||
#define _MAIN_WINDOW_H
|
||||
|
||||
@@ -56,18 +55,18 @@ enum ProjectPlaybackMode
|
||||
PPM_PianoRoll
|
||||
};
|
||||
|
||||
class mainWindow : public QMainWindow
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
inline QMdiArea * workspace( void )
|
||||
inline QMdiArea * workspace()
|
||||
{
|
||||
return( m_workspace );
|
||||
return m_workspace;
|
||||
}
|
||||
|
||||
inline QWidget * toolBar( void )
|
||||
inline QWidget * toolBar()
|
||||
{
|
||||
return( m_toolBar );
|
||||
return m_toolBar;
|
||||
}
|
||||
|
||||
//int addWidgetToToolBar( QWidget * _w, int _row = -1, int _col = -1 );
|
||||
@@ -77,24 +76,24 @@ public:
|
||||
// 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
|
||||
bool mayChangeProject( void );
|
||||
bool mayChangeProject();
|
||||
|
||||
|
||||
void clearKeyModifiers( void );
|
||||
void clearKeyModifiers();
|
||||
|
||||
inline bool isCtrlPressed( void )
|
||||
inline bool isCtrlPressed()
|
||||
{
|
||||
return( m_keyMods.m_ctrl );
|
||||
return m_keyMods.m_ctrl;
|
||||
}
|
||||
|
||||
inline bool isShiftPressed( void )
|
||||
inline bool isShiftPressed()
|
||||
{
|
||||
return( m_keyMods.m_shift );
|
||||
return m_keyMods.m_shift;
|
||||
}
|
||||
|
||||
inline bool isAltPressed( void )
|
||||
inline bool isAltPressed()
|
||||
{
|
||||
return( m_keyMods.m_alt );
|
||||
return m_keyMods.m_alt;
|
||||
}
|
||||
|
||||
static void saveWidgetState( QWidget * _w, QDomElement & _de );
|
||||
@@ -102,40 +101,40 @@ public:
|
||||
|
||||
inline ProjectPlaybackMode playbackMode() const
|
||||
{
|
||||
return m_playbackMode;
|
||||
return m_playbackMode;
|
||||
}
|
||||
|
||||
void setPlaybackMode( ProjectPlaybackMode _playbackMode );
|
||||
|
||||
|
||||
public slots:
|
||||
void resetWindowTitle( void );
|
||||
void resetWindowTitle();
|
||||
|
||||
inline void emptySlot( void )
|
||||
inline void emptySlot()
|
||||
{
|
||||
}
|
||||
inline void enterWhatsThisMode( void )
|
||||
inline void enterWhatsThisMode()
|
||||
{
|
||||
QWhatsThis::enterWhatsThisMode();
|
||||
}
|
||||
void createNewProject( void );
|
||||
void createNewProject();
|
||||
void createNewProjectFromTemplate( QAction * _idx );
|
||||
void openProject( void );
|
||||
bool saveProject( void );
|
||||
bool saveProjectAs( void );
|
||||
void showSettingsDialog( void );
|
||||
void aboutLMMS( void );
|
||||
void help( void );
|
||||
void toggleAutomationEditorWin( void );
|
||||
void toggleBBEditorWin( void );
|
||||
void toggleSongEditorWin( void );
|
||||
void toggleProjectNotesWin( void );
|
||||
void toggleFxMixerWin( void );
|
||||
void togglePianoRollWin( void );
|
||||
void toggleControllerRack( void );
|
||||
void openProject();
|
||||
bool saveProject();
|
||||
bool saveProjectAs();
|
||||
void showSettingsDialog();
|
||||
void aboutLMMS();
|
||||
void help();
|
||||
void toggleAutomationEditorWin();
|
||||
void toggleBBEditorWin();
|
||||
void toggleSongEditorWin();
|
||||
void toggleProjectNotesWin();
|
||||
void toggleFxMixerWin();
|
||||
void togglePianoRollWin();
|
||||
void toggleControllerRack();
|
||||
|
||||
void undo( void );
|
||||
void redo( void );
|
||||
void undo();
|
||||
void redo();
|
||||
|
||||
void loadResource();
|
||||
|
||||
@@ -150,11 +149,11 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
mainWindow( void );
|
||||
mainWindow( const mainWindow & );
|
||||
virtual ~mainWindow();
|
||||
MainWindow();
|
||||
MainWindow( const MainWindow & );
|
||||
virtual ~MainWindow();
|
||||
|
||||
void finalize( void );
|
||||
void finalize();
|
||||
|
||||
void toggleWindow( QWidget * _w );
|
||||
|
||||
@@ -171,16 +170,16 @@ private:
|
||||
QRadioButton * m_radpPianoRoll;
|
||||
|
||||
ProjectPlaybackMode m_playbackMode;
|
||||
|
||||
|
||||
lcdSpinBox * m_tempoSpinBox;
|
||||
meterDialog * m_timeSigDisplay;
|
||||
|
||||
|
||||
automatableSlider * m_masterVolumeSlider;
|
||||
automatableSlider * m_masterPitchSlider;
|
||||
|
||||
|
||||
textFloat * m_mvsStatus;
|
||||
textFloat * m_mpsStatus;
|
||||
|
||||
|
||||
QMenu * m_templatesMenu;
|
||||
QMenu * m_recentlyOpenedProjectsMenu;
|
||||
int m_custom_templates_count;
|
||||
@@ -210,36 +209,36 @@ private:
|
||||
|
||||
private slots:
|
||||
void setHighQuality( bool );
|
||||
|
||||
|
||||
void masterVolumeChanged( int _new_val );
|
||||
void masterVolumePressed( void );
|
||||
void masterVolumePressed();
|
||||
void masterVolumeMoved( int _new_val );
|
||||
void masterVolumeReleased( void );
|
||||
void masterVolumeReleased();
|
||||
void masterPitchChanged( int _new_val );
|
||||
void masterPitchPressed( void );
|
||||
void masterPitchPressed();
|
||||
void masterPitchMoved( int _new_val );
|
||||
void masterPitchReleased( void );
|
||||
|
||||
void browseHelp( void );
|
||||
void fillTemplatesMenu( void );
|
||||
void masterPitchReleased();
|
||||
|
||||
void browseHelp();
|
||||
void fillTemplatesMenu();
|
||||
void openRecentlyOpenedProject( QAction * _action );
|
||||
void showTool( QAction * _idx );
|
||||
void updateRecentlyOpenedProjectsMenu( void );
|
||||
void updateRecentlyOpenedProjectsMenu();
|
||||
|
||||
void playbackSongClicked( bool );
|
||||
void playbackBBClicked( bool );
|
||||
void playbackPianoRollClicked( bool );
|
||||
|
||||
void shortcutSpacePressed( void );
|
||||
void shortcutLPressed( void );
|
||||
|
||||
void play( void );
|
||||
void record( void );
|
||||
void playAndRecord( void );
|
||||
void stop( void );
|
||||
void shortcutSpacePressed();
|
||||
void shortcutLPressed();
|
||||
|
||||
void play();
|
||||
void record();
|
||||
void playAndRecord();
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void periodicUpdate( void );
|
||||
void periodicUpdate();
|
||||
|
||||
} ;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* engine.h - engine-system of LMMS
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,7 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ENGINE_H
|
||||
#define _ENGINE_H
|
||||
|
||||
@@ -41,7 +40,7 @@ class dummyTrackContainer;
|
||||
class fxMixer;
|
||||
class fxMixerView;
|
||||
class projectJournal;
|
||||
class mainWindow;
|
||||
class MainWindow;
|
||||
class mixer;
|
||||
class pianoRoll;
|
||||
class projectNotes;
|
||||
@@ -58,9 +57,9 @@ class EXPORT engine
|
||||
{
|
||||
public:
|
||||
static void init( const bool _has_gui = true );
|
||||
static void destroy( void );
|
||||
static void destroy();
|
||||
|
||||
static bool hasGUI( void )
|
||||
static bool hasGUI()
|
||||
{
|
||||
return s_hasGUI;
|
||||
}
|
||||
@@ -70,105 +69,105 @@ public:
|
||||
s_suppressMessages = _on;
|
||||
}
|
||||
|
||||
static bool suppressMessages( void )
|
||||
static bool suppressMessages()
|
||||
{
|
||||
return !s_hasGUI || s_suppressMessages;
|
||||
}
|
||||
|
||||
// core
|
||||
static mixer * getMixer( void )
|
||||
static mixer * getMixer()
|
||||
{
|
||||
return s_mixer;
|
||||
}
|
||||
|
||||
static fxMixer * getFxMixer( void )
|
||||
static fxMixer * getFxMixer()
|
||||
{
|
||||
return s_fxMixer;
|
||||
}
|
||||
|
||||
static song * getSong( void )
|
||||
static song * getSong()
|
||||
{
|
||||
return s_song;
|
||||
}
|
||||
|
||||
static bbTrackContainer * getBBTrackContainer( void )
|
||||
static bbTrackContainer * getBBTrackContainer()
|
||||
{
|
||||
return s_bbTrackContainer;
|
||||
}
|
||||
|
||||
static projectJournal * getProjectJournal( void )
|
||||
static projectJournal * getProjectJournal()
|
||||
{
|
||||
return s_projectJournal;
|
||||
}
|
||||
|
||||
static UnifiedResourceProvider * resourceProvider( void )
|
||||
static UnifiedResourceProvider * resourceProvider()
|
||||
{
|
||||
return s_resourceProvider;
|
||||
}
|
||||
|
||||
// GUI
|
||||
static mainWindow * getMainWindow( void )
|
||||
static MainWindow * mainWindow()
|
||||
{
|
||||
return s_mainWindow;
|
||||
}
|
||||
|
||||
static fxMixerView * getFxMixerView( void )
|
||||
static fxMixerView * getFxMixerView()
|
||||
{
|
||||
return s_fxMixerView;
|
||||
}
|
||||
|
||||
static songEditor * getSongEditor( void )
|
||||
static songEditor * getSongEditor()
|
||||
{
|
||||
return s_songEditor;
|
||||
}
|
||||
|
||||
static bbEditor * getBBEditor( void )
|
||||
static bbEditor * getBBEditor()
|
||||
{
|
||||
return s_bbEditor;
|
||||
}
|
||||
|
||||
static pianoRoll * getPianoRoll( void )
|
||||
static pianoRoll * getPianoRoll()
|
||||
{
|
||||
return s_pianoRoll;
|
||||
}
|
||||
|
||||
static projectNotes * getProjectNotes( void )
|
||||
static projectNotes * getProjectNotes()
|
||||
{
|
||||
return s_projectNotes;
|
||||
}
|
||||
|
||||
static automationEditor * getAutomationEditor( void )
|
||||
static automationEditor * getAutomationEditor()
|
||||
{
|
||||
return s_automationEditor;
|
||||
}
|
||||
|
||||
static AutomationRecorder * getAutomationRecorder( void )
|
||||
static AutomationRecorder * getAutomationRecorder()
|
||||
{
|
||||
return s_automationRecorder;
|
||||
}
|
||||
|
||||
static ladspa2LMMS * getLADSPAManager( void )
|
||||
static ladspa2LMMS * getLADSPAManager()
|
||||
{
|
||||
return s_ladspaManager;
|
||||
}
|
||||
|
||||
static dummyTrackContainer * getDummyTrackContainer( void )
|
||||
static dummyTrackContainer * getDummyTrackContainer()
|
||||
{
|
||||
return s_dummyTC;
|
||||
}
|
||||
|
||||
static ControllerRackView * getControllerRackView( void )
|
||||
static ControllerRackView * getControllerRackView()
|
||||
{
|
||||
return s_controllerRackView;
|
||||
}
|
||||
|
||||
static float framesPerTick( void )
|
||||
static float framesPerTick()
|
||||
{
|
||||
return s_framesPerTick;
|
||||
}
|
||||
static void updateFramesPerTick( void );
|
||||
static void updateFramesPerTick();
|
||||
|
||||
static const QMap<QString, QString> & pluginFileHandling( void )
|
||||
static const QMap<QString, QString> & pluginFileHandling()
|
||||
{
|
||||
return s_pluginFileHandling;
|
||||
}
|
||||
@@ -178,7 +177,7 @@ public:
|
||||
s_lmmsStyle = _style;
|
||||
}
|
||||
|
||||
static LmmsStyle * getLmmsStyle( void )
|
||||
static LmmsStyle * getLmmsStyle()
|
||||
{
|
||||
return s_lmmsStyle;
|
||||
}
|
||||
@@ -187,7 +186,7 @@ public:
|
||||
|
||||
static void loadConfiguration( QDomDocument & doc );
|
||||
|
||||
static MidiControlListener * getMidiControlListener( void )
|
||||
static MidiControlListener * getMidiControlListener()
|
||||
{
|
||||
return s_midiControlListener;
|
||||
}
|
||||
@@ -209,7 +208,7 @@ private:
|
||||
static MidiControlListener * s_midiControlListener;
|
||||
|
||||
// GUI
|
||||
static mainWindow * s_mainWindow;
|
||||
static MainWindow * s_mainWindow;
|
||||
static fxMixerView * s_fxMixerView;
|
||||
static songEditor * s_songEditor;
|
||||
static automationEditor * s_automationEditor;
|
||||
@@ -223,7 +222,7 @@ private:
|
||||
|
||||
static QMap<QString, QString> s_pluginFileHandling;
|
||||
|
||||
static void initPluginFileHandling( void );
|
||||
static void initPluginFileHandling();
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ private:
|
||||
|
||||
friend class engine;
|
||||
friend class songEditor;
|
||||
friend class mainWindow;
|
||||
friend class MainWindow;
|
||||
friend class ControllerRackView;
|
||||
|
||||
signals:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* ladspa_effect.h - class for handling LADSPA effect plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2006-2009 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -28,11 +28,8 @@
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#include "effect.h"
|
||||
#include "engine.h"
|
||||
#include "ladspa_base.h"
|
||||
#include "ladspa_controls.h"
|
||||
#include "main_window.h"
|
||||
#include "mixer.h"
|
||||
|
||||
|
||||
typedef QVector<port_desc_t *> multi_proc_t;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "config_mgr.h"
|
||||
#include "pattern.h"
|
||||
#include "instrument.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "debug.h"
|
||||
#include "embed.h"
|
||||
#include "song.h"
|
||||
@@ -100,7 +100,7 @@ bool midiImport::tryImport( trackContainer * _tc )
|
||||
if( engine::hasGUI() &&
|
||||
configManager::inst()->defaultSoundfont() == NULL )
|
||||
{
|
||||
QMessageBox::information( engine::getMainWindow(),
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
tr( "Setup incomplete" ),
|
||||
tr( "You do not have set up a default soundfont in "
|
||||
"the settings dialog (Edit->Settings). "
|
||||
@@ -112,7 +112,7 @@ bool midiImport::tryImport( trackContainer * _tc )
|
||||
#else
|
||||
if( engine::hasGUI() )
|
||||
{
|
||||
QMessageBox::information( engine::getMainWindow(),
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
tr( "Setup incomplete" ),
|
||||
tr( "You did not compile LMMS with support for "
|
||||
"SoundFont2 player, which is used to add default "
|
||||
@@ -273,7 +273,7 @@ bool midiImport::readSMF( trackContainer * _tc )
|
||||
|
||||
const int preTrackSteps = 2;
|
||||
QProgressDialog pd( trackContainer::tr( "Importing MIDI-file..." ),
|
||||
trackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::getMainWindow() );
|
||||
trackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::mainWindow() );
|
||||
pd.setWindowTitle( trackContainer::tr( "Please wait..." ) );
|
||||
pd.setWindowModality(Qt::WindowModal);
|
||||
pd.setMinimumDuration( 0 );
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* peak_controller_effect.h - PeakController effect plugin
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,16 +22,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _PEAK_CONTROLLER_EFFECT_H
|
||||
#define _PEAK_CONTROLLER_EFFECT_H
|
||||
|
||||
#include <QtGui/QWorkspace>
|
||||
|
||||
#include "effect.h"
|
||||
#include "effect_lib.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "peak_controller_effect_controls.h"
|
||||
|
||||
class peakControllerEffect : public effect
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include "knob.h"
|
||||
#include "song.h"
|
||||
|
||||
#include "main_window.h"
|
||||
#include "patches_dialog.h"
|
||||
#include "tooltip.h"
|
||||
#include "lcd_spinbox.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#include "spectrum_analyzer.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "embed.h"
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
m_background( PLUGIN_NAME::getIconPixmap( "spectrum_background" ).toImage() )
|
||||
{
|
||||
setFixedSize( 249, 151 );
|
||||
connect( engine::getMainWindow(), SIGNAL( periodicUpdate() ),
|
||||
connect( engine::mainWindow(), SIGNAL( periodicUpdate() ),
|
||||
this, SLOT( update() ) );
|
||||
setAttribute( Qt::WA_OpaquePaintEvent, TRUE );
|
||||
}
|
||||
|
||||
@@ -26,12 +26,8 @@
|
||||
#ifndef _STEREO_ENHANCER_H
|
||||
#define _STEREO_ENHANCER_H
|
||||
|
||||
#include <QtGui/QWorkspace>
|
||||
|
||||
#include "effect.h"
|
||||
#include "effect_lib.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "stereoenhancer_controls.h"
|
||||
|
||||
class stereoEnhancerEffect : public effect
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* stereo_matrix.h - stereo-matrix-effect-plugin
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,16 +22,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _STEREO_MATRIX_H
|
||||
#define _STEREO_MATRIX_H
|
||||
|
||||
#include <QtGui/QWorkspace>
|
||||
|
||||
#include "effect.h"
|
||||
#include "effect_lib.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "stereomatrix_controls.h"
|
||||
|
||||
class stereoMatrixEffect : public effect
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#include "config_mgr.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "song.h"
|
||||
#include "templates.h"
|
||||
|
||||
@@ -145,7 +145,7 @@ vstPlugin::vstPlugin( const QString & _plugin ) :
|
||||
{
|
||||
target->setFixedSize( m_pluginGeometry );
|
||||
vstSubWin * sw = new vstSubWin(
|
||||
engine::getMainWindow()->workspace() );
|
||||
engine::mainWindow()->workspace() );
|
||||
sw->setWidget( helper );
|
||||
helper->setWindowTitle( name() );
|
||||
m_pluginWidget = helper;
|
||||
@@ -195,7 +195,7 @@ void vstPlugin::showEditor( QWidget * _parent )
|
||||
if( _parent == NULL )
|
||||
{
|
||||
vstSubWin * sw = new vstSubWin(
|
||||
engine::getMainWindow()->workspace() );
|
||||
engine::mainWindow()->workspace() );
|
||||
sw->setWidget( m_pluginWidget );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* vst_effect_control_dialog.cpp - dialog for displaying VST-effect GUI
|
||||
*
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
#include "vst_effect_control_dialog.h"
|
||||
#include "vst_effect.h"
|
||||
#include "main_window.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "import_filter.h"
|
||||
#include "instrument.h"
|
||||
#include "instrument_track.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "mmp.h"
|
||||
#include "song.h"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
bool ResourceAction::loadProject()
|
||||
{
|
||||
if( engine::getMainWindow()->mayChangeProject() )
|
||||
if( engine::mainWindow()->mayChangeProject() )
|
||||
{
|
||||
ResourceFileMapper mapper( m_item );
|
||||
if( m_item->isLocalResource() )
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "config_mgr.h"
|
||||
#include "lcd_spinbox.h"
|
||||
#include "AudioPort.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "Cpu.h"
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ void AudioJack::restartAfterZombified()
|
||||
{
|
||||
m_active = false;
|
||||
startProcessing();
|
||||
QMessageBox::information( engine::getMainWindow(),
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
tr( "JACK client restarted" ),
|
||||
tr( "LMMS was kicked by JACK for some reason. "
|
||||
"Therefore the JACK backend of LMMS has been "
|
||||
@@ -111,7 +111,7 @@ void AudioJack::restartAfterZombified()
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information( engine::getMainWindow(),
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
tr( "JACK server down" ),
|
||||
tr( "The JACK server seems to have been shutdown "
|
||||
"and starting a new instance failed. "
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "ResourceDB.h"
|
||||
#include "lmmsversion.h"
|
||||
#include "config_mgr.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "engine.h"
|
||||
|
||||
|
||||
@@ -358,8 +358,8 @@ void configManager::loadConfigFile( void )
|
||||
if( !QDir( m_workingDir ).exists() )
|
||||
{
|
||||
if( QMessageBox::question( 0,
|
||||
mainWindow::tr( "Working directory" ),
|
||||
mainWindow::tr( "The LMMS working directory %1 does not "
|
||||
MainWindow::tr( "Working directory" ),
|
||||
MainWindow::tr( "The LMMS working directory %1 does not "
|
||||
"exist. Create it now? You can change the directory "
|
||||
"later via Edit -> Settings." ).arg( m_workingDir ),
|
||||
QMessageBox::Yes, QMessageBox::No ) ==
|
||||
@@ -434,8 +434,8 @@ void configManager::saveConfigFile( void )
|
||||
if( !outfile.open( QIODevice::WriteOnly | QIODevice::Truncate ) )
|
||||
{
|
||||
QMessageBox::critical( NULL,
|
||||
mainWindow::tr( "Could not save config-file" ),
|
||||
mainWindow::tr( "Could not save configuration file %1. "
|
||||
MainWindow::tr( "Could not save config-file" ),
|
||||
MainWindow::tr( "Could not save configuration file %1. "
|
||||
"You're probably not permitted to "
|
||||
"write to this file.\n"
|
||||
"Please make sure you have write-"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* engine.cpp - implementation of LMMS' engine-system
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "fx_mixer_view.h"
|
||||
#include "instrument_track.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "mixer.h"
|
||||
#include "pattern.h"
|
||||
#include "piano_roll.h"
|
||||
@@ -59,7 +59,7 @@ float engine::s_framesPerTick;
|
||||
mixer * engine::s_mixer = NULL;
|
||||
fxMixer * engine::s_fxMixer = NULL;
|
||||
fxMixerView * engine::s_fxMixerView = NULL;
|
||||
mainWindow * engine::s_mainWindow = NULL;
|
||||
MainWindow * engine::s_mainWindow = NULL;
|
||||
bbTrackContainer * engine::s_bbTrackContainer = NULL;
|
||||
song * engine::s_song = NULL;
|
||||
UnifiedResourceProvider * engine::s_resourceProvider = NULL;
|
||||
@@ -125,7 +125,7 @@ void engine::init( const bool _has_gui )
|
||||
|
||||
if( s_hasGUI )
|
||||
{
|
||||
s_mainWindow = new mainWindow;
|
||||
s_mainWindow = new MainWindow;
|
||||
s_songEditor = new songEditor( s_song, s_songEditor );
|
||||
s_fxMixerView = new fxMixerView;
|
||||
s_controllerRackView = new ControllerRackView;
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "import_filter.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "ProjectRenderer.h"
|
||||
#include "song.h"
|
||||
#include "Cpu.h"
|
||||
@@ -452,10 +452,10 @@ int main( int argc, char * * argv )
|
||||
// we try to load given file
|
||||
if( !file_to_load.isEmpty() )
|
||||
{
|
||||
engine::getMainWindow()->show();
|
||||
engine::mainWindow()->show();
|
||||
if( fullscreen )
|
||||
{
|
||||
engine::getMainWindow()->showMaximized();
|
||||
engine::mainWindow()->showMaximized();
|
||||
}
|
||||
engine::getSong()->loadProject( file_to_load );
|
||||
}
|
||||
@@ -468,10 +468,10 @@ int main( int argc, char * * argv )
|
||||
return 0;
|
||||
}
|
||||
|
||||
engine::getMainWindow()->show();
|
||||
engine::mainWindow()->show();
|
||||
if( fullscreen )
|
||||
{
|
||||
engine::getMainWindow()->showMaximized();
|
||||
engine::mainWindow()->showMaximized();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -480,10 +480,10 @@ int main( int argc, char * * argv )
|
||||
|
||||
// [Settel] workaround: showMaximized() doesn't work with
|
||||
// FVWM2 unless the window is already visible -> show() first
|
||||
engine::getMainWindow()->show();
|
||||
engine::mainWindow()->show();
|
||||
if( fullscreen )
|
||||
{
|
||||
engine::getMainWindow()->showMaximized();
|
||||
engine::mainWindow()->showMaximized();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#include "instrument_track.h"
|
||||
#include "knob.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "midi.h"
|
||||
#include "templates.h"
|
||||
#include "update_event.h"
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include "fx_mixer_view.h"
|
||||
#include "import_filter.h"
|
||||
#include "instrument_track.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "MidiClient.h"
|
||||
#include "mmp.h"
|
||||
#include "note_play_handle.h"
|
||||
@@ -837,9 +837,9 @@ void song::createNewProject()
|
||||
|
||||
m_modified = false;
|
||||
|
||||
if( engine::getMainWindow() )
|
||||
if( engine::mainWindow() )
|
||||
{
|
||||
engine::getMainWindow()->resetWindowTitle();
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -853,9 +853,9 @@ void song::createNewProjectFromTemplate( const QString & _template )
|
||||
// saving...
|
||||
m_fileName = m_oldFileName = "";
|
||||
// update window title
|
||||
if( engine::getMainWindow() )
|
||||
if( engine::mainWindow() )
|
||||
{
|
||||
engine::getMainWindow()->resetWindowTitle();
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -985,9 +985,9 @@ void song::loadProject( const QString & _file_name )
|
||||
m_loadingProject = false;
|
||||
m_modified = false;
|
||||
|
||||
if( engine::getMainWindow() )
|
||||
if( engine::mainWindow() )
|
||||
{
|
||||
engine::getMainWindow()->resetWindowTitle();
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
if( engine::getSongEditor() )
|
||||
{
|
||||
@@ -1036,7 +1036,7 @@ bool song::saveProject()
|
||||
2000 );
|
||||
configManager::inst()->addRecentlyOpenedProject( m_fileName );
|
||||
m_modified = false;
|
||||
engine::getMainWindow()->resetWindowTitle();
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
else if( engine::hasGUI() )
|
||||
{
|
||||
@@ -1125,7 +1125,7 @@ void song::exportProject()
|
||||
{
|
||||
if( isEmpty() )
|
||||
{
|
||||
QMessageBox::information( engine::getMainWindow(),
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
tr( "Empty project" ),
|
||||
tr( "This project is empty so exporting makes "
|
||||
"no sense. Please put some items into "
|
||||
@@ -1133,7 +1133,7 @@ void song::exportProject()
|
||||
return;
|
||||
}
|
||||
|
||||
QFileDialog efd( engine::getMainWindow() );
|
||||
QFileDialog efd( engine::mainWindow() );
|
||||
efd.setFileMode( QFileDialog::AnyFile );
|
||||
efd.setAcceptMode( QFileDialog::AcceptSave );
|
||||
int idx = 0;
|
||||
@@ -1165,7 +1165,7 @@ void song::exportProject()
|
||||
{
|
||||
const QString export_file_name = efd.selectedFiles()[0];
|
||||
exportProjectDialog epd( export_file_name,
|
||||
engine::getMainWindow() );
|
||||
engine::mainWindow() );
|
||||
epd.exec();
|
||||
}
|
||||
}
|
||||
@@ -1186,11 +1186,11 @@ void song::setModified()
|
||||
if( !m_loadingProject )
|
||||
{
|
||||
m_modified = true;
|
||||
if( engine::getMainWindow() &&
|
||||
if( engine::mainWindow() &&
|
||||
QThread::currentThread() ==
|
||||
engine::getMainWindow()->thread() )
|
||||
engine::mainWindow()->thread() )
|
||||
{
|
||||
engine::getMainWindow()->resetWindowTitle();
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "lmms_style.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "nstate_button.h"
|
||||
#include "templates.h"
|
||||
#include "text_float.h"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ tool * tool::instantiate( const QString & _plugin_name, model * _parent )
|
||||
toolView::toolView( tool * _tool ) :
|
||||
pluginView( _tool, NULL )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
|
||||
setWindowTitle( _tool->displayName() );
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#include "engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "instrument_track.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "mmp.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "project_journal.h"
|
||||
@@ -578,7 +578,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me )
|
||||
mmp.toString(), thumbnail, this );
|
||||
}
|
||||
else if( _me->button() == Qt::LeftButton &&
|
||||
/* engine::getMainWindow()->isShiftPressed() == false &&*/
|
||||
/* engine::mainWindow()->isShiftPressed() == false &&*/
|
||||
fixedTCOs() == false )
|
||||
{
|
||||
// move or resize
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "track_container.h"
|
||||
#include "instrument_track.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "song.h"
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ void trackContainer::loadSettings( const QDomElement & _this )
|
||||
pd = new QProgressDialog( tr( "Loading project..." ),
|
||||
tr( "Cancel" ), 0,
|
||||
_this.childNodes().count(),
|
||||
engine::getMainWindow() );
|
||||
engine::mainWindow() );
|
||||
pd->setWindowModality( Qt::ApplicationModal );
|
||||
pd->setWindowTitle( tr( "Please wait..." ) );
|
||||
pd->show();
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* main_window.cpp - implementation of LMMS' main window
|
||||
* MainWindow.cpp - implementation of LMMS' main window
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,7 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <QtXml/QDomElement>
|
||||
#include <QtCore/QUrl>
|
||||
#include <QtGui/QApplication>
|
||||
@@ -40,9 +39,8 @@
|
||||
#include <QtGui/QGraphicsView>
|
||||
#include <QtGui/QPixmapCache>
|
||||
|
||||
|
||||
#include "lmmsversion.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "bb_editor.h"
|
||||
#include "song_editor.h"
|
||||
#include "automation_recorder.h"
|
||||
@@ -50,7 +48,7 @@
|
||||
#include "piano_roll.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "fx_mixer_view.h"
|
||||
#include "fx_mixer_view.h"
|
||||
#include "about_dialog.h"
|
||||
#include "ControllerRackView.h"
|
||||
#include "plugin_browser.h"
|
||||
@@ -79,7 +77,7 @@
|
||||
#include "gui/tracks/track_container_scene.h"
|
||||
|
||||
|
||||
mainWindow::mainWindow( void ) :
|
||||
MainWindow::MainWindow() :
|
||||
m_workspace( NULL ),
|
||||
m_templatesMenu( NULL ),
|
||||
m_recentlyOpenedProjectsMenu( NULL ),
|
||||
@@ -103,7 +101,7 @@ mainWindow::mainWindow( void ) :
|
||||
side_bar->setPosition( sideBar::Left );
|
||||
|
||||
QSplitter * splitter = new QSplitter( Qt::Horizontal, w );
|
||||
splitter->setChildrenCollapsible( FALSE );
|
||||
splitter->setChildrenCollapsible( false );
|
||||
|
||||
int id = 0;
|
||||
QString wdir = configManager::inst()->workingDir();
|
||||
@@ -118,7 +116,7 @@ mainWindow::mainWindow( void ) :
|
||||
|
||||
// Load background
|
||||
QString bgArtwork = configManager::inst()->backgroundArtwork();
|
||||
QImage bgImage;
|
||||
QImage bgImage;
|
||||
if( !bgArtwork.isEmpty() )
|
||||
{
|
||||
bgImage = QImage( bgArtwork );
|
||||
@@ -164,7 +162,7 @@ mainWindow::mainWindow( void ) :
|
||||
|
||||
|
||||
|
||||
mainWindow::~mainWindow()
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
for( QList<pluginView *>::iterator it = m_tools.begin();
|
||||
it != m_tools.end(); ++it )
|
||||
@@ -184,7 +182,7 @@ mainWindow::~mainWindow()
|
||||
|
||||
|
||||
|
||||
void mainWindow::finalize( void )
|
||||
void MainWindow::finalize()
|
||||
{
|
||||
resetWindowTitle();
|
||||
setWindowIcon( embed::getIconPixmap( "icon" ) );
|
||||
@@ -201,7 +199,7 @@ void mainWindow::finalize( void )
|
||||
project_menu->addAction( embed::getIconPixmap( "project_open" ),
|
||||
tr( "&Open..." ),
|
||||
this, SLOT( openProject() ),
|
||||
Qt::CTRL + Qt::Key_O );
|
||||
Qt::CTRL + Qt::Key_O );
|
||||
|
||||
m_recentlyOpenedProjectsMenu = project_menu->addMenu(
|
||||
embed::getIconPixmap( "project_open_recent" ),
|
||||
@@ -284,7 +282,7 @@ void mainWindow::finalize( void )
|
||||
QMenu * help_menu = new QMenu( this );
|
||||
menuBar()->addMenu( help_menu )->setText( tr( "&Help" ) );
|
||||
// May use offline help
|
||||
if( TRUE )
|
||||
if( true )
|
||||
{
|
||||
help_menu->addAction( embed::getIconPixmap( "help" ),
|
||||
tr( "Online help" ),
|
||||
@@ -308,7 +306,7 @@ void mainWindow::finalize( void )
|
||||
QWidget * gridButtons_w = new QWidget( m_toolBar );
|
||||
QGridLayout * gridButtons_layout = new QGridLayout( gridButtons_w/*, 2, 1*/ );
|
||||
|
||||
|
||||
|
||||
// create tool-buttons
|
||||
toolButton * project_new = new toolButton(
|
||||
embed::getIconPixmap( "project_new" ),
|
||||
@@ -330,28 +328,28 @@ void mainWindow::finalize( void )
|
||||
project_new_from_template->setMenu( m_templatesMenu );
|
||||
project_new_from_template->setPopupMode( toolButton::InstantPopup );
|
||||
|
||||
toolButton * project_open = new toolButton(
|
||||
toolButton * project_open = new toolButton(
|
||||
embed::getIconPixmap( "project_open" ),
|
||||
tr( "Open existing project" ),
|
||||
this, SLOT( openProject() ),
|
||||
gridButtons_w );
|
||||
|
||||
|
||||
toolButton * project_open_recent = new toolButton(
|
||||
toolButton * project_open_recent = new toolButton(
|
||||
embed::getIconPixmap( "project_open_recent" ),
|
||||
tr( "Recently opened project" ),
|
||||
this, SLOT( emptySlot() ), gridButtons_w );
|
||||
project_open_recent->setMenu( m_recentlyOpenedProjectsMenu );
|
||||
project_open_recent->setPopupMode( toolButton::InstantPopup );
|
||||
|
||||
toolButton * project_save = new toolButton(
|
||||
toolButton * project_save = new toolButton(
|
||||
embed::getIconPixmap( "project_save" ),
|
||||
tr( "Save current project" ),
|
||||
this, SLOT( saveProject() ),
|
||||
gridButtons_w );
|
||||
|
||||
|
||||
toolButton * project_export = new toolButton(
|
||||
toolButton * project_export = new toolButton(
|
||||
embed::getIconPixmap( "project_export" ),
|
||||
tr( "Export current project" ),
|
||||
engine::getSong(),
|
||||
@@ -436,7 +434,7 @@ void mainWindow::finalize( void )
|
||||
this, SLOT( toggleFxMixerWin() ),
|
||||
gridButtons_w );
|
||||
fx_mixer_window->setShortcut( Qt::Key_F9 );
|
||||
fx_mixer_window->setWhatsThis(
|
||||
fx_mixer_window->setWhatsThis(
|
||||
tr( "Click here to show or hide the "
|
||||
"FX Mixer. The FX Mixer is a very powerful tool "
|
||||
"for managing effects for your song. You can insert "
|
||||
@@ -472,18 +470,18 @@ void mainWindow::finalize( void )
|
||||
gridButtons_layout->addWidget( controllers_window, 1, 7 );
|
||||
gridButtons_layout->setColumnStretch( 100, 1 );
|
||||
|
||||
|
||||
|
||||
m_toolBarLayout->addWidget( gridButtons_w, 0, Qt::AlignLeft );
|
||||
|
||||
|
||||
m_toolBarLayout->insertSpacing( -1, 10 );
|
||||
|
||||
|
||||
// container for tempo/bpm and high quality
|
||||
QWidget * tempo_hq_w = new QWidget( m_toolBar );
|
||||
QVBoxLayout * tempo_hq_layout = new QVBoxLayout( tempo_hq_w );
|
||||
tempo_hq_layout->setMargin( 0 );
|
||||
tempo_hq_layout->setSpacing( 0 );
|
||||
tempo_hq_layout->addSpacing( 22 );
|
||||
|
||||
|
||||
// tempo spin box
|
||||
m_tempoSpinBox = new lcdSpinBox( 3, tempo_hq_w, tr( "Tempo" ) );
|
||||
m_tempoSpinBox->setModel( &( engine::getSong()->m_tempoModel) );
|
||||
@@ -505,11 +503,11 @@ void mainWindow::finalize( void )
|
||||
toolButton * hq_btn = new toolButton( embed::getIconPixmap( "hq_mode" ),
|
||||
tr( "High quality mode" ),
|
||||
NULL, NULL, tempo_hq_w );
|
||||
hq_btn->setCheckable( TRUE );
|
||||
hq_btn->setCheckable( true );
|
||||
connect( hq_btn, SIGNAL( toggled( bool ) ),
|
||||
this, SLOT( setHighQuality( bool ) ) );
|
||||
hq_btn->setFixedWidth( 42 );
|
||||
|
||||
|
||||
tempo_hq_layout->addWidget( hq_btn );
|
||||
#endif
|
||||
|
||||
@@ -526,14 +524,14 @@ void mainWindow::finalize( void )
|
||||
timeSigLayout->setSpacing( 0 );
|
||||
timeSigLayout->addSpacing( 3 );
|
||||
|
||||
m_timeSigDisplay = new meterDialog( this, TRUE );
|
||||
m_timeSigDisplay = new meterDialog( this, true );
|
||||
m_timeSigDisplay->setModel( &( engine::getSong()->m_timeSigModel ) );
|
||||
timeSigLayout->addWidget( m_timeSigDisplay );
|
||||
|
||||
m_toolBarLayout->addWidget( timeSigWidget );
|
||||
|
||||
m_toolBarLayout->insertSpacing( -1, 10 );
|
||||
|
||||
|
||||
// master volume slider
|
||||
QLabel * master_vol_lbl = new QLabel( m_toolBar );
|
||||
master_vol_lbl->setPixmap( embed::getIconPixmap( "master_volume" ) );
|
||||
@@ -600,7 +598,7 @@ void mainWindow::finalize( void )
|
||||
// box to hold all new controls we're adding to main toolbar
|
||||
//QWidget * add_w = new QWidget( tb );
|
||||
//QHBoxLayout * add_layout = new QHBoxLayout( add_w );
|
||||
|
||||
|
||||
// create widget for visualization- and cpu-load-widget
|
||||
QWidget * vc_w = new QWidget( m_toolBar );
|
||||
QVBoxLayout * vcw_layout = new QVBoxLayout( vc_w );
|
||||
@@ -613,29 +611,29 @@ void mainWindow::finalize( void )
|
||||
|
||||
vcw_layout->addWidget( new cpuloadWidget( vc_w ) );
|
||||
vcw_layout->addStretch();
|
||||
|
||||
|
||||
m_toolBarLayout->addWidget( vc_w, 0, Qt::AlignLeft );
|
||||
m_toolBarLayout->insertSpacing( -1, 10 );
|
||||
|
||||
|
||||
|
||||
|
||||
// global playback and record controls
|
||||
// main box
|
||||
QWidget * gpbr_w = new QWidget( m_toolBar );
|
||||
QHBoxLayout * gpbrw_layout = new QHBoxLayout( gpbr_w );
|
||||
|
||||
|
||||
// playback half
|
||||
QWidget * gpb_w = new QWidget( gpbr_w );
|
||||
QVBoxLayout * gpbw_layout = new QVBoxLayout( gpb_w );
|
||||
gpbw_layout->setMargin( 0 );
|
||||
gpbw_layout->setSpacing( 0 );
|
||||
gpbw_layout->addWidget( new QLabel( tr( "PLAYBACK" ), gpb_w ) );
|
||||
|
||||
|
||||
QWidget * btns = new QWidget( gpb_w );
|
||||
QHBoxLayout * btns_layout = new QHBoxLayout( btns );
|
||||
btns_layout->setMargin(0);
|
||||
btns_layout->setSpacing(0);
|
||||
|
||||
|
||||
|
||||
toolButton * m_playButton =
|
||||
new toolButton(
|
||||
embed::getIconPixmap( "play" ),
|
||||
@@ -645,14 +643,14 @@ void mainWindow::finalize( void )
|
||||
btns );
|
||||
|
||||
toolButton * m_recordButton =
|
||||
new toolButton(
|
||||
new toolButton(
|
||||
embed::getIconPixmap( "record" ),
|
||||
tr( "Record from the checked items to the right" ),
|
||||
tr( "Record from the checked items to the right" ),
|
||||
this,
|
||||
SLOT(record()),
|
||||
btns );
|
||||
|
||||
toolButton * m_recordAccompanyButton =
|
||||
toolButton * m_recordAccompanyButton =
|
||||
new toolButton(
|
||||
embed::getIconPixmap( "record_accompany" ),
|
||||
tr( "Record from the checked items to "
|
||||
@@ -660,7 +658,7 @@ void mainWindow::finalize( void )
|
||||
this,
|
||||
SLOT(playAndRecord()),
|
||||
btns );
|
||||
|
||||
|
||||
toolButton * m_stopButton =
|
||||
new toolButton(
|
||||
embed::getIconPixmap( "stop" ),
|
||||
@@ -673,10 +671,10 @@ void mainWindow::finalize( void )
|
||||
btns_layout->addWidget( m_recordButton );
|
||||
btns_layout->addWidget( m_recordAccompanyButton );
|
||||
btns_layout->addWidget( m_stopButton );
|
||||
|
||||
|
||||
gpbw_layout->addWidget( btns );
|
||||
|
||||
// choose between song or BB to playback
|
||||
|
||||
// choose between song or BB to playback
|
||||
QWidget * pbopt_w = new QWidget( gpb_w );
|
||||
QHBoxLayout * pbopt_layout = new QHBoxLayout( pbopt_w );
|
||||
pbopt_layout->setSpacing(0);
|
||||
@@ -685,14 +683,14 @@ void mainWindow::finalize( void )
|
||||
m_radpSong = new QRadioButton( tr( "Song" ), pbopt_w );
|
||||
m_radpSong->setToolTip( tr("Playback: song mode") );
|
||||
connect(m_radpSong, SIGNAL(clicked(bool)), SLOT(playbackSongClicked(bool)));
|
||||
m_radpBB = new QRadioButton( tr( "B+B" ), pbopt_w );
|
||||
m_radpBB->setToolTip( tr("Playback: beat+bassline mode") );
|
||||
m_radpBB = new QRadioButton( tr( "B+B" ), pbopt_w );
|
||||
m_radpBB->setToolTip( tr("Playback: beat+bassline mode") );
|
||||
connect(m_radpBB, SIGNAL(clicked(bool)), SLOT(playbackBBClicked(bool)));
|
||||
m_radpPianoRoll = new QRadioButton( tr( "Piano Roll" ), pbopt_w );
|
||||
m_radpPianoRoll->setToolTip( tr("Playback: piano roll mode") );
|
||||
m_radpPianoRoll = new QRadioButton( tr( "Piano Roll" ), pbopt_w );
|
||||
m_radpPianoRoll->setToolTip( tr("Playback: piano roll mode") );
|
||||
connect(m_radpPianoRoll, SIGNAL(clicked(bool)), SLOT(playbackPianoRollClicked(bool)));
|
||||
|
||||
|
||||
|
||||
|
||||
pbopt_layout->setMargin(0);
|
||||
pbopt_layout->setSpacing(0);
|
||||
pbopt_layout->addWidget( m_radpSong );
|
||||
@@ -700,37 +698,37 @@ void mainWindow::finalize( void )
|
||||
pbopt_layout->addWidget( m_radpPianoRoll );
|
||||
|
||||
gpbw_layout->addWidget( pbopt_w );
|
||||
|
||||
|
||||
gpbw_layout->addStretch();
|
||||
|
||||
|
||||
QWidget * gr_w = new QWidget( gpbr_w );
|
||||
QVBoxLayout * grw_layout = new QVBoxLayout( gr_w );
|
||||
grw_layout->setMargin( 0 );
|
||||
grw_layout->setSpacing( 0 );
|
||||
|
||||
|
||||
|
||||
m_chkrAudio = new QCheckBox( tr( "Audio-device" ), gr_w );
|
||||
m_chkrAutomation = new QCheckBox( tr( "Automation" ), gr_w );
|
||||
m_chkrMidi = new QCheckBox( tr( "MIDI" ), gr_w );
|
||||
|
||||
|
||||
connect(m_chkrAutomation, SIGNAL(toggled(bool)), SLOT(toggleRecordAutomation(bool)));
|
||||
|
||||
grw_layout->addWidget( new QLabel( tr( "RECORD" ), gr_w ) );
|
||||
grw_layout->addWidget( m_chkrAudio );
|
||||
grw_layout->addWidget( m_chkrAutomation );
|
||||
grw_layout->addWidget( m_chkrMidi );
|
||||
|
||||
|
||||
grw_layout->addWidget( m_chkrMidi );
|
||||
|
||||
|
||||
gpbrw_layout->setMargin( 0 );
|
||||
gpbrw_layout->setSpacing( 0 );
|
||||
gpbrw_layout->addWidget( gpb_w );
|
||||
gpbrw_layout->addSpacing( 20 );
|
||||
gpbrw_layout->addWidget( gr_w );
|
||||
gpbrw_layout->addStretch();
|
||||
|
||||
|
||||
|
||||
|
||||
m_toolBarLayout->addWidget( gpbr_w );
|
||||
|
||||
|
||||
// initial toolbar settings
|
||||
m_chkrAutomation->click();
|
||||
m_chkrMidi->click();
|
||||
@@ -763,7 +761,7 @@ void mainWindow::finalize( void )
|
||||
|
||||
|
||||
/*
|
||||
int mainWindow::addWidgetToToolBar( QWidget * _w, int _row, int _col )
|
||||
int MainWindow::addWidgetToToolBar( QWidget * _w, int _row, int _col )
|
||||
{
|
||||
int col = ( _col == -1 ) ? m_toolBarLayout->columnCount() + 7 : _col;
|
||||
if( _w->height() > 32 || _row == -1 )
|
||||
@@ -774,13 +772,13 @@ int mainWindow::addWidgetToToolBar( QWidget * _w, int _row, int _col )
|
||||
{
|
||||
m_toolBarLayout->addWidget( _w, _row, col );
|
||||
}
|
||||
return( col );
|
||||
return col;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void mainWindow::addSpacingToToolBar( int _size )
|
||||
void MainWindow::addSpacingToToolBar( int _size )
|
||||
{
|
||||
m_toolBarLayout->setColumnMinimumWidth( m_toolBarLayout->columnCount() +
|
||||
7, _size );
|
||||
@@ -789,7 +787,7 @@ void mainWindow::addSpacingToToolBar( int _size )
|
||||
|
||||
|
||||
|
||||
void mainWindow::resetWindowTitle( void )
|
||||
void MainWindow::resetWindowTitle()
|
||||
{
|
||||
QString title = "";
|
||||
if( engine::getSong()->projectFileName() != "" )
|
||||
@@ -811,11 +809,11 @@ void mainWindow::resetWindowTitle( void )
|
||||
|
||||
|
||||
|
||||
bool mainWindow::mayChangeProject( void )
|
||||
bool MainWindow::mayChangeProject()
|
||||
{
|
||||
if( !engine::getSong()->isModified() )
|
||||
{
|
||||
return( TRUE );
|
||||
return true;
|
||||
}
|
||||
|
||||
QMessageBox mb( tr( "Project not saved" ),
|
||||
@@ -831,37 +829,37 @@ bool mainWindow::mayChangeProject( void )
|
||||
|
||||
if( answer == QMessageBox::Yes )
|
||||
{
|
||||
return( saveProject() );
|
||||
return saveProject();
|
||||
}
|
||||
else if( answer == QMessageBox::No )
|
||||
{
|
||||
return( TRUE );
|
||||
return true;
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void mainWindow::clearKeyModifiers( void )
|
||||
void MainWindow::clearKeyModifiers()
|
||||
{
|
||||
m_keyMods.m_ctrl = FALSE;
|
||||
m_keyMods.m_shift = FALSE;
|
||||
m_keyMods.m_alt = FALSE;
|
||||
m_keyMods.m_ctrl = false;
|
||||
m_keyMods.m_shift = false;
|
||||
m_keyMods.m_alt = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void mainWindow::saveWidgetState( QWidget * _w, QDomElement & _de )
|
||||
void MainWindow::saveWidgetState( QWidget * _w, QDomElement & _de )
|
||||
{
|
||||
if( _w->parentWidget() != NULL &&
|
||||
_w->parentWidget()->inherits( "QMdiSubWindow" ) )
|
||||
{
|
||||
_w = _w->parentWidget();
|
||||
}
|
||||
|
||||
|
||||
_de.setAttribute( "x", _w->x() );
|
||||
_de.setAttribute( "y", _w->y() );
|
||||
_de.setAttribute( "visible", _w->isVisible() );
|
||||
@@ -875,7 +873,7 @@ void mainWindow::saveWidgetState( QWidget * _w, QDomElement & _de )
|
||||
|
||||
|
||||
|
||||
void mainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de )
|
||||
void MainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de )
|
||||
{
|
||||
QRect r( qMax( 0, _de.attribute( "x" ).toInt() ),
|
||||
qMax( 0, _de.attribute( "y" ).toInt() ),
|
||||
@@ -904,7 +902,7 @@ void mainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de )
|
||||
|
||||
|
||||
|
||||
void mainWindow::createNewProject( void )
|
||||
void MainWindow::createNewProject()
|
||||
{
|
||||
if( mayChangeProject() )
|
||||
{
|
||||
@@ -915,7 +913,7 @@ void mainWindow::createNewProject( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::createNewProjectFromTemplate( QAction * _idx )
|
||||
void MainWindow::createNewProjectFromTemplate( QAction * _idx )
|
||||
{
|
||||
if( m_templatesMenu != NULL && mayChangeProject() )
|
||||
{
|
||||
@@ -932,7 +930,7 @@ void mainWindow::createNewProjectFromTemplate( QAction * _idx )
|
||||
|
||||
|
||||
|
||||
void mainWindow::openProject( void )
|
||||
void MainWindow::openProject()
|
||||
{
|
||||
if( mayChangeProject() )
|
||||
{
|
||||
@@ -954,7 +952,7 @@ void mainWindow::openProject( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::updateRecentlyOpenedProjectsMenu( void )
|
||||
void MainWindow::updateRecentlyOpenedProjectsMenu()
|
||||
{
|
||||
m_recentlyOpenedProjectsMenu->clear();
|
||||
QStringList rup = configManager::inst()->recentlyOpenedProjects();
|
||||
@@ -965,24 +963,24 @@ void mainWindow::updateRecentlyOpenedProjectsMenu( void )
|
||||
}
|
||||
}
|
||||
|
||||
void mainWindow::playbackSongClicked( bool checked )
|
||||
void MainWindow::playbackSongClicked( bool checked )
|
||||
{
|
||||
m_playbackMode = PPM_Song;
|
||||
}
|
||||
|
||||
|
||||
void mainWindow::playbackBBClicked( bool checked )
|
||||
void MainWindow::playbackBBClicked( bool checked )
|
||||
{
|
||||
m_playbackMode = PPM_BB;
|
||||
}
|
||||
|
||||
void mainWindow::playbackPianoRollClicked( bool checked )
|
||||
void MainWindow::playbackPianoRollClicked( bool checked )
|
||||
{
|
||||
m_playbackMode = PPM_PianoRoll;
|
||||
}
|
||||
|
||||
|
||||
void mainWindow::openRecentlyOpenedProject( QAction * _action )
|
||||
void MainWindow::openRecentlyOpenedProject( QAction * _action )
|
||||
{
|
||||
const QString & f = _action->text();
|
||||
setCursor( Qt::WaitCursor );
|
||||
@@ -994,23 +992,23 @@ void mainWindow::openRecentlyOpenedProject( QAction * _action )
|
||||
|
||||
|
||||
|
||||
bool mainWindow::saveProject( void )
|
||||
bool MainWindow::saveProject()
|
||||
{
|
||||
if( engine::getSong()->projectFileName() == "" )
|
||||
{
|
||||
return( saveProjectAs() );
|
||||
return saveProjectAs();
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getSong()->saveProject();
|
||||
}
|
||||
return( TRUE );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool mainWindow::saveProjectAs( void )
|
||||
bool MainWindow::saveProjectAs()
|
||||
{
|
||||
QFileDialog sfd( this, tr( "Save project" ), "",
|
||||
tr( "MultiMedia Project (*.mmp *.mmpz);;"
|
||||
@@ -1033,15 +1031,15 @@ bool mainWindow::saveProjectAs( void )
|
||||
{
|
||||
engine::getSong()->saveProjectAs(
|
||||
sfd.selectedFiles()[0] );
|
||||
return( TRUE );
|
||||
return true;
|
||||
}
|
||||
return( FALSE );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void mainWindow::showSettingsDialog( void )
|
||||
void MainWindow::showSettingsDialog()
|
||||
{
|
||||
setupDialog sd;
|
||||
sd.exec();
|
||||
@@ -1050,7 +1048,7 @@ void mainWindow::showSettingsDialog( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::aboutLMMS( void )
|
||||
void MainWindow::aboutLMMS()
|
||||
{
|
||||
aboutDialog().exec();
|
||||
}
|
||||
@@ -1058,7 +1056,7 @@ void mainWindow::aboutLMMS( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::help( void )
|
||||
void MainWindow::help()
|
||||
{
|
||||
QMessageBox::information( this, tr( "Help not available" ),
|
||||
tr( "Currently there's no help "
|
||||
@@ -1072,7 +1070,7 @@ void mainWindow::help( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleWindow( QWidget * _w )
|
||||
void MainWindow::toggleWindow( QWidget * _w )
|
||||
{
|
||||
if( m_workspace->activeSubWindow() != _w->parentWidget()
|
||||
|| _w->parentWidget()->isHidden() )
|
||||
@@ -1090,7 +1088,7 @@ void mainWindow::toggleWindow( QWidget * _w )
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleBBEditorWin( void )
|
||||
void MainWindow::toggleBBEditorWin()
|
||||
{
|
||||
toggleWindow( engine::getBBEditor() );
|
||||
}
|
||||
@@ -1098,7 +1096,7 @@ void mainWindow::toggleBBEditorWin( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleSongEditorWin( void )
|
||||
void MainWindow::toggleSongEditorWin()
|
||||
{
|
||||
toggleWindow( engine::getSongEditor() );
|
||||
}
|
||||
@@ -1106,7 +1104,7 @@ void mainWindow::toggleSongEditorWin( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleProjectNotesWin( void )
|
||||
void MainWindow::toggleProjectNotesWin()
|
||||
{
|
||||
toggleWindow( engine::getProjectNotes() );
|
||||
}
|
||||
@@ -1114,7 +1112,7 @@ void mainWindow::toggleProjectNotesWin( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::togglePianoRollWin( void )
|
||||
void MainWindow::togglePianoRollWin()
|
||||
{
|
||||
toggleWindow( engine::getPianoRoll() );
|
||||
}
|
||||
@@ -1122,7 +1120,7 @@ void mainWindow::togglePianoRollWin( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleAutomationEditorWin( void )
|
||||
void MainWindow::toggleAutomationEditorWin()
|
||||
{
|
||||
toggleWindow( engine::getAutomationEditor() );
|
||||
}
|
||||
@@ -1130,7 +1128,7 @@ void mainWindow::toggleAutomationEditorWin( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleFxMixerWin( void )
|
||||
void MainWindow::toggleFxMixerWin()
|
||||
{
|
||||
toggleWindow( engine::getFxMixerView() );
|
||||
}
|
||||
@@ -1138,7 +1136,7 @@ void mainWindow::toggleFxMixerWin( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleControllerRack( void )
|
||||
void MainWindow::toggleControllerRack()
|
||||
{
|
||||
toggleWindow( engine::getControllerRackView() );
|
||||
}
|
||||
@@ -1146,7 +1144,7 @@ void mainWindow::toggleControllerRack( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::undo( void )
|
||||
void MainWindow::undo()
|
||||
{
|
||||
engine::getProjectJournal()->undo();
|
||||
}
|
||||
@@ -1154,7 +1152,7 @@ void mainWindow::undo( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::redo( void )
|
||||
void MainWindow::redo()
|
||||
{
|
||||
engine::getProjectJournal()->redo();
|
||||
}
|
||||
@@ -1162,7 +1160,7 @@ void mainWindow::redo( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::loadResource()
|
||||
void MainWindow::loadResource()
|
||||
{
|
||||
QuickLoadDialog( this ).exec();
|
||||
}
|
||||
@@ -1170,7 +1168,7 @@ void mainWindow::loadResource()
|
||||
|
||||
|
||||
|
||||
void mainWindow::closeEvent( QCloseEvent * _ce )
|
||||
void MainWindow::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
if( mayChangeProject() )
|
||||
{
|
||||
@@ -1185,7 +1183,7 @@ void mainWindow::closeEvent( QCloseEvent * _ce )
|
||||
|
||||
|
||||
|
||||
void mainWindow::focusOutEvent( QFocusEvent * _fe )
|
||||
void MainWindow::focusOutEvent( QFocusEvent * _fe )
|
||||
{
|
||||
// when loosing focus we do not receive key-(release!)-events anymore,
|
||||
// so we might miss release-events of one the modifiers we're watching!
|
||||
@@ -1196,23 +1194,26 @@ void mainWindow::focusOutEvent( QFocusEvent * _fe )
|
||||
|
||||
|
||||
|
||||
void mainWindow::keyPressEvent( QKeyEvent * _ke )
|
||||
void MainWindow::keyPressEvent( QKeyEvent * _ke )
|
||||
{
|
||||
switch( _ke->key() )
|
||||
{
|
||||
case Qt::Key_Control: m_keyMods.m_ctrl = TRUE; break;
|
||||
case Qt::Key_Shift: m_keyMods.m_shift = TRUE; break;
|
||||
case Qt::Key_Alt: m_keyMods.m_alt = TRUE; break;
|
||||
case Qt::Key_Control: m_keyMods.m_ctrl = true; break;
|
||||
case Qt::Key_Shift: m_keyMods.m_shift = true; break;
|
||||
case Qt::Key_Alt: m_keyMods.m_alt = true; break;
|
||||
default:
|
||||
QMainWindow::keyPressEvent( _ke );
|
||||
}
|
||||
}
|
||||
|
||||
void mainWindow::shortcutSpacePressed( void )
|
||||
|
||||
|
||||
|
||||
void MainWindow::shortcutSpacePressed()
|
||||
{
|
||||
if( engine::getSong()->isPlaying() )
|
||||
{
|
||||
if(
|
||||
if(
|
||||
( engine::getSong()->playMode() == song::Mode_PlaySong &&
|
||||
m_playbackMode == PPM_Song ) ||
|
||||
( engine::getSong()->playMode() == song::Mode_PlayBB &&
|
||||
@@ -1236,9 +1237,12 @@ void mainWindow::shortcutSpacePressed( void )
|
||||
{
|
||||
play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mainWindow::shortcutLPressed( void )
|
||||
|
||||
|
||||
|
||||
void MainWindow::shortcutLPressed()
|
||||
{
|
||||
// cycle through global playback mode
|
||||
if( m_playbackMode == PPM_BB )
|
||||
@@ -1252,10 +1256,13 @@ void mainWindow::shortcutLPressed( void )
|
||||
else
|
||||
{
|
||||
m_radpBB->click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mainWindow::play( void )
|
||||
|
||||
|
||||
|
||||
void MainWindow::play()
|
||||
{
|
||||
if( m_playbackMode == PPM_BB )
|
||||
{
|
||||
@@ -1269,9 +1276,12 @@ void mainWindow::play( void )
|
||||
{
|
||||
engine::getSongEditor()->play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mainWindow::stop( void )
|
||||
|
||||
|
||||
|
||||
void MainWindow::stop()
|
||||
{
|
||||
if( m_playbackMode == PPM_BB )
|
||||
{
|
||||
@@ -1285,10 +1295,12 @@ void mainWindow::stop( void )
|
||||
{
|
||||
engine::getSongEditor()->stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void mainWindow::record( void )
|
||||
|
||||
|
||||
void MainWindow::record()
|
||||
{
|
||||
if( m_playbackMode == PPM_BB )
|
||||
{
|
||||
@@ -1302,14 +1314,16 @@ void mainWindow::record( void )
|
||||
{
|
||||
engine::getSongEditor()->record();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void mainWindow::playAndRecord( void )
|
||||
|
||||
|
||||
void MainWindow::playAndRecord()
|
||||
{
|
||||
if( m_playbackMode == PPM_BB )
|
||||
{
|
||||
printf("bb editor does not support record accompany\n");
|
||||
printf("bb editor does not support record accompany\n");
|
||||
}
|
||||
else if( m_playbackMode == PPM_PianoRoll )
|
||||
{
|
||||
@@ -1319,12 +1333,12 @@ void mainWindow::playAndRecord( void )
|
||||
{
|
||||
engine::getSongEditor()->recordAccompany();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void mainWindow::setPlaybackMode( ProjectPlaybackMode _playbackMode )
|
||||
|
||||
void MainWindow::setPlaybackMode( ProjectPlaybackMode _playbackMode )
|
||||
{
|
||||
if( _playbackMode == PPM_BB )
|
||||
{
|
||||
@@ -1342,13 +1356,13 @@ void mainWindow::setPlaybackMode( ProjectPlaybackMode _playbackMode )
|
||||
|
||||
|
||||
|
||||
void mainWindow::keyReleaseEvent( QKeyEvent * _ke )
|
||||
void MainWindow::keyReleaseEvent( QKeyEvent * _ke )
|
||||
{
|
||||
switch( _ke->key() )
|
||||
{
|
||||
case Qt::Key_Control: m_keyMods.m_ctrl = FALSE; break;
|
||||
case Qt::Key_Shift: m_keyMods.m_shift = FALSE; break;
|
||||
case Qt::Key_Alt: m_keyMods.m_alt = FALSE; break;
|
||||
case Qt::Key_Control: m_keyMods.m_ctrl = false; break;
|
||||
case Qt::Key_Shift: m_keyMods.m_shift = false; break;
|
||||
case Qt::Key_Alt: m_keyMods.m_alt = false; break;
|
||||
default:
|
||||
QMainWindow::keyReleaseEvent( _ke );
|
||||
}
|
||||
@@ -1357,7 +1371,7 @@ void mainWindow::keyReleaseEvent( QKeyEvent * _ke )
|
||||
|
||||
|
||||
|
||||
void mainWindow::timerEvent( QTimerEvent * )
|
||||
void MainWindow::timerEvent( QTimerEvent * )
|
||||
{
|
||||
emit periodicUpdate();
|
||||
}
|
||||
@@ -1365,7 +1379,7 @@ void mainWindow::timerEvent( QTimerEvent * )
|
||||
|
||||
|
||||
|
||||
void mainWindow::fillTemplatesMenu( void )
|
||||
void MainWindow::fillTemplatesMenu()
|
||||
{
|
||||
m_templatesMenu->clear();
|
||||
|
||||
@@ -1403,7 +1417,7 @@ void mainWindow::fillTemplatesMenu( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::showTool( QAction * _idx )
|
||||
void MainWindow::showTool( QAction * _idx )
|
||||
{
|
||||
pluginView * p = m_tools[m_toolsMenu->actions().indexOf( _idx )];
|
||||
p->show();
|
||||
@@ -1414,7 +1428,7 @@ void mainWindow::showTool( QAction * _idx )
|
||||
|
||||
|
||||
|
||||
void mainWindow::browseHelp( void )
|
||||
void MainWindow::browseHelp()
|
||||
{
|
||||
// file:// alternative for offline help
|
||||
QString url = "http://lmms.sf.net/wiki/index.php?title=Main_Page";
|
||||
@@ -1425,7 +1439,7 @@ void mainWindow::browseHelp( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::setHighQuality( bool _hq )
|
||||
void MainWindow::setHighQuality( bool _hq )
|
||||
{
|
||||
engine::getMixer()->changeQuality( mixer::qualitySettings(
|
||||
_hq ? mixer::qualitySettings::Mode_HighQuality :
|
||||
@@ -1434,10 +1448,10 @@ void mainWindow::setHighQuality( bool _hq )
|
||||
|
||||
|
||||
|
||||
void mainWindow::masterVolumeChanged( int _new_val )
|
||||
void MainWindow::masterVolumeChanged( int _new_val )
|
||||
{
|
||||
masterVolumeMoved( _new_val );
|
||||
if( m_mvsStatus->isVisible() == FALSE && engine::getSong()->m_loadingProject == FALSE
|
||||
if( m_mvsStatus->isVisible() == false && engine::getSong()->m_loadingProject == false
|
||||
&& m_masterVolumeSlider->showStatus() )
|
||||
{
|
||||
m_mvsStatus->moveGlobal( m_masterVolumeSlider,
|
||||
@@ -1450,7 +1464,7 @@ void mainWindow::masterVolumeChanged( int _new_val )
|
||||
|
||||
|
||||
|
||||
void mainWindow::masterVolumePressed( void )
|
||||
void MainWindow::masterVolumePressed()
|
||||
{
|
||||
m_mvsStatus->moveGlobal( m_masterVolumeSlider,
|
||||
QPoint( m_masterVolumeSlider->width() + 2, -2 ) );
|
||||
@@ -1461,7 +1475,7 @@ void mainWindow::masterVolumePressed( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::masterVolumeMoved( int _new_val )
|
||||
void MainWindow::masterVolumeMoved( int _new_val )
|
||||
{
|
||||
m_mvsStatus->setText( tr( "Value: %1%" ).arg( _new_val ) );
|
||||
}
|
||||
@@ -1469,7 +1483,7 @@ void mainWindow::masterVolumeMoved( int _new_val )
|
||||
|
||||
|
||||
|
||||
void mainWindow::masterVolumeReleased( void )
|
||||
void MainWindow::masterVolumeReleased()
|
||||
{
|
||||
m_mvsStatus->hide();
|
||||
}
|
||||
@@ -1477,11 +1491,12 @@ void mainWindow::masterVolumeReleased( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::masterPitchChanged( int _new_val )
|
||||
void MainWindow::masterPitchChanged( int _new_val )
|
||||
{
|
||||
masterPitchMoved( _new_val );
|
||||
if( m_mpsStatus->isVisible() == FALSE && engine::getSong()->m_loadingProject == FALSE
|
||||
&& m_masterPitchSlider->showStatus() )
|
||||
if( m_mpsStatus->isVisible() == false &&
|
||||
engine::getSong()->m_loadingProject == false &&
|
||||
m_masterPitchSlider->showStatus() )
|
||||
{
|
||||
m_mpsStatus->moveGlobal( m_masterPitchSlider,
|
||||
QPoint( m_masterPitchSlider->width() + 2, -2 ) );
|
||||
@@ -1492,7 +1507,7 @@ void mainWindow::masterPitchChanged( int _new_val )
|
||||
|
||||
|
||||
|
||||
void mainWindow::masterPitchPressed( void )
|
||||
void MainWindow::masterPitchPressed()
|
||||
{
|
||||
m_mpsStatus->moveGlobal( m_masterPitchSlider,
|
||||
QPoint( m_masterPitchSlider->width() + 2, -2 ) );
|
||||
@@ -1503,29 +1518,29 @@ void mainWindow::masterPitchPressed( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::masterPitchMoved( int _new_val )
|
||||
void MainWindow::masterPitchMoved( int _new_val )
|
||||
{
|
||||
m_mpsStatus->setText( tr( "Value: %1 semitones").arg( _new_val ) );
|
||||
m_mpsStatus->setText( tr( "Value: %1 semitones" ).arg( _new_val ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void mainWindow::masterPitchReleased( void )
|
||||
void MainWindow::masterPitchReleased()
|
||||
{
|
||||
m_mpsStatus->hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleRecordAutomation( bool _recording )
|
||||
void MainWindow::toggleRecordAutomation( bool _recording )
|
||||
{
|
||||
engine::getAutomationRecorder()->setRecording( _recording );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "moc_main_window.cxx"
|
||||
#include "moc_MainWindow.cxx"
|
||||
|
||||
/* vim: set tw=0 noexpandtab: */
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "gui_templates.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "UnifiedResourceProvider.h"
|
||||
#include "engine.h"
|
||||
#include "embed.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "piano.h"
|
||||
#include "song.h"
|
||||
|
||||
@@ -368,7 +368,7 @@ void ResourceBrowser::triggerAction( Actions _action, ResourceItem * _item )
|
||||
switch( _action )
|
||||
{
|
||||
case LoadProject:
|
||||
if( engine::getMainWindow()->mayChangeProject() )
|
||||
if( engine::mainWindow()->mayChangeProject() )
|
||||
{
|
||||
ResourceFileMapper mapper( _item );
|
||||
if( _item->isLocalResource() )
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "about_dialog.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
|
||||
aboutDialog::aboutDialog() :
|
||||
QDialog( engine::getMainWindow() ),
|
||||
QDialog( engine::mainWindow() ),
|
||||
Ui::AboutDialog()
|
||||
{
|
||||
setupUi( this );
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "ControllerConnectionDialog.h"
|
||||
#include "ControllerConnection.h"
|
||||
#include "embed.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "string_pair_drag.h"
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ void automatableModelViewSlots::execConnectionDialog( void )
|
||||
|
||||
m->displayName();
|
||||
ControllerConnectionDialog * d = new ControllerConnectionDialog(
|
||||
(QWidget*)engine::getMainWindow(), m );
|
||||
(QWidget*)engine::mainWindow(), m );
|
||||
|
||||
if( d->exec() == 1)
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
|
||||
#include "song_editor.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "pixmap_button.h"
|
||||
@@ -355,9 +355,9 @@ automationEditor::automationEditor( void ) :
|
||||
setMinimumSize( tb_layout->minimumSize().width(), 128 );
|
||||
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
if( engine::mainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->resize( InitialWidth, InitialHeight );
|
||||
parentWidget()->hide();
|
||||
}
|
||||
@@ -412,7 +412,7 @@ void automationEditor::setCurrentPattern( automationPattern * _new_pattern )
|
||||
|
||||
void automationEditor::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
mainWindow::saveWidgetState( this, _this );
|
||||
MainWindow::saveWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
@@ -420,7 +420,7 @@ void automationEditor::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
void automationEditor::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
mainWindow::restoreWidgetState( this, _this );
|
||||
MainWindow::restoreWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "bb_editor.h"
|
||||
#include "bb_track_container.h"
|
||||
#include "embed.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "song.h"
|
||||
#include "tool_button.h"
|
||||
|
||||
@@ -112,7 +112,7 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
|
||||
tb_layout->addWidget( l );
|
||||
tb_layout->addSpacing( 15 );
|
||||
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
parentWidget()->layout()->setSizeConstraint( QLayout::SetMinimumSize );
|
||||
parentWidget()->resize( minimumWidth(), 300 );
|
||||
@@ -149,7 +149,7 @@ void bbEditor::removeBBView( int _bb )
|
||||
|
||||
void bbEditor::play( void )
|
||||
{
|
||||
engine::getMainWindow()->setPlaybackMode( PPM_BB );
|
||||
engine::mainWindow()->setPlaybackMode( PPM_BB );
|
||||
|
||||
if( engine::getSong()->isPlaying() )
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "export_project_dialog.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "ProjectRenderer.h"
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ void exportProjectDialog::startBtnClicked()
|
||||
connect( m_renderer, SIGNAL( finished() ),
|
||||
this, SLOT( accept() ) );
|
||||
connect( m_renderer, SIGNAL( finished() ),
|
||||
engine::getMainWindow(), SLOT( resetWindowTitle() ) );
|
||||
engine::mainWindow(), SLOT( resetWindowTitle() ) );
|
||||
|
||||
m_renderer->startProcessing();
|
||||
}
|
||||
@@ -186,7 +186,7 @@ void exportProjectDialog::startBtnClicked()
|
||||
|
||||
void exportProjectDialog::updateTitleBar( int _prog )
|
||||
{
|
||||
engine::getMainWindow()->setWindowTitle(
|
||||
engine::mainWindow()->setWindowTitle(
|
||||
tr( "Rendering: %1%" ).arg( _prog ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "effect_rack_view.h"
|
||||
#include "engine.h"
|
||||
#include "embed.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "lcd_spinbox.h"
|
||||
#include "gui_templates.h"
|
||||
#include "tooltip.h"
|
||||
@@ -219,13 +219,13 @@ fxMixerView::fxMixerView() :
|
||||
setCurrentFxLine( m_fxChannelViews[0].m_fxLine );
|
||||
|
||||
// timer for updating faders
|
||||
connect( engine::getMainWindow(), SIGNAL( periodicUpdate() ),
|
||||
connect( engine::mainWindow(), SIGNAL( periodicUpdate() ),
|
||||
this, SLOT( updateFaders() ) );
|
||||
|
||||
|
||||
// add ourself to workspace
|
||||
QMdiSubWindow * subWin =
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
Qt::WindowFlags flags = subWin->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
@@ -251,7 +251,7 @@ fxMixerView::~fxMixerView()
|
||||
|
||||
void fxMixerView::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
mainWindow::saveWidgetState( this, _this );
|
||||
MainWindow::saveWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ void fxMixerView::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
void fxMixerView::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
mainWindow::restoreWidgetState( this, _this );
|
||||
MainWindow::restoreWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
#include "instrument_track.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "midi.h"
|
||||
#include "mmp.h"
|
||||
#include "pattern.h"
|
||||
@@ -517,9 +517,9 @@ pianoRoll::pianoRoll( void ) :
|
||||
setMinimumSize( tb_layout->minimumSize().width(), 160 );
|
||||
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
if( engine::mainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->resize( InitialPianoRollWidth,
|
||||
InitialPianoRollHeight );
|
||||
parentWidget()->hide();
|
||||
@@ -622,7 +622,7 @@ void pianoRoll::setCurrentPattern( pattern * _new_pattern )
|
||||
|
||||
void pianoRoll::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
mainWindow::saveWidgetState( this, _this );
|
||||
MainWindow::saveWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
@@ -630,7 +630,7 @@ void pianoRoll::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
void pianoRoll::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
mainWindow::restoreWidgetState( this, _this );
|
||||
MainWindow::restoreWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
@@ -3008,7 +3008,7 @@ song::PlayModes pianoRoll::desiredPlayModeForAccompany( void ) const
|
||||
|
||||
void pianoRoll::play( void )
|
||||
{
|
||||
engine::getMainWindow()->setPlaybackMode( PPM_PianoRoll );
|
||||
engine::mainWindow()->setPlaybackMode( PPM_PianoRoll );
|
||||
|
||||
if( validPattern() == false )
|
||||
{
|
||||
@@ -3047,7 +3047,7 @@ void pianoRoll::play( void )
|
||||
|
||||
void pianoRoll::record( void )
|
||||
{
|
||||
engine::getMainWindow()->setPlaybackMode( PPM_PianoRoll );
|
||||
engine::mainWindow()->setPlaybackMode( PPM_PianoRoll );
|
||||
|
||||
if( engine::getSong()->isPlaying() )
|
||||
{
|
||||
@@ -3068,7 +3068,7 @@ void pianoRoll::record( void )
|
||||
|
||||
void pianoRoll::recordAccompany( void )
|
||||
{
|
||||
engine::getMainWindow()->setPlaybackMode( PPM_PianoRoll );
|
||||
engine::mainWindow()->setPlaybackMode( PPM_PianoRoll );
|
||||
|
||||
if( engine::getSong()->isPlaying() )
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "song_editor.h"
|
||||
#include "combobox.h"
|
||||
#include "embed.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "mmp.h"
|
||||
#include "timeline.h"
|
||||
#include "tool_button.h"
|
||||
@@ -250,7 +250,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
|
||||
this, SLOT( updateScrollBar( int ) ) );
|
||||
|
||||
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
parentWidget()->resize( 600, 300 );
|
||||
parentWidget()->move( 5, 5 );
|
||||
@@ -277,7 +277,7 @@ void songEditor::scrolled( int _new_pos )
|
||||
|
||||
void songEditor::play( void )
|
||||
{
|
||||
engine::getMainWindow()->setPlaybackMode( PPM_Song );
|
||||
engine::mainWindow()->setPlaybackMode( PPM_Song );
|
||||
|
||||
m_s->play();
|
||||
engine::getPianoRoll()->stopRecording();
|
||||
@@ -296,7 +296,7 @@ void songEditor::play( void )
|
||||
|
||||
void songEditor::record( void )
|
||||
{
|
||||
engine::getMainWindow()->setPlaybackMode( PPM_Song );
|
||||
engine::mainWindow()->setPlaybackMode( PPM_Song );
|
||||
|
||||
m_s->record();
|
||||
}
|
||||
@@ -306,7 +306,7 @@ void songEditor::record( void )
|
||||
|
||||
void songEditor::recordAccompany( void )
|
||||
{
|
||||
engine::getMainWindow()->setPlaybackMode( PPM_Song );
|
||||
engine::mainWindow()->setPlaybackMode( PPM_Song );
|
||||
|
||||
m_s->playAndRecord();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "string_pair_drag.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
||||
stringPairDrag::stringPairDrag( const QString & _key, const QString & _value,
|
||||
@@ -61,9 +61,9 @@ stringPairDrag::~stringPairDrag()
|
||||
{
|
||||
// during a drag, we might have lost key-press-events, so reset
|
||||
// modifiers of main-win
|
||||
if( engine::getMainWindow() )
|
||||
if( engine::mainWindow() )
|
||||
{
|
||||
engine::getMainWindow()->clearKeyModifiers();
|
||||
engine::mainWindow()->clearKeyModifiers();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "track_container_view.h"
|
||||
#include "track_container.h"
|
||||
#include "bb_track.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "debug.h"
|
||||
#include "import_filter.h"
|
||||
#include "instrument.h"
|
||||
@@ -111,7 +111,7 @@ trackContainerView::~trackContainerView()
|
||||
void trackContainerView::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
mainWindow::saveWidgetState( this, _this );
|
||||
MainWindow::saveWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ void trackContainerView::saveSettings( QDomDocument & _doc,
|
||||
|
||||
void trackContainerView::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
mainWindow::restoreWidgetState( this, _this );
|
||||
MainWindow::restoreWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "song.h"
|
||||
#include "embed.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "group_box.h"
|
||||
#include "ControllerRackView.h"
|
||||
#include "ControllerView.h"
|
||||
@@ -75,7 +75,7 @@ ControllerRackView::ControllerRackView( ) :
|
||||
this->setLayout( layout );
|
||||
|
||||
QMdiSubWindow * subWin =
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
|
||||
// No maximize button
|
||||
Qt::WindowFlags flags = subWin->windowFlags();
|
||||
@@ -104,7 +104,7 @@ ControllerRackView::~ControllerRackView()
|
||||
void ControllerRackView::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
mainWindow::saveWidgetState( this, _this );
|
||||
MainWindow::saveWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ void ControllerRackView::saveSettings( QDomDocument & _doc,
|
||||
|
||||
void ControllerRackView::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
mainWindow::restoreWidgetState( this, _this );
|
||||
MainWindow::restoreWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "tooltip.h"
|
||||
#include "mv_base.h"
|
||||
|
||||
@@ -60,9 +60,9 @@ ControllerView::ControllerView( Controller * _model, QWidget * _parent ) :
|
||||
ctls_btn->setGeometry( 140, 2, 50, 14 );
|
||||
connect( ctls_btn, SIGNAL( clicked() ), this, SLOT( editControls() ) );
|
||||
|
||||
m_controllerDlg = getController()->createDialog( engine::getMainWindow()->workspace() );
|
||||
m_controllerDlg = getController()->createDialog( engine::mainWindow()->workspace() );
|
||||
|
||||
m_subWindow = engine::getMainWindow()->workspace()->addSubWindow( m_controllerDlg );
|
||||
m_subWindow = engine::mainWindow()->workspace()->addSubWindow( m_controllerDlg );
|
||||
|
||||
Qt::WindowFlags flags = m_subWindow->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "caption_menu.h"
|
||||
#include "engine.h"
|
||||
#include "embed.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "string_pair_drag.h"
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "caption_menu.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "engine.h"
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
||||
QPixmap * comboBox::s_background = NULL;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "gui_templates.h"
|
||||
#include "knob.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "tempo_sync_knob.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
@@ -102,7 +102,7 @@ effectView::effectView( effect * _model, QWidget * _parent ) :
|
||||
m_controlView = getEffect()->getControls()->createView();
|
||||
if( m_controlView )
|
||||
{
|
||||
m_subWindow = engine::getMainWindow()->workspace()->addSubWindow(
|
||||
m_subWindow = engine::mainWindow()->workspace()->addSubWindow(
|
||||
m_controlView,
|
||||
Qt::SubWindow | Qt::CustomizeWindowHint |
|
||||
Qt::WindowTitleHint | Qt::WindowSystemMenuHint );
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "caption_menu.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "project_journal.h"
|
||||
#include "song.h"
|
||||
#include "string_pair_drag.h"
|
||||
@@ -374,7 +374,7 @@ void knob::drawKnob( QPainter * _p )
|
||||
|
||||
float knob::getValue( const QPoint & _p )
|
||||
{
|
||||
if( engine::getMainWindow()->isShiftPressed() )
|
||||
if( engine::mainWindow()->isShiftPressed() )
|
||||
{
|
||||
//return( ( _p.y() - m_origMousePos.y() ) * model()->step<float>() );
|
||||
return( ( _p.y() - m_origMousePos.y() ) * pageSize() );
|
||||
@@ -463,7 +463,7 @@ void knob::mousePressEvent( QMouseEvent * _me )
|
||||
m_buttonPressed = TRUE;
|
||||
}
|
||||
else if( _me->button() == Qt::LeftButton &&
|
||||
engine::getMainWindow()->isShiftPressed() == TRUE )
|
||||
engine::mainWindow()->isShiftPressed() == TRUE )
|
||||
{
|
||||
new stringPairDrag( "float_value",
|
||||
QString::number( model()->value() ),
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
#include "templates.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#include "pixmap_button.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "embed.h"
|
||||
|
||||
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "song.h"
|
||||
|
||||
|
||||
|
||||
projectNotes::projectNotes( void ) :
|
||||
QMainWindow( engine::getMainWindow()->workspace() )
|
||||
QMainWindow( engine::mainWindow()->workspace() )
|
||||
{
|
||||
m_edit = new QTextEdit( this );
|
||||
m_edit->setAutoFillBackground( TRUE );
|
||||
@@ -70,7 +70,7 @@ projectNotes::projectNotes( void ) :
|
||||
setWindowTitle( tr( "Project notes" ) );
|
||||
setWindowIcon( embed::getIconPixmap( "project_notes" ) );
|
||||
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, false );
|
||||
parentWidget()->move( 700, 10 );
|
||||
parentWidget()->resize( 400, 300 );
|
||||
@@ -378,7 +378,7 @@ void projectNotes::alignmentChanged( int _a )
|
||||
|
||||
void projectNotes::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
mainWindow::saveWidgetState( this, _this );
|
||||
MainWindow::saveWidgetState( this, _this );
|
||||
|
||||
QDomCDATASection ds = _doc.createCDATASection( m_edit->toHtml() );
|
||||
_this.appendChild( ds );
|
||||
@@ -389,7 +389,7 @@ void projectNotes::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
void projectNotes::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
mainWindow::restoreWidgetState( this, _this );
|
||||
MainWindow::restoreWidgetState( this, _this );
|
||||
m_edit->setHtml( _this.text() );
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "engine.h"
|
||||
#include "caption_menu.h"
|
||||
#include "embed.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "meter_dialog.h"
|
||||
#include "song.h"
|
||||
|
||||
@@ -475,8 +475,8 @@ void tempoSyncKnob::showCustom( void )
|
||||
if( m_custom == NULL )
|
||||
{
|
||||
m_custom = new meterDialog(
|
||||
engine::getMainWindow()->workspace() );
|
||||
engine::getMainWindow()->workspace()->addSubWindow( m_custom );
|
||||
engine::mainWindow()->workspace() );
|
||||
engine::mainWindow()->workspace()->addSubWindow( m_custom );
|
||||
m_custom->setWindowTitle( "Meter" );
|
||||
m_custom->setModel( &model()->m_custom );
|
||||
}
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
|
||||
#include "text_float.h"
|
||||
#include "gui_templates.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "engine.h"
|
||||
|
||||
|
||||
|
||||
textFloat::textFloat( void ) :
|
||||
QWidget( engine::getMainWindow(), Qt::ToolTip ),
|
||||
QWidget( engine::mainWindow(), Qt::ToolTip ),
|
||||
m_title( "" ),
|
||||
m_text( "" ),
|
||||
m_pixmap()
|
||||
@@ -87,7 +87,7 @@ void textFloat::setVisibilityTimeOut( int _msecs )
|
||||
textFloat * textFloat::displayMessage( const QString & _msg, int _timeout,
|
||||
QWidget * _parent, int _add_y_margin )
|
||||
{
|
||||
QWidget * mw = engine::getMainWindow();
|
||||
QWidget * mw = engine::mainWindow();
|
||||
textFloat * tf = new textFloat;
|
||||
if( _parent != NULL )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "visualization_widget.h"
|
||||
#include "gui_templates.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "tooltip.h"
|
||||
@@ -89,7 +89,7 @@ void visualizationWidget::setActive( bool _active )
|
||||
m_active = _active;
|
||||
if( m_active )
|
||||
{
|
||||
connect( engine::getMainWindow(),
|
||||
connect( engine::mainWindow(),
|
||||
SIGNAL( periodicUpdate() ),
|
||||
this, SLOT( update() ) );
|
||||
connect( engine::getMixer(),
|
||||
@@ -98,7 +98,7 @@ void visualizationWidget::setActive( bool _active )
|
||||
}
|
||||
else
|
||||
{
|
||||
disconnect( engine::getMainWindow(),
|
||||
disconnect( engine::mainWindow(),
|
||||
SIGNAL( periodicUpdate() ),
|
||||
this, SLOT( update() ) );
|
||||
disconnect( engine::getMixer(),
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
#include "instrument_midi_io_view.h"
|
||||
#include "lcd_spinbox.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "MidiClient.h"
|
||||
#include "MidiPortMenu.h"
|
||||
#include "mmp.h"
|
||||
@@ -1287,7 +1287,7 @@ instrumentTrackWindow::instrumentTrackWindow( instrumentTrackView * _itv ) :
|
||||
resize( sizeHint() );
|
||||
|
||||
QMdiSubWindow * subWin =
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
Qt::WindowFlags flags = subWin->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
@@ -1303,7 +1303,7 @@ instrumentTrackWindow::instrumentTrackWindow( instrumentTrackView * _itv ) :
|
||||
instrumentTrackWindow::~instrumentTrackWindow()
|
||||
{
|
||||
delete m_instrumentView;
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
if( engine::mainWindow()->workspace() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
parentWidget()->deleteLater();
|
||||
@@ -1452,7 +1452,7 @@ void instrumentTrackWindow::toggleVisibility( bool _on )
|
||||
void instrumentTrackWindow::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
_ce->ignore();
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
if( engine::mainWindow()->workspace() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
@@ -1532,7 +1532,7 @@ void instrumentTrackWindow::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
_this.setAttribute( "tab", m_tabWidget->activeTab() );
|
||||
mainWindow::saveWidgetState( this, _this );
|
||||
MainWindow::saveWidgetState( this, _this );
|
||||
}
|
||||
|
||||
|
||||
@@ -1541,7 +1541,7 @@ void instrumentTrackWindow::saveSettings( QDomDocument & _doc,
|
||||
void instrumentTrackWindow::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
m_tabWidget->setActiveTab( _this.attribute( "tab" ).toInt() );
|
||||
mainWindow::restoreWidgetState( this, _this );
|
||||
MainWindow::restoreWidgetState( this, _this );
|
||||
if( isVisible() )
|
||||
{
|
||||
m_itv->m_tlb->setChecked( true );
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
#include "tooltip.h"
|
||||
#include "bb_track_container.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "main_window.h"
|
||||
|
||||
|
||||
QPixmap * patternView::s_stepBtnOn = NULL;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "sample_record_handle.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "knob.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "effect_rack_view.h"
|
||||
#include "track_label_button.h"
|
||||
|
||||
@@ -527,7 +527,7 @@ sampleTrackView::sampleTrackView( sampleTrack * _t, trackContainerView * _tcv )
|
||||
m_effectRack = new effectRackView( _t->audioPort()->getEffects() );
|
||||
m_effectRack->setFixedSize( 240, 242 );
|
||||
|
||||
engine::getMainWindow()->workspace()->addSubWindow( m_effectRack );
|
||||
engine::mainWindow()->workspace()->addSubWindow( m_effectRack );
|
||||
m_effWindow = m_effectRack->parentWidget();
|
||||
m_effWindow->setAttribute( Qt::WA_DeleteOnClose, false );
|
||||
m_effWindow->layout()->setSizeConstraint( QLayout::SetFixedSize );
|
||||
|
||||
Reference in New Issue
Block a user