Class sh::ui::qt::QtFileViewControl

class sh::ui::qt::QtFileViewControl : public sh::ui::FileView

Qt based file view.

Public Functions

QtFileViewControl(sh::ui::qt::QtFilesystemPanel *panel, int i)
~QtFileViewControl()
sh::ui::ColumnDimensions *columndimensions() override

Returns the column dimensions handler. .

sh::tools::HistoryTracker<std::shared_ptr<const sh::filesystem::Eurl>> *historyTracker() override

Returns the history tracker. .

FileViewMode viewmode() override

Returns the view mode (icons, list, … ?). .

void setViewmode(FileViewMode m) override

Sets the view mode. .

int index() override

Returns the position of this file view within the panel. .

void gotoDir(std::shared_ptr<sh::filesystem::FilesystemNode> n) override

Jumps to a new current directory.

Implementations have to call the base class implementation inside.

sh::filesystem::SizeFormatting getSizeFormattingMode() override

Returns the mode how file sizes are formatted for displaying. .

void setSizeFormattingMode(sh::filesystem::SizeFormatting mode) override

Sets the mode how file sizes are formatted for displaying. .

bool hiddenFilesVisible() override

Returns if hidden files are visible. .

void setHiddenFilesVisible(bool v) override

Sets the visibility of hidden files. .

int iconDimension() override

Returns the icon size (in pixels). .

void setIconDimension(int v) override

Sets the icon size (in pixels). .

void setSort(int column, Qt::SortOrder order) override

Sets how to sort this view. .

int sortColumn() override

Returns the index of the current sort column. .

Qt::SortOrder sortOrder() override

Returns the current sort order. .

QList<std::shared_ptr<sh::filesystem::FilesystemNode>> selectedNodes() override

Returns the nodes which the user has selected in this fileview. .

void setSelection(const QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes) override

Sets the node selection of this fileview. .

QList<std::shared_ptr<sh::filesystem::FilesystemNode>> getAllVisibleNodes() override

Returns a list of all nodes currently listed in this file view. .

void emit_nodesActivated(QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes)
void emit_selectionChanged()
std::shared_ptr<sh::filesystem::FilesystemNode> node()

Returns the current directory.

void reload(bool skipModel = false)

Reloads the data inside this file view.

sh::filesystem::FilesystemModelFileviewProxy *filemodel()

Returns the filesystem model for this view. .

void setFilemodel(sh::filesystem::FilesystemModelFileviewProxy *model)

Sets the filesystem model for this view. .

Signals

void nodesActivated(QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes)
void selectionChanged()

Triggered when the selection have changed.

void viewOptionChanged()

Triggered when some view options have changed.

Private Functions

void setIndex(int i)

Private Members

sh::ui::qt::QtFilesystemPanel *_panel
int i
sh::ui::ColumnDimensions *_columndimensions
sh::tools::HistoryTracker<std::shared_ptr<const sh::filesystem::Eurl>> *_historyTracker
FileViewMode _viewmode = FileViewMode::ListView
bool _hiddenfilesvisible = false
int _icondimension = 0
int _sortColumn
Qt::SortOrder _sortOrder
sh::filesystem::SizeFormatting _sizeformattingmode = sh::filesystem::SizeFormatting::SizeFormattingModePrefixes

Friends

friend class sh::ui::qt::QtFilesystemPanel