MuseScore  3.4
Music composition and notation
masterpalette.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2002-2016 Werner Schweer
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 LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __MASTERPALETTE_H__
14 #define __MASTERPALETTE_H__
15 
16 #include "ui_masterpalette.h"
17 
18 namespace Ms {
19 
20 class Palette;
21 class TimeDialog;
22 class KeyEditor;
23 
24 //---------------------------------------------------------
25 // MasterPalette
26 //---------------------------------------------------------
27 
28 class MasterPalette : public QWidget, Ui::MasterPalette
29  {
30  Q_OBJECT
31 
34  QTreeWidgetItem* keyItem;
35  QTreeWidgetItem* timeItem;
36  QTreeWidgetItem* symbolItem;
37 
38  int idxAllSymbols = -1;
39 
40  virtual void closeEvent(QCloseEvent*);
41  Palette* createPalette(int w, int h, bool grid, double mag = 1.0);
42  void addPalette(Palette* sp);
43 
44  signals:
45  void closed(bool);
46 
47  private slots:
48  void currentChanged(QTreeWidgetItem*, QTreeWidgetItem*);
49  void clicked(QTreeWidgetItem*, int);
50 
51  protected:
52  virtual void changeEvent(QEvent *event);
53  void retranslate(bool firstTime = false);
54  virtual void keyPressEvent(QKeyEvent *ev);
55 
56  public:
57  MasterPalette(QWidget* parent = 0);
58  void selectItem(const QString& s);
59  QString selectedItem();
60  };
61 
62 } // namespace Ms
63 #endif
64 
MasterPalette(QWidget *parent=0)
Definition: masterpalette.cpp:147
QString selectedItem()
Definition: masterpalette.cpp:122
void clicked(QTreeWidgetItem *, int)
Definition: masterpalette.cpp:249
Palette * createPalette(int w, int h, bool grid, double mag=1.0)
Definition: masterpalette.cpp:78
virtual void keyPressEvent(QKeyEvent *ev)
Definition: masterpalette.cpp:95
QTreeWidgetItem * keyItem
Definition: masterpalette.h:34
Definition: masterpalette.h:28
Definition: keyedit.h:34
void selectItem(const QString &s)
Definition: masterpalette.cpp:108
int idxAllSymbols
Definition: masterpalette.h:38
KeyEditor * keyEditor
Definition: masterpalette.h:33
Definition: aeolus.cpp:26
void addPalette(Palette *sp)
Definition: masterpalette.cpp:131
virtual void changeEvent(QEvent *event)
Definition: masterpalette.cpp:278
TimeDialog * timeDialog
Definition: masterpalette.h:32
void closed(bool)
void retranslate(bool firstTime=false)
Definition: masterpalette.cpp:225
Definition: palette.h:72
void currentChanged(QTreeWidgetItem *, QTreeWidgetItem *)
Definition: masterpalette.cpp:238
QTreeWidgetItem * symbolItem
Definition: masterpalette.h:36
QTreeWidgetItem * timeItem
Definition: masterpalette.h:35
virtual void closeEvent(QCloseEvent *)
Definition: masterpalette.cpp:263
Definition: timedialog.h:31