mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
Formatting, new icons, minor tweaks
This commit is contained in:
@@ -133,6 +133,12 @@ namespace BlackGui
|
||||
return QVariant(cvo->toPixmap());
|
||||
}
|
||||
|
||||
CDateTimeFormatter::CDateTimeFormatter(const QString formatString, int alignment, bool i18n) :
|
||||
CDefaultFormatter(alignment, i18n, { Qt::DisplayRole }), m_formatString(formatString)
|
||||
{
|
||||
// void
|
||||
}
|
||||
|
||||
QVariant CDateTimeFormatter::displayRole(const QVariant &dateTime) const
|
||||
{
|
||||
if (dateTime.isNull()) return "";
|
||||
|
||||
@@ -209,8 +209,7 @@ namespace BlackGui
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
CDateTimeFormatter(const QString formatString = formatYmd(), int alignment = alignDefault(), bool i18n = true) :
|
||||
CDefaultFormatter(alignment, i18n, { Qt::DisplayRole }), m_formatString(formatString) {}
|
||||
CDateTimeFormatter(const QString formatString = formatYmd(), int alignment = alignDefault(), bool i18n = true);
|
||||
|
||||
//! \copydoc CDefaultFormatter::displayRole
|
||||
virtual QVariant displayRole(const QVariant &dateTime) const override;
|
||||
|
||||
@@ -129,10 +129,9 @@ namespace BlackGui
|
||||
{
|
||||
// KWB remove: qDebug() will be removed soon
|
||||
qDebug() << "update" << this->objectName() << "size" << container.size() << "thread:" << QThread::currentThreadId();
|
||||
|
||||
// Keep sorting out of begin/end reset model
|
||||
QTime myTimer;
|
||||
|
||||
// Keep sorting out of begin/end reset model
|
||||
ContainerType sortedContainer;
|
||||
bool performSort = sort && container.size() > 1 && this->hasValidSortColumn();
|
||||
if (performSort)
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace BlackGui
|
||||
|
||||
/*!
|
||||
* Set column for sorting
|
||||
* \param propertyIndex index of column to be sorted by
|
||||
* \param propertyIndex index of column to be sorted
|
||||
*/
|
||||
virtual void setSortColumnByPropertyIndex(const BlackMisc::CPropertyIndex &propertyIndex)
|
||||
{
|
||||
@@ -85,6 +85,8 @@ namespace BlackGui
|
||||
|
||||
protected slots:
|
||||
//! Helper method with template free signature
|
||||
//! \param variant container is transferred in variant
|
||||
//! \param sort
|
||||
int updateContainer(const QVariant &variant, bool sort)
|
||||
{
|
||||
return this->performUpdateContainer(variant, sort);
|
||||
|
||||
Reference in New Issue
Block a user