📄 rosegardenguiapp.cpp
字号:
KStdAction::tipOfDay( this, SLOT( slotShowTip() ), actionCollection() ); // Standard Actions // KStdAction::saveOptions(this, SLOT(slotSaveOptions()), actionCollection()); KStdAction::preferences(this, SLOT(slotConfigure()), actionCollection()); KStdAction::keyBindings(this, SLOT(slotEditKeys()), actionCollection()); KStdAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection()); KRadioAction *action = 0; // Create the select icon // QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); QIconSet icon = QIconSet(pixmap); // TODO : add some shortcuts here action = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, this, SLOT(slotPointerSelected()), actionCollection(), "select"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Draw"), "pencil", Key_F3, this, SLOT(slotDrawSelected()), actionCollection(), "draw"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, this, SLOT(slotEraseSelected()), actionCollection(), "erase"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Move"), "move", Key_F5, this, SLOT(slotMoveSelected()), actionCollection(), "move"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); icon = QIconSet(pixmap); action = new KRadioAction(i18n("&Resize"), icon, Key_F6, this, SLOT(slotResizeSelected()), actionCollection(), "resize"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/split.xpm"); icon = QIconSet(pixmap); action = new KRadioAction(i18n("&Split"), icon, Key_F7, this, SLOT(slotSplitSelected()), actionCollection(), "split"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/join.xpm"); icon = QIconSet(pixmap); action = new KRadioAction(i18n("&Join"), icon, 0, this, SLOT(slotJoinSelected()), actionCollection(), "join"); action->setExclusiveGroup("segmenttools"); new KAction(i18n("&Harmonize"), 0, this, SLOT(slotHarmonizeSelection()), actionCollection(), "harmonize_selection"); pixmap.load(pixmapDir + "/toolbar/event-insert-timesig.png"); icon = QIconSet(pixmap); new KAction(AddTimeSignatureCommand::getGlobalName(), icon, 0, this, SLOT(slotEditTimeSignature()), actionCollection(), "add_time_signature"); new KAction(i18n("Open Tempo and Time Signature Editor"), 0, this, SLOT(slotEditTempos()), actionCollection(), "edit_tempos"); // // Edit menu // new KAction(i18n("Cut Range"), Key_X + CTRL + SHIFT, this, SLOT(slotCutRange()), actionCollection(), "cut_range"); new KAction(i18n("Copy Range"), Key_C + CTRL + SHIFT, this, SLOT(slotCopyRange()), actionCollection(), "copy_range"); new KAction(i18n("Paste Range"), Key_V + CTRL + SHIFT, this, SLOT(slotPasteRange()), actionCollection(), "paste_range");/* new KAction(i18n("Delete Range"), Key_Delete + SHIFT, this, SLOT(slotDeleteRange()), actionCollection(), "delete_range");*/ new KAction(i18n("Insert Range..."), Key_Insert + SHIFT, this, SLOT(slotInsertRange()), actionCollection(), "insert_range"); new KAction(i18n("De&lete"), Key_Delete, this, SLOT(slotDeleteSelectedSegments()), actionCollection(), "delete"); new KAction(i18n("Select &All Segments"), Key_A + CTRL, this, SLOT(slotSelectAll()), actionCollection(), "select_all"); pixmap.load(pixmapDir + "/toolbar/event-insert-tempo.png"); icon = QIconSet(pixmap); new KAction(AddTempoChangeCommand::getGlobalName(), icon, 0, this, SLOT(slotEditTempo()), actionCollection(), "add_tempo"); new KAction(ChangeCompositionLengthCommand::getGlobalName(), 0, this, SLOT(slotChangeCompositionLength()), actionCollection(), "change_composition_length"); new KAction(i18n("Edit Mar&kers..."), Key_K + CTRL, this, SLOT(slotEditMarkers()), actionCollection(), "edit_markers"); new KAction(i18n("Edit Document P&roperties..."), 0, this, SLOT(slotEditDocumentProperties()), actionCollection(), "edit_doc_properties"); // // Segments menu // new KAction(i18n("Open in &Default Editor"), Key_Return, this, SLOT(slotEdit()), actionCollection(), "edit_default"); pixmap.load(pixmapDir + "/toolbar/matrix.png"); icon = QIconSet(pixmap); new KAction(i18n("Open in Matri&x Editor"), icon, Key_M, this, SLOT(slotEditInMatrix()), actionCollection(), "edit_matrix"); pixmap.load(pixmapDir + "/toolbar/matrix-percussion.png"); icon = QIconSet(pixmap); new KAction(i18n("Open in &Percussion Matrix Editor"), icon, Key_D, this, SLOT(slotEditInPercussionMatrix()), actionCollection(), "edit_percussion_matrix"); pixmap.load(pixmapDir + "/toolbar/notation.png"); icon = QIconSet(pixmap); new KAction(i18n("Open in &Notation Editor"), icon, Key_N, this, SLOT(slotEditAsNotation()), actionCollection(), "edit_notation"); pixmap.load(pixmapDir + "/toolbar/eventlist.png"); icon = QIconSet(pixmap); new KAction(i18n("Open in &Event List Editor"), icon, Key_E, this, SLOT(slotEditInEventList()), actionCollection(), "edit_event_list"); pixmap.load(pixmapDir + "/toolbar/quantize.png"); icon = QIconSet(pixmap); new KAction(i18n("&Quantize..."), icon, Key_Equal, this, SLOT(slotQuantizeSelection()), actionCollection(), "quantize_selection"); new KAction(SegmentLabelCommand::getGlobalName(), 0, this, SLOT(slotRelabelSegments()), actionCollection(), "relabel_segment"); new KAction(SegmentTransposeCommand::getGlobalName(), 0, this, SLOT(slotTransposeSegments()), actionCollection(), "transpose"); new KAction(i18n("Repeat Last Quantize"), Key_Plus, this, SLOT(slotRepeatQuantizeSelection()), actionCollection(), "repeat_quantize"); new KAction(SegmentRescaleCommand::getGlobalName(), 0, this, SLOT(slotRescaleSelection()), actionCollection(), "rescale"); new KAction(SegmentAutoSplitCommand::getGlobalName(), 0, this, SLOT(slotAutoSplitSelection()), actionCollection(), "auto_split"); new KAction(SegmentSplitByPitchCommand::getGlobalName(), 0, this, SLOT(slotSplitSelectionByPitch()), actionCollection(), "split_by_pitch"); new KAction(SegmentSplitByRecordingSrcCommand::getGlobalName(), 0, this, SLOT(slotSplitSelectionByRecordedSrc()), actionCollection(), "split_by_recording"); new KAction(i18n("Split at Time..."), 0, this, SLOT(slotSplitSelectionAtTime()), actionCollection(), "split_at_time"); new KAction(i18n("Jog &Left"), Key_Left + ALT, this, SLOT(slotJogLeft()), actionCollection(), "jog_left"); new KAction(i18n("Jog &Right"), Key_Right + ALT, this, SLOT(slotJogRight()), actionCollection(), "jog_right"); new KAction(i18n("Set Start Time..."), 0, this, SLOT(slotSetSegmentStartTimes()), actionCollection(), "set_segment_start"); new KAction(i18n("Set Duration..."), 0, this, SLOT(slotSetSegmentDurations()), actionCollection(), "set_segment_duration"); new KAction(SegmentJoinCommand::getGlobalName(), Key_J + CTRL, this, SLOT(slotJoinSegments()), actionCollection(), "join_segments"); new KAction(i18n("Turn Re&peats into Copies"), 0, this, SLOT(slotRepeatingSegments()), actionCollection(), "repeats_to_real_copies"); new KAction(i18n("Manage Tri&ggered Segments"), 0, this, SLOT(slotManageTriggerSegments()), actionCollection(), "manage_trigger_segments"); new KAction(i18n("Set Tempos from &Beat Segment"), 0, this, SLOT(slotGrooveQuantize()), actionCollection(), "groove_quantize"); new KAction(i18n("Set &Tempo to Audio Segment Duration"), 0, this, SLOT(slotTempoToSegmentLength()), actionCollection(), "set_tempo_to_segment_length"); pixmap.load(pixmapDir + "/toolbar/manage-audio-segments.xpm"); icon = QIconSet(pixmap); new KAction(i18n("Manage A&udio Files"), icon, Key_U + CTRL, this, SLOT(slotAudioManager()), actionCollection(), "audio_manager"); m_viewSegmentLabels = new KToggleAction(i18n("Show Segment Labels"), 0, this, SLOT(slotToggleSegmentLabels()), actionCollection(), "show_segment_labels"); // // Tracks menu // pixmap.load(pixmapDir + "/toolbar/add_tracks.png"); icon = QIconSet(pixmap); new KAction(i18n("Add &Track"), icon, CTRL + Key_T, this, SLOT(slotAddTrack()), actionCollection(), "add_track"); new KAction(i18n("&Add Tracks..."), 0, this, SLOT(slotAddTracks()), actionCollection(), "add_tracks"); pixmap.load(pixmapDir + "/toolbar/delete_track.png"); icon = QIconSet(pixmap); new KAction(i18n("D&elete Track"), icon, CTRL + Key_D, this, SLOT(slotDeleteTrack()), actionCollection(), "delete_track"); pixmap.load(pixmapDir + "/toolbar/move_track_down.png"); icon = QIconSet(pixmap); new KAction(i18n("Move Track &Down"), icon, SHIFT + Key_Down, this, SLOT(slotMoveTrackDown()), actionCollection(), "move_track_down"); pixmap.load(pixmapDir + "/toolbar/move_track_up.png"); icon = QIconSet(pixmap); new KAction(i18n("Move Track &Up"), icon, SHIFT + Key_Up, this, SLOT(slotMoveTrackUp()), actionCollection(), "move_track_up"); new KAction(i18n("Select &Next Track"), Key_Down, this, SLOT(slotTrackDown()), actionCollection(), "select_next_track"); new KAction(i18n("Select &Previous Track"), Key_Up, this, SLOT(slotTrackUp()), actionCollection(), "select_previous_track"); new KAction(i18n("Mute or Unmute Track"), Key_U, this, SLOT(slotToggleMutedCurrentTrack()), actionCollection(), "toggle_mute_track"); new KAction(i18n("Arm or Un-arm Track for Record"), Key_R, this, SLOT(slotToggleRecordCurrentTrack()), actionCollection(), "toggle_arm_track"); pixmap.load(pixmapDir + "/toolbar/mute-all.png"); icon = QIconSet(pixmap); new KAction(i18n("&Mute all Tracks"), icon, 0, this, SLOT(slotMuteAllTracks()), actionCollection(), "mute_all_tracks"); pixmap.load(pixmapDir + "/toolbar/un-mute-all.png"); icon = QIconSet(pixmap); new KAction(i18n("&Unmute all Tracks"), icon, 0, this, SLOT(slotUnmuteAllTracks()), actionCollection(), "unmute_all_tracks"); new KAction(i18n("&Remap Instruments..."), 0, this, SLOT(slotRemapInstruments()), actionCollection(), "remap_instruments"); // // Studio menu // pixmap.load(pixmapDir + "/toolbar/mixer.png"); icon = QIconSet(pixmap); new KAction(i18n("&Audio Mixer"), icon, 0, this, SLOT(slotOpenAudioMixer()), actionCollection(), "audio_mixer"); pixmap.load(pixmapDir + "/toolbar/midimixer.png"); icon = QIconSet(pixmap); new KAction(i18n("Midi Mi&xer"), icon, 0, this, SLOT(slotOpenMidiMixer()), actionCollection(), "midi_mixer"); pixmap.load(pixmapDir + "/toolbar/manage-midi-devices.xpm"); icon = QIconSet(pixmap); new KAction(i18n("Manage MIDI &Devices"), icon, 0, this, SLOT(slotManageMIDIDevices()), actionCollection(), "manage_devices"); pixmap.load(pixmapDir + "/toolbar/manage-synth-plugins.png"); icon = QIconSet(pixmap); new KAction(i18n("Manage S&ynth Plugins"), icon, 0, this, SLOT(slotManageSynths()), actionCollection(), "manage_synths"); new KAction(i18n("Modify MIDI &Filters"), "filter", 0, this, SLOT(slotModifyMIDIFilters()), actionCollection(), "modify_midi_filters"); m_enableMIDIrouting = new KToggleAction(i18n("MIDI Thru Routing"), 0, this, SLOT(slotEnableMIDIThruRouting()), actionCollection(), "enable_midi_routing");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -