13 using namespace swift::gui::menus;
17 CApplicationInfoView::CApplicationInfoView(QWidget *parent) :
CViewBase(parent)
26 CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories(reinitOtherVersions);
37 this->resizeRowsToContents();
44 const QMessageBox::StandardButton reply = QMessageBox::question(
45 this,
"Delete?",
"Delete selected data directories?", QMessageBox::Yes | QMessageBox::No);
46 if (reply != QMessageBox::Yes) {
return; }
48 QStringList deletedDirectories;
51 const QString d = CFileUtils::fixWindowsUncPath(info.getApplicationDataDirectory());
53 if (!dir.exists()) {
continue; }
54 if (dir.removeRecursively()) { deletedDirectories << d; }
56 if (deletedDirectories.isEmpty()) {
return; }
62 if (!this->view()) {
return; }
63 if (!this->view()->isEmpty())
65 m_menuActionDeleteDirectory = menuActions.
addAction(
66 m_menuActionDeleteDirectory, CIcons::delete16(),
"Delete data directories", CMenuAction::pathNone(),
Application info list model.
int otherSwiftVersionsFromDataDiretoriesAndResize(bool reinitOtherVersion=false)
Display versions and resize.
int otherSwiftVersionsFromDataDirectories(bool reinitOtherVersions=false)
swift::misc::CApplicationInfoList::otherSwiftVersionsFromDataDirectories
void deleteSelectedDataDirectories()
Delete the selected directories.
void standardInit(ModelClass *model=nullptr)
Standard initialization.
virtual ContainerType selectedObjects() const
Selected objects.
void setPercentageColumnWidths()
Set the widths based on the column percentages.
int updateContainer(const ContainerType &container, bool sort=true, bool resize=true)
Update whole container.
bool m_acceptRowSelection
selection changed
menus::IMenuDelegate * setCustomMenu(menus::IMenuDelegate *menu, bool nestPreviousMenu=true)
Set custom menu if applicable.
bool hasSelection() const
Selection (selected rows)
Description of a swift application.
List of swift application descriptions.
size_type size() const
Returns number of elements in the sequence.
bool isEmpty() const
Synonym for empty.
Models to be used with views, mainly QTableView.
Views, mainly QTableView.
Free functions in swift::misc.