Mercurial > trustbridge
comparison ui/certificatetabledelegate.cpp @ 402:bae8d4a20ef1
Added strings for add and remove in table view combobox.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 16 Apr 2014 11:03:53 +0200 |
parents | 9ba7b4b4c1de |
children | 17e1c8f37d72 |
comparison
equal
deleted
inserted
replaced
401:e11409381e16 | 402:bae8d4a20ef1 |
---|---|
39 const QStyleOptionViewItem &option, const QModelIndex &index) const | 39 const QStyleOptionViewItem &option, const QModelIndex &index) const |
40 { | 40 { |
41 bool editable = index.data(Qt::UserRole).toBool(); | 41 bool editable = index.data(Qt::UserRole).toBool(); |
42 // Create a combobox and add two items for install/remove. | 42 // Create a combobox and add two items for install/remove. |
43 QComboBox *comboBox = new QComboBox(parent); | 43 QComboBox *comboBox = new QComboBox(parent); |
44 comboBox->addItem(QIcon(":/img/list-add.png"), QString(""), QVariant("true")); | 44 comboBox->addItem(QIcon(":/img/list-add.png"), tr("add"), QVariant("true")); |
45 if (editable) { | 45 if (editable) { |
46 comboBox->addItem(QIcon(":/img/list-remove.png"), | 46 comboBox->addItem(QIcon(":/img/list-remove.png"), |
47 QString(""), QVariant("false")); | 47 tr("remove"), QVariant("false")); |
48 } | 48 } |
49 return comboBox; | 49 return comboBox; |
50 } | 50 } |
51 | 51 |
52 void CertificateTableDelegate::setEditorData(QWidget *editor, | 52 void CertificateTableDelegate::setEditorData(QWidget *editor, |