1 //=========================================================
2 // MusE
3 // Linux Music Editor
4 // $Id: icons.cpp,v 1.13.2.8 2009/11/14 03:37:48 terminator356 Exp $
5 //
6 // (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License
10 // as published by the Free Software Foundation; version 2 of
11 // the License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 //
22 //=========================================================
23
24 #include <QPixmap>
25 #include <QIcon>
26 #include <QCursor>
27 #include <QDir>
28 #include <QApplication>
29
30 #include "xpm/midi_ctrl_graph_merge_erase.xpm"
31 #include "xpm/midi_ctrl_graph_merge_erase_inclusive.xpm"
32 #include "xpm/midi_ctrl_graph_merge_erase_wysiwyg.xpm"
33
34 #include "xpm/muse_icon.xpm"
35 #include "xpm/about_muse.xpm"
36
37 #include "xpm/global.xpm"
38 #include "xpm/project.xpm"
39 #include "xpm/user.xpm"
40
41 #include "xpm/pianoNew.xpm"
42 #include "xpm/presetsNew.xpm"
43
44 #include "icons.h"
45
46
47 namespace MusEGui {
48
49 QPixmap* midiCtrlMergeEraseIcon;
50 QPixmap* midiCtrlMergeEraseInclusiveIcon;
51 QPixmap* midiCtrlMergeEraseWysiwygIcon;
52
53 QPixmap* museIcon;
54 QPixmap* aboutMuseImage;
55
56 QIcon* globalIcon;
57 QIcon* projectIcon;
58 QIcon* userIcon;
59
60 QIcon* pianoNewIcon;
61 QIcon* presetsNewIcon;
62
63 //----------------------------------
64 // SVG...
65 //----------------------------------
66
67 QIcon* dropDownTriangleSVGIcon;
68 QIcon* expandLeftRightSVGIcon;
69
70 QIcon* routingInputSVGIcon;
71 QIcon* routingOutputSVGIcon;
72 QIcon* routingInputUnconnectedSVGIcon;
73 QIcon* routingOutputUnconnectedSVGIcon;
74
75 QIcon* headphonesOffSVGIcon;
76 QIcon* headphonesOnSVGIcon;
77
78 QIcon* muteOffSVGIcon;
79 QIcon* muteOnSVGIcon;
80 QIcon* muteOnXSVGIcon;
81 QIcon* muteProxyOnSVGIcon;
82 QIcon* muteAndProxyOnSVGIcon;
83 QIcon* muteStateSVGIcon;
84
85 QIcon* soloOffSVGIcon;
86 QIcon* soloOnSVGIcon;
87 QIcon* soloOnAloneSVGIcon;
88 QIcon* soloProxyOnSVGIcon;
89 QIcon* soloProxyOnAloneSVGIcon;
90 QIcon* soloAndProxyOnSVGIcon;
91 QIcon* soloStateSVGIcon;
92
93 QIcon* trackOffSVGIcon;
94 QIcon* trackOnSVGIcon;
95
96 QIcon* stereoOffSVGIcon;
97 QIcon* stereoOnSVGIcon;
98
99 QIcon* preFaderOffSVGIcon;
100 QIcon* preFaderOnSVGIcon;
101
102 QIcon* recArmOffSVGIcon;
103 QIcon* recArmOnSVGIcon;
104 QIcon* recArmStateSVGIcon;
105
106 QIcon* monitorOffSVGIcon;
107 QIcon* monitorOnSVGIcon;
108 QIcon* monitorStateSVGIcon;
109
110 QIcon* velocityPerNoteSVGIcon;
111 QIcon* midiControllerNewSVGIcon;
112 QIcon* midiControllerSelectSVGIcon;
113 QIcon* midiControllerRemoveSVGIcon;
114
115 //QIcon* soloSVGIcon;
116 //QIcon* soloProxySVGIcon;
117 QIcon* muteSVGIcon;
118 //QIcon* trackEnableSVGIcon;
119 //QIcon* recArmSVGIcon;
120 QIcon* recMasterSVGIcon;
121
122 QIcon* stopSVGIcon;
123 QIcon* playSVGIcon;
124 QIcon* fastForwardSVGIcon;
125 QIcon* rewindSVGIcon;
126 QIcon* rewindToStartSVGIcon;
127
128 QIcon* externSyncOffSVGIcon;
129 QIcon* externSyncOnSVGIcon;
130
131 QIcon* masterTrackOffSVGIcon;
132 QIcon* masterTrackOnSVGIcon;
133
134 QIcon* jackTransportOffSVGIcon;
135 QIcon* jackTransportOnSVGIcon;
136
137 QIcon* timebaseMasterOffSVGIcon;
138 QIcon* timebaseMasterOnSVGIcon;
139
140 QIcon* metronomeOffSVGIcon;
141 QIcon* metronomeOnSVGIcon;
142
143 QIcon* fixedSpeedSVGIcon;
144 QIcon* transportAffectsLatencySVGIcon;
145 QIcon* overrideLatencySVGIcon;
146
147 QIcon* panicSVGIcon;
148 QIcon* loopSVGIcon;
149 QIcon* punchinSVGIcon;
150 QIcon* punchoutSVGIcon;
151 QIcon* undoSVGIcon;
152 QIcon* redoSVGIcon;
153 QIcon* midiInSVGIcon;
154 QIcon* steprecSVGIcon;
155 QIcon* speakerSVGIcon;
156 QIcon* speakerSingleNoteSVGIcon;
157 QIcon* speakerChordsSVGIcon;
158 QIcon* filenewSVGIcon;
159 QIcon* filetemplateSVGIcon;
160 QIcon* fileopenSVGIcon;
161 QIcon* filesaveSVGIcon;
162 QIcon* filesaveasSVGIcon;
163 QIcon* filesaveProjectSVGIcon;
164 QIcon* filesaveTemplateSVGIcon;
165 QIcon* filesaveRevisionSVGIcon;
166 QIcon* filecloseSVGIcon;
167 QIcon* appexitSVGIcon;
168 QIcon* whatsthisSVGIcon;
169 QIcon* infoSVGIcon;
170 QIcon* showFieldsSVGIcon;
171 QIcon* exitSVGIcon;
172 QIcon* noteSVGIcon;
173 QIcon* metaSVGIcon;
174 QIcon* ctrlSVGIcon;
175 QIcon* sysexSVGIcon;
176 QIcon* tracktypeSVGIcon;
177 QIcon* pianorollSVGIcon;
178 QIcon* arrangerSVGIcon;
179 QIcon* waveeditorSVGIcon;
180 QIcon* scoreeditSVGIcon;
181 QIcon* mastereditSVGIcon;
182 QIcon* drumeditSVGIcon;
183 QIcon* listeditSVGIcon;
184 QIcon* synthSVGIcon;
185 QIcon* trackInputSVGIcon;
186 QIcon* trackOutputSVGIcon;
187 QIcon* trackAuxSVGIcon;
188 QIcon* trackGroupVGIcon;
189
190 // tool icons
191 QIcon* pencilIconSVG;
192 QIcon* glueIconSVG;
193 QIcon* cutterIconSVG;
194 QIcon* zoomIconSVG;
195 QIcon* zoomAtIconSVG;
196 QIcon* deleteIconSVG;
197 QIcon* drawIconSVG;
198 QIcon* pointerIconSVG;
199 QIcon* mutePartsIconSVG;
200 QIcon* handIconSVG;
201 QIcon* closedHandIconSVG;
202 QIcon* cursorIconSVG;
203 //QIcon* magnetIconSVG;
204 //QIcon* customMoveIconSVG;
205 QIcon* pencilMove4WayIconSVG;
206 QIcon* pencilMoveHorizIconSVG;
207 QIcon* pencilMoveVertIconSVG;
208 QIcon* audioStretchIconSVG;
209 QIcon* audioResampleIconSVG;
210
211 QIcon* synthGuiSVGIcon;
212 QIcon* ankerSVGIcon;
213 QIcon* settingsSVGIcon;
214 QIcon* transportSVGIcon;
215 QIcon* bigtimeSVGIcon;
216 QIcon* mixerSVGIcon;
217 QIcon* plusSVGIcon;
218 QIcon* minusSVGIcon;
219 QIcon* keySVGIcon;
220 QIcon* delSelTracksSVGIcon;
221 QIcon* duplSelTrackSVGIcon;
222 QIcon* duplSelTracksSVGIcon;
223
224 QIcon* routeAutoAdjustSVGIcon;
225 QIcon* routeSelSourceSVGIcon;
226 QIcon* routeSelDestSVGIcon;
227 QIcon* routeSourceSVGIcon;
228 QIcon* routeDestSVGIcon;
229
230 QIcon* gridOnSVGIcon;
231 QIcon* rangeToSelectionSVGIcon;
232 QIcon* quantizeSVGIcon;
233 QIcon* clearSVGIcon;
234 QIcon* downmixOffSVGIcon;
235 QIcon* downmixOnSVGIcon;
236 QIcon* downmixTrackSVGIcon;
237 QIcon* downmixStateSVGIcon;
238 QIcon* restartSVGIcon;
239 QIcon* snapshotSVGIcon;
240 QIcon* emptyBarSVGIcon;
241 QIcon* lockSVGIcon;
242
243 QIcon* midiResetSVGIcon;
244 QIcon* midiInitSVGIcon;
245 QIcon* midiLocalOffSVGIcon;
246 QIcon* midiTransformSVGIcon;
247 QIcon* midiInputTransformSVGIcon;
248 QIcon* midiInputTransposeSVGIcon;
249 QIcon* midiInputFilterSVGIcon;
250 QIcon* midiInputRemoteSVGIcon;
251 QIcon* midiSyncSVGIcon;
252 QIcon* midiExportImportSVGIcon;
253
254 QIcon* cutSVGIcon;
255 QIcon* copySVGIcon;
256 QIcon* pasteSVGIcon;
257 QIcon* pasteDialogSVGIcon;
258 QIcon* pasteCloneSVGIcon;
259 QIcon* copyRangeSVGIcon;
260 QIcon* deleteSVGIcon;
261 QIcon* pasteSelectedTrackSVGIcon;
262 QIcon* pasteCloneSelectedTrackSVGIcon;
263
264 QIcon* eyeSVGIcon;
265 QIcon* eyeCrossedSVGIcon;
266 QIcon* eyeGreySVGIcon;
267
268 QIcon* nextPartSVGIcon;
269 QIcon* lastPartSVGIcon;
270
271 QIcon* selectAllSVGIcon;
272 QIcon* selectAllTrackSVGIcon;
273 QIcon* selectInsideLoopSVGIcon;
274 QIcon* selectOutsideLoopSVGIcon;
275 QIcon* selectInvertSVGIcon;
276 QIcon* deselectAllSVGIcon;
277
278 QIcon* ledGreenSVGIcon;
279 QIcon* ledGreenDarkSVGIcon;
280 QIcon* ledRedSVGIcon;
281 QIcon* ledBlueSVGIcon;
282 QIcon* ledYellowSVGIcon;
283 QIcon* ledOffSVGIcon;
284
285 QIcon* routeInSVGIcon;
286 QIcon* routeOutSVGIcon;
287 QIcon* routeInMidiSVGIcon;
288 QIcon* routeOutMidiSVGIcon;
289 QIcon* midiPortSVGIcon;
290 QIcon* routerSVGIcon;
291
292 QIcon* appearanceSVGIcon;
293 QIcon* editInstrumentSVGIcon;
294 QIcon* deltaSVGIcon;
295
296 QIcon* dummySVGIcon;
297
298 //----------------------------------
299 // Cursors
300 //----------------------------------
301
302 QCursor* editpasteSCursor;
303 QCursor* editpasteCloneSCursor;
304
305 QCursor* pencilCursor;
306 QCursor* glueCursor;
307 QCursor* cutterCursor;
308 QCursor* zoomCursor;
309 QCursor* zoomAtCursor;
310 QCursor* deleteCursor;
311 QCursor* drawCursor;
312 QCursor* mutePartsCursor;
313 QCursor* handCursor;
314 QCursor* closedHandCursor;
315 //QCursor* magnetCursor;
316 //QCursor* customMoveCursor;
317 QCursor* pencilMove4WayCursor;
318 QCursor* pencilMoveHorizCursor;
319 QCursor* pencilMoveVertCursor;
320
321
322 //---------------------------------------------------------
323 // class Icons
324 //---------------------------------------------------------
325
326 class Icons {
327 QStringList _global, _user;
328 QString _path_global, _path_user;
329 bool _global_on, _user_on;
330
331 public:
Icons(const QString & path_global,const QString & path_user)332 Icons(const QString & path_global, const QString & path_user)
333 : _path_global(path_global),
334 _path_user(path_user)
335 {
336 QDir dir(path_global, "*.svg");
337 _global = dir.entryList(QDir::Files);
338 _global_on = !_global.isEmpty();
339
340 dir.setPath(path_user);
341 _user = dir.entryList(QDir::Files);
342 _user_on = !_user.isEmpty();
343 }
344
getSVG(const QString & filename)345 QIcon* getSVG(const QString & filename)
346 {
347 if (_user_on && _user.contains(filename))
348 return new QIcon(_path_user + "/" + filename);
349
350 if (_global_on && _global.contains(filename))
351 return new QIcon(_path_global + "/" + filename);
352
353 return new QIcon(":/svg/" + filename);
354 }
355
addSVG(QIcon * icon,const QString & filename,QIcon::Mode mode=QIcon::Normal,QIcon::State state=QIcon::On)356 void addSVG(QIcon *icon, const QString & filename,
357 QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::On)
358 {
359 if (!icon)
360 return;
361
362 if (_user_on && _user.contains(filename)) {
363 icon->addFile(_path_user + "/" + filename, QSize(), mode, state);
364 return;
365 }
366
367 if (_global_on && _global.contains(filename)) {
368 icon->addFile(_path_global + "/" + filename, QSize(), mode, state);
369 return;
370 }
371
372 icon->addFile(":/svg/" + filename, QSize(), mode, state);
373 }
374 };
375
376
377 //---------------------------------------------------------
378 // initIcons
379 //---------------------------------------------------------
380
initIcons(int cursorSize,const QString & gpath,const QString & upath)381 void initIcons(int cursorSize, const QString& gpath, const QString& upath)
382 {
383 const qreal dpr = qApp->devicePixelRatio();
384
385 Icons icons(gpath, upath);
386
387 midiCtrlMergeEraseIcon = new QPixmap(midi_ctrl_graph_merge_erase_xpm);
388 midiCtrlMergeEraseInclusiveIcon = new QPixmap(midi_ctrl_graph_merge_erase_inclusive_xpm);
389 midiCtrlMergeEraseWysiwygIcon = new QPixmap(midi_ctrl_graph_merge_erase_wysiwyg_xpm);
390
391 museIcon = new QPixmap(muse_icon_xpm);
392 aboutMuseImage = new QPixmap(about_muse_xpm);
393
394 globalIcon = new QIcon(QPixmap(global_xpm));
395 userIcon = new QIcon(QPixmap(user_xpm));
396 projectIcon = new QIcon(QPixmap(project_xpm));
397
398 pianoNewIcon = new QIcon(QPixmap(pianoNew_xpm));
399 presetsNewIcon = new QIcon(QPixmap(presetsNew_xpm));
400
401 //----------------------------------
402 // SVG...
403 //----------------------------------
404
405 dropDownTriangleSVGIcon = icons.getSVG("drop_down_triangle.svg");
406 expandLeftRightSVGIcon = icons.getSVG("expand_left_right.svg");
407
408 routingInputSVGIcon = icons.getSVG("routing_input.svg");
409 routingOutputSVGIcon = icons.getSVG("routing_output.svg");
410 routingInputUnconnectedSVGIcon = icons.getSVG("routing_input_unconnected.svg");
411 routingOutputUnconnectedSVGIcon = icons.getSVG("routing_output_unconnected.svg");
412
413 headphonesOffSVGIcon = icons.getSVG("headphones_off.svg");
414 headphonesOnSVGIcon = icons.getSVG("headphones_on.svg");
415
416 muteOffSVGIcon = icons.getSVG("mute_off.svg");
417 muteOnSVGIcon = icons.getSVG("mute_on.svg");
418 muteOnXSVGIcon = icons.getSVG("mute_on_X.svg");
419 muteProxyOnSVGIcon = icons.getSVG("mute_proxy_on.svg");
420 muteAndProxyOnSVGIcon = icons.getSVG("mute_and_proxy_on.svg");
421
422 muteStateSVGIcon = icons.getSVG("mute_off.svg");
423 icons.addSVG(muteStateSVGIcon, "mute_on.svg");
424
425 soloOffSVGIcon = icons.getSVG("solo_spotlight_off.svg");
426 soloOnSVGIcon = icons.getSVG("solo_spotlight_on.svg");
427 soloOnAloneSVGIcon = icons.getSVG("solo_spotlight_on_alone.svg");
428 soloProxyOnSVGIcon = icons.getSVG("solo_proxy_spotlight_on.svg");
429 soloProxyOnAloneSVGIcon = icons.getSVG("solo_proxy_spotlight_on_alone.svg");
430 soloAndProxyOnSVGIcon = icons.getSVG("solo_and_proxy_spotlight_on.svg");
431
432 soloStateSVGIcon = icons.getSVG("solo_spotlight_off.svg");
433 icons.addSVG(soloStateSVGIcon, "solo_spotlight_on_alone.svg");
434
435 trackOffSVGIcon = icons.getSVG("track_off.svg");
436 trackOnSVGIcon = icons.getSVG("track_on.svg");
437 icons.addSVG(trackOnSVGIcon, "track_off.svg");
438
439 stereoOffSVGIcon = icons.getSVG("stereo_off.svg");
440 stereoOnSVGIcon = icons.getSVG("stereo_on.svg");
441
442 preFaderOffSVGIcon = icons.getSVG("pre_fader_off.svg");
443 preFaderOnSVGIcon = icons.getSVG("pre_fader_on.svg");
444
445 recArmOffSVGIcon = icons.getSVG("rec_arm_off_default_col.svg");
446 recArmOnSVGIcon = icons.getSVG("rec_arm_on.svg");
447
448 recArmStateSVGIcon = icons.getSVG("rec_arm_off_default_col.svg");
449 icons.addSVG(recArmStateSVGIcon, "rec_arm_on.svg");
450
451 monitorOffSVGIcon = icons.getSVG("monitor_off_default_col.svg");
452 monitorOnSVGIcon = icons.getSVG("monitor_on.svg");
453
454 monitorStateSVGIcon = icons.getSVG("monitor_off_default_col.svg");
455 icons.addSVG(monitorStateSVGIcon, "monitor_on.svg");
456
457 velocityPerNoteSVGIcon = icons.getSVG("velocity_all_notes.svg");
458 velocityPerNoteSVGIcon->addFile(":/svg/velocity_per_note.svg", QSize(), QIcon::Normal, QIcon::On);
459
460 midiControllerNewSVGIcon = icons.getSVG("midi_controller_new.svg");
461 midiControllerSelectSVGIcon = icons.getSVG("midi_controller_select.svg");
462 midiControllerRemoveSVGIcon = icons.getSVG("midi_controller_remove.svg");
463
464
465 // soloSVGIcon = icons.getSVG("headphones_off.svg");
466 // soloSVGIcon->addFile(":/svg/headphones_on.svg", QSize(), QIcon::Normal, QIcon::On);
467 // TODO
468 // soloProxySVGIcon = icons.getSVG("headphones_off.svg");
469 // soloProxySVGIcon->addFile(":/svg/headphones_on.svg", QSize(), QIcon::Normal, QIcon::On);
470
471 muteSVGIcon = icons.getSVG("mute_off.svg");
472 muteSVGIcon->addFile(":/svg/mute_on.svg", QSize(), QIcon::Normal, QIcon::On);
473
474 // trackEnableSVGIcon = icons.getSVG("track_on.svg");
475 // trackEnableSVGIcon->addFile(":/svg/track_off.svg", QSize(), QIcon::Normal, QIcon::On);
476
477 //recArmSVGIcon = icons.getSVG("rec_arm_off_default_col.svg");
478 // recArmSVGIcon = icons.getSVG("rec_arm_off.svg");
479 // recArmSVGIcon->addFile(":/svg/rec_arm_on.svg", QSize(), QIcon::Normal, QIcon::On);
480
481 //recMasterSVGIcon = icons.getSVG("rec_arm_off_default_col.svg");
482 recMasterSVGIcon = icons.getSVG("rec_arm_off.svg");
483 recMasterSVGIcon->addFile(":/svg/rec_arm_on.svg", QSize(), QIcon::Normal, QIcon::On);
484
485
486 stopSVGIcon = icons.getSVG("stop.svg");
487
488 playSVGIcon = icons.getSVG("play_off.svg");
489 playSVGIcon->addFile(":/svg/play_on.svg", QSize(), QIcon::Normal, QIcon::On);
490
491 fastForwardSVGIcon = icons.getSVG("fast_forward.svg");
492
493 rewindSVGIcon = icons.getSVG("rewind.svg");
494
495 rewindToStartSVGIcon = icons.getSVG("rewind_to_start.svg");
496
497 externSyncOffSVGIcon = icons.getSVG("extern_sync_off.svg");
498 externSyncOnSVGIcon = icons.getSVG("extern_sync_on.svg");
499
500 masterTrackOffSVGIcon = icons.getSVG("master_track_off.svg");
501 masterTrackOnSVGIcon = icons.getSVG("master_track_on.svg");
502
503 jackTransportOffSVGIcon = icons.getSVG("jack_transport_off.svg");
504 jackTransportOnSVGIcon = icons.getSVG("jack_transport_on.svg");
505
506 timebaseMasterOffSVGIcon = icons.getSVG("timebase_master_off.svg");
507 timebaseMasterOnSVGIcon = icons.getSVG("timebase_master_on.svg");
508
509 metronomeOffSVGIcon = icons.getSVG("metronome_off.svg");
510 metronomeOnSVGIcon = icons.getSVG("metronome_on.svg");
511
512 fixedSpeedSVGIcon = icons.getSVG("speed_off.svg");
513 fixedSpeedSVGIcon->addFile(":/svg/speed_on.svg", QSize(), QIcon::Normal, QIcon::On);
514 transportAffectsLatencySVGIcon = icons.getSVG("transport_affects_latency_off.svg");
515 transportAffectsLatencySVGIcon->addFile(":/svg/transport_affects_latency_on.svg", QSize(), QIcon::Normal, QIcon::On);
516 overrideLatencySVGIcon = icons.getSVG("override_latency_off.svg");
517 overrideLatencySVGIcon->addFile(":/svg/override_latency_on.svg", QSize(), QIcon::Normal, QIcon::On);
518
519 panicSVGIcon = icons.getSVG("panic.svg");
520 loopSVGIcon = icons.getSVG("loop.svg");
521 punchinSVGIcon = icons.getSVG("punchin.svg");
522 punchoutSVGIcon = icons.getSVG("punchout.svg");
523 undoSVGIcon = icons.getSVG("undo.svg");
524 redoSVGIcon = icons.getSVG("redo.svg");
525 midiInSVGIcon = icons.getSVG("midiin.svg");
526 steprecSVGIcon = icons.getSVG("steprec.svg");
527 speakerSVGIcon = icons.getSVG("speaker.svg");
528 speakerSingleNoteSVGIcon = icons.getSVG("speaker_single_note.svg");
529 speakerChordsSVGIcon = icons.getSVG("speaker_chords.svg");
530 whatsthisSVGIcon = icons.getSVG("whatsthis.svg");
531 infoSVGIcon = icons.getSVG("info.svg");
532 showFieldsSVGIcon = icons.getSVG("show_fields.svg");
533 exitSVGIcon = icons.getSVG("exit.svg");
534 noteSVGIcon = icons.getSVG("note.svg");
535 metaSVGIcon = icons.getSVG("meta.svg");
536 ctrlSVGIcon = icons.getSVG("ctrl.svg");
537 sysexSVGIcon = icons.getSVG("sysex.svg");
538 tracktypeSVGIcon = icons.getSVG("tracktype.svg");
539
540 filenewSVGIcon = icons.getSVG("filenew.svg");
541 filetemplateSVGIcon = icons.getSVG("filefromtemplate.svg");
542 fileopenSVGIcon = icons.getSVG("fileopen.svg");
543 filesaveSVGIcon = icons.getSVG("filesave.svg");
544 filesaveasSVGIcon = icons.getSVG("filesaveas.svg");
545 filesaveRevisionSVGIcon = icons.getSVG("filesave_revision.svg");
546 filesaveTemplateSVGIcon = icons.getSVG("filesave_template.svg");
547 filesaveProjectSVGIcon = icons.getSVG("filesave_project.svg");
548 filecloseSVGIcon = icons.getSVG("fileclose.svg");
549 appexitSVGIcon = icons.getSVG("appexit.svg");
550
551 pianorollSVGIcon = icons.getSVG("pianoroll.svg");
552 arrangerSVGIcon = icons.getSVG("arranger.svg");
553 waveeditorSVGIcon = icons.getSVG("waveeditor.svg");
554 scoreeditSVGIcon = icons.getSVG("scoreedit.svg");
555 mastereditSVGIcon = icons.getSVG("masteredit.svg");
556 drumeditSVGIcon = icons.getSVG("drumedit.svg");
557 listeditSVGIcon = icons.getSVG("listedit.svg");
558
559 synthSVGIcon = icons.getSVG("synth.svg");
560 trackInputSVGIcon = icons.getSVG("track_input.svg");
561 trackOutputSVGIcon = icons.getSVG("track_output.svg");
562 trackAuxSVGIcon = icons.getSVG("track_aux.svg");
563 trackGroupVGIcon = icons.getSVG("track_group.svg");
564
565 synthGuiSVGIcon = icons.getSVG("synth_gui.svg");
566 ankerSVGIcon = icons.getSVG("anker.svg");
567 settingsSVGIcon = icons.getSVG("settings.svg");
568 transportSVGIcon = icons.getSVG("transport.svg");
569 bigtimeSVGIcon = icons.getSVG("bigtime.svg");
570 mixerSVGIcon = icons.getSVG("mixer.svg");
571 plusSVGIcon = icons.getSVG("plus.svg");
572 minusSVGIcon = icons.getSVG("minus.svg");
573 keySVGIcon = icons.getSVG("key.svg");
574 delSelTracksSVGIcon = icons.getSVG("delete_sel_tracks.svg");
575 duplSelTrackSVGIcon = icons.getSVG("duplicate_sel_track.svg");
576 duplSelTracksSVGIcon = icons.getSVG("duplicate_sel_tracks.svg");
577
578 // tool icons
579 pencilIconSVG = icons.getSVG("pencil.svg");
580 glueIconSVG = icons.getSVG("glue.svg");
581 cutterIconSVG = icons.getSVG("cutter.svg");
582 zoomIconSVG = icons.getSVG("zoom.svg");
583 zoomAtIconSVG = icons.getSVG("zoomAt.svg");
584 deleteIconSVG = icons.getSVG("eraser.svg");
585 drawIconSVG = icons.getSVG("draw.svg");
586 pointerIconSVG = icons.getSVG("pointer.svg");
587 mutePartsIconSVG = icons.getSVG("mute_parts.svg");
588 handIconSVG = icons.getSVG("hand.svg");
589 closedHandIconSVG = icons.getSVG("closed_hand.svg");
590 cursorIconSVG = icons.getSVG("cursor.svg");
591 //magnetIconSVG = icons.getSVG("magnet.svg");
592 //customMoveIconSVG = icons.getSVG("cursor_move.svg");
593 pencilMove4WayIconSVG = icons.getSVG("pencil_move_4_way.svg");
594 pencilMoveHorizIconSVG = icons.getSVG("pencil_move_horiz.svg");
595 pencilMoveVertIconSVG = icons.getSVG("pencil_move_vert.svg");
596 audioStretchIconSVG = icons.getSVG("audio_stretch.svg");
597 audioResampleIconSVG = icons.getSVG("audio_resample.svg");
598
599 routeAutoAdjustSVGIcon = icons.getSVG("route_auto_adjust.svg");
600 routeSelSourceSVGIcon = icons.getSVG("route_sel_source.svg");
601 routeSelDestSVGIcon = icons.getSVG("route_sel_dest.svg");
602 routeSourceSVGIcon = icons.getSVG("route_sources.svg");
603 routeDestSVGIcon = icons.getSVG("route_destinations.svg");
604
605 gridOnSVGIcon = icons.getSVG("grid_on.svg");
606 rangeToSelectionSVGIcon = icons.getSVG("range_to_selection.svg");
607 quantizeSVGIcon = icons.getSVG("quantize.svg");
608 clearSVGIcon = icons.getSVG("clear.svg");
609 downmixOffSVGIcon = icons.getSVG("downmix_off.svg");
610 downmixOnSVGIcon = icons.getSVG("downmix_on.svg");
611 downmixTrackSVGIcon = icons.getSVG("downmix_track.svg");
612 downmixStateSVGIcon = icons.getSVG("downmix_off.svg");
613 icons.addSVG(downmixStateSVGIcon, "downmix_on.svg");
614 restartSVGIcon = icons.getSVG("restart.svg");
615 snapshotSVGIcon = icons.getSVG("snapshot.svg");
616 emptyBarSVGIcon = icons.getSVG("empty_bar.svg");
617 lockSVGIcon = icons.getSVG("lock.svg");
618
619 midiResetSVGIcon = icons.getSVG("midi_reset.svg");
620 midiInitSVGIcon = icons.getSVG("midi_init.svg");
621 midiLocalOffSVGIcon = icons.getSVG("midi_local_off.svg");
622 midiTransformSVGIcon = icons.getSVG("midi_transform.svg");
623 midiInputTransformSVGIcon = icons.getSVG("midi_input_transform.svg");
624 midiInputTransposeSVGIcon = icons.getSVG("midi_input_transpose.svg");
625 midiInputFilterSVGIcon = icons.getSVG("midi_input_filter.svg");
626 midiInputRemoteSVGIcon = icons.getSVG("midi_input_remote.svg");
627 midiSyncSVGIcon = icons.getSVG("midi_sync.svg");
628 midiExportImportSVGIcon = icons.getSVG("midi_import_export.svg");
629
630 cutSVGIcon = icons.getSVG("cut.svg");
631 copySVGIcon = icons.getSVG("copy.svg");
632 pasteSVGIcon = icons.getSVG("paste.svg");
633 pasteDialogSVGIcon = icons.getSVG("paste_dialog.svg");
634 pasteCloneSVGIcon = icons.getSVG("paste_clone.svg");
635 copyRangeSVGIcon = icons.getSVG("copy_range.svg");
636 deleteSVGIcon = icons.getSVG("delete.svg");
637 pasteSelectedTrackSVGIcon = icons.getSVG("paste_selected_track.svg");
638 pasteCloneSelectedTrackSVGIcon = icons.getSVG("paste_clone_selected_track.svg");
639
640 eyeSVGIcon = icons.getSVG("eye.svg");
641 eyeCrossedSVGIcon = icons.getSVG("eye_crossed.svg");
642 eyeGreySVGIcon = icons.getSVG("eye_grey.svg");
643
644 nextPartSVGIcon = icons.getSVG("next_part.svg");
645 lastPartSVGIcon = icons.getSVG("last_part.svg");
646
647 selectAllSVGIcon = icons.getSVG("select_all.svg");
648 selectAllTrackSVGIcon = icons.getSVG("select_all_track.svg");
649 selectInsideLoopSVGIcon = icons.getSVG("select_inside_loop.svg");
650 selectOutsideLoopSVGIcon = icons.getSVG("select_outside_loop.svg");
651 selectInvertSVGIcon = icons.getSVG("select_invert.svg");
652 deselectAllSVGIcon = icons.getSVG("deselect_all.svg");
653
654 ledGreenSVGIcon = icons.getSVG("led_green.svg");
655 ledGreenDarkSVGIcon = icons.getSVG("led_green_dark.svg");
656 ledRedSVGIcon = icons.getSVG("led_red.svg");
657 ledBlueSVGIcon = icons.getSVG("led_blue.svg");
658 ledYellowSVGIcon = icons.getSVG("led_yellow.svg");
659 ledOffSVGIcon = icons.getSVG("led_off.svg");
660
661 routeInSVGIcon = icons.getSVG("route_in.svg");
662 routeOutSVGIcon = icons.getSVG("route_out.svg");
663 routeInMidiSVGIcon = icons.getSVG("route_in_midi.svg");
664 routeOutMidiSVGIcon = icons.getSVG("route_out_midi.svg");
665 midiPortSVGIcon = icons.getSVG("midi_port.svg");
666 routerSVGIcon = icons.getSVG("router.svg");
667
668 appearanceSVGIcon = icons.getSVG("appearance.svg");
669 editInstrumentSVGIcon = icons.getSVG("edit_instrument.svg");
670 deltaSVGIcon = icons.getSVG("delta.svg");
671
672 QPixmap px(10,10);
673 px.fill(Qt::transparent);
674 dummySVGIcon = new QIcon(px);
675
676 //----------------------------------
677 // Cursors
678 //----------------------------------
679
680 editpasteSCursor = new QCursor(pasteSVGIcon->pixmap(QSize(cursorSize, cursorSize)));
681 editpasteCloneSCursor = new QCursor(copySVGIcon->pixmap(QSize(cursorSize, cursorSize)));
682
683 // tool cursors
684 pencilCursor = new QCursor(pencilIconSVG->pixmap(QSize(cursorSize, cursorSize)), 0, qRound(dpr * (cursorSize - 1)));
685 glueCursor = new QCursor(glueIconSVG->pixmap(QSize(cursorSize, cursorSize)), 0, qRound(dpr * (cursorSize - 1)));
686 cutterCursor = new QCursor(cutterIconSVG->pixmap(QSize(cursorSize, cursorSize)), 0, qRound(dpr * (cursorSize - 1)));
687 zoomCursor = new QCursor(zoomIconSVG->pixmap(QSize(cursorSize, cursorSize)));
688 zoomAtCursor = new QCursor(zoomAtIconSVG->pixmap(QSize(cursorSize, cursorSize)));
689 deleteCursor = new QCursor(deleteIconSVG->pixmap(QSize(cursorSize, cursorSize)), qRound(dpr * (cursorSize / 6)), qRound(dpr * (cursorSize - 1)));
690 drawCursor = new QCursor(drawIconSVG->pixmap(QSize(cursorSize, cursorSize)), 0, qRound(dpr * (cursorSize - 1)));
691 mutePartsCursor = new QCursor(mutePartsIconSVG->pixmap(QSize(cursorSize, cursorSize)));
692 handCursor = new QCursor(handIconSVG->pixmap(QSize(cursorSize, cursorSize)));
693 closedHandCursor = new QCursor(closedHandIconSVG->pixmap(QSize(cursorSize, cursorSize)));
694 //magnetCursor = new QCursor(magnetIconSVG->pixmap(QSize(cursorSize, cursorSize)), -1, qRound(dpr * 15));
695 // This one needs to be bigger to contain drum notes.
696 //customMoveCursor = new QCursor(customMoveIconSVG->pixmap(QSize(2 * cursorSize, 2 * cursorSize)));
697 pencilMove4WayCursor =
698 new QCursor(pencilMove4WayIconSVG->pixmap(QSize(cursorSize, cursorSize)), 0, qRound(dpr * (cursorSize - 1)));
699 pencilMoveHorizCursor =
700 new QCursor(pencilMoveHorizIconSVG->pixmap(QSize(cursorSize, cursorSize)), 0, qRound(dpr * (cursorSize - 1)));
701 pencilMoveVertCursor =
702 new QCursor(pencilMoveVertIconSVG->pixmap(QSize(cursorSize, cursorSize)), 0, qRound(dpr * (cursorSize - 1)));
703 }
704
705 //---------------------------------------------------------
706 // deleteIcons
707 //---------------------------------------------------------
708
deleteIcons()709 void deleteIcons()
710 {
711 delete midiCtrlMergeEraseIcon;
712 delete midiCtrlMergeEraseInclusiveIcon;
713 delete midiCtrlMergeEraseWysiwygIcon;
714
715 delete museIcon;
716 delete aboutMuseImage;
717 delete globalIcon;
718 delete userIcon;
719 delete projectIcon;
720
721 //----------------------------------
722 // SVG...
723 //----------------------------------
724
725 delete dropDownTriangleSVGIcon;
726 delete expandLeftRightSVGIcon;
727
728 delete routingInputSVGIcon;
729 delete routingOutputSVGIcon;
730 delete routingInputUnconnectedSVGIcon;
731 delete routingOutputUnconnectedSVGIcon;
732
733 delete headphonesOffSVGIcon;
734 delete headphonesOnSVGIcon;
735
736 delete muteOffSVGIcon;
737 delete muteOnSVGIcon;
738 delete muteOnXSVGIcon;
739 delete muteProxyOnSVGIcon;
740 delete muteAndProxyOnSVGIcon;
741 delete muteStateSVGIcon;
742
743 delete soloOffSVGIcon;
744 delete soloOnSVGIcon;
745 delete soloOnAloneSVGIcon;
746 delete soloProxyOnSVGIcon;
747 delete soloProxyOnAloneSVGIcon;
748 delete soloAndProxyOnSVGIcon;
749 delete soloStateSVGIcon;
750
751 delete trackOffSVGIcon;
752 delete trackOnSVGIcon;
753
754 delete stereoOffSVGIcon;
755 delete stereoOnSVGIcon;
756
757 delete preFaderOffSVGIcon;
758 delete preFaderOnSVGIcon;
759
760 delete recArmOffSVGIcon;
761 delete recArmOnSVGIcon;
762 delete recArmStateSVGIcon;
763
764 delete monitorOffSVGIcon;
765 delete monitorOnSVGIcon;
766 delete monitorStateSVGIcon;
767
768 delete velocityPerNoteSVGIcon;
769
770 delete midiControllerNewSVGIcon;
771 delete midiControllerSelectSVGIcon;
772 delete midiControllerRemoveSVGIcon;
773
774
775 // delete soloSVGIcon;
776 // delete soloProxySVGIcon;
777 delete muteSVGIcon;
778 // delete trackEnableSVGIcon;
779 // delete recArmSVGIcon;
780 delete recMasterSVGIcon;
781
782 delete stopSVGIcon;
783 delete playSVGIcon;
784 delete fastForwardSVGIcon;
785 delete rewindSVGIcon;
786 delete rewindToStartSVGIcon;
787
788 delete externSyncOffSVGIcon;
789 delete externSyncOnSVGIcon;
790
791 delete masterTrackOffSVGIcon;
792 delete masterTrackOnSVGIcon;
793
794 delete jackTransportOffSVGIcon;
795 delete jackTransportOnSVGIcon;
796
797 delete timebaseMasterOffSVGIcon;
798 delete timebaseMasterOnSVGIcon;
799
800 delete metronomeOffSVGIcon;
801 delete metronomeOnSVGIcon;
802
803 delete fixedSpeedSVGIcon;
804 delete transportAffectsLatencySVGIcon;
805 delete overrideLatencySVGIcon;
806
807 delete panicSVGIcon;
808 delete loopSVGIcon;
809 delete punchinSVGIcon;
810 delete punchoutSVGIcon;
811 delete undoSVGIcon;
812 delete redoSVGIcon;
813 delete midiInSVGIcon;
814 delete steprecSVGIcon;
815 delete speakerSVGIcon;
816 delete speakerSingleNoteSVGIcon;
817 delete speakerChordsSVGIcon;
818
819 delete filenewSVGIcon;
820 delete filetemplateSVGIcon;
821 delete fileopenSVGIcon;
822 delete filesaveSVGIcon;
823 delete filesaveasSVGIcon;
824 delete filesaveProjectSVGIcon;
825 delete filesaveTemplateSVGIcon;
826 delete filesaveRevisionSVGIcon;
827 delete filecloseSVGIcon;
828 delete appexitSVGIcon;
829 delete whatsthisSVGIcon;
830 delete infoSVGIcon;
831 delete showFieldsSVGIcon;
832 delete exitSVGIcon;
833 delete noteSVGIcon;
834 delete metaSVGIcon;
835 delete ctrlSVGIcon;
836 delete sysexSVGIcon;
837 delete tracktypeSVGIcon;
838
839 delete pencilIconSVG;
840 delete glueIconSVG;
841 delete cutterIconSVG;
842 delete zoomIconSVG;
843 delete zoomAtIconSVG;
844 delete deleteIconSVG;
845 delete drawIconSVG;
846 delete pointerIconSVG;
847 delete mutePartsIconSVG;
848 delete handIconSVG;
849 delete closedHandIconSVG;
850 delete cursorIconSVG;
851 //delete magnetIconSVG;
852 //delete customMoveIconSVG;
853 delete pencilMove4WayIconSVG;
854 delete pencilMoveHorizIconSVG;
855 delete pencilMoveVertIconSVG;
856 delete audioStretchIconSVG;
857 delete audioResampleIconSVG;
858
859 delete synthGuiSVGIcon;
860 delete ankerSVGIcon;
861 delete settingsSVGIcon;
862 delete transportSVGIcon;
863 delete bigtimeSVGIcon;
864 delete mixerSVGIcon;
865 delete plusSVGIcon;
866 delete minusSVGIcon;
867 delete keySVGIcon;
868 delete delSelTracksSVGIcon;
869 delete duplSelTrackSVGIcon;
870 delete duplSelTracksSVGIcon;
871
872 delete pianorollSVGIcon;
873 delete arrangerSVGIcon;
874 delete waveeditorSVGIcon;
875 delete scoreeditSVGIcon;
876 delete mastereditSVGIcon;
877 delete drumeditSVGIcon;
878 delete listeditSVGIcon;
879
880 delete synthSVGIcon;
881 delete trackInputSVGIcon;
882 delete trackOutputSVGIcon;
883 delete trackAuxSVGIcon;
884 delete trackGroupVGIcon;
885
886 delete routeAutoAdjustSVGIcon;
887 delete routeSelSourceSVGIcon;
888 delete routeSelDestSVGIcon;
889 delete routeSourceSVGIcon;
890 delete routeDestSVGIcon;
891
892 delete gridOnSVGIcon;
893 delete rangeToSelectionSVGIcon;
894 delete quantizeSVGIcon;
895 delete clearSVGIcon;
896 delete downmixOffSVGIcon;
897 delete downmixOnSVGIcon;
898 delete downmixTrackSVGIcon;
899 delete downmixStateSVGIcon;
900 delete restartSVGIcon;
901 delete snapshotSVGIcon;
902 delete emptyBarSVGIcon;
903 delete lockSVGIcon;
904
905 delete midiResetSVGIcon;
906 delete midiInitSVGIcon;
907 delete midiLocalOffSVGIcon;
908
909 delete midiTransformSVGIcon;
910 delete midiInputTransformSVGIcon;
911 delete midiInputTransposeSVGIcon;
912 delete midiInputFilterSVGIcon;
913 delete midiInputRemoteSVGIcon;
914 delete midiSyncSVGIcon;
915 delete midiExportImportSVGIcon;
916
917 delete cutSVGIcon;
918 delete copySVGIcon;
919 delete pasteSVGIcon;
920 delete pasteDialogSVGIcon;
921 delete pasteCloneSVGIcon;
922 delete copyRangeSVGIcon;
923 delete deleteSVGIcon;
924 delete pasteSelectedTrackSVGIcon;
925 delete pasteCloneSelectedTrackSVGIcon;
926
927 delete eyeSVGIcon;
928 delete eyeCrossedSVGIcon;
929 delete eyeGreySVGIcon;
930
931 delete nextPartSVGIcon;
932 delete lastPartSVGIcon;
933
934 delete selectAllSVGIcon;
935 delete selectAllTrackSVGIcon;
936 delete selectInsideLoopSVGIcon;
937 delete selectOutsideLoopSVGIcon;
938 delete selectInvertSVGIcon;
939 delete deselectAllSVGIcon;
940
941 delete ledGreenSVGIcon;
942 delete ledGreenDarkSVGIcon;
943 delete ledRedSVGIcon;
944 delete ledBlueSVGIcon;
945 delete ledYellowSVGIcon;
946 delete ledOffSVGIcon;
947
948 delete routeInSVGIcon;
949 delete routeOutSVGIcon;
950 delete routeInMidiSVGIcon;
951 delete routeOutMidiSVGIcon;
952 delete midiPortSVGIcon;
953 delete routerSVGIcon;
954
955 delete appearanceSVGIcon;
956 delete editInstrumentSVGIcon;
957 delete deltaSVGIcon;
958
959 delete dummySVGIcon;
960
961 //----------------------------------
962 // Cursors
963 //----------------------------------
964
965 delete editpasteSCursor;
966 delete editpasteCloneSCursor;
967
968 delete pencilCursor;
969 delete glueCursor;
970 delete cutterCursor;
971 delete zoomCursor;
972 delete zoomAtCursor;
973 delete deleteCursor;
974 delete drawCursor;
975 delete mutePartsCursor;
976 delete handCursor;
977 delete closedHandCursor;
978 //delete magnetCursor;
979 //delete customMoveCursor;
980 delete pencilMove4WayCursor;
981 delete pencilMoveHorizCursor;
982 delete pencilMoveVertCursor;
983 }
984
985 } // namespace MusEGui
986