MuseScore  3.4
Music composition and notation
pluginManager.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2011 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 #ifndef __PLUGIN_MANAGER_H__
14 #define __PLUGIN_MANAGER_H__
15 
16 #include "ui_pluginManager.h"
17 #include "shortcut.h"
18 
19 namespace Ms {
20 
21 
22 //---------------------------------------------------------
23 // PluginDescription
24 //---------------------------------------------------------
25 
27  QString path;
28  QString version;
29  QString description;
30  bool load;
32  QString menuPath;
33  };
34 
35 //---------------------------------------------------------
36 // PluginManager
37 //---------------------------------------------------------
38 
39 class PluginManager : public QDialog, public Ui::PluginManager {
40  Q_OBJECT
41 
42  QMap<QString, Shortcut*> localShortcuts;
44  QList<PluginDescription> _pluginList;
45 
46  void readSettings();
47  void loadList(bool forceRefresh);
48 
49  virtual void closeEvent(QCloseEvent*);
50  virtual void accept();
51 
52  private slots:
53  void definePluginShortcutClicked();
54  void clearPluginShortcutClicked();
55  void pluginListWidgetItemChanged(QListWidgetItem*, QListWidgetItem*);
56  void pluginLoadToggled(QListWidgetItem*);
57  void reloadPluginsClicked();
58 
59  signals:
60  void closed(bool);
61 
62  public:
63  PluginManager(QWidget* parent = 0);
64  void writeSettings();
65  void init();
66 
67  bool readPluginList();
68  void writePluginList();
69  void updatePluginList(bool forceRefresh=false);
70 
71  int pluginCount() {return _pluginList.size();}
72  PluginDescription* getPluginDescription(int idx) {return &_pluginList[idx];}
73  };
74 
76 
77 } // namespace Ms
78 #endif
79 
QMap< QString, Shortcut * > localShortcuts
Definition: pluginManager.h:42
bool collectPluginMetaInformation(PluginDescription *d)
returns false if loading a plugin for the given description has failed
Definition: mscorePlugins.cpp:460
Definition: pluginManager.h:39
int pluginCount()
Definition: pluginManager.h:71
bool shortcutsChanged
Definition: pluginManager.h:43
QString path
Definition: pluginManager.h:27
Shortcut shortcut
Definition: pluginManager.h:31
QString menuPath
Definition: pluginManager.h:32
QString description
Definition: pluginManager.h:29
bool load
Definition: pluginManager.h:30
Definition: pluginManager.h:26
PluginDescription * getPluginDescription(int idx)
Definition: pluginManager.h:72
QList< PluginDescription > _pluginList
Definition: pluginManager.h:44
Definition: aeolus.cpp:26
QString version
Definition: pluginManager.h:28
Definition: shortcut.h:98