Mercurial > hg > svgui
comparison view/Pane.cpp @ 584:1fe7951a61e8 debug-output
Remove most toStdString calls (no longer needed, with debug header)
author | Chris Cannam |
---|---|
date | Thu, 12 May 2011 17:31:43 +0100 |
parents | dc511d5fee75 |
children | f4960f8ce798 |
comparison
equal
deleted
inserted
replaced
583:4c484636d5ec | 584:1fe7951a61e8 |
---|---|
826 Pane::drawWorkTitle(QRect r, QPainter &paint, const Model *model) | 826 Pane::drawWorkTitle(QRect r, QPainter &paint, const Model *model) |
827 { | 827 { |
828 QString title = model->getTitle(); | 828 QString title = model->getTitle(); |
829 QString maker = model->getMaker(); | 829 QString maker = model->getMaker(); |
830 //std::cerr << "Pane::drawWorkTitle: title=\"" << title.toStdString() | 830 //std::cerr << "Pane::drawWorkTitle: title=\"" << title.toStdString() |
831 //<< "\", maker=\"" << maker.toStdString() << "\"" << std::endl; | 831 //<< "\", maker=\"" << maker << "\"" << std::endl; |
832 if (title == "") return; | 832 if (title == "") return; |
833 | 833 |
834 QString text = title; | 834 QString text = title; |
835 if (maker != "") { | 835 if (maker != "") { |
836 text = tr("%1 - %2").arg(title).arg(maker); | 836 text = tr("%1 - %2").arg(title).arg(maker); |
873 QStringList texts; | 873 QStringList texts; |
874 std::vector<QPixmap> pixmaps; | 874 std::vector<QPixmap> pixmaps; |
875 for (LayerList::iterator i = m_layers.begin(); i != m_layers.end(); ++i) { | 875 for (LayerList::iterator i = m_layers.begin(); i != m_layers.end(); ++i) { |
876 texts.push_back((*i)->getLayerPresentationName()); | 876 texts.push_back((*i)->getLayerPresentationName()); |
877 // std::cerr << "Pane " << this << ": Layer presentation name for " << *i << ": " | 877 // std::cerr << "Pane " << this << ": Layer presentation name for " << *i << ": " |
878 // << texts[texts.size()-1].toStdString() << std::endl; | 878 // << texts[texts.size()-1] << std::endl; |
879 pixmaps.push_back((*i)->getLayerPresentationPixmap | 879 pixmaps.push_back((*i)->getLayerPresentationPixmap |
880 (QSize(fontAscent, fontAscent))); | 880 (QSize(fontAscent, fontAscent))); |
881 } | 881 } |
882 | 882 |
883 int maxTextWidth = width() / 3; | 883 int maxTextWidth = width() / 3; |
890 | 890 |
891 if (r.x() + r.width() >= llx - fontAscent - 3) { | 891 if (r.x() + r.width() >= llx - fontAscent - 3) { |
892 | 892 |
893 for (size_t i = 0; i < texts.size(); ++i) { | 893 for (size_t i = 0; i < texts.size(); ++i) { |
894 | 894 |
895 // std::cerr << "Pane "<< this << ": text " << i << ": " << texts[i].toStdString() << std::endl; | 895 // std::cerr << "Pane "<< this << ": text " << i << ": " << texts[i] << std::endl; |
896 | 896 |
897 if (i + 1 == texts.size()) { | 897 if (i + 1 == texts.size()) { |
898 paint.setPen(getForeground()); | 898 paint.setPen(getForeground()); |
899 } | 899 } |
900 | 900 |
1722 std::cerr << "min: " << min << ", max: " << max << ", y0: " << y0 << ", y1: " << y1 << ", h: " << height() << ", rmin: " << rmin << ", rmax: " << rmax << std::endl; | 1722 std::cerr << "min: " << min << ", max: " << max << ", y0: " << y0 << ", y1: " << y1 << ", h: " << height() << ", rmin: " << rmin << ", rmax: " << rmax << std::endl; |
1723 if (log) { | 1723 if (log) { |
1724 rmin = powf(10, rmin); | 1724 rmin = powf(10, rmin); |
1725 rmax = powf(10, rmax); | 1725 rmax = powf(10, rmax); |
1726 } | 1726 } |
1727 std::cerr << "finally: rmin: " << rmin << ", rmax: " << rmax << " " << unit.toStdString() << std::endl; | 1727 std::cerr << "finally: rmin: " << rmin << ", rmax: " << rmax << " " << unit << std::endl; |
1728 | 1728 |
1729 layer->setDisplayExtents(rmin, rmax); | 1729 layer->setDisplayExtents(rmin, rmax); |
1730 updateVerticalPanner(); | 1730 updateVerticalPanner(); |
1731 } | 1731 } |
1732 } | 1732 } |