syncthingtray/model/syncthingmodel.cpp

21 lines
514 B
C++
Raw Normal View History

#include "./syncthingmodel.h"
namespace Data {
2017-05-01 03:34:43 +02:00
SyncthingModel::SyncthingModel(SyncthingConnection &connection, QObject *parent)
: QAbstractItemModel(parent)
, m_connection(connection)
2017-08-29 23:51:03 +02:00
, m_brightColors(false)
2017-05-01 03:34:43 +02:00
{
}
void SyncthingModel::setBrightColors(bool brightColors)
{
2017-05-01 03:34:43 +02:00
if (m_brightColors != brightColors) {
m_brightColors = brightColors;
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1), QVector<int>() << Qt::ForegroundRole);
}
}
} // namespace Data