MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / getToolButton

Method getToolButton

ASAP/annotation/RectangleAnnotationTool.cpp:206–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206QAction* 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
221std::string RectangleAnnotationTool::name() {
222 return std::string("rectangleannotation");

Callers

nothing calls this directly

Calls 1

QPixmapClass · 0.50

Tested by

no test coverage detected