connect(textEdit, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(showContextMenu(QPoint)));
+ setWindowTitle(tr("Translation"));
}
QWidget::show();
}
-void TranslationWidget::show(QModelIndex index) {
+void TranslationWidget::show(QList<Translation*> translations) {
show();
- QString v = index.model()->data(index, Qt::DisplayRole).toString();
- Translation* t = backbone->result().value(v);
textEdit->clear();
- textEdit->setPlainText(t->toHtml());
+ QString trans;
+ Translation* t;
+ foreach(t, translations) {
+ trans += t->toHtml() + "\n";
+ }
+
+ textEdit->setPlainText(trans);
textEdit->repaint(this->rect());