summaryrefslogtreecommitdiffstats
path: root/backend-shared/roundrectitem.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-03 12:46:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-03 13:56:05 -0800
commitb188560ae57304676fb10d8015dc2e3985e44c42 (patch)
tree81bd406f2de74d186c1113eb0634f1a38ba6f85f /backend-shared/roundrectitem.h
parent9759d5b21a330ae2908fe91ff1533d06f6a59f4f (diff)
downloadsubsurface-b188560ae57304676fb10d8015dc2e3985e44c42.tar.gz
ui: create a RoundRectItem class
Factor out code from ProfileWidget's ToolTipItem, but make the radius of the corners dynamic. Move into backend-shared, though a new ui-shared might be preferred. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'backend-shared/roundrectitem.h')
-rw-r--r--backend-shared/roundrectitem.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/backend-shared/roundrectitem.h b/backend-shared/roundrectitem.h
new file mode 100644
index 000000000..d3f58782f
--- /dev/null
+++ b/backend-shared/roundrectitem.h
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0
+#ifndef ROUNDRECTITEM_H
+#define ROUNDRECTITEM_H
+
+#include <QGraphicsRectItem>
+
+class RoundRectItem : public QGraphicsRectItem {
+public:
+ RoundRectItem(double radius, QGraphicsItem *parent);
+private:
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
+ double radius;
+};
+
+#endif