MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / data

Method data

tools/monitor/MonitorDataModel.cpp:157–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157QVariant
158MonitorDataModel::data( const QModelIndex& index, int role) const
159{
160 if( false == index.isValid()) {
161 return QVariant();
162 }
163
164 switch( role) {
165 case Qt::DisplayRole:
166 return this->getNode( index)->column( index.column());
167
168 // for checkboxes in tree view
169 // case Qt::CheckStateRole:
170 // return Qt::Checked;
171 case Qt::ToolTipRole:
172 case Qt::StatusTipRole:
173 case Qt::WhatsThisRole:
174 default:
175 return QVariant();
176
177 case Qt::BackgroundRole:
178 {
179 QVariant value = this->getNode( index)->color( index.column());
180 if( value.value<QColor>().isValid()) {
181 return value;
182 } else {
183 return QVariant();
184 }
185 }
186 }
187}
188
189Qt::ItemFlags
190MonitorDataModel::flags( const QModelIndex& index) const

Callers 15

runFunction · 0.45
processRequestMethod · 0.45
read_fileFunction · 0.45
initMethod · 0.45
initMethod · 0.45
initMethod · 0.45
serialized_sampleFunction · 0.45
check_reassembledFunction · 0.45
TESTFunction · 0.45
ACE_TMAINFunction · 0.45
run_testFunction · 0.45
run_testFunction · 0.45

Calls 4

getNodeMethod · 0.95
columnMethod · 0.80
colorMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected