MCPcopy Create free account
hub / github.com/davy7125/polyphone / getDeleteButtonRect

Method getDeleteButtonRect

sources/directory/directorylistdelegate.cpp:230–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230QRect DirectoryListDelegate::getDeleteButtonRect(const QStyleOptionViewItem &option) const
231{
232 QFont font = option.font;
233 const QFontMetrics fm(font);
234 int btnY = option.rect.top() + MARGIN + (fm.height() - BUTTON_SIZE) / 2;
235 return QRect(option.rect.left() + 2 * MARGIN + BUTTON_SIZE, btnY, BUTTON_SIZE, BUTTON_SIZE);
236}
237
238bool DirectoryListDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
239{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected