summaryrefslogtreecommitdiffstats
path: root/quanta/components/tableeditor/tableitem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/components/tableeditor/tableitem.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/components/tableeditor/tableitem.cpp')
-rw-r--r--quanta/components/tableeditor/tableitem.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/quanta/components/tableeditor/tableitem.cpp b/quanta/components/tableeditor/tableitem.cpp
index 96d7d37c..6d3da1ac 100644
--- a/quanta/components/tableeditor/tableitem.cpp
+++ b/quanta/components/tableeditor/tableitem.cpp
@@ -14,66 +14,66 @@
* *
***************************************************************************/
-#include <qtextedit.h>
-#include <qpainter.h>
+#include <tqtextedit.h>
+#include <tqpainter.h>
#include "tableitem.h"
-TableItem::TableItem(QTable* table, EditType et) : QTableItem(table, et)
+TableItem::TableItem(TQTable* table, EditType et) : TQTableItem(table, et)
{
setReplaceable(false);
m_halign = Qt::AlignLeft;
m_valign = Qt::AlignVCenter;
}
-TableItem::TableItem(QTable* table, EditType et, const QString& text) : QTableItem(table, et, text)
+TableItem::TableItem(TQTable* table, EditType et, const TQString& text) : TQTableItem(table, et, text)
{
setReplaceable(false);
m_halign = Qt::AlignLeft;
m_valign = Qt::AlignVCenter;
}
-TableItem::TableItem (QTable* table, EditType et, const QString& text, const QPixmap& p) :
- QTableItem(table, et, text, p)
+TableItem::TableItem (TQTable* table, EditType et, const TQString& text, const TQPixmap& p) :
+ TQTableItem(table, et, text, p)
{
setReplaceable(false);
m_halign = Qt::AlignLeft;
m_valign = Qt::AlignVCenter;
}
-QWidget* TableItem::createEditor() const
+TQWidget* TableItem::createEditor() const
{
- QTextEdit* Editor = new QTextEdit(table()->viewport());
- Editor->setTextFormat(QTextEdit::PlainText);
- Editor->setHScrollBarMode(QScrollView::AlwaysOff);
- Editor->setVScrollBarMode(QScrollView::AlwaysOff);
+ TQTextEdit* Editor = new TQTextEdit(table()->viewport());
+ Editor->setTextFormat(TQTextEdit::PlainText);
+ Editor->setHScrollBarMode(TQScrollView::AlwaysOff);
+ Editor->setVScrollBarMode(TQScrollView::AlwaysOff);
Editor->setBold(m_header);
Editor->setText(text());
- QObject::connect(Editor, SIGNAL(textChanged()), table(), SLOT(doValueChanged()));
+ TQObject::connect(Editor, TQT_SIGNAL(textChanged()), table(), TQT_SLOT(doValueChanged()));
return Editor;
}
-void TableItem::setContentFromEditor(QWidget *w)
+void TableItem::setContentFromEditor(TQWidget *w)
{
- if (w->inherits( "QTextEdit" ))
- setText(((QTextEdit*)w)->text());
+ if (w->inherits( "TQTextEdit" ))
+ setText(((TQTextEdit*)w)->text());
else
- QTableItem::setContentFromEditor(w);
+ TQTableItem::setContentFromEditor(w);
}
-void TableItem::paint(QPainter* p, const QColorGroup& cg, const QRect& cr, bool selected)
+void TableItem::paint(TQPainter* p, const TQColorGroup& cg, const TQRect& cr, bool selected)
{
if (m_header) {
- QFont editFont = p->font();
+ TQFont editFont = p->font();
editFont.setBold(true);
p->setFont(editFont);
}
- QRect cr0(0, 0, cr.width(), cr.height());
+ TQRect cr0(0, 0, cr.width(), cr.height());
if (selected) {
- p->fillRect(cr0, cg.brush(QColorGroup::Highlight));
+ p->fillRect(cr0, cg.brush(TQColorGroup::Highlight));
p->setPen(cg.highlightedText());
}
else {
- p->fillRect(cr0, cg.brush(QColorGroup::Base));
+ p->fillRect(cr0, cg.brush(TQColorGroup::Base));
p->setPen(cg.text());
}
if (!pixmap().isNull()) {
@@ -84,9 +84,9 @@ void TableItem::paint(QPainter* p, const QColorGroup& cg, const QRect& cr, bool
p->drawText(4, 4, cr0.width()-8, cr0.height()-8, m_halign | m_valign | WordBreak, text());
}
-QSize TableItem::sizeHint() const
+TQSize TableItem::sizeHint() const
{
- QSize size = QTableItem::sizeHint();
+ TQSize size = TQTableItem::sizeHint();
size.setWidth(size.width()+8);
size.setHeight(size.height()+8);
return size;