summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/nodewidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /umbrello/umbrello/nodewidget.cpp
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/nodewidget.cpp')
-rw-r--r--umbrello/umbrello/nodewidget.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/umbrello/umbrello/nodewidget.cpp b/umbrello/umbrello/nodewidget.cpp
index 2bd78a93..8214b7b6 100644
--- a/umbrello/umbrello/nodewidget.cpp
+++ b/umbrello/umbrello/nodewidget.cpp
@@ -13,7 +13,7 @@
#include "nodewidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -33,7 +33,7 @@ NodeWidget::NodeWidget(UMLView * view, UMLNode *n )
NodeWidget::~NodeWidget() {}
-void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void NodeWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() ) {
p.setBrush( UMLWidget::getFillColour() );
@@ -47,13 +47,13 @@ void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
const int bodyOffsetY = offsetY + hDepth;
const int bodyWidth = w - wDepth;
const int bodyHeight = h - hDepth;
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
- QString name = getName();
+ TQString name = getName();
- QPointArray pointArray(5);
+ TQPointArray pointArray(5);
pointArray.setPoint(0, offsetX, bodyOffsetY);
pointArray.setPoint(1, offsetX + wDepth, offsetY);
pointArray.setPoint(2, offsetX + w - 1, offsetY);
@@ -63,12 +63,12 @@ void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
p.drawRect(offsetX, bodyOffsetY, bodyWidth, bodyHeight);
p.drawLine(offsetX + w - 1, offsetY, offsetX + bodyWidth - 2, bodyOffsetY + 1);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
int lines = 1;
if (m_pObject) {
- QString stereotype = m_pObject->getStereotype();
+ TQString stereotype = m_pObject->getStereotype();
if (!stereotype.isEmpty()) {
p.drawText(offsetX, bodyOffsetY + (bodyHeight/2) - fontHeight,
bodyWidth, fontHeight, Qt::AlignCenter, m_pObject->getStereotype(true));
@@ -95,16 +95,16 @@ void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
}
-QSize NodeWidget::calculateSize() {
+TQSize NodeWidget::calculateSize() {
if (m_pObject == NULL) {
kDebug() << "NodeWidget::calculateSize: m_pObject is NULL" << endl;
return UMLWidget::calculateSize();
}
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
- QString name = m_pObject->getName();
+ TQString name = m_pObject->getName();
if ( UMLWidget::getIsInstance() ) {
name = UMLWidget::getInstanceName() + " : " + name;
}
@@ -121,11 +121,11 @@ QSize NodeWidget::calculateSize() {
int height = (2*fontHeight) + DEPTH;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void NodeWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement conceptElement = qDoc.createElement("nodewidget");
+void NodeWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement conceptElement = qDoc.createElement("nodewidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}