| 67 | void ElaDoubleSpinBox::paintEvent(QPaintEvent* event) |
| 68 | { |
| 69 | Q_D(ElaDoubleSpinBox); |
| 70 | QDoubleSpinBox::paintEvent(event); |
| 71 | } |
| 72 | |
| 73 | void ElaDoubleSpinBox::contextMenuEvent(QContextMenuEvent* event) |
| 74 | { |
| 75 | Q_D(ElaDoubleSpinBox); |
| 76 | ElaMenu* menu = d->_createStandardContextMenu(); |
| 77 | if (!menu) |
| 78 | { |
| 79 | return; |
| 80 | } |
| 81 | menu->addSeparator(); |
| 82 | const uint se = stepEnabled(); |
| 83 | QAction* up = menu->addElaIconAction(ElaIconType::Plus, tr("增加")); |
| 84 | up->setEnabled(se & StepUpEnabled); |
| 85 | QAction* down = menu->addElaIconAction(ElaIconType::Minus, tr("减少")); |
| 86 | down->setEnabled(se & StepDownEnabled); |
| 87 | menu->addSeparator(); |
| 88 |
nothing calls this directly
no outgoing calls
no test coverage detected