aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-25 17:11:22 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-25 17:11:22 +0100
commiteea2dd30f5fbc770b3a95d8330b3b88615974382 (patch)
tree025a0d8cd0649df703110514eff3c1bf45b3de6d /qtmips_gui
parentc82fd7320a83daec780bb9f7c11239e269410c91 (diff)
downloadqtmips-eea2dd30f5fbc770b3a95d8330b3b88615974382.tar.gz
qtmips-eea2dd30f5fbc770b3a95d8330b3b88615974382.tar.bz2
qtmips-eea2dd30f5fbc770b3a95d8330b3b88615974382.zip
Drop some debug outputs
Diffstat (limited to 'qtmips_gui')
-rw-r--r--qtmips_gui/memoryview.cpp8
-rw-r--r--qtmips_gui/statictable.cpp12
2 files changed, 0 insertions, 20 deletions
diff --git a/qtmips_gui/memoryview.cpp b/qtmips_gui/memoryview.cpp
index 4b6fee1..7bd66cd 100644
--- a/qtmips_gui/memoryview.cpp
+++ b/qtmips_gui/memoryview.cpp
@@ -7,9 +7,6 @@
#define FOCUS 0.25
///////////////////////////
-#include <iostream>
-using namespace std;
-
MemoryView::MemoryView(QWidget *parent) : QWidget(parent) {
memory = nullptr;
addr_0 = 0;
@@ -81,7 +78,6 @@ void MemoryView::update_content(int count, int shift) {
int diff = count - memf->widg->count();
int d_b = shift;
int d_e = diff - shift;
- cout << "count:" << memf->widg->count() << " tocount:" << count << " d_b:" << d_b << " d_e:" << d_e << endl;
if (d_b > 0)
for (int i = 0; i < d_b; i++) {
@@ -158,15 +154,11 @@ void MemoryView::Frame::check_update() {
int req_height = height() + 2*hpart;
while (!((content_y <= -hpart) && (content_y >= -2*hpart)) || (widg->height() < req_height)) {
- cout << "widg.h:" << widg->height() << " req_h:" << req_height << endl;
- cout << "content_y:" << content_y << " hpart:" << hpart << endl;
int row_h = widg->row_size();
- cout << "row_h:" << row_h << " columns:" << widg->columns() << endl;
// Calculate how many we need and how much we need to move and update content accordingly
int count = (req_height / row_h) + 1;
int shift = (content_y + hpart + hpart/2)/row_h;
mv->update_content(count * widg->columns(), shift * widg->columns());
- cout << "count:" << count << endl;
// Move and resize widget
content_y -= shift * row_h;
widg->setGeometry(0, content_y, width(), widg->heightForWidth(width()));
diff --git a/qtmips_gui/statictable.cpp b/qtmips_gui/statictable.cpp
index fe8a820..829e71b 100644
--- a/qtmips_gui/statictable.cpp
+++ b/qtmips_gui/statictable.cpp
@@ -2,10 +2,6 @@
#include <QPainter>
#include <qtmipsexception.h>
-#include <iostream>
-#include <QLabel>
-using namespace std;
-
StaticTableLayout::StaticTableLayout(QWidget *parent, int margin, int horizontal_big_spacing, int horizontal_small_spacing, int vertical_spacing) : QLayout(parent) {
setContentsMargins(margin, margin, margin, margin);
bhspace = horizontal_big_spacing;
@@ -159,12 +155,6 @@ int StaticTableLayout::layout_count_approx(const QRect &rect) const {
w += items[vis][i]->sizeHint().width() + shspace;
w -= shspace; // subtract lastest spacing
int width = rect.right() / w; // Note: this always rounds down so this always founds maximal possible count
-
- cout << "ST: widht:" << rect.right() << " row_w" << w << " so count:" << width << " we have:" << items.count() << " In 0:" << items[vis].count() << " contains:";
- for (int i = 0; i < items[0].size(); i++)
- cout << ((QLabel*)items[0][i]->widget())->text().toStdString() << " ";
- cout << endl;
-
return width <= 0 ? 1 : width; // We have to fit at least one column
}
@@ -221,7 +211,6 @@ void StaticTableLayout::do_layout(const QRect &rect) {
QList<QList<int>> row_w;
int count;
- cout << "Doing layout" << endl;
QRect reff(rect);
layout_parms(reff, row_h, row_w, count);
@@ -244,7 +233,6 @@ void StaticTableLayout::do_layout(const QRect &rect) {
}
int StaticTableLayout::layout_height(int width) const {
- cout << "Quering height" << endl;
QRect reff(0, 0, width, 0);
int row_h;
QList<QList<int>> row_w;