Ref T442, getColumns from view/model

This commit is contained in:
Klaus Basan
2018-12-06 03:17:50 +01:00
parent 02213e860d
commit 6116797727
2 changed files with 11 additions and 1 deletions

View File

@@ -130,6 +130,9 @@ namespace BlackGui
//! Convert to JSON string
virtual QString toJsonString(QJsonDocument::JsonFormat format = QJsonDocument::Indented, bool selectedOnly = false) const = 0;
//! The columns
const CColumns &getColumns() const { return m_columns; }
signals:
//! Asynchronous update finished
void asyncUpdateFinished();

View File

@@ -49,7 +49,6 @@ class QModelIndex;
class QPaintEvent;
class QPoint;
class QShowEvent;
class QWidget;
class QTabWidget;
namespace BlackMisc { class CWorker; }
@@ -64,6 +63,11 @@ namespace BlackGui
class CFontMenu;
}
namespace Models
{
class CColumns;
}
namespace Filters
{
class CFilterDialog;
@@ -604,6 +608,9 @@ namespace BlackGui
//! Model
const ModelClass *derivedModel() const { return m_model; }
//! The columns
const Models::CColumns &getColumns() const { return this->derivedModel()->getColumns(); }
//! Update whole container
//! \return int size after update
int updateContainer(const ContainerType &container, bool sort = true, bool resize = true);