From eea2dd30f5fbc770b3a95d8330b3b88615974382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 25 Jan 2018 17:11:22 +0100 Subject: Drop some debug outputs --- qtmips_gui/memoryview.cpp | 8 -------- qtmips_gui/statictable.cpp | 12 ------------ 2 files changed, 20 deletions(-) (limited to 'qtmips_gui') 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 -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 #include -#include -#include -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> 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> row_w; -- cgit v1.2.3