SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
toolboxitem.cpp
Go to the documentation of this file.
1// SedSAT3 – Sediment Source Assessment Tool, version 3
2// U.S. Geological Survey. See LICENSE.md and DISCLAIMER.md in the repository root.
3
4#include "toolboxitem.h"
5
6ToolBoxItem::ToolBoxItem():QStandardItem()
7{
8
9}
10
11
12ToolBoxItem::ToolBoxItem(SourceSinkData *_data, const QString &itemtext):QStandardItem(itemtext)
13{
14 Data = _data;
15
16}
17
18QVariant ToolBoxItem::data(int role) const
19{
20 if (role == Qt::ForegroundRole)
21 {
22 if (Data->ToolsUsed(data(Qt::UserRole+1).toString().toStdString()))
23 return QColor(Qt::blue);
24 else
25 return QStandardItem::data(role);
26 }
27 else
28 return QStandardItem::data(role);
29}
SourceSinkData * Data
Definition toolboxitem.h:18
QVariant data(int role=Qt::UserRole+1) const override