MuseScore  3.4
Music composition and notation
inspector.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2011-2016 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 __INSPECTOR_H__
14 #define __INSPECTOR_H__
15 
16 #include "inspectorBase.h"
17 #include "inspectorElementBase.h"
18 #include "inspectorTextBase.h"
19 #include "ui_inspector_break.h"
20 #include "ui_inspector_sectionbreak.h"
21 #include "ui_inspector_stafftypechange.h"
22 #include "ui_inspector_vbox.h"
23 #include "ui_inspector_tbox.h"
24 #include "ui_inspector_hbox.h"
25 #include "ui_inspector_articulation.h"
26 #include "ui_inspector_spacer.h"
27 #include "ui_inspector_segment.h"
28 #include "ui_inspector_note.h"
29 #include "ui_inspector_chord.h"
30 #include "ui_inspector_rest.h"
31 #include "ui_inspector_clef.h"
32 #include "ui_inspector_timesig.h"
33 #include "ui_inspector_keysig.h"
34 #include "ui_inspector_volta.h"
35 #include "ui_inspector_tuplet.h"
36 #include "ui_inspector_accidental.h"
37 #include "ui_inspector_tempotext.h"
38 #include "ui_inspector_lyric.h"
39 #include "ui_inspector_stafftext.h"
40 #include "ui_inspector_slur.h"
41 #include "ui_inspector_empty.h"
42 #include "ui_inspector_text.h"
43 // #include "ui_inspector_fret.h"
44 #include "ui_inspector_tremolo.h"
45 #include "ui_inspector_caesura.h"
46 #include "ui_inspector_bracket.h"
47 #include "ui_inspector_iname.h"
48 #include "ui_inspector_fermata.h"
49 #include "ui_inspector_stem.h"
50 
51 namespace Ms {
52 
53 class Score;
54 class Element;
55 class Note;
56 class Inspector;
57 class Segment;
58 class Chord;
59 class Clef;
60 
61 //---------------------------------------------------------
62 // InspectorElement
63 //---------------------------------------------------------
64 
66  Q_OBJECT
67 
68  public:
69  InspectorElement(QWidget* parent);
70  };
71 
72 //---------------------------------------------------------
73 // InspectorBreak
74 //---------------------------------------------------------
75 
76 class InspectorBreak : public InspectorBase {
77  Q_OBJECT
78  Ui::InspectorBreak b;
79 
80  public:
81  InspectorBreak(QWidget* parent);
82  };
83 
84 //---------------------------------------------------------
85 // InspectorSectionBreak
86 //---------------------------------------------------------
87 
89  Q_OBJECT
90  Ui::InspectorSectionBreak scb;
91 
92  public:
93  InspectorSectionBreak(QWidget* parent);
94  };
95 
96 //---------------------------------------------------------
97 // InspectorStaffTypeChange
98 //---------------------------------------------------------
99 
101  Q_OBJECT
102  Ui::InspectorStaffTypeChange sl;
103 
104  public:
105  InspectorStaffTypeChange(QWidget* parent);
106  virtual void setElement() override;
107  };
108 
109 //---------------------------------------------------------
110 // InspectorVBox
111 //---------------------------------------------------------
112 
113 class InspectorVBox : public InspectorBase {
114  Q_OBJECT
115  Ui::InspectorVBox vb;
116 
117  public:
118  InspectorVBox(QWidget* parent);
119  };
120 
121 //---------------------------------------------------------
122 // InspectorTBox
123 //---------------------------------------------------------
124 
125 class InspectorTBox : public InspectorBase {
126  Q_OBJECT
127  Ui::InspectorTBox tb;
128 
129  public:
130  InspectorTBox(QWidget* parent);
131  };
132 
133 //---------------------------------------------------------
134 // InspectorHBox
135 //---------------------------------------------------------
136 
137 class InspectorHBox : public InspectorBase {
138  Q_OBJECT
139  Ui::InspectorHBox hb;
140 
141  public:
142  InspectorHBox(QWidget* parent);
143  };
144 
145 //---------------------------------------------------------
146 // InspectorArticulation
147 //---------------------------------------------------------
148 
150  Q_OBJECT
151  Ui::InspectorArticulation ar;
152 
153  private slots:
154  void propertiesClicked();
155 
156  public:
157  InspectorArticulation(QWidget* parent);
158  virtual void setElement() override;
159  };
160 
161 //---------------------------------------------------------
162 // InspectorFermata
163 //---------------------------------------------------------
164 
166  Q_OBJECT
167  Ui::InspectorFermata f;
168 
169  public:
170  InspectorFermata(QWidget* parent);
171  virtual void setElement() override;
172  };
173 
174 //---------------------------------------------------------
175 // InspectorSpacer
176 //---------------------------------------------------------
177 
179  Q_OBJECT
180  Ui::InspectorSpacer sp;
181 
182  public:
183  InspectorSpacer(QWidget* parent);
184  };
185 
186 //---------------------------------------------------------
187 // InspectorRest
188 //---------------------------------------------------------
189 
191  Q_OBJECT
192 
193  Ui::InspectorSegment s;
194  Ui::InspectorRest r;
195 
196  QPushButton* dot1;
197  QPushButton* dot2;
198  QPushButton* dot3;
199  QPushButton* dot4;
200  QPushButton* tuplet;
201 
202  void dotClicked(int n);
203 
204  private slots:
205  void dot1Clicked();
206  void dot2Clicked();
207  void dot3Clicked();
208  void dot4Clicked();
209  void tupletClicked();
210 
211  public:
212  InspectorRest(QWidget* parent);
213  virtual void setElement() override;
214  };
215 
216 //---------------------------------------------------------
217 // InspectorClef
218 //---------------------------------------------------------
219 
221  Q_OBJECT
222 
223  Ui::InspectorSegment s;
224  Ui::InspectorClef c;
225  Clef* otherClef; // the courtesy clef for a main clef or viceversa
226  // used to keep in sync ShowCourtesy setting of both clefs
227  protected slots:
228  virtual void valueChanged(int idx) override;
229 
230  public:
231  InspectorClef(QWidget* parent);
232  virtual void setElement() override;
233  };
234 
235 //---------------------------------------------------------
236 // InspectorStem
237 //---------------------------------------------------------
238 
240  Q_OBJECT
241 
242  Ui::InspectorStem s;
243 
244  public:
245  InspectorStem(QWidget* parent);
246 // virtual void setElement() override;
247  };
248 
249 //---------------------------------------------------------
250 // InspectorTimeSig
251 //---------------------------------------------------------
252 
254  Q_OBJECT
255 
256  Ui::InspectorSegment s;
257  Ui::InspectorTimeSig t;
258 
259  private slots:
260  void propertiesClicked();
261 
262  public:
263  InspectorTimeSig(QWidget* parent);
264  virtual void setElement() override;
265  };
266 
267 //---------------------------------------------------------
268 // InspectorKeySig
269 //---------------------------------------------------------
270 
272  Q_OBJECT
273 
274  Ui::InspectorSegment s;
275  Ui::InspectorKeySig k;
276 
277  public:
278  InspectorKeySig(QWidget* parent);
279  virtual void setElement() override;
280  };
281 
282 //---------------------------------------------------------
283 // InspectorTuplet
284 //---------------------------------------------------------
285 
287  Q_OBJECT
288 
289  Ui::InspectorTuplet t;
290 
291  public:
292  InspectorTuplet(QWidget* parent);
293  };
294 
295 //---------------------------------------------------------
296 // InspectorAccidental
297 //---------------------------------------------------------
298 
300  Q_OBJECT
301 
302  Ui::InspectorAccidental a;
303 
304  public:
305  InspectorAccidental(QWidget* parent);
306  };
307 
308 //---------------------------------------------------------
309 // InspectorTremolo
310 //---------------------------------------------------------
311 
313  Q_OBJECT
314 
315  Ui::InspectorTremolo g;
316 
317  public:
318  InspectorTremolo(QWidget* parent);
319  };
320 
321 //---------------------------------------------------------
322 // InspectorTempoText
323 //---------------------------------------------------------
324 
326  Q_OBJECT
327 
328  Ui::InspectorTempoText tt;
329 
330  public:
331  InspectorTempoText(QWidget* parent);
332  virtual void postInit() override;
333  };
334 
335 //---------------------------------------------------------
336 // InspectorLyric
337 //---------------------------------------------------------
338 
340  Q_OBJECT
341 
342  Ui::InspectorLyric l;
343 
344  private slots:
345 
346  public:
347  InspectorLyric(QWidget* parent);
348  };
349 
350 //---------------------------------------------------------
351 // InspectorLyric
352 //---------------------------------------------------------
353 
355  Q_OBJECT
356 
357  Ui::InspectorStaffText s;
358 
359  private slots:
360  void propertiesClicked();
361 
362  public:
363  InspectorStaffText(QWidget* parent);
364  virtual void setElement() override;
365  };
366 
367 //---------------------------------------------------------
368 // Inspector
369 //---------------------------------------------------------
370 
371 class Inspector : public QDockWidget {
372  Q_OBJECT
373 
374  QScrollArea* sa;
377  bool _inspectorEdit; // set to true when an edit originates from
378  // within the inspector itself
381 
382  public slots:
383  void update();
384 
385  protected:
386  virtual void changeEvent(QEvent *event);
387  void retranslate();
388 
389  public:
390  Inspector(QWidget* parent = 0);
391  void update(Score* s);
392 
393  Element* element() const;
394  const QList<Element*>* el() const;
395  void setInspectorEdit(bool val) { _inspectorEdit = val; }
396 
397  friend class InspectorScriptEntry;
398  };
399 
400 //---------------------------------------------------------
401 // InspectorSlurTie
402 //---------------------------------------------------------
403 
405  Q_OBJECT
406 
407  Ui::InspectorSlur s;
408 
409  public:
410  InspectorSlurTie(QWidget* parent);
411  };
412 
413 //---------------------------------------------------------
414 // InspectorCaesura
415 //---------------------------------------------------------
416 
418  Q_OBJECT
419 
420  Ui::InspectorCaesura c;
421 
422  public:
423  InspectorCaesura(QWidget* parent);
424  };
425 
426 //---------------------------------------------------------
427 // InspectorBracket
428 //---------------------------------------------------------
429 
431  Q_OBJECT
432 
433  Ui::InspectorBracket b;
434 
435  public:
436  InspectorBracket(QWidget* parent);
437  };
438 
439 //---------------------------------------------------------
440 // InspectorIname
441 //---------------------------------------------------------
442 
444  Q_OBJECT
445 
446  Ui::InspectorIname i;
447 
448  public:
449  InspectorIname(QWidget* parent);
450  };
451 
452 //---------------------------------------------------------
453 // InspectorEmpty
454 //---------------------------------------------------------
455 
457  Q_OBJECT
458 
459  Ui::InspectorEmpty e;
460 
461  public:
462  InspectorEmpty(QWidget* parent);
463  virtual QSize sizeHint() const override;
464  };
465 
466 extern void populatePlacement(QComboBox*);
467 
468 } // namespace Ms
469 #endif
470 
Definition: inspector.h:178
Ui::InspectorBracket b
Definition: inspector.h:433
QPushButton * dot3
Definition: inspector.h:198
Definition: inspector.h:239
Definition: inspector.h:430
Ui::InspectorTuplet t
Definition: inspector.h:289
Ui::InspectorSegment s
Definition: inspector.h:223
Ui::InspectorLyric l
Definition: inspector.h:342
Definition: inspector.h:65
Ui::InspectorStem s
Definition: inspector.h:242
Ui::InspectorTimeSig t
Definition: inspector.h:257
QPushButton * dot2
Definition: inspector.h:197
Element * oe
Definition: inspector.h:379
QPushButton * dot4
Definition: inspector.h:199
Definition: inspector.h:354
Ui::InspectorHBox hb
Definition: inspector.h:139
Ui::InspectorBreak b
Definition: inspector.h:78
Ui::InspectorKeySig k
Definition: inspector.h:275
Definition: inspector.h:339
Ui::InspectorTempoText tt
Definition: inspector.h:328
Definition: inspector.h:271
Definition: inspector.h:371
Ui::InspectorClef c
Definition: inspector.h:224
Ui::InspectorTBox tb
Definition: inspector.h:127
Base class of score layout elements.
Definition: element.h:158
QPushButton * tuplet
Definition: inspector.h:200
Definition: inspector.h:443
QScrollArea * sa
Definition: inspector.h:374
void populatePlacement(QComboBox *b)
Definition: inspector.cpp:1094
Graphic representation of a clef.
Definition: clef.h:132
Definition: inspector.h:312
QPushButton * dot1
Definition: inspector.h:196
virtual void postInit()
Definition: inspectorBase.h:84
Ui::InspectorArticulation ar
Definition: inspector.h:151
void setInspectorEdit(bool val)
Definition: inspector.h:395
Definition: score.h:391
InspectorElement(QWidget *parent)
Definition: inspector.cpp:440
Definition: inspector.h:190
Ui::InspectorStaffText s
Definition: inspector.h:357
Ui::InspectorCaesura c
Definition: inspector.h:420
bool _inspectorEdit
Definition: inspector.h:377
Definition: inspectorBase.h:49
Definition: scriptentry.h:96
Ui::InspectorFermata f
Definition: inspector.h:167
Definition: inspectorTextBase.h:25
Ui::InspectorRest r
Definition: inspector.h:194
Ui::InspectorSpacer sp
Definition: inspector.h:180
InspectorBase * ie
Definition: inspector.h:375
Definition: inspector.h:149
Definition: inspector.h:286
Ui::InspectorStaffTypeChange sl
Definition: inspector.h:102
Definition: aeolus.cpp:26
virtual void valueChanged(int idx, bool reset)
Definition: inspectorBase.cpp:382
Definition: inspector.h:137
Definition: inspector.h:456
Definition: inspector.h:253
Score * _score
Definition: inspector.h:376
Ui::InspectorVBox vb
Definition: inspector.h:115
Definition: inspector.h:220
bool oSameTypes
Definition: inspector.h:380
Ui::InspectorSegment s
Definition: inspector.h:274
Definition: inspector.h:76
Ui::InspectorSegment s
Definition: inspector.h:193
virtual void setElement() override
Definition: inspectorElementBase.cpp:44
Definition: inspector.h:299
Ui::InspectorTremolo g
Definition: inspector.h:315
Definition: inspector.h:417
Clef * otherClef
Definition: inspector.h:225
Definition: inspector.h:125
Ui::InspectorIname i
Definition: inspector.h:446
Definition: inspector.h:404
Definition: inspector.h:325
Definition: inspectorElementBase.h:34
Ui::InspectorSlur s
Definition: inspector.h:407
Ui::InspectorSegment s
Definition: inspector.h:256
Ui::InspectorEmpty e
Definition: inspector.h:459
Ui::InspectorSectionBreak scb
Definition: inspector.h:90
Ui::InspectorAccidental a
Definition: inspector.h:302
Definition: inspector.h:100
Definition: inspector.h:113
Definition: inspector.h:88
Definition: inspector.h:165