summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/componentwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'umbrello/umbrello/componentwidget.cpp')
-rw-r--r--umbrello/umbrello/componentwidget.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/umbrello/umbrello/componentwidget.cpp b/umbrello/umbrello/componentwidget.cpp
index f4c38270..84bae8b0 100644
--- a/umbrello/umbrello/componentwidget.cpp
+++ b/umbrello/umbrello/componentwidget.cpp
@@ -13,7 +13,7 @@
#include "componentwidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
// app includes
#include <kdebug.h>
@@ -45,13 +45,13 @@ void ComponentWidget::init() {
ComponentWidget::~ComponentWidget() {}
-void ComponentWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void ComponentWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLComponent *umlcomp = static_cast<UMLComponent*>(m_pObject);
if (umlcomp == NULL)
return;
UMLWidget::setPen(p);
if ( umlcomp->getExecutable() ) {
- QPen thickerPen = p.pen();
+ TQPen thickerPen = p.pen();
thickerPen.setWidth(2);
p.setPen(thickerPen);
}
@@ -63,18 +63,18 @@ void ComponentWidget::draw(QPainter & p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- 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();
- const QString stereotype = m_pObject->getStereotype();
+ TQString name = getName();
+ const TQString stereotype = m_pObject->getStereotype();
p.drawRect(offsetX + 2*COMPONENT_MARGIN, offsetY, w - 2*COMPONENT_MARGIN, h);
p.drawRect(offsetX, offsetY + h/2 - fontHeight/2 - fontHeight, COMPONENT_MARGIN*4, fontHeight);
p.drawRect(offsetX, offsetY + h/2 + fontHeight/2, COMPONENT_MARGIN*4, fontHeight);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
int lines = 1;
@@ -105,14 +105,14 @@ void ComponentWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
}
-QSize ComponentWidget::calculateSize() {
+TQSize ComponentWidget::calculateSize() {
if ( !m_pObject) {
- return QSize(70, 70);
+ return TQSize(70, 70);
}
- 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;
}
@@ -130,11 +130,11 @@ QSize ComponentWidget::calculateSize() {
int height = (2*fontHeight) + (COMPONENT_MARGIN * 3);
- return QSize(width, height);
+ return TQSize(width, height);
}
-void ComponentWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement conceptElement = qDoc.createElement("componentwidget");
+void ComponentWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement conceptElement = qDoc.createElement("componentwidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}