diff options
| author | mirror <mirror@localhost> | 2026-11-22 08:41:00 +0900 |
|---|---|---|
| committer | mirror <mirror@localhost> | 2026-11-22 08:41:00 +0900 |
| commit | 449d8b74bd6d9dae98a07254cdfad677b920e7b0 (patch) | |
| tree | c131c3528c4d517f56e19b854a7453fedb097d40 /plugins/aves_model/lib/src/actions/entry.dart | |
| download | aves-src-master.tar.gz aves-src-master.zip | |
Diffstat (limited to 'plugins/aves_model/lib/src/actions/entry.dart')
| -rw-r--r-- | plugins/aves_model/lib/src/actions/entry.dart | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/plugins/aves_model/lib/src/actions/entry.dart b/plugins/aves_model/lib/src/actions/entry.dart new file mode 100644 index 0000000..02becf1 --- /dev/null +++ b/plugins/aves_model/lib/src/actions/entry.dart @@ -0,0 +1,148 @@ +enum EntryAction { + info, + addShortcut, + copyToClipboard, + delete, + restore, + convert, + print, + rename, + copy, + move, + share, + toggleFavourite, + // raster + rotateCCW, + rotateCW, + flip, + // vector + viewSource, + // video + lockViewer, + videoCaptureFrame, + videoSelectStreams, + videoSetSpeed, + videoABRepeat, + videoToggleMute, + videoSettings, + videoTogglePlay, + videoReplay10, + videoSkip10, + videoShowPreviousFrame, + videoShowNextFrame, + // external + edit, + open, + openVideoPlayer, + openMap, + setAs, + cast, + // platform + rotateScreen, + // metadata + editDate, + editLocation, + editTitleDescription, + editRating, + editTags, + removeMetadata, + exportMetadata, + // metadata / GeoTIFF + showGeoTiffOnMap, + // metadata / motion photo + convertMotionPhotoToStillImage, + viewMotionPhotoVideo, + // debug + debug, +} + +class EntryActions { + static const topLevel = [ + EntryAction.info, + EntryAction.share, + EntryAction.edit, + EntryAction.rename, + EntryAction.delete, + EntryAction.copy, + EntryAction.move, + EntryAction.toggleFavourite, + EntryAction.rotateScreen, + EntryAction.viewSource, + ]; + + static const export = [ + ...exportInternal, + ...exportExternal, + ]; + + static const exportInternal = [ + EntryAction.convert, + EntryAction.addShortcut, + EntryAction.copyToClipboard, + EntryAction.print, + ]; + + static const exportExternal = [ + EntryAction.open, + EntryAction.openMap, + EntryAction.setAs, + EntryAction.cast, + ]; + + static const pageActions = { + EntryAction.videoCaptureFrame, + EntryAction.videoToggleMute, + EntryAction.videoSetSpeed, + EntryAction.videoABRepeat, + EntryAction.videoSelectStreams, + EntryAction.videoSettings, + ...videoPlayback, + ...orientationActions, + }; + + static const orientationActions = [ + EntryAction.rotateCCW, + EntryAction.rotateCW, + EntryAction.flip, + ]; + + static const trashed = [ + EntryAction.delete, + EntryAction.restore, + EntryAction.debug, + ]; + + static const video = [ + EntryAction.videoCaptureFrame, + EntryAction.videoToggleMute, + EntryAction.videoSetSpeed, + EntryAction.videoABRepeat, + EntryAction.videoSelectStreams, + EntryAction.videoSettings, + EntryAction.lockViewer, + ]; + + static const videoPlayback = [ + EntryAction.videoReplay10, + EntryAction.videoShowPreviousFrame, + EntryAction.videoTogglePlay, + EntryAction.videoShowNextFrame, + EntryAction.videoSkip10, + ]; + + static const commonMetadataActions = [ + EntryAction.editDate, + EntryAction.editLocation, + EntryAction.editTitleDescription, + EntryAction.editRating, + EntryAction.editTags, + EntryAction.removeMetadata, + EntryAction.exportMetadata, + ]; + + static const formatSpecificMetadataActions = [ + EntryAction.showGeoTiffOnMap, + EntryAction.convertMotionPhotoToStillImage, + EntryAction.viewMotionPhotoVideo, + ]; +} |
