| 22 | } |
| 23 | |
| 24 | void QmitkDoseValueDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option |
| 25 | , const QModelIndex &index) const |
| 26 | { |
| 27 | QVariant data = index.data(Qt::DisplayRole); |
| 28 | |
| 29 | QStyleOptionViewItem opt = option; |
| 30 | initStyleOption(&opt, index); |
| 31 | |
| 32 | QStyle *style = QApplication::style(); |
| 33 | |
| 34 | |
| 35 | style->drawItemText(painter, opt.rect.adjusted(0,0,-5,0), Qt::AlignRight | Qt::AlignVCenter, opt.palette,true, data.toString()); |
| 36 | } |
| 37 | |
| 38 | QWidget* QmitkDoseValueDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem & |
| 39 | , const QModelIndex &index) const |