diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2015-05-17 18:10:42 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2015-05-17 21:51:15 +0200 |
commit | 2caf08aaa783cfabf54212bcb0197afc1db24440 (patch) | |
tree | 7d3f23002bbf502b2f0b804660616b7553ea1ae7 /src/actions.h | |
parent | c68631b2f080257108f979295fc6a5e2d58304d6 (diff) |
split PressSpace action into modular pieces
Diffstat (limited to 'src/actions.h')
-rw-r--r-- | src/actions.h | 56 |
1 files changed, 40 insertions, 16 deletions
diff --git a/src/actions.h b/src/actions.h index f099ca92..db8ee5d1 100644 --- a/src/actions.h +++ b/src/actions.h @@ -37,15 +37,15 @@ enum class Type MacroUtility = 0, Dummy, UpdateEnvironment, MouseEvent, ScrollUp, ScrollDown, ScrollUpArtist, ScrollUpAlbum, ScrollDownArtist, ScrollDownAlbum, PageUp, PageDown, MoveHome, MoveEnd, - ToggleInterface, JumpToParentDirectory, PressEnter, PressSpace, PreviousColumn, - NextColumn, MasterScreen, SlaveScreen, VolumeUp, VolumeDown, DeletePlaylistItems, - DeleteStoredPlaylist, DeleteBrowserItems, ReplaySong, Previous, Next, Pause, - Stop, ExecuteCommand, SavePlaylist, MoveSortOrderUp, MoveSortOrderDown, + ToggleInterface, JumpToParentDirectory, PressEnter, PreviousColumn, + NextColumn, MasterScreen, SlaveScreen, VolumeUp, VolumeDown, AddItemToPlaylist, + DeletePlaylistItems, DeleteStoredPlaylist, DeleteBrowserItems, ReplaySong, Previous, + Next, Pause, Stop, ExecuteCommand, SavePlaylist, MoveSortOrderUp, MoveSortOrderDown, MoveSelectedItemsUp, MoveSelectedItemsDown, MoveSelectedItemsTo, Add, SeekForward, SeekBackward, ToggleDisplayMode, ToggleSeparatorsBetweenAlbums, - ToggleLyricsFetcher, ToggleFetchingLyricsInBackground, TogglePlayingSongCentering, - UpdateDatabase, JumpToPlayingSong, ToggleRepeat, Shuffle, ToggleRandom, - StartSearching, SaveTagChanges, ToggleSingle, ToggleConsume, ToggleCrossfade, + ToggleLyricsUpdateOnSongChange, ToggleLyricsFetcher, ToggleFetchingLyricsInBackground, + TogglePlayingSongCentering, UpdateDatabase, JumpToPlayingSong, ToggleRepeat, Shuffle, + ToggleRandom, StartSearching, SaveTagChanges, ToggleSingle, ToggleConsume, ToggleCrossfade, SetCrossfade, SetVolume, EditSong, EditLibraryTag, EditLibraryAlbum, EditDirectoryName, EditPlaylistName, EditLyrics, JumpToBrowser, JumpToMediaLibrary, JumpToPlaylistEditor, ToggleScreenLock, JumpToTagEditor, JumpToPositionInSong, @@ -56,7 +56,7 @@ enum class Type ToggleAddMode, ToggleMouse, ToggleBitrateVisibility, AddRandomItems, ToggleBrowserSortMode, ToggleLibraryTagType, ToggleMediaLibrarySortMode, RefetchLyrics, - SetSelectedItemsPriority, SetVisualizerSampleMultiplier, + SetSelectedItemsPriority, ToggleVisualizationType, SetVisualizerSampleMultiplier, ShowSongInfo, ShowArtistInfo, ShowLyrics, Quit, NextScreen, PreviousScreen, ShowHelp, ShowPlaylist, ShowBrowser, ChangeBrowseMode, ShowSearchEngine, ResetSearchEngine, ShowMediaLibrary, ToggleMediaLibraryColumnsMode, @@ -272,14 +272,6 @@ private: virtual void run() OVERRIDE; }; -struct PressSpace: BaseAction -{ - PressSpace(): BaseAction(Type::PressSpace, "press_space") { } - -private: - virtual void run() OVERRIDE; -}; - struct PreviousColumn: BaseAction { PreviousColumn(): BaseAction(Type::PreviousColumn, "previous_column") { } @@ -332,6 +324,17 @@ private: virtual void run() OVERRIDE; }; +struct AddItemToPlaylist: BaseAction +{ + AddItemToPlaylist(): BaseAction(Type::AddItemToPlaylist, "add_item_to_playlist") { } + +private: + virtual bool canBeRun() OVERRIDE; + virtual void run() OVERRIDE; + + HasSongs *m_hs; +}; + struct DeletePlaylistItems: BaseAction { DeletePlaylistItems(): BaseAction(Type::DeletePlaylistItems, "delete_playlist_items") { } @@ -506,6 +509,16 @@ private: virtual void run() OVERRIDE; }; +struct ToggleLyricsUpdateOnSongChange: BaseAction +{ + ToggleLyricsUpdateOnSongChange() + : BaseAction(Type::ToggleLyricsUpdateOnSongChange, "toggle_lyrics_update_on_song_change") { } + +private: + virtual bool canBeRun() OVERRIDE; + virtual void run() OVERRIDE; +}; + struct ToggleLyricsFetcher: BaseAction { ToggleLyricsFetcher(): BaseAction(Type::ToggleLyricsFetcher, "toggle_lyrics_fetcher") { } @@ -998,6 +1011,17 @@ private: virtual void run() OVERRIDE; }; +struct ToggleVisualizationType: BaseAction +{ + ToggleVisualizationType() + : BaseAction(Type::ToggleVisualizationType, "toggle_visualization_type") { } + +private: + + virtual bool canBeRun() OVERRIDE; + virtual void run() OVERRIDE; +}; + struct SetVisualizerSampleMultiplier: BaseAction { SetVisualizerSampleMultiplier() |