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

Method itemEntered

kdevplatform/shell/sessionchooserdialog.cpp:109–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void SessionChooserDialog::itemEntered(const QModelIndex& index)
110{
111 // The last row says "Create new session", we don't want to delete that
112 if(index.row() == m_model->rowCount()-1) {
113 m_deleteButton->hide();
114 m_deleteButtonTimer.stop();
115 return;
116 }
117
118 // align the delete-button to stay on the right border of the item
119 // we need the right most column's index
120 QModelIndex in = m_model->index( index.row(), 1 );
121 const QRect rect = m_view->visualRect(in);
122 m_deleteButton->resize(rect.height(), rect.height());
123
124 QPoint p(rect.right() - m_deleteButton->size().width(), rect.top()+rect.height()/2-m_deleteButton->height()/2);
125 m_deleteButton->move(p);
126
127 m_deleteCandidateRow = index.row();
128 m_deleteButtonTimer.start();
129}
130
131void SessionChooserDialog::showDeleteButton()
132{

Callers

nothing calls this directly

Calls 8

stopMethod · 0.80
topMethod · 0.80
rowMethod · 0.45
rowCountMethod · 0.45
indexMethod · 0.45
sizeMethod · 0.45
moveMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected