Class sh::ui::FilePropertyDialog

class sh::ui::FilePropertyDialog : public sh::ui::Dialog

The ‘File Properties’ dialog.

Subclassed by sh::ui::qt::QtFilePropertyDialog, sh::ui::web::WebFilePropertyDialog

Public Functions

~FilePropertyDialog()
FilePropertyDialog(QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes)
void refresh() = 0

Refreshes the dialog content.

QList<std::shared_ptr<FilePropertyDialogTab>> tabs()

Returns a list of all tabs.

sh::ui::FilePropertyDialogTabActionsView *widgetAt(std::shared_ptr<FilePropertyDialogTab> tab, int i)

Returns the widget from a tab at a certain index.

int widgetCount(std::shared_ptr<FilePropertyDialogTab> tab)

Returns the number of widgets in a tab.

sh::ui::FilePropertyDialogTabTableView *createTabViewTable() = 0

Creates a new tab view table sub-widget.

sh::ui::FilePropertyDialogTabTextView *createTabViewText() = 0

Creates a new tab view text sub-widget.

sh::ui::FilePropertyDialogTabIconTextBannerView *createTabViewIconTextBanner() = 0

Creates a new tab view icon text banner sub-widget.

qint64 dialogId()

Returns the dialog id.

Each instance has an id unique in the complete Shallot process lifetime.

Must be called in main thread.

bool isInited()

Returns if this dialog is initialized.

Must be called in main thread.

bool wasAccepted()

Returns if this dialog was ‘accepted’ by the user (typically by clicking some ‘OK’ button).

Must be called in main thread.

void waitClosed()

Wait until the user closed the dialog in some way.

May be called in any thread.

void close()

Closes the dialog.

Must be called in main thread.

bool wasClosed()

Returns if this dialog was closed.

Must be called in main thread.

DialogManager *manager()

Returns the DialogManager which hosts this dialog.

Public Static Functions

void addTabFactory(int i, std::shared_ptr<FilePropertyDialogTabFactory> factory)

Adds a FilePropertyDialogTabFactory so the Properties dialogs show its content.

See also the REGISTER_FILEPROPERTYDIALOGTAB macro.

Parameters
  • i: An index which controls the display order. Use one of the REGISTER_FILEPROPERTYDIALOGTAB_INDEX_* values in FilePropertyDialogTabFactory as base values.

Private Members

QList<std::shared_ptr<sh::filesystem::FilesystemNode>> _nodes
QList<TabViewStruct> _tabs

Private Static Attributes

QHash<int, std::shared_ptr<FilePropertyDialogTabFactory>> _propertytabs

Friends

friend class FilePropertyDialogTab