KFile Class

KFile is a class which provides a namespace for some enumerated values associated with the kfile library. You will never need to construct a KFile object itself. More...

Header: #include <KFile>
CMake: find_package(KF6 REQUIRED COMPONENTS KIO)
target_link_libraries(mytarget PRIVATE KF6::KIOWidgets)

Public Types

enum FileView { Default, Simple, Detail, SeparateDirs, PreviewContents, …, DetailTree }
enum Mode { File, Directory, Files, ExistingOnly, LocalOnly }
flags Modes
enum SelectionMode { Single, Multi, Extended, NoSelection }

Static Public Members

bool isDefaultView(const KFile::FileView &view)
bool isDetailTreeView(const KFile::FileView &view)
bool isDetailView(const KFile::FileView &view)
bool isPreviewContents(const KFile::FileView &view)
bool isPreviewInfo(const KFile::FileView &view)
bool isSeparateDirs(const KFile::FileView &view)
bool isSimpleView(const KFile::FileView &view)
bool isSortByDate(const QDir::SortFlags &sort)
bool isSortByName(const QDir::SortFlags &sort)
bool isSortBySize(const QDir::SortFlags &sort)
bool isSortByType(const QDir::SortFlags &sort)
bool isSortCaseInsensitive(const QDir::SortFlags &sort)
bool isSortDirsFirst(const QDir::SortFlags &sort)
bool isTreeView(const KFile::FileView &view)

Detailed Description

Member Type Documentation

enum KFile::FileView

ConstantValue
KFile::Default0
KFile::Simple1
KFile::Detail2
KFile::SeparateDirs4
KFile::PreviewContents8
KFile::PreviewInfo16
KFile::Tree32
KFile::DetailTree64

enum KFile::Mode
flags KFile::Modes

Modes of operation for the dialog.

ConstantValueDescription
KFile::File1Get a single file name from the user.
KFile::Directory2Get a directory name from the user.
KFile::Files4Get multiple file names from the user.
KFile::ExistingOnly8Never return a filename which does not exist yet
KFile::LocalOnly16Don't return remote filenames

The Modes type is a typedef for QFlags<Mode>. It stores an OR combination of Mode values.

enum KFile::SelectionMode

ConstantValue
KFile::Single1
KFile::Multi2
KFile::Extended4
KFile::NoSelection8

Member Function Documentation

[static] bool KFile::isDefaultView(const KFile::FileView &view)

[static] bool KFile::isDetailTreeView(const KFile::FileView &view)

[static] bool KFile::isDetailView(const KFile::FileView &view)

[static] bool KFile::isPreviewContents(const KFile::FileView &view)

[static] bool KFile::isPreviewInfo(const KFile::FileView &view)

[static] bool KFile::isSeparateDirs(const KFile::FileView &view)

[static] bool KFile::isSimpleView(const KFile::FileView &view)

[static] bool KFile::isSortByDate(const QDir::SortFlags &sort)

[static] bool KFile::isSortByName(const QDir::SortFlags &sort)

[static] bool KFile::isSortBySize(const QDir::SortFlags &sort)

[static] bool KFile::isSortByType(const QDir::SortFlags &sort)

[static] bool KFile::isSortCaseInsensitive(const QDir::SortFlags &sort)

[static] bool KFile::isSortDirsFirst(const QDir::SortFlags &sort)

[static] bool KFile::isTreeView(const KFile::FileView &view)