Class sh::ui::qt::QtFilePropertyDialog

class sh::ui::qt::QtFilePropertyDialog : public sh::ui::qt::QtDialog, public sh::ui::FilePropertyDialog

Qt based properties dialog.

Public Functions

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

Constructed only by the infrastructure and made available otherwise.

void init(std::shared_ptr<Dialog> dialog) override

Executes custom stuff on initialization, e.g. for populating the dialog.

void refresh() override

Refreshes the dialog content.

sh::ui::FilePropertyDialogTabTableView *createTabViewTable() override

Creates a new tab view table sub-widget.

sh::ui::FilePropertyDialogTabTextView *createTabViewText() override

Creates a new tab view text sub-widget.

sh::ui::FilePropertyDialogTabIconTextBannerView *createTabViewIconTextBanner() override

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

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.

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 Slots

void on_btnClose_clicked()
void on_btnRefresh_clicked()
void on_tabWidget_currentChanged(int index)
void selectTabByScrollPosition()

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

Ui::QtFilePropertyDialog *ui
QList<QWidget*> _internaltabwidgets
QList<QString> _tabheads
int _skip_on_tabWidget_currentChanged = 0
int _skip_selectTabByScrollPosition = 0
QVBoxLayout *scrollAreaLayout

Friends

friend class FilePropertyDialogTab