aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview/multiplexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/coreview/multiplexer.cpp')
-rw-r--r--qtmips_gui/coreview/multiplexer.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/qtmips_gui/coreview/multiplexer.cpp b/qtmips_gui/coreview/multiplexer.cpp
index 7429fda..b25e6d1 100644
--- a/qtmips_gui/coreview/multiplexer.cpp
+++ b/qtmips_gui/coreview/multiplexer.cpp
@@ -10,15 +10,15 @@ using namespace coreview;
#define PENW 1
//////////////////////
-Multiplexer::Multiplexer(unsigned size) {
+Multiplexer::Multiplexer(unsigned size, bool ctl_up) {
this->size = size;
seton = 0;
- ctlfrom = false;
- con_ctl = new Connector(M_PI_2);
- con_out = new Connector(M_PI);
+ ctlfrom = ctl_up;
+ con_ctl = new Connector(Connector::AX_Y);
+ con_out = new Connector(Connector::AX_X);
con_in = new Connector*[size];
for (unsigned i = 0; i < size; i++)
- con_in[i] = new Connector(0);
+ con_in[i] = new Connector(Connector::AX_X);
setPos(x(), y()); // Set connectors possitions
}
@@ -80,7 +80,3 @@ void Multiplexer::set(unsigned i) {
update();
}
-void Multiplexer::setCtl(bool up) {
- ctlfrom = up;
- setPos(x(), y()); // Update connectors
-}