Class sh::ui::FilePropertyDialogTab

class sh::ui::FilePropertyDialogTab : public std::enable_shared_from_this<FilePropertyDialogTab>

Abstract base class for one tab in the Properties dialog (containing a list of widgets).

Subclass and register this class for providing additional content in the Properties dialog.

Register it by using the REGISTER_FILEPROPERTYDIALOGTAB macro (or by adding a FilePropertyDialogTabFactory via FilePropertyDialog::addTabFactory).

Subclassed by sh::filepropertydialogtabs::FilePropertyDialogTabExtendedAttributes, sh::filepropertydialogtabs::FilePropertyDialogTabGeneral, sh::filepropertydialogtabs::FilePropertyDialogTabUnixPermissions, sh::filepropertydialogtabs::FilePropertyDialogTabWindows, sh::scripting::api::ApiFilePropertyDialogTab

Public Functions

QString title() = 0

The tab title. .

QString titleWithoutMnemonic()

The tab title without mnemonic.

QList<QString> properties() = 0

Returns the list of property labels (one entry for each widget).

Each property is displayed with a header and a widget (created in createWidget) with some content (populated in updateWidget).

void populateWidget(int i, FilePropertyDialogTabActionsView *widget) = 0

Populates the tab widget for the i-th property.

Typically uses the FilePropertyDialog::create* methods to create sub-widgets.

See also dialog().

void updateWidget(int i, FilePropertyDialogTabActionsView *widget, sh::filesystem::Operation *op) = 0

Populates the widget for the i-th property with actual content. .

void refresh()

Refreshes the complete content.

Typically called after some user actions in a property widget require that all the other content must be refreshed.

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

The nodes to show.

FilePropertyDialogTabActionsView *widgetAt(int i)

Returns the widget for the i-th property.

int widgetCount()

Returns the number of widgets.

std::shared_ptr<FilePropertyDialog> dialog()

Returns the associated dialog.

~FilePropertyDialogTab()

Private Members

std::weak_ptr<FilePropertyDialog> _dialog

Friends

friend class FilePropertyDialog
friend class FilePropertyDialogTabFactoryByFunction
friend class sh::scripting::api::ApiFilePropertyDialogTabFactory