| 24 | } |
| 25 | |
| 26 | QAction* DotAnnotationTool::getToolButton() { |
| 27 | if (!_button) { |
| 28 | _button = new QAction("&DotAnnotation", this); |
| 29 | _button->setObjectName(QString::fromStdString(name())); |
| 30 | if (QApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark) { |
| 31 | _button->setIcon(QIcon(QPixmap(":/AnnotationWorkstationExtensionPlugin_icons/dot_dark.png"))); |
| 32 | } |
| 33 | else { |
| 34 | _button->setIcon(QIcon(QPixmap(":/AnnotationWorkstationExtensionPlugin_icons/dot.png"))); |
| 35 | } |
| 36 | _button->setShortcut(QKeySequence("d")); |
| 37 | } |
| 38 | return _button; |
| 39 | } |
| 40 | |
| 41 | std::string DotAnnotationTool::name() { |
| 42 | return std::string("dotannotation"); |