diff --git a/README.md b/README.md index 92e601b..74e336a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ NoTagPlayer =========== -BB10 Audio playes not using MP3 tags, rather directory tree \ No newline at end of file +BB10 Audio playes not using MP3 tags, rather directory tree + +joe test git push. diff --git a/assets/Player.qml b/assets/Player.qml index 145ca49..56f89cb 100644 --- a/assets/Player.qml +++ b/assets/Player.qml @@ -12,6 +12,35 @@ Page { title: prettyName } */ + keyListeners: [ + KeyListener { + onKeyEvent: { + //Perform an action when the signal is emitted + } + + onKeyPressed: { + //Perform an action when the signal is emitted + } + + onKeyReleased: { + //Perform an action when the signal is emitted + var codeKey = String.fromCharCode(event.key); + console.log("main page KeyListener " + event.key + "(" + codeKey + ")"); + switch(codeKey) + { + // Latest + case 'l': + case 'L': + break; + } // switch + + // Global - quick quit + if(codeKey == 'x' || codeKey == 'X') + Application.requestExit(); + } // onKeyReleased + } + ] + id: player signal deletePlaylistTab(int playlist_id); signal playbackStatusChanged(bool is_playing); @@ -222,6 +251,14 @@ Page { } imageSource: "asset:///images/ic_back.png" ActionBar.placement: ActionBarPlacement.OnBar + shortcuts: [ + SystemShortcut { + type: SystemShortcuts.PreviousSection + onTriggered: { + console.log("SystemShortcuts.NextSection --- next page") + } + } + ] }, ActionItem { id: actPlay @@ -233,7 +270,15 @@ Page { play(audioPlayer.isPlaying); } ActionBar.placement: ActionBarPlacement.OnBar - }, + shortcuts: [ + Shortcut { + key: "Space" + onTriggered: { + + } + } + ] + }, ActionItem { title: qsTr("Forward") onTriggered: { @@ -241,6 +286,14 @@ Page { } imageSource: "asset:///images/ic_next.png" ActionBar.placement: ActionBarPlacement.OnBar + shortcuts: [ + SystemShortcut { + type: SystemShortcuts.NextSection + onTriggered: { + console.log("SystemShortcuts.NextSection --- next page") + } + } + ] }, ActionItem { title: qsTr("Shuffle") @@ -411,8 +464,31 @@ Page { SystemToast { id: moveTrackToast body: qsTr("Tap on track to move after.") - } - + }, + MediaKeyWatcher { + id: keyWatcherUp + key: MediaKey.VolumeUp + onLongPress: { + console.log("UP onLongPress"); + forward(true); + } + }, + MediaKeyWatcher { + id: keyWatcherDown + key: MediaKey.VolumeDown + onLongPress: { + console.log("DOWN onLongPress"); + backward(); + } + }, + MediaKeyWatcher { + id: keyWatcherPlayPause + key: MediaKey.PlayPause + onShortPress: { + console.log("PLAY/PAUSE onShortPress"); + play(audioPlayer.isPlaying); + } + } ] function appendToPlayList(file_infos) diff --git a/bar-descriptor.xml b/bar-descriptor.xml index c4d36ec..2f729f7 100644 --- a/bar-descriptor.xml +++ b/bar-descriptor.xml @@ -51,7 +51,7 @@ - 1.0.12 + 1.0.14 diff --git a/src/applicationui.cpp b/src/applicationui.cpp index 8d15c83..13ac95c 100644 --- a/src/applicationui.cpp +++ b/src/applicationui.cpp @@ -16,6 +16,8 @@ #include #include +#include + #include #include #include diff --git a/translations/notagplayer.ts b/translations/notagplayer.ts index 5b06a74..8445fda 100644 --- a/translations/notagplayer.ts +++ b/translations/notagplayer.ts @@ -155,92 +155,92 @@ Player - - Pause - - - - - Play - - - - + Playlist actions - + Edit track - + Move track - + Shift track after current - + Scroll to the played track - + Remove track - + Backward - + + Pause + + + + + Play + + + + Forward - + Shuffle - + Add files - + Add URI - + Edit playlist properties - + Delete playlist tab - - Clear play list + + Realy delete current playlist tab? - - Realy delete current playlist tab? + + Clear play list - + Tap on track to move after.