• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • FileView
  • FileView Class

    The preview pane of the file manager: it shows one file with the viewer for its type. More...

    Header: #include <FileView>
    Inherits: QWidget

    Detailed Description

    setFile() picks a viewer from the file's MIME type and replaces the previous one. Text and images use the shared content viewers, the same ones the lightbox shows. Audio and video, fonts, archives and PDF files have their own views. Any other file shows as plain text when it looks like text, or else in a hex view.

    A host can opt in to editing: a file whose suffix is in setEditableSuffixes() opens in an embedded, autosaving Markdown editor instead of the read-only preview. dirtyChanged() relays the editor's unsaved state, and saveCurrent() flushes it. FileManager shows each open file in a FileView tab, and gives it the settings store the editor keeps its pane choice in.

    See also FileManager.