MuseScore  3.4
Music composition and notation
palettedialog.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2019 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 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __PALETTEDIALOGS_H__
21 #define __PALETTEDIALOGS_H__
22 
23 namespace Ui {
24  class PaletteProperties;
25  }
26 
27 namespace Ms {
28 
29 class PalettePanel;
30 
31 //---------------------------------------------------------
32 // PalettePropertiesDialog
33 //---------------------------------------------------------
34 
35 class PalettePropertiesDialog : public QDialog {
36  Q_OBJECT
37 
38  Ui::PaletteProperties* ui;
40 
41  void fillControlsWithData();
42 
43  virtual void hideEvent(QHideEvent*);
44  virtual void reject();
45 
46  void setInitialProperties();
47  void applyInitialPropertiesToThePalette();
48  bool areInitialPropertiesChanged() const;
49 
50  bool isGridCheckBoxChanged = false;
51  bool isNameChanged = false;
52  bool isHeightChanged = false;
53  bool isWidthChanged = false;
54  bool isScaleChanged = false;
55  bool isOffsetChanged = false;
56 
57  int gridCheckboxInitialState = 0;
58  QString initialName;
60  int initialWidth = 0;
61  int initialHeight = 0;
62  double initialOffset = 0.f;
63  double initialScale = 0.f;
64 
65  public:
66  PalettePropertiesDialog(PalettePanel*, QWidget* parent = nullptr);
68 
69  /*
70  / checkBoxChanged(int state)
71  / The @state values are Qt::Unchecked and Qt::Checked
72  */
73  void gridCheckBoxChanged(int state);
74 
75  void nameChanged(const QString &text);
76  void heightChanged(int height);
77  void widthChanged(int width);
78  void offsetChanged(double offset);
79  void scaleChanged(double scale);
80 
81  signals:
82  void changed();
83 
84  };
85 
86 } // namespace Ms
87 
88 #endif
Definition: crashreporter.h:27
Definition: palettetree.h:95
PalettePanel * palette
Definition: palettedialog.h:39
Definition: palettedialog.h:35
QString initialName
Definition: palettedialog.h:58
Definition: aeolus.cpp:26
QString initialTranslatedName
Definition: palettedialog.h:59
Ui::PaletteProperties * ui
Definition: palettedialog.h:38