Qt::ItemIsUserCheckable);
/*checking if word is already in bookmarks, information about that is
- stored in it's translation object (not all translation have to be in
+ stored in its translation object (not all translations have to be in
bookmarks)*/
bool bookmark = false;
Translation* t;
void WordListWidget::wordClicked(QModelIndex index) {
//we're getting translation based on data in index
- qDebug()<<searchResult[index.data().toString()].at(0)->dictionaryInfo();
- emit showTranslation(
+ //qDebug()<<searchResult[index.data().toString()].at(0)->dictionaryInfo();
+ Q_EMIT showTranslation(
searchResult[index.data().toString()]);
}
QModelIndex item = selectedIndexes().at(0);
if(!item.isValid()) return;
- //to shorten lag between clicking on star and it's change
+ //to shorten lag between clicking on star and its change
repaint();
//depending on new state emit suitable signal
if(state == Qt::Checked) {
- emit addBookmark(searchResult[item.data().toString()]);
+ Q_EMIT addBookmark(searchResult[item.data().toString()]);
}
else {
- emit removeBookmark(searchResult[item.data().toString()]);
+ Q_EMIT removeBookmark(searchResult[item.data().toString()]);
}
}
//firstly we normally handle this event
QTreeView::mouseReleaseEvent(event);
- //then we checking at which item user clicked
+ //then we check at which item user clicked
QModelIndex index = indexAt(event->pos());
if(!index.isValid()) return;
/*if there are no selected items we return, that occurs sometimes
- on maemo, when user is scrolling list and click to stop the scroll,
- system don't select item but emitting mouseReleaseEvent*/
+ on maemo, when user is scrolling list and clicks to stop the scroll,
+ system doesn't select item but emits mouseReleaseEvent*/
if(selectedIndexes().count() == 0) return;
- //if user don't click on word either on star return
+ //if user doesn't click either on word or on star, return
if(selectedIndexes().at(0) != index && selectedIndexes().at(1) != index)
return;