| 138 | } |
| 139 | |
| 140 | QSize CMakeCacheDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index ) const |
| 141 | { |
| 142 | // qCDebug(CMAKE) << "calculant" << index << bool(option.state & QStyle::State_Editing); |
| 143 | QSize ret=QItemDelegate::sizeHint(option, index); |
| 144 | if(index.column()==2 && option.state & QStyle::State_Editing) |
| 145 | { |
| 146 | QModelIndex typeIdx=index.sibling(index.row(), 1); |
| 147 | QString type=index.model()->data(typeIdx, Qt::DisplayRole).toString(); |
| 148 | if(type==QLatin1String("PATH")) |
| 149 | { |
| 150 | ret.setHeight(m_sample->sizeHint().height()); |
| 151 | } |
| 152 | } |
| 153 | return ret; |
| 154 | } |
| 155 | |
| 156 | void CMakeCacheDelegate::checkboxToggled() |
| 157 | { |
no test coverage detected