miva/README.md

3 KiB

miva

Mobile image and video browser/viewer

miva screenshot miva screenshot of video playback

Building

You will need Qt 6.8+ in a dev flavour. In particular (for PostmarketOS):

  • qt6-qtbase-dev
  • qt6-qtdeclarative-dev

You'll also need some KF6 stuff:

  • kio-dev

Then build/install it:

doneill@lyria ~/c/miva> mkdir build
doneill@lyria ~/c/miva> cd build
doneill@lyria ~/c/m/build> qmake6 ..
Info: creating stash file /home/doneill/code/miva/build/.qmake.stash
doneill@lyria ~/c/m/build> make
g++ -c -pipe -O2 -std=gnu++1z -Wall -Wextra -D_REENTRANT -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_QMLINTEGRATION_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../miva -I. -I/usr/include/KF6/KIOGui -I/usr/include/KF6/KIO -I/usr/include/KF6/KIOCore -I/usr/include/KF6/KCoreAddons -I/usr/include/qt6 -I/usr/include/qt6/QtQuick -I/usr/include/qt6/QtOpenGL -I/usr/include/qt6/QtWidgets -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtQml -I/usr/include/qt6/QtQmlIntegration -I/usr/include/qt6/QtNetwork -I/usr/include/qt6/QtCore -I. -I/usr/lib/qt6/mkspecs/linux-g++ -o main.o ../src/main.cpp
...
g++ -Wl,-O1 -Wl,-rpath,/usr/lib -Wl,-rpath-link,/usr/lib -o miva  main.o mutils.o thumbnailprovider.o qrc_qml.o moc_mutils.o   -lKF6KIOCore -lKF6KIOGui -lKF6CoreAddons /usr/lib/libQt6Quick.so /usr/lib/libQt6OpenGL.so /usr/lib/libQt6Widgets.so /usr/lib/libQt6Gui.so /usr/lib/libGLESv2.so /usr/lib/libEGL.so /usr/lib/libQt6Qml.so /usr/lib/libQt6Network.so /usr/lib/libQt6Core.so -lpthread -lGLESv2 -lEGL   
doneill@lyria ~/c/m/build> sudo make install
[sudo: authenticate] Password:     
/usr/bin/qmake6 -install qinstall -exe miva /usr/local/bin/miva
strip /usr/local/bin/miva
/usr/bin/qmake6 -install qinstall /home/doneill/code/miva/dist/miva.desktop /usr/local/share/applications/miva.desktop
/usr/bin/qmake6 -install qinstall /home/doneill/code/miva/dist/miva.png /usr/local/share/icons/hicolor/512x512/apps/miva.png
doneill@lyria ~/c/m/build> miva

Usage

Once installed, it should show up in the Plasma Mobile launcher with the opossum icon. (I like opossums.)

You can navigate the filesystem from the gallery interface, which is fairly straightforward. KIO is used to generate (or use existing) thumbnails for supported image and video formats.

Tapping on a directory (folder icons) will move into them. Tapping on an image or video will display that image or video.

While viewing an image, tapping it will swap between scaled to fit and unscaled.

While viewing a video, tapping it once will pause or unpause playback. Double-tapping will toggle fullscreen.

A button in the top-left will get you back to the browser.

Really, this is a super dead-simple image viewer.

Notes

GIF files are treated as "videos" to facilitate smooth pausing, looping, and seeking.

Credits

The following graphics are from KDE Breeze:

  • document-open-folder.svg
  • go-parent-folder.svg
  • insert-image.svg
  • question.svg
  • video-symbolic.svg

They have been unmodified.