wxString TdsColumnData::GetColumnName(TDSCOLUMN* pColumn) { // We might consider a version of ConvertFromUnicodeStream that excepts the string length // parameter wxString colName((wxChar*)pColumn->column_name, pColumn->column_namelen); return colName; }
QVariant InterfaceModel::data(const QModelIndex & index, int role) const { if(!index.isValid()) return QVariant(); //maybe this could be optimized by caching the stringlists... QString nodeName = rowName(index.row()); QString optionName = colName(index.column()); if (role == Qt::DisplayRole || role == Qt::EditRole) return config->getOption(nodeType, nodeName, optionName, QVariant()); else return QVariant(); }
bool InterfaceModel::setData(const QModelIndex & index, const QVariant & value, int role) { if (index.isValid() && (role == Qt::EditRole || role == Qt::DisplayRole)) { QString nodeName = rowName(index.row()); QString optionName = colName(index.column()); config->getConfig()->setOption(nodeType, nodeName, optionName, value); emit dataChanged(index, index); return true; } return false; }
Lng32 CRUTbl::GetUpdateBitmapSize() { RUASSERT (NULL != pddIUDLogTbl_); CDSString colName("UPDATE_BITMAP"); colName = CRUSQLComposer::ComposeQuotedColName( CRUTbl::logCrtlColPrefix, colName ); CDDColumn *pCol = pddIUDLogTbl_->GetColumn(colName); RUASSERT (NULL != pCol); return pCol->GetSize(); }