Better Highlights (#1320)
* Support for user-defined sounds and colors * Make color & sound columns selectable * Add custom row for subscription highlights * Add subscriptions to custom highlights and centrally manage highlight colors * Dynamically update message highlight colors
This commit is contained in:
@@ -22,6 +22,19 @@ static void setStringItem(QStandardItem *item, const QString &value,
|
||||
(editable ? (Qt::ItemIsEditable) : 0)));
|
||||
}
|
||||
|
||||
static void setFilePathItem(QStandardItem *item, const QUrl &value)
|
||||
{
|
||||
item->setData(value, Qt::UserRole);
|
||||
item->setData(value.fileName(), Qt::DisplayRole);
|
||||
item->setFlags(Qt::ItemFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable));
|
||||
}
|
||||
|
||||
static void setColorItem(QStandardItem *item, const QColor &value)
|
||||
{
|
||||
item->setData(value, Qt::DecorationRole);
|
||||
item->setFlags(Qt::ItemFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable));
|
||||
}
|
||||
|
||||
static QStandardItem *emptyItem()
|
||||
{
|
||||
auto *item = new QStandardItem();
|
||||
|
||||
Reference in New Issue
Block a user