src/tools/drawtool.cpp

Sun, 16 May 2021 22:41:00 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 16 May 2021 22:41:00 +0300
changeset 103
94719518e310
parent 96
165777a20dc7
child 104
cd4df75924b7
permissions
-rw-r--r--

update

103
Teemu Piippo <teemu@hecknology.net>
parents: 96
diff changeset
1 #include <QMessageBox>
96
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 #include "drawtool.h"
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4 DrawTool::DrawTool(QObject* parent) :
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 BaseTool{parent} {}
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 QString DrawTool::name() const
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8 {
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9 static const QString result = tr("Draw");
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 return result;
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 }
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 QString DrawTool::toolTip() const
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14 {
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 static const QString result = tr("Draw new elements into the model.");
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16 return result;
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 }
103
Teemu Piippo <teemu@hecknology.net>
parents: 96
diff changeset
18
Teemu Piippo <teemu@hecknology.net>
parents: 96
diff changeset
19 bool DrawTool::mouseReleased(const BaseTool::MouseEventData &event)
Teemu Piippo <teemu@hecknology.net>
parents: 96
diff changeset
20 {
Teemu Piippo <teemu@hecknology.net>
parents: 96
diff changeset
21 QMessageBox::information(nullptr, "hleelo", "it works");
Teemu Piippo <teemu@hecknology.net>
parents: 96
diff changeset
22 }

mercurial