1 //============================================================================= 2 // MuseScore 3 // Music Composition & Notation 4 // 5 // Copyright (C) 2017 Werner Schweer and others 6 // 7 // This program is free software; you can redistribute it and/or modify 8 // it under the terms of the GNU General Public License version 2 9 // as published by the Free Software Foundation and appearing in 10 // the file LICENSE.GPL 11 //============================================================================= 12 13 #include "fontStyleSelect.h" 14 #include "resetButton.h" 15 #include "inspectorplugin.h" 16 #include "icons.h" 17 18 #include <QtCore/QtPlugin> 19 20 namespace Ms { 21 QString iconPath = QString(":/data/icons/"); 22 QColor MScore::selectColor[VOICES]; 23 init()24 void MScore::init() 25 { 26 selectColor[0].setNamedColor("#0065BF"); //blue 27 selectColor[1].setNamedColor("#007F00"); //green 28 selectColor[2].setNamedColor("#C53F00"); //orange 29 selectColor[3].setNamedColor("#C31989"); //purple 30 } 31 Preferences preferences; 32 getInt(QString) const33 int Preferences::getInt(QString) const 34 { 35 return 20; 36 } isThemeDark() const37 bool Preferences::isThemeDark() const { return false; } 38 } 39 initialize(QDesignerFormEditorInterface *)40void InspectorPlugin::initialize(QDesignerFormEditorInterface *) 41 { 42 if (m_initialized) 43 return; 44 m_initialized = true; 45 Ms::MScore::init(); 46 Ms::genIcons(); 47 } 48 createWidget(QWidget * parent)49QWidget* FontStyleSelectPlugin::createWidget(QWidget* parent) 50 { 51 return new Ms::FontStyleSelect(parent); 52 } 53 createWidget(QWidget * parent)54QWidget* ResetButtonPlugin::createWidget(QWidget* parent) 55 { 56 return new Ms::ResetButton(parent); 57 } 58 59 //--------------------------------------------------------- 60 // customWidgets 61 //--------------------------------------------------------- 62 customWidgets() const63QList<QDesignerCustomWidgetInterface*> InspectorPlugins::customWidgets() const 64 { 65 QList<QDesignerCustomWidgetInterface*> plugins; 66 plugins 67 << new FontStyleSelectPlugin 68 << new ResetButtonPlugin 69 ; 70 return plugins; 71 } 72 InspectorPlugins()73InspectorPlugins::InspectorPlugins() 74 { 75 // Ms::MScore::init(); 76 // Ms::genIcons(); 77 } 78 79 80 // Q_EXPORT_PLUGIN(InspectorPlugins) 81 82