mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Ref T345, in view added acceptRowSelection
This commit is contained in:
@@ -25,7 +25,7 @@ namespace BlackGui
|
||||
{
|
||||
const CApplicationInfoList others = CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories();
|
||||
this->updateContainer(others);
|
||||
m_acceptRowSelected = others.size() > 0;
|
||||
m_acceptRowSelection = others.size() > 0;
|
||||
return others.size();
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace BlackGui
|
||||
{
|
||||
m_menus |= MenuClear;
|
||||
this->menuRemoveItems(MenuRefresh | MenuBackend | MenuToggleSelectionMode);
|
||||
m_acceptRowSelected = true;
|
||||
m_acceptRowSelection = true;
|
||||
this->standardInit(new CStatusMessageListModel(this));
|
||||
}
|
||||
|
||||
|
||||
@@ -1712,7 +1712,7 @@ namespace BlackGui
|
||||
template <class ModelClass, class ContainerType, class ObjectType>
|
||||
void CViewBase<ModelClass, ContainerType, ObjectType>::ps_rowSelected(const QModelIndex &index)
|
||||
{
|
||||
if (!m_acceptRowSelected) { return; }
|
||||
if (!m_acceptRowSelection) { return; }
|
||||
if (!index.isValid()) { return; }
|
||||
emit objectSelected(CVariant::fromValue(at(index)));
|
||||
}
|
||||
|
||||
@@ -250,6 +250,9 @@ namespace BlackGui
|
||||
//! Accept double click selection
|
||||
void acceptDoubleClickSelection(bool accept) { m_acceptDoubleClickSelection = accept; }
|
||||
|
||||
//! Accept row selection
|
||||
void acceptRowSelection(bool accept) { m_acceptRowSelection = accept; }
|
||||
|
||||
//! Remove given menu items
|
||||
void menuRemoveItems(Menu menusToRemove);
|
||||
|
||||
@@ -487,7 +490,7 @@ namespace BlackGui
|
||||
bool m_showingLoadIndicator = false; //!< showing loading indicator
|
||||
bool m_enabledLoadIndicator = true; //!< loading indicator enabled/disabled
|
||||
bool m_acceptClickSelection = false; //!< clicked
|
||||
bool m_acceptRowSelected = false; //!< selection changed
|
||||
bool m_acceptRowSelection = false; //!< selection changed
|
||||
bool m_acceptDoubleClickSelection = false; //!< double clicked
|
||||
bool m_displayAutomatically = true; //!< display directly when loaded
|
||||
bool m_enableDeleteSelectedRows = false; //!< selected rows can be deleted
|
||||
|
||||
Reference in New Issue
Block a user