MCPcopy Create free account
hub / github.com/KDE/kdevelop / sizeHint

Method sizeHint

plugins/cmake/settings/cmakecachedelegate.cpp:140–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140QSize 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
156void CMakeCacheDelegate::checkboxToggled()
157{

Callers 5

showToolTipMethod · 0.45
ProjectPathsWidgetMethod · 0.45
IncludesWidgetMethod · 0.45
eventMethod · 0.45

Calls 7

sizeHintFunction · 0.85
siblingMethod · 0.80
columnMethod · 0.45
rowMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45
modelMethod · 0.45

Tested by

no test coverage detected