headingobj.cpp
changeset 428 9ae68208e2ff
parent 421 5522d1da7e37
child 568 b44cc0d3ed4a
     1.1 --- a/headingobj.cpp	Mon Feb 12 09:28:47 2007 +0000
     1.2 +++ b/headingobj.cpp	Mon Feb 19 12:01:52 2007 +0000
     1.3 @@ -90,12 +90,13 @@
     1.4      bbox.setSize (QSizeF(w,h));
     1.5  }
     1.6  
     1.7 -QGraphicsTextItem* HeadingObj::newLine(QString s)
     1.8 +QGraphicsSimpleTextItem* HeadingObj::newLine(QString s)
     1.9  {
    1.10 -    QGraphicsTextItem *t=scene->addText(s);
    1.11 +    QGraphicsSimpleTextItem *t=new QGraphicsSimpleTextItem (s,0,scene);
    1.12      t->setFont (font);
    1.13      t->setZValue(Z_TEXT);
    1.14 -    t->setDefaultTextColor(color);
    1.15 +    //t->setDefaultTextColor(color);
    1.16 +    t->setBrush(color);
    1.17      return t;
    1.18  }
    1.19  
    1.20 @@ -217,7 +218,8 @@
    1.21      {
    1.22  		color=c;
    1.23  		for (int i=0; i<textline.size(); ++i)
    1.24 -			textline.at(i)->setDefaultTextColor(c);
    1.25 +			//textline.at(i)->setDefaultTextColor(c);
    1.26 +			textline.at(i)->setBrush(c);
    1.27      }	    
    1.28  }
    1.29