mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Ref T529, view improvements
* protected slots -> protected * removed unused functions * load indicator timeout slot
This commit is contained in:
committed by
Mat Sutcliffe
parent
4e6437db4e
commit
91050e198c
@@ -786,7 +786,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CStatusMessage CViewBase<T>::ps_loadJson(const QString &directory)
|
||||
CStatusMessage CViewBase<T>::loadJson(const QString &directory)
|
||||
{
|
||||
const QString fileName = QFileDialog::getOpenFileName(nullptr,
|
||||
tr("Load data file"),
|
||||
@@ -796,7 +796,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CStatusMessage CViewBase<T>::ps_saveJson(bool selectedOnly, const QString &directory)
|
||||
CStatusMessage CViewBase<T>::saveJson(bool selectedOnly, const QString &directory)
|
||||
{
|
||||
const QString fileName = QFileDialog::getSaveFileName(nullptr,
|
||||
tr("Save data file"),
|
||||
@@ -899,27 +899,27 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void CViewBase<T>::ps_clicked(const QModelIndex &index)
|
||||
void CViewBase<T>::onClicked(const QModelIndex &index)
|
||||
{
|
||||
if (!m_acceptClickSelection) { return; }
|
||||
if (!index.isValid()) { return; }
|
||||
emit objectClicked(CVariant::fromValue(at(index)));
|
||||
emit this->objectClicked(CVariant::fromValue(at(index)));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void CViewBase<T>::ps_doubleClicked(const QModelIndex &index)
|
||||
void CViewBase<T>::onDoubleClicked(const QModelIndex &index)
|
||||
{
|
||||
if (!m_acceptDoubleClickSelection) { return; }
|
||||
if (!index.isValid()) { return; }
|
||||
emit objectDoubleClicked(CVariant::fromValue(at(index)));
|
||||
emit this->objectDoubleClicked(CVariant::fromValue(at(index)));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void CViewBase<T>::ps_rowSelected(const QModelIndex &index)
|
||||
void CViewBase<T>::onRowSelected(const QModelIndex &index)
|
||||
{
|
||||
if (!m_acceptRowSelection) { return; }
|
||||
if (!index.isValid()) { return; }
|
||||
emit objectSelected(CVariant::fromValue(at(index)));
|
||||
emit this->objectSelected(CVariant::fromValue(at(index)));
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user