summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/notewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'umbrello/umbrello/notewidget.cpp')
-rw-r--r--umbrello/umbrello/notewidget.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/umbrello/umbrello/notewidget.cpp b/umbrello/umbrello/notewidget.cpp
index 0cc7d079..9badeef5 100644
--- a/umbrello/umbrello/notewidget.cpp
+++ b/umbrello/umbrello/notewidget.cpp
@@ -12,10 +12,10 @@
// own header
#include "notewidget.h"
//qt includes
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qtextedit.h>
-#include <qframe.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
+#include <tqtextedit.h>
+#include <tqframe.h>
// kde includes
#include <kdebug.h>
#include <kcolordialog.h>
@@ -38,15 +38,15 @@ NoteWidget::NoteWidget(UMLView * view, Uml::IDType id)
#ifdef NOTEWIDGET_EMBED_EDITOR
// NB: This code is currently deactivated because
// Zoom does not yet work with the embedded text editor.
- m_pEditor = new QTextEdit(view);
- m_pEditor->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
- m_pEditor->setHScrollBarMode(QScrollView::AlwaysOff);
- m_pEditor->setVScrollBarMode(QScrollView::AlwaysOff);
+ m_pEditor = new TQTextEdit(view);
+ m_pEditor->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain);
+ m_pEditor->setHScrollBarMode(TQScrollView::AlwaysOff);
+ m_pEditor->setVScrollBarMode(TQScrollView::AlwaysOff);
m_pEditor->setTextFormat(Qt::RichText);
m_pEditor->setShown(true);
setEditorGeometry();
- connect(m_pView, SIGNAL(contentsMoving(int, int)),
- this, SLOT(slotViewScrolled(int, int)));
+ connect(m_pView, TQT_SIGNAL(contentsMoving(int, int)),
+ this, TQT_SLOT(slotViewScrolled(int, int)));
#endif
}
@@ -69,7 +69,7 @@ void NoteWidget::setDiagramLink(Uml::IDType viewID) {
<< "): no view found for this ID." << endl;
return;
}
- QString linkText("Diagram: " + view->getName());
+ TQString linkText("Diagram: " + view->getName());
#if defined (NOTEWIDGET_EMBED_EDITOR)
m_pEditor->setUnderline(true);
m_pEditor->insert(linkText);
@@ -89,7 +89,7 @@ void NoteWidget::slotViewScrolled(int x, int y) {
setEditorGeometry(x, y);
}
-void NoteWidget::setFont(QFont font) {
+void NoteWidget::setFont(TQFont font) {
UMLWidget::setFont(font);
#ifdef NOTEWIDGET_EMBED_EDITOR
m_pEditor->setFont(font);
@@ -98,7 +98,7 @@ void NoteWidget::setFont(QFont font) {
void NoteWidget::setEditorGeometry(int dx /*=0*/, int dy /*=0*/) {
#if defined (NOTEWIDGET_EMBED_EDITOR)
- const QRect editorGeometry( UMLWidget::getX() - dx + 6,
+ const TQRect editorGeometry( UMLWidget::getX() - dx + 6,
UMLWidget::getY() - dy + 10,
UMLWidget::getWidth() - 16,
UMLWidget::getHeight() - 16);
@@ -119,7 +119,7 @@ void NoteWidget::setY( int y ) {
setEditorGeometry();
}
-QString NoteWidget::getDoc() const {
+TQString NoteWidget::getDoc() const {
#if defined (NOTEWIDGET_EMBED_EDITOR)
return m_pEditor->text();
#else
@@ -127,7 +127,7 @@ QString NoteWidget::getDoc() const {
#endif
}
-void NoteWidget::setDoc(const QString &newText) {
+void NoteWidget::setDoc(const TQString &newText) {
#if defined (NOTEWIDGET_EMBED_EDITOR)
m_pEditor->setText(newText);
#else
@@ -135,12 +135,12 @@ void NoteWidget::setDoc(const QString &newText) {
#endif
}
-void NoteWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void NoteWidget::draw(TQPainter & p, int offsetX, int offsetY) {
int margin = 10;
int w = width()-1;
int h= height()-1;
- QPointArray poly(6);
+ TQPointArray poly(6);
poly.setPoint(0, offsetX, offsetY);
poly.setPoint(1, offsetX, offsetY + h);
poly.setPoint(2, offsetX + w, offsetY + h);
@@ -149,7 +149,7 @@ void NoteWidget::draw(QPainter & p, int offsetX, int offsetY) {
poly.setPoint(5, offsetX, offsetY);
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() ) {
- QBrush brush( UMLWidget::getFillColour() );
+ TQBrush brush( UMLWidget::getFillColour() );
p.setBrush(brush);
p.drawPolygon(poly);
#if defined (NOTEWIDGET_EMBED_EDITOR)
@@ -166,8 +166,8 @@ void NoteWidget::draw(QPainter & p, int offsetX, int offsetY) {
drawText(&p, offsetX, offsetY);
}
-QSize NoteWidget::calculateSize() {
- return QSize(50, 50);
+TQSize NoteWidget::calculateSize() {
+ return TQSize(50, 50);
}
void NoteWidget::slotMenuSelection(int sel) {
@@ -197,7 +197,7 @@ void NoteWidget::slotMenuSelection(int sel) {
}
}
-void NoteWidget::drawText(QPainter * p /*=NULL*/, int offsetX /*=0*/, int offsetY /*=0*/) {
+void NoteWidget::drawText(TQPainter * p /*=NULL*/, int offsetX /*=0*/, int offsetY /*=0*/) {
#if defined (NOTEWIDGET_EMBED_EDITOR)
m_pEditor->setText( getDoc() );
m_pEditor->setShown(true);
@@ -213,23 +213,23 @@ void NoteWidget::drawText(QPainter * p /*=NULL*/, int offsetX /*=0*/, int offset
start new line on \n character
*/
p->setPen( Qt::black );
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
p->setFont( font );
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- QString text = getDoc();
+ TQString text = getDoc();
if( text.length() == 0 )
return;
- QString word = "";
- QString fullLine = "";
- QString testCombineLine = "";
+ TQString word = "";
+ TQString fullLine = "";
+ TQString testCombineLine = "";
const int margin = fm.width( "W" );
int textY = fontHeight / 2;
int textX = margin;
const int width = this -> width() - margin * 2;
const int height = this -> height() - fontHeight;
- QChar returnChar('\n');
- QChar c;
+ TQChar returnChar('\n');
+ TQChar c;
for (uint i = 0; i <= text.length(); i++) {
if (i < text.length()) {
c = text[i];
@@ -291,8 +291,8 @@ void NoteWidget::drawText(QPainter * p /*=NULL*/, int offsetX /*=0*/, int offset
#endif
}
-void NoteWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement noteElement = qDoc.createElement( "notewidget" );
+void NoteWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement noteElement = qDoc.createElement( "notewidget" );
UMLWidget::saveToXMI( qDoc, noteElement );
noteElement.setAttribute( "text", getDoc() );
if (m_DiagramLink != Uml::id_None)
@@ -300,12 +300,12 @@ void NoteWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( noteElement );
}
-bool NoteWidget::loadFromXMI( QDomElement & qElement ) {
+bool NoteWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
setZ( 20 ); //make sure always on top.
setDoc( qElement.attribute("text", "") );
- QString diagramlink = qElement.attribute("diagramlink", "");
+ TQString diagramlink = qElement.attribute("diagramlink", "");
if (!diagramlink.isEmpty())
m_DiagramLink = STR2ID(diagramlink);
return true;