MuseScore/mscore/musescore.h

717 lines
23 KiB
C
Raw Normal View History

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"
#include "loginmanager.h"
#include "uploadscoredialog.h"
#include "libmscore/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;
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;
class PluginManager;
class MasterSynthesizer;
class Driver;
class Seq;
2013-04-28 21:29:12 +02:00
class ImportMidiPanel;
2014-11-10 10:05:25 +01:00
class Startcenter;
2015-02-06 16:36:43 +01:00
class HelpBrowser;
2012-07-02 18:05:10 +02:00
2012-06-06 14:16:06 +02:00
struct PluginDescription;
enum class SelState : char;
enum class IconType : signed char;
enum class MagIdx : char;
2012-05-26 14:49:10 +02:00
extern QString mscoreGlobalShare;
static const int PROJECT_LIST_LEN = 6;
extern const char* voiceActions[];
2012-05-26 14:49:10 +02:00
//---------------------------------------------------------
// IconActions
//---------------------------------------------------------
struct IconAction {
IconType subtype;
2014-11-14 18:08:02 +01:00
const char* 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
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) {
};
2015-02-19 19:55:17 +01:00
virtual bool event(QEvent *ev) override;
2012-05-26 14:49:10 +02:00
};
//---------------------------------------------------------
// 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;
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;
ImportMidiPanel* importmidiPanel { 0 };
QFrame* importmidiShowPanel;
2012-05-26 14:49:10 +02:00
QSplitter* mainWindow;
QMenu* menuView;
2012-05-26 14:49:10 +02:00
QMenu* openRecent;
MagBox* mag;
QComboBox* viewModeCombo;
QAction* playId;
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 };
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 };
SelectionWindow* selectionWindow { 0 };
2012-05-26 14:49:10 +02:00
QMenu* _fileMenu;
QMenu* menuEdit;
QMenu* menuNotes;
QMenu* menuLayout;
QMenu* menuStyle;
AlbumManager* albumManager { 0 };
2012-05-26 14:49:10 +02:00
QWidget* _searchDialog { 0 };
2012-05-26 14:49:10 +02:00
QComboBox* searchCombo;
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
QWidget* symbolDialog { 0 };
2012-05-26 14:49:10 +02: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 };
2015-02-06 16:36:43 +01:00
HelpBrowser* helpBrowser { 0 };
QDockWidget* manualDock { 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*);
void removeMenuEntry(PluginDescription*);
2012-05-26 14:49:10 +02:00
QTimer* autoSaveTimer;
QList<QAction*> qmlPluginActions;
2012-05-26 14:49:10 +02:00
QList<QAction*> pluginActions;
QSignalMapper* pluginMapper { 0 };
2012-05-26 14:49:10 +02:00
PianorollEditor* pianorollEditor { 0 };
DrumrollEditor* drumrollEditor { 0 };
bool _splitScreen { false };
bool _horizontalSplit { true };
2012-05-26 14:49:10 +02:00
QString rev;
int _midiRecordId { -1 };
2012-05-26 14:49:10 +02:00
bool _fullscreen { false };
2012-05-26 14:49:10 +02:00
QList<LanguageItem> _languages;
Startcenter* startcenter { 0 };
QWidget* loginDialog { 0 };
UploadScoreDialog* uploadScoreDialog { 0 };
LoginManager* _loginManager { 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 };
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;
QActionGroup* workspaces { 0 };
2012-05-26 14:49:10 +02:00
bool inChordEditor { false };
2012-05-26 14:49:10 +02:00
QComboBox* layerSwitch;
QComboBox* playMode;
QNetworkAccessManager* networkManager { 0 };
QAction* lastCmd { 0 };
const Shortcut* lastShortcut { 0 };
QHelpEngine* _helpEngine { 0 };
2015-02-19 19:55:17 +01:00
int globalX, globalY; // current mouse position
2012-05-26 14:49:10 +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;
QStringList _recentScores;
QToolButton* _playButton;
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 undoRedo(bool undo);
2012-05-26 14:49:10 +02:00
void showPalette(bool);
void showInspector(bool);
void showOmrPanel(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);
void showSearchDialog();
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*);
void showModeText(const QString&);
void addRecentScore(const QString& scorePath);
2012-05-26 14:49:10 +02:00
void updateNewWizard();
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();
void helpBrowser1() const;
2012-05-26 14:49:10 +02:00
void about();
void aboutQt();
void aboutMusicXML();
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);
2015-02-02 01:25:35 +01:00
void magTextChanged();
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);
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 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);
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();
~MuseScore();
2012-05-26 14:49:10 +02:00
bool checkDirty(Score*);
PlayPanel* getPlayPanel() const { return playPanel; }
Mixer* getMixer() const { return mixer; }
2012-05-26 14:49:10 +02:00
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;
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(const Drumset*, Staff*);
2015-03-17 11:50:59 +01:00
void updateDrumTools(const Drumset* ds);
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 addRecentScore(Score*);
2012-05-26 14:49:10 +02:00
QFileDialog* saveAsDialog();
QFileDialog* saveCopyDialog();
QString lastSaveCopyDirectory;
QString lastSaveDirectory;
SynthControl* getSynthControl() const { return synthControl; }
2012-05-26 14:49:10 +02:00
void editInPianoroll(Staff* staff);
void editInDrumroll(Staff* staff);
PianorollEditor* getPianorollEditor() const { return pianorollEditor; }
DrumrollEditor* getDrumrollEditor() const { return drumrollEditor; }
PianoTools* pianoTools() const { return _pianoTools; }
2012-05-26 14:49:10 +02:00
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; }
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; }
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());
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; }
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&);
virtual void endCmd() override;
2012-05-26 14:49:10 +02:00
void printFile();
void exportFile();
2012-05-26 14:49:10 +02:00
bool exportParts();
bool saveAs(Score*, bool saveCopy, const QString& path, const QString& ext);
bool savePdf(const QString& saveName);
bool savePdf(Score* cs, const QString& saveName);
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
bool savePng(Score*, const QString& name, bool screenshot, bool transparent, double convDpi, int trimMargin, 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);
bool saveMidi(Score* score, const QString& name);
2012-05-26 14:49:10 +02:00
void closeScore(Score* score);
void addTempo();
void addMetronome();
Q_INVOKABLE QString getLocaleISOCode() const;
2012-05-26 14:49:10 +02:00
Navigator* navigator() const;
NScrollArea* navigatorScrollArea() const { return _navigator; }
QWidget* searchDialog() const;
2015-02-03 01:55:16 +01:00
SelectionWindow* getSelectionWindow() const { return selectionWindow; }
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(); }
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
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();
static Palette* newTimePalette();
2012-05-26 14:49:10 +02:00
static Palette* newRepeatsPalette();
static Palette* newBreaksPalette();
2014-11-19 19:16:18 +01:00
static Palette* newBeamPalette(bool basic);
static Palette* newDynamicsPalette(bool basic, 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);
2014-11-19 19:16:18 +01:00
static Palette* newGraceNotePalette(bool basic);
2013-08-01 22:24:36 +02:00
static Palette* newBagpipeEmbellishmentPalette();
static Palette* newKeySigPalette(bool basic = false);
static Palette* newAccidentalsPalette(bool basic = false);
2014-11-19 19:16:18 +01:00
static Palette* newBarLinePalette(bool basic);
static Palette* newLinesPalette(bool basic);
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; }
QToolButton* playButton() { return _playButton; }
2013-05-24 18:40:15 +02:00
void showMessage(const QString& s, int timeout);
2015-02-06 16:36:43 +01:00
void showHelp(QString);
2015-02-19 19:55:17 +01:00
void showContextHelp();
2015-02-06 16:36:43 +01:00
void showHelp(const QUrl&);
2014-09-06 10:23:37 +02:00
void registerPlugin(PluginDescription*);
void unregisterPlugin(PluginDescription*);
2014-11-10 10:05:25 +01:00
Q_INVOKABLE void showStartcenter(bool);
void showPlayPanel(bool);
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);
2014-11-14 13:17:56 +01:00
QPixmap extractThumbnail(const QString& name);
void showLoginDialog();
void showUploadScoreDialog();
LoginManager* loginManager() { return _loginManager; }
QHelpEngine* helpEngine() const { return _helpEngine; }
2015-01-05 10:50:47 +01:00
void updateInspector();
2013-05-24 18:40:15 +02:00
};
2012-05-26 14:49:10 +02:00
extern MuseScore* mscore;
extern QStringList recentScores;
2012-05-26 14:49:10 +02:00
extern QString dataPath;
extern MasterSynthesizer* synti;
MasterSynthesizer* synthesizerFactory();
Driver* driverFactory(Seq*, QString driver);
2012-05-26 14:49:10 +02:00
2014-11-14 18:08:02 +01:00
extern QAction* getAction(const char*);
2012-05-26 14:49:10 +02:00
extern Shortcut* midiActionMap[128];
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*);
2015-02-02 09:30:17 +01:00
extern QString getSharePath();
2013-05-13 18:49:17 +02:00
} // namespace Ms
2012-05-26 14:49:10 +02:00
#endif