aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview/constant.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-21 11:36:34 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-21 11:36:34 +0100
commit16b1544fff7e9ca11deb3ae1b891c79eac7ec50e (patch)
treee9f04ca11d330e1e47469bb7471d6abcb25c8d49 /qtmips_gui/coreview/constant.cpp
parent507e81b60af88721780a1eb5591d884d1667c4b4 (diff)
downloadqtmips-16b1544fff7e9ca11deb3ae1b891c79eac7ec50e.tar.gz
qtmips-16b1544fff7e9ca11deb3ae1b891c79eac7ec50e.tar.bz2
qtmips-16b1544fff7e9ca11deb3ae1b891c79eac7ec50e.zip
Implement little bit more of scheme and fix connection angle
This commit adds few more bits to scheme but mainly it chnages how connectors specify angles. Originally it was in radians but we was mapping that trough mathematical operations directly to sizes. But that was problematic because of floating point inacuracy and we sometimes founded intersection where there should be one. So this commit gets rid of this at all and instead allows just some fixes axes to be used instead of arbitrary angles.
Diffstat (limited to 'qtmips_gui/coreview/constant.cpp')
-rw-r--r--qtmips_gui/coreview/constant.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qtmips_gui/coreview/constant.cpp b/qtmips_gui/coreview/constant.cpp
index 2f39fce..433d842 100644
--- a/qtmips_gui/coreview/constant.cpp
+++ b/qtmips_gui/coreview/constant.cpp
@@ -12,8 +12,8 @@ Constant::Constant(const Connector *con, const QString &text) : QGraphicsObject(
font.setPointSize(7);
this->text.setFont(font);
- con_our = new Connector(M_PI);
- conn = new Connection(con_our, con);
+ con_our = new Connector(Connector::AX_X);
+ conn = new Bus(con_our, con, 2);
connect(con, SIGNAL(updated(QPointF)), this, SLOT(ref_con_updated(QPointF)));
ref_con_updated(con->point()); // update initial connector position
}