AppStorage (Modules) names an application's persistent folder, ~/<name>, with images/ and sessions/ subfolders. WindowHost::persistentAppStorage() is pure virtual, so every WidgetApplication must say where its data lives; widgets reach it through ui()->windowHost(). MarkdownEditor without an explicit image store now saves a pasted image into <application>/images/pasted-N.<ext> and links it by absolute path, instead of ignoring it with "nowhere to save it". saveClipboardImage is the one writer of pasted image files; the gallery's own store uses it too. Session recordings default to <application>/sessions instead of ~/<application>-sessions; MODULES_SESSION_DIR still overrides it. AppStorage::adoptLegacyDirectory moves an older folder in once, by rename.
25 lines
622 B
C++
25 lines
622 B
C++
#pragma once
|
|
|
|
#include "GUI.hpp"
|
|
#include "WidgetApplication.hpp"
|
|
|
|
#include <string>
|
|
|
|
namespace tp {
|
|
|
|
class LibraryViewerApplication : public ui::WidgetApplication {
|
|
public:
|
|
explicit LibraryViewerApplication(const std::string& libraryPath);
|
|
~LibraryViewerApplication() override;
|
|
|
|
[[nodiscard]] Library& library() { return mLibrary; }
|
|
[[nodiscard]] LibraryWidget& gui() { return mGui; }
|
|
[[nodiscard]] AppStorage persistentAppStorage() const override { return AppStorage::inHome("library-viewer"); }
|
|
|
|
private:
|
|
Player mPlayer;
|
|
PlayerDevice mDevice{ mPlayer };
|
|
Library mLibrary;
|
|
LibraryWidget mGui;
|
|
};
|
|
}
|