2012-05-26 14:49:10 +02:00
|
|
|
//=============================================================================
|
|
|
|
// MuseScore
|
|
|
|
// Music Composition & Notation
|
|
|
|
// $Id: musescore.h 5657 2012-05-21 15:46:06Z lasconic $
|
|
|
|
//
|
|
|
|
// Copyright (C) 2002-2011 Werner Schweer and others
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License version 2.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
#ifndef __MUSESCORE_H__
|
|
|
|
#define __MUSESCORE_H__
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
#include "globals.h"
|
|
|
|
#include "ui_measuresdialog.h"
|
|
|
|
#include "ui_insertmeasuresdialog.h"
|
|
|
|
#include "ui_aboutbox.h"
|
|
|
|
#include "ui_aboutmusicxmlbox.h"
|
|
|
|
#include "ui_startdialog.h"
|
|
|
|
#include "singleapp/src/QtSingleApplication"
|
|
|
|
#include "updatechecker.h"
|
2012-12-10 09:15:50 +01:00
|
|
|
#include "musescoreCore.h"
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2013-05-13 18:49:17 +02:00
|
|
|
namespace Ms {
|
|
|
|
|
2012-05-26 14:49:10 +02:00
|
|
|
class Shortcut;
|
|
|
|
class ScoreView;
|
|
|
|
class Element;
|
|
|
|
class PreferenceDialog;
|
|
|
|
class InstrumentsDialog;
|
|
|
|
class Instrument;
|
|
|
|
class MidiFile;
|
|
|
|
class TextStyleDialog;
|
|
|
|
class PlayPanel;
|
2013-04-03 12:13:23 +02:00
|
|
|
class Mixer;
|
2012-05-26 14:49:10 +02:00
|
|
|
class Debugger;
|
|
|
|
class MeasureListEditor;
|
|
|
|
class Score;
|
2013-05-21 22:29:48 +02:00
|
|
|
class Tuplet;
|
2012-05-26 14:49:10 +02:00
|
|
|
class PageSettings;
|
|
|
|
class PaletteBox;
|
|
|
|
class Palette;
|
|
|
|
class PaletteScrollArea;
|
2014-06-02 12:12:53 +02:00
|
|
|
class SelectionWindow;
|
2012-05-26 14:49:10 +02:00
|
|
|
class Xml;
|
|
|
|
class MagBox;
|
|
|
|
class NewWizard;
|
|
|
|
class ExcerptsDialog;
|
|
|
|
class SynthControl;
|
|
|
|
class PianorollEditor;
|
|
|
|
class DrumrollEditor;
|
|
|
|
class Staff;
|
|
|
|
class ScoreTab;
|
|
|
|
class Drumset;
|
|
|
|
class TextTools;
|
|
|
|
class DrumTools;
|
|
|
|
class ScriptEngine;
|
|
|
|
class KeyEditor;
|
|
|
|
class ChordStyleEditor;
|
|
|
|
class Navigator;
|
|
|
|
class PianoTools;
|
|
|
|
class MediaDialog;
|
2013-02-06 16:43:25 +01:00
|
|
|
class Workspace;
|
2012-05-26 14:49:10 +02:00
|
|
|
class AlbumManager;
|
|
|
|
class WebPageDockWidget;
|
|
|
|
class ChordList;
|
|
|
|
class Capella;
|
|
|
|
class Inspector;
|
|
|
|
class OmrPanel;
|
|
|
|
class NScrollArea;
|
|
|
|
class Sym;
|
|
|
|
class MasterPalette;
|
2012-07-02 18:05:10 +02:00
|
|
|
class PluginCreator;
|
2013-02-11 14:13:38 +01:00
|
|
|
class PluginManager;
|
2013-03-28 11:09:31 +01:00
|
|
|
class MasterSynthesizer;
|
2013-04-02 20:46:07 +02:00
|
|
|
class Driver;
|
|
|
|
class Seq;
|
2013-04-28 21:29:12 +02:00
|
|
|
class ImportMidiPanel;
|
2014-11-10 10:05:25 +01:00
|
|
|
class Startcenter;
|
2012-07-02 18:05:10 +02:00
|
|
|
|
2012-06-06 14:16:06 +02:00
|
|
|
struct PluginDescription;
|
2014-05-26 20:21:45 +02:00
|
|
|
enum class SelState : char;
|
2014-05-30 10:14:57 +02:00
|
|
|
enum class IconType : signed char;
|
2014-06-30 15:15:03 +02:00
|
|
|
enum class MagIdx : char;
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
extern QString mscoreGlobalShare;
|
|
|
|
static const int PROJECT_LIST_LEN = 6;
|
2014-03-27 11:34:12 +01:00
|
|
|
extern const char* voiceActions[];
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// IconActions
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
struct IconAction {
|
2014-05-30 10:14:57 +02:00
|
|
|
IconType subtype;
|
2014-09-06 10:23:37 +02:00
|
|
|
const QString action;
|
2012-05-26 14:49:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// LanguageItem
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
struct LanguageItem {
|
|
|
|
QString key;
|
|
|
|
QString name;
|
|
|
|
QString handbook;
|
|
|
|
LanguageItem(const QString k, const QString n) {
|
|
|
|
key = k;
|
|
|
|
name = n;
|
|
|
|
handbook = QString::null;
|
|
|
|
}
|
|
|
|
LanguageItem(const QString k, const QString n, const QString h) {
|
|
|
|
key = k;
|
|
|
|
name = n;
|
|
|
|
handbook = h;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// AboutBoxDialog
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class AboutBoxDialog : public QDialog, Ui::AboutBox {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
AboutBoxDialog();
|
2013-05-13 18:49:17 +02:00
|
|
|
|
2012-05-30 02:12:37 +02:00
|
|
|
private slots:
|
|
|
|
void copyRevisionToClipboard();
|
2012-05-26 14:49:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// AboutMusicXMLBoxDialog
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class AboutMusicXMLBoxDialog : public QDialog, Ui::AboutMusicXMLBox {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
AboutMusicXMLBoxDialog();
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// InsertMeasuresDialog
|
|
|
|
// Added by DK, 05.08.07
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class InsertMeasuresDialog : public QDialog, public Ui::InsertMeasuresDialogBase {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
virtual void accept();
|
|
|
|
|
|
|
|
public:
|
|
|
|
InsertMeasuresDialog(QWidget* parent = 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// MeasuresDialog
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class MeasuresDialog : public QDialog, public Ui::MeasuresDialogBase {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
virtual void accept();
|
|
|
|
|
|
|
|
public:
|
|
|
|
MeasuresDialog(QWidget* parent = 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// StartDialog
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class StartDialog : public QDialog, public Ui::StartDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void createScoreClicked();
|
|
|
|
void loadScoreClicked();
|
|
|
|
|
|
|
|
public:
|
|
|
|
StartDialog(QWidget* parent = 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// MuseScoreApplication (mac only)
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class MuseScoreApplication : public QtSingleApplication {
|
|
|
|
public:
|
|
|
|
QStringList paths;
|
|
|
|
MuseScoreApplication(const QString &id, int &argc, char **argv)
|
|
|
|
: QtSingleApplication(id, argc, argv) {
|
|
|
|
};
|
|
|
|
bool event(QEvent *ev);
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// MuseScore
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2012-12-10 09:15:50 +01:00
|
|
|
class MuseScore : public QMainWindow, public MuseScoreCore {
|
2012-05-26 14:49:10 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
2014-11-13 13:04:04 +01:00
|
|
|
QSettings settings;
|
2014-11-12 18:57:15 +01:00
|
|
|
ScoreView* cv { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
ScoreState _sstate;
|
|
|
|
UpdateChecker* ucheck;
|
|
|
|
|
|
|
|
QVBoxLayout* layout; // main window layout
|
|
|
|
QSplitter* splitter;
|
|
|
|
ScoreTab* tab1;
|
|
|
|
ScoreTab* tab2;
|
|
|
|
NScrollArea* _navigator;
|
2014-11-12 18:57:15 +01:00
|
|
|
ImportMidiPanel* importmidiPanel { 0 };
|
2013-09-25 21:53:52 +02:00
|
|
|
QFrame* importmidiShowPanel;
|
2012-05-26 14:49:10 +02:00
|
|
|
QSplitter* mainWindow;
|
|
|
|
|
2013-06-18 13:10:50 +02:00
|
|
|
QMenu* menuView;
|
2012-05-26 14:49:10 +02:00
|
|
|
QMenu* openRecent;
|
|
|
|
|
|
|
|
MagBox* mag;
|
|
|
|
QComboBox* viewModeCombo;
|
|
|
|
QAction* playId;
|
|
|
|
|
2014-11-12 18:57:15 +01:00
|
|
|
QProgressBar* _progressBar { 0 };
|
2014-11-10 10:05:25 +01:00
|
|
|
PreferenceDialog* preferenceDialog { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
QToolBar* cpitchTools;
|
|
|
|
QToolBar* fileTools;
|
|
|
|
QToolBar* transportTools;
|
|
|
|
QToolBar* entryTools;
|
2014-11-10 10:05:25 +01:00
|
|
|
TextTools* _textTools { 0 };
|
|
|
|
PianoTools* _pianoTools { 0 };
|
|
|
|
WebPageDockWidget* _webPage { 0 };
|
2014-11-12 18:57:15 +01:00
|
|
|
MediaDialog* _mediaDialog { 0 };
|
|
|
|
DrumTools* _drumTools { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
QToolBar* voiceTools;
|
2014-11-10 10:05:25 +01:00
|
|
|
InstrumentsDialog* instrList { 0 };
|
|
|
|
MeasuresDialog* measuresDialog { 0 };
|
|
|
|
InsertMeasuresDialog* insertMeasuresDialog { 0 };
|
|
|
|
MasterPalette* masterPalette { 0 };
|
|
|
|
PluginCreator* _pluginCreator { 0 };
|
|
|
|
PluginManager* pluginManager { 0 };
|
2014-11-12 18:57:15 +01:00
|
|
|
SelectionWindow* selectionWindow { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
QMenu* _fileMenu;
|
|
|
|
QMenu* menuEdit;
|
|
|
|
QMenu* menuNotes;
|
|
|
|
QMenu* menuLayout;
|
|
|
|
QMenu* menuStyle;
|
2014-11-12 18:57:15 +01:00
|
|
|
AlbumManager* albumManager { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2014-11-12 18:57:15 +01:00
|
|
|
QWidget* _searchDialog { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
QComboBox* searchCombo;
|
|
|
|
|
2014-11-12 18:57:15 +01:00
|
|
|
PlayPanel* playPanel { 0 };
|
|
|
|
Mixer* mixer { 0 };
|
|
|
|
SynthControl* synthControl { 0 };
|
|
|
|
Debugger* debugger { 0 };
|
|
|
|
MeasureListEditor* measureListEdit { 0 };
|
|
|
|
PageSettings* pageSettings { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2014-11-12 18:57:15 +01:00
|
|
|
QWidget* symbolDialog { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2014-11-12 18:57:15 +01:00
|
|
|
PaletteScrollArea* clefPalette { 0 };
|
|
|
|
PaletteScrollArea* keyPalette { 0 };
|
|
|
|
KeyEditor* keyEditor { 0 };
|
|
|
|
ChordStyleEditor* chordStyleEditor { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
QStatusBar* _statusBar;
|
|
|
|
QLabel* _modeText;
|
|
|
|
QLabel* _positionLabel;
|
2014-11-10 10:05:25 +01:00
|
|
|
NewWizard* newWizard { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2014-11-10 10:05:25 +01:00
|
|
|
PaletteBox* paletteBox { 0 };
|
|
|
|
Inspector* _inspector { 0 };
|
|
|
|
OmrPanel* omrPanel { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2014-11-10 10:05:25 +01:00
|
|
|
bool _midiinEnabled { true };
|
2012-05-26 14:49:10 +02:00
|
|
|
QList<QString> plugins;
|
2014-11-10 10:05:25 +01:00
|
|
|
ScriptEngine* se { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
QString pluginPath;
|
|
|
|
|
2012-06-06 14:16:06 +02:00
|
|
|
void createMenuEntry(PluginDescription*);
|
2014-07-17 22:48:38 +02:00
|
|
|
void removeMenuEntry(PluginDescription*);
|
2012-05-28 11:29:21 +02:00
|
|
|
|
2012-05-26 14:49:10 +02:00
|
|
|
QTimer* autoSaveTimer;
|
2012-05-28 11:29:21 +02:00
|
|
|
QList<QAction*> qmlPluginActions;
|
2012-05-26 14:49:10 +02:00
|
|
|
QList<QAction*> pluginActions;
|
2014-11-12 18:57:15 +01:00
|
|
|
QSignalMapper* pluginMapper { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2014-11-12 18:57:15 +01:00
|
|
|
PianorollEditor* pianorollEditor { 0 };
|
|
|
|
DrumrollEditor* drumrollEditor { 0 };
|
|
|
|
bool _splitScreen { false };
|
|
|
|
bool _horizontalSplit { true };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
QString rev;
|
|
|
|
|
2014-11-12 18:57:15 +01:00
|
|
|
int _midiRecordId { -1 };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2014-11-12 18:57:15 +01:00
|
|
|
bool _fullscreen { false };
|
2012-05-26 14:49:10 +02:00
|
|
|
QList<LanguageItem> _languages;
|
|
|
|
|
2014-11-12 18:57:15 +01:00
|
|
|
Startcenter* startcenter { 0 };
|
|
|
|
QFileDialog* loadScoreDialog { 0 };
|
|
|
|
QFileDialog* saveScoreDialog { 0 };
|
|
|
|
QFileDialog* loadStyleDialog { 0 };
|
|
|
|
QFileDialog* saveStyleDialog { 0 };
|
|
|
|
QFileDialog* saveImageDialog { 0 };
|
|
|
|
QFileDialog* loadChordStyleDialog { 0 };
|
|
|
|
QFileDialog* saveChordStyleDialog { 0 };
|
2014-11-13 13:04:04 +01:00
|
|
|
// QFileDialog* loadSoundFontDialog { 0 };
|
2014-11-12 18:57:15 +01:00
|
|
|
QFileDialog* loadSfzFileDialog { 0 };
|
|
|
|
QFileDialog* loadBackgroundDialog { 0 };
|
|
|
|
QFileDialog* loadScanDialog { 0 };
|
|
|
|
QFileDialog* loadAudioDialog { 0 };
|
|
|
|
QFileDialog* loadDrumsetDialog { 0 };
|
|
|
|
QFileDialog* loadPluginDialog { 0 };
|
|
|
|
QFileDialog* loadPaletteDialog { 0 };
|
|
|
|
QFileDialog* savePaletteDialog { 0 };
|
|
|
|
QFileDialog* saveDrumsetDialog { 0 };
|
|
|
|
QFileDialog* savePluginDialog { 0 };
|
|
|
|
|
|
|
|
QDialog* editRasterDialog { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
QAction* hRasterAction;
|
|
|
|
QAction* vRasterAction;
|
|
|
|
|
2013-02-06 16:43:25 +01:00
|
|
|
QMenu* menuWorkspaces;
|
2014-11-12 18:57:15 +01:00
|
|
|
QActionGroup* workspaces { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2014-11-12 18:57:15 +01:00
|
|
|
bool inChordEditor { false };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
QComboBox* layerSwitch;
|
|
|
|
QComboBox* playMode;
|
2014-11-12 18:57:15 +01:00
|
|
|
QNetworkAccessManager* networkManager { 0 };
|
|
|
|
QAction* lastCmd { 0 };
|
2014-11-14 11:44:48 +01:00
|
|
|
const Shortcut* lastShortcut { 0 };
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2013-10-15 09:36:17 +02:00
|
|
|
QAction* countInAction;
|
2012-05-26 14:49:10 +02:00
|
|
|
QAction* metronomeAction;
|
2013-07-31 19:47:33 +02:00
|
|
|
QAction* loopAction;
|
2013-08-19 08:53:30 +02:00
|
|
|
QAction* loopInAction;
|
|
|
|
QAction* loopOutAction;
|
2012-05-26 14:49:10 +02:00
|
|
|
QAction* panAction;
|
|
|
|
|
|
|
|
QLabel* cornerLabel;
|
2014-11-13 10:22:05 +01:00
|
|
|
QStringList _recentScores;
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
//---------------------
|
|
|
|
|
|
|
|
virtual void closeEvent(QCloseEvent*);
|
|
|
|
|
|
|
|
virtual void dragEnterEvent(QDragEnterEvent*);
|
|
|
|
virtual void dropEvent(QDropEvent*);
|
|
|
|
|
|
|
|
void playVisible(bool flag);
|
|
|
|
void launchBrowser(const QString whereTo);
|
|
|
|
|
|
|
|
void loadScoreList();
|
|
|
|
void editInstrList();
|
|
|
|
void symbolMenu();
|
|
|
|
void showKeyEditor();
|
2013-07-19 11:23:44 +02:00
|
|
|
bool saveFile();
|
2013-07-20 09:21:42 +02:00
|
|
|
bool saveFile(Score* score);
|
2012-05-26 14:49:10 +02:00
|
|
|
void fingeringMenu();
|
2014-09-06 10:23:37 +02:00
|
|
|
|
2012-05-26 14:49:10 +02:00
|
|
|
int pluginIdxFromPath(QString pluginPath);
|
|
|
|
void startDebugger();
|
|
|
|
void midiinToggled(bool);
|
|
|
|
void undo();
|
|
|
|
void redo();
|
|
|
|
void showPalette(bool);
|
|
|
|
void showInspector(bool);
|
|
|
|
void showOmrPanel(bool);
|
|
|
|
void showPlayPanel(bool);
|
|
|
|
void showNavigator(bool);
|
|
|
|
void showMixer(bool);
|
2013-04-24 12:41:38 +02:00
|
|
|
void showSynthControl(bool);
|
2014-06-02 12:12:53 +02:00
|
|
|
void showSelectionWindow(bool);
|
2013-04-23 16:20:02 +02:00
|
|
|
void showSearchDialog();
|
2012-07-12 18:46:15 +02:00
|
|
|
void helpBrowser(const QUrl&) const;
|
2012-05-26 14:49:10 +02:00
|
|
|
void splitWindow(bool horizontal);
|
|
|
|
void removeSessionFile();
|
|
|
|
void editChordStyle();
|
|
|
|
void startExcerptsDialog();
|
|
|
|
void initOsc();
|
|
|
|
void editRaster();
|
|
|
|
void showPianoKeyboard(bool);
|
|
|
|
void showMediaDialog();
|
|
|
|
void showAlbumManager();
|
|
|
|
void showLayerManager();
|
|
|
|
void updateUndoRedo();
|
|
|
|
void changeScore(int);
|
|
|
|
virtual void resizeEvent(QResizeEvent*);
|
2012-07-12 15:35:35 +02:00
|
|
|
void updateInspector();
|
2013-02-21 11:04:41 +01:00
|
|
|
void showModeText(const QString&);
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
private slots:
|
2012-06-08 19:06:52 +02:00
|
|
|
void cmd(QAction* a, const QString& cmd);
|
2012-05-26 14:49:10 +02:00
|
|
|
void autoSaveTimerTimeout();
|
2012-07-12 18:46:15 +02:00
|
|
|
void helpBrowser1() const;
|
2012-05-26 14:49:10 +02:00
|
|
|
void about();
|
|
|
|
void aboutQt();
|
|
|
|
void aboutMusicXML();
|
2012-05-30 00:54:53 +02:00
|
|
|
void reportBug();
|
2012-05-26 14:49:10 +02:00
|
|
|
void openRecentMenu();
|
|
|
|
void selectScore(QAction*);
|
|
|
|
void startPreferenceDialog();
|
|
|
|
void preferencesChanged();
|
|
|
|
void seqStarted();
|
|
|
|
void seqStopped();
|
|
|
|
void cmdAppendMeasures();
|
|
|
|
void cmdInsertMeasures();
|
2014-07-17 16:52:27 +02:00
|
|
|
void magChanged(int);
|
2012-05-26 14:49:10 +02:00
|
|
|
void showPageSettings();
|
|
|
|
void removeTab(int);
|
|
|
|
void removeTab();
|
|
|
|
void clipboardChanged();
|
|
|
|
void endSearch();
|
|
|
|
void saveScoreDialogFilterSelected(const QString&);
|
|
|
|
#ifdef OSC
|
|
|
|
void oscIntMessage(int);
|
|
|
|
void oscVolume(int val);
|
|
|
|
void oscTempo(int val);
|
|
|
|
void oscGoto(int m);
|
|
|
|
void oscSelectMeasure(int m);
|
|
|
|
void oscVolChannel(double val);
|
|
|
|
void oscPanChannel(double val);
|
|
|
|
void oscMuteChannel(double val);
|
|
|
|
void oscOpen(QString path);
|
|
|
|
void oscCloseAll();
|
|
|
|
void oscTriggerPlugin(QString list);
|
|
|
|
void oscColorNote(QVariantList list);
|
2014-03-26 23:28:26 +01:00
|
|
|
void oscAction();
|
2012-05-26 14:49:10 +02:00
|
|
|
#endif
|
2013-02-06 16:43:25 +01:00
|
|
|
void deleteWorkspace();
|
2013-02-08 11:36:50 +01:00
|
|
|
void undoWorkspace();
|
2013-02-06 16:43:25 +01:00
|
|
|
void showWorkspaceMenu();
|
2012-05-26 14:49:10 +02:00
|
|
|
void switchLayer(const QString&);
|
|
|
|
void switchPlayMode(int);
|
|
|
|
void networkFinished(QNetworkReply*);
|
|
|
|
void switchLayoutMode(int);
|
2013-09-25 21:53:52 +02:00
|
|
|
void showMidiImportPanel();
|
2014-10-14 15:25:55 +02:00
|
|
|
void changeWorkspace(QAction*);
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
public slots:
|
2012-12-10 09:15:50 +01:00
|
|
|
virtual void cmd(QAction* a);
|
2012-05-26 14:49:10 +02:00
|
|
|
void dirtyChanged(Score*);
|
|
|
|
void setPos(int tick);
|
|
|
|
void searchTextChanged(const QString& s);
|
|
|
|
void pluginTriggered(int);
|
|
|
|
void handleMessage(const QString& message);
|
|
|
|
void setCurrentScoreView(ScoreView*);
|
|
|
|
void setCurrentScoreView(int);
|
|
|
|
void setNormalState() { changeState(STATE_NORMAL); }
|
|
|
|
void setPlayState() { changeState(STATE_PLAY); }
|
|
|
|
void checkForUpdate();
|
|
|
|
QMenu* fileMenu() const { return _fileMenu; }
|
|
|
|
void midiNoteReceived(int channel, int pitch, int velo);
|
|
|
|
void midiNoteReceived(int pitch, bool ctrl);
|
|
|
|
void instrumentChanged();
|
2013-02-07 17:34:44 +01:00
|
|
|
void showMasterPalette(const QString& = 0);
|
2014-05-26 20:21:45 +02:00
|
|
|
void selectionChanged(SelState);
|
2014-10-14 15:25:55 +02:00
|
|
|
void createNewWorkspace();
|
|
|
|
void changeWorkspace(Workspace* p);
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
MuseScore();
|
2014-11-14 11:44:48 +01:00
|
|
|
~MuseScore() {}
|
2012-05-26 14:49:10 +02:00
|
|
|
bool checkDirty(Score*);
|
|
|
|
PlayPanel* getPlayPanel() const { return playPanel; }
|
|
|
|
QMenu* genCreateMenu(QWidget* parent = 0);
|
2012-12-10 09:15:50 +01:00
|
|
|
virtual int appendScore(Score*);
|
2012-05-26 14:49:10 +02:00
|
|
|
void midiCtrlReceived(int controller, int value);
|
|
|
|
void showElementContext(Element* el);
|
2012-06-08 19:06:52 +02:00
|
|
|
void cmdAppendMeasures(int);
|
2012-05-26 14:49:10 +02:00
|
|
|
bool midiinEnabled() const;
|
|
|
|
bool playEnabled() const;
|
|
|
|
|
|
|
|
void incMag();
|
|
|
|
void decMag();
|
|
|
|
void readSettings();
|
|
|
|
void writeSettings();
|
|
|
|
void play(Element* e) const;
|
|
|
|
void play(Element* e, int pitch) const;
|
|
|
|
bool loadPlugin(const QString& filename);
|
|
|
|
QString createDefaultName() const;
|
|
|
|
void startAutoSave();
|
|
|
|
double getMag(ScoreView*) const;
|
|
|
|
void setMag(double);
|
|
|
|
bool noScore() const { return scoreList.isEmpty(); }
|
|
|
|
|
|
|
|
TextTools* textTools();
|
|
|
|
void showDrumTools(Drumset*, Staff*);
|
2012-06-23 20:00:05 +02:00
|
|
|
void updateDrumTools();
|
2012-05-26 14:49:10 +02:00
|
|
|
void showWebPanel(bool on);
|
2012-07-02 18:05:10 +02:00
|
|
|
void showPluginCreator(QAction*);
|
2014-09-01 22:35:04 +02:00
|
|
|
void showPluginManager();
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
void updateTabNames();
|
|
|
|
QProgressBar* showProgressBar();
|
|
|
|
void hideProgressBar();
|
|
|
|
void updateRecentScores(Score*);
|
|
|
|
QFileDialog* saveAsDialog();
|
|
|
|
QFileDialog* saveCopyDialog();
|
|
|
|
|
|
|
|
QString lastSaveCopyDirectory;
|
|
|
|
QString lastSaveDirectory;
|
|
|
|
SynthControl* getSynthControl() const { return synthControl; }
|
|
|
|
void editInPianoroll(Staff* staff);
|
|
|
|
void editInDrumroll(Staff* staff);
|
|
|
|
PianorollEditor* getPianorollEditor() const { return pianorollEditor; }
|
|
|
|
DrumrollEditor* getDrumrollEditor() const { return drumrollEditor; }
|
|
|
|
void writeSessionFile(bool);
|
|
|
|
bool restoreSession(bool);
|
|
|
|
bool splitScreen() const { return _splitScreen; }
|
2012-12-10 09:15:50 +01:00
|
|
|
virtual void setCurrentView(int tabIdx, int idx);
|
2012-05-26 14:49:10 +02:00
|
|
|
void loadPlugins();
|
|
|
|
void unloadPlugins();
|
2013-02-15 22:39:56 +01:00
|
|
|
|
2012-05-26 14:49:10 +02:00
|
|
|
ScoreState state() const { return _sstate; }
|
|
|
|
void changeState(ScoreState);
|
2013-02-15 22:39:56 +01:00
|
|
|
void updateInputState(Score*);
|
|
|
|
|
2012-05-26 14:49:10 +02:00
|
|
|
bool readLanguages(const QString& path);
|
2013-02-15 22:39:56 +01:00
|
|
|
void setRevision(QString& r) {rev = r;}
|
2013-02-21 23:07:43 +01:00
|
|
|
Q_INVOKABLE QString revision() {return rev;}
|
|
|
|
Q_INVOKABLE QString version() {return VERSION;}
|
2012-05-26 14:49:10 +02:00
|
|
|
Q_INVOKABLE void newFile();
|
|
|
|
Q_INVOKABLE void loadFile(const QString& url);
|
|
|
|
void loadFile(const QUrl&);
|
2012-12-10 09:15:50 +01:00
|
|
|
virtual Score* openScore(const QString& fn);
|
2012-05-26 14:49:10 +02:00
|
|
|
bool hasToCheckForUpdate();
|
|
|
|
static bool unstable();
|
|
|
|
bool eventFilter(QObject *, QEvent *);
|
|
|
|
void setMidiRecordId(int id) { _midiRecordId = id; }
|
|
|
|
int midiRecordId() const { return _midiRecordId; }
|
2013-11-21 16:40:30 +01:00
|
|
|
void setAdvancedPalette();
|
|
|
|
void setBasicPalette();
|
2012-05-26 14:49:10 +02:00
|
|
|
void excerptsChanged(Score*);
|
|
|
|
bool processMidiRemote(MidiRemoteType type, int data);
|
|
|
|
ScoreTab* getTab1() const { return tab1; }
|
|
|
|
ScoreTab* getTab2() const { return tab2; }
|
|
|
|
QList<LanguageItem>& languages() { return _languages; }
|
|
|
|
|
2014-11-12 15:01:08 +01:00
|
|
|
QStringList getOpenScoreNames(const QString& filter, const QString& title);
|
2013-05-13 10:27:06 +02:00
|
|
|
QString getSaveScoreName(const QString& title, QString& name, const QString& filter, bool folder = false);
|
2012-05-26 14:49:10 +02:00
|
|
|
QString getStyleFilename(bool open, const QString& title = QString());
|
2013-03-04 18:15:36 +01:00
|
|
|
QString getFotoFilename(QString& filter, QString *selectedFilter);
|
2012-05-26 14:49:10 +02:00
|
|
|
QString getChordStyleFilename(bool open);
|
|
|
|
QString getScanFile(const QString&);
|
|
|
|
QString getAudioFile(const QString&);
|
|
|
|
QString getDrumsetFilename(bool open);
|
2012-07-02 18:05:10 +02:00
|
|
|
QString getPluginFilename(bool open);
|
2012-05-26 14:49:10 +02:00
|
|
|
QString getPaletteFilename(bool open);
|
|
|
|
QString getWallpaper(const QString& caption);
|
|
|
|
|
|
|
|
bool hRaster() const { return hRasterAction->isChecked(); }
|
|
|
|
bool vRaster() const { return vRasterAction->isChecked(); }
|
|
|
|
|
|
|
|
PaletteBox* getPaletteBox();
|
|
|
|
void disableCommands(bool val) { inChordEditor = val; }
|
|
|
|
|
2013-05-21 22:29:48 +02:00
|
|
|
Tuplet* tupletDialog();
|
2012-05-26 14:49:10 +02:00
|
|
|
void selectSimilar(Element*, bool);
|
2014-07-14 13:24:47 +02:00
|
|
|
void selectSimilarInRange(Element* e);
|
2012-05-26 14:49:10 +02:00
|
|
|
void selectElementDialog(Element* e);
|
|
|
|
void transpose();
|
|
|
|
|
|
|
|
Q_INVOKABLE void openExternalLink(const QString&);
|
|
|
|
Q_INVOKABLE void closeWebPanelPermanently();
|
|
|
|
|
|
|
|
void endCmd();
|
|
|
|
void printFile();
|
|
|
|
bool exportFile();
|
|
|
|
bool exportParts();
|
|
|
|
bool saveAs(Score*, bool saveCopy, const QString& path, const QString& ext);
|
2013-07-17 11:47:52 +02:00
|
|
|
bool savePdf(const QString& saveName);
|
|
|
|
bool savePdf(Score* cs, const QString& saveName);
|
2014-09-13 13:29:26 +02:00
|
|
|
bool savePdf(QList<Score*> cs, const QString& saveName);
|
2014-10-14 14:37:38 +02:00
|
|
|
|
2012-09-29 16:46:45 +02:00
|
|
|
|
|
|
|
Score* readScore(const QString& name);
|
|
|
|
|
2012-05-26 14:49:10 +02:00
|
|
|
bool saveAs(Score*, bool saveCopy = false);
|
|
|
|
bool saveSelection(Score*);
|
|
|
|
void addImage(Score*, Element*);
|
2012-09-29 16:46:45 +02:00
|
|
|
|
2012-05-26 14:49:10 +02:00
|
|
|
bool savePng(Score*, const QString& name, bool screenshot, bool transparent, double convDpi, QImage::Format format);
|
2014-11-14 11:44:48 +01:00
|
|
|
bool saveAudio(Score*, const QString& name);
|
2012-05-26 14:49:10 +02:00
|
|
|
bool saveMp3(Score*, const QString& name);
|
|
|
|
bool saveSvg(Score*, const QString& name);
|
|
|
|
bool savePng(Score*, const QString& name);
|
2013-06-12 14:23:57 +02:00
|
|
|
// bool saveLilypond(Score*, const QString& name);
|
2012-06-11 17:48:20 +02:00
|
|
|
bool saveMidi(Score* score, const QString& name);
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
void closeScore(Score* score);
|
|
|
|
|
|
|
|
void addTempo();
|
|
|
|
void addMetronome();
|
|
|
|
|
2012-07-12 18:46:15 +02:00
|
|
|
Q_INVOKABLE QString getLocaleISOCode() const;
|
2012-05-26 14:49:10 +02:00
|
|
|
Navigator* navigator() const;
|
|
|
|
NScrollArea* navigatorScrollArea() const { return _navigator; }
|
2014-08-30 09:04:40 +02:00
|
|
|
QWidget* searchDialog() const;
|
2012-05-26 14:49:10 +02:00
|
|
|
void updateLayer();
|
|
|
|
void updatePlayMode();
|
2014-05-30 13:35:44 +02:00
|
|
|
bool loop() const { return loopAction->isChecked(); }
|
2012-05-26 14:49:10 +02:00
|
|
|
bool metronome() const { return metronomeAction->isChecked(); }
|
2013-10-15 09:36:17 +02:00
|
|
|
bool countIn() const { return countInAction->isChecked(); }
|
2012-05-26 14:49:10 +02:00
|
|
|
bool panDuringPlayback() const { return panAction->isChecked(); }
|
|
|
|
void noteTooShortForTupletDialog();
|
|
|
|
void loadFiles();
|
2013-07-23 13:05:19 +02:00
|
|
|
// midi panel functions
|
2013-07-22 01:33:56 +02:00
|
|
|
void midiPanelOnSwitchToFile(const QString &file);
|
|
|
|
void midiPanelOnCloseFile(const QString &file);
|
|
|
|
void allowShowMidiPanel(const QString &file);
|
2014-07-29 21:58:36 +02:00
|
|
|
void setMidiReopenInProgress(const QString &file);
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2013-09-25 14:36:11 +02:00
|
|
|
static Palette* newTempoPalette();
|
2012-05-26 14:49:10 +02:00
|
|
|
static Palette* newTextPalette();
|
2012-09-06 12:35:34 +02:00
|
|
|
static Palette* newTimePalette();
|
2012-05-26 14:49:10 +02:00
|
|
|
static Palette* newRepeatsPalette();
|
|
|
|
static Palette* newBreaksPalette();
|
|
|
|
static Palette* newBeamPalette();
|
2014-07-26 10:26:57 +02:00
|
|
|
static Palette* newDynamicsPalette(bool master = false);
|
2012-05-26 14:49:10 +02:00
|
|
|
static Palette* newFramePalette();
|
|
|
|
static Palette* newFingeringPalette();
|
|
|
|
static Palette* newTremoloPalette();
|
|
|
|
static Palette* newNoteHeadsPalette();
|
2014-10-14 14:37:38 +02:00
|
|
|
static Palette* newArticulationsPalette(bool basic);
|
2012-05-26 14:49:10 +02:00
|
|
|
static Palette* newBracketsPalette();
|
|
|
|
static Palette* newBreathPalette();
|
|
|
|
static Palette* newArpeggioPalette();
|
2014-10-14 14:37:38 +02:00
|
|
|
static Palette* newClefsPalette(bool basic);
|
2012-05-26 14:49:10 +02:00
|
|
|
static Palette* newGraceNotePalette();
|
2013-08-01 22:24:36 +02:00
|
|
|
static Palette* newBagpipeEmbellishmentPalette();
|
2012-05-26 14:49:10 +02:00
|
|
|
static Palette* newKeySigPalette();
|
2013-11-21 16:40:30 +01:00
|
|
|
static Palette* newAccidentalsPalette(bool basic = false);
|
2012-05-26 14:49:10 +02:00
|
|
|
static Palette* newBarLinePalette();
|
|
|
|
static Palette* newLinesPalette();
|
2012-06-04 12:57:26 +02:00
|
|
|
|
2014-08-29 19:18:39 +02:00
|
|
|
Inspector* inspector() { return _inspector; }
|
|
|
|
PluginCreator* pluginCreator() { return _pluginCreator; }
|
2012-12-10 09:15:50 +01:00
|
|
|
ScoreView* currentScoreView() const { return cv; }
|
2013-05-24 18:40:15 +02:00
|
|
|
void showMessage(const QString& s, int timeout);
|
2013-10-16 18:09:26 +02:00
|
|
|
void helpBrowser(const QString = QString()) const;
|
2014-09-06 10:23:37 +02:00
|
|
|
|
2014-07-17 22:48:38 +02:00
|
|
|
void registerPlugin(PluginDescription*);
|
|
|
|
void unregisterPlugin(PluginDescription*);
|
2014-11-10 10:05:25 +01:00
|
|
|
|
|
|
|
void showStartcenter(bool);
|
2014-11-13 10:22:05 +01:00
|
|
|
QFileInfoList recentScores() const;
|
2014-11-13 13:04:04 +01:00
|
|
|
void saveDialogState(const char* name, QFileDialog* d);
|
|
|
|
void restoreDialogState(const char* name, QFileDialog* d);
|
2013-05-24 18:40:15 +02:00
|
|
|
};
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
extern MuseScore* mscore;
|
2012-12-10 09:15:50 +01:00
|
|
|
extern MuseScoreCore* mscoreCore;
|
2014-11-12 15:01:08 +01:00
|
|
|
extern QStringList recentScores;
|
2012-05-26 14:49:10 +02:00
|
|
|
extern QString dataPath;
|
2013-03-28 11:09:31 +01:00
|
|
|
extern MasterSynthesizer* synti;
|
2013-04-02 20:46:07 +02:00
|
|
|
MasterSynthesizer* synthesizerFactory();
|
2013-04-15 19:56:59 +02:00
|
|
|
Driver* driverFactory(Seq*, QString driver);
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2014-09-06 10:23:37 +02:00
|
|
|
extern QAction* getAction(const QString&);
|
2012-05-26 14:49:10 +02:00
|
|
|
extern Shortcut* midiActionMap[128];
|
2014-08-07 10:28:13 +02:00
|
|
|
extern void loadTranslation(QString fileName, QString localeName);
|
2012-05-26 14:49:10 +02:00
|
|
|
extern void setMscoreLocale(QString localeName);
|
|
|
|
extern QPixmap sym2pixmap(const Sym* s, qreal mag);
|
|
|
|
|
2012-09-27 21:34:36 +02:00
|
|
|
extern bool saveMxl(Score*, const QString& name);
|
|
|
|
extern bool saveXml(Score*, const QString& name);
|
2013-05-13 18:49:17 +02:00
|
|
|
|
2014-04-25 18:43:25 +02:00
|
|
|
struct PluginDescription;
|
|
|
|
extern void collectPluginMetaInformation(PluginDescription*);
|
2013-05-13 18:49:17 +02:00
|
|
|
} // namespace Ms
|
2012-05-26 14:49:10 +02:00
|
|
|
#endif
|
|
|
|
|