| 204 | } |
| 205 | |
| 206 | QAction* RectangleAnnotationTool::getToolButton() { |
| 207 | if (!_button) { |
| 208 | _button = new QAction("&RectangleAnnotation", this); |
| 209 | _button->setObjectName(QString::fromStdString(name())); |
| 210 | if (QApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark) { |
| 211 | _button->setIcon(QIcon(QPixmap(":/AnnotationWorkstationExtensionPlugin_icons/rectangle_dark.png"))); |
| 212 | } |
| 213 | else { |
| 214 | _button->setIcon(QIcon(QPixmap(":/AnnotationWorkstationExtensionPlugin_icons/rectangle.png"))); |
| 215 | } |
| 216 | _button->setShortcut(QKeySequence("r")); |
| 217 | } |
| 218 | return _button; |
| 219 | } |
| 220 | |
| 221 | std::string RectangleAnnotationTool::name() { |
| 222 | return std::string("rectangleannotation"); |