diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
commit | e985f7e545f4739493965aad69bbecb136dc9346 (patch) | |
tree | 54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /quanta/components/tableeditor | |
parent | f7670c198945adc3b95ad69a959fe5f8ae55b493 (diff) | |
download | tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip |
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/components/tableeditor')
-rw-r--r-- | quanta/components/tableeditor/tableeditor.cpp | 72 | ||||
-rw-r--r-- | quanta/components/tableeditor/tableeditor.h | 5 | ||||
-rw-r--r-- | quanta/components/tableeditor/tableeditors.ui | 74 | ||||
-rw-r--r-- | quanta/components/tableeditor/tableitem.cpp | 16 | ||||
-rw-r--r-- | quanta/components/tableeditor/tableitem.h | 26 |
5 files changed, 97 insertions, 96 deletions
diff --git a/quanta/components/tableeditor/tableeditor.cpp b/quanta/components/tableeditor/tableeditor.cpp index bb581859..e9475242 100644 --- a/quanta/components/tableeditor/tableeditor.cpp +++ b/quanta/components/tableeditor/tableeditor.cpp @@ -48,8 +48,8 @@ int newNum; -TableEditor::TableEditor(TQWidget* parent, const char* name) - : TableEditorS(parent, name) +TableEditor::TableEditor(TQWidget* tqparent, const char* name) + : TableEditorS(tqparent, name) { m_popup = new KPopupMenu(); m_cellEditId = m_popup->insertItem(i18n("&Edit Cell Properties"), this ,TQT_SLOT(slotEditCell())); @@ -152,7 +152,7 @@ void TableEditor::slotContextMenuRequested( int row, int col, const TQPoint & po TQTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); TQRect rect(TQPoint(selection.topRow(), selection.leftCol()) , TQPoint(selection.bottomRow(), selection.rightCol())); - if (rect.isValid() && (rect.width() > 1 || rect.height() > 1) && rect.contains(m_row, m_col)) { + if (rect.isValid() && (rect.width() > 1 || rect.height() > 1) && rect.tqcontains(m_row, m_col)) { m_popup->setItemVisible(m_mergeCellsId, true); m_popup->setItemVisible(m_mergeSeparatorId, true); } @@ -204,7 +204,7 @@ void TableEditor::slotEditRow() void TableEditor::slotEditCol() { - KMessageBox::information(this, i18n("Edit col: %1").arg(m_col + 1)); + KMessageBox::information(this, i18n("Edit col: %1").tqarg(m_col + 1)); TagDialog dlg(QuantaCommon::tagFromDTD(m_dtd,"col")); dlg.exec(); } @@ -411,7 +411,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser m_colSpin->setValue(col); TableNode tableN = mergeMatrix[nRow - 1][col]; Node *n = tableN.node; - setCellText(m_dataTable, nRow - 1, col, i18n("Merged with (%1, %2).").arg(tableN.mergedRow + 1).arg(tableN.mergedCol + 1)); + setCellText(m_dataTable, nRow - 1, col, i18n("Merged with (%1, %2).").tqarg(tableN.mergedRow + 1).tqarg(tableN.mergedCol + 1)); m_dataTable->item(nRow-1, col)->setEnabled(false); tableNode.node = new Node(0L); tableNode.node->tag = new Tag(*(n->tag)); @@ -451,7 +451,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser m_colSpin->setValue(col); TableNode tableN = mergeMatrix[nRow - 1][col]; Node *n = tableN.node; - setCellText(m_dataTable, nRow - 1, col, i18n("Merged with (%1, %2).").arg(tableN.mergedRow + 1).arg(tableN.mergedCol + 1)); + setCellText(m_dataTable, nRow - 1, col, i18n("Merged with (%1, %2).").tqarg(tableN.mergedRow + 1).tqarg(tableN.mergedCol + 1)); m_dataTable->item(nRow-1, col)->setEnabled(false); tableNode.node = new Node(0L); tableNode.node->tag = new Tag(*(n->tag)); @@ -496,7 +496,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser m_colSpin->setValue(nCol); for (int i = 0; i < colValue - 1; i++) { - setCellText(m_dataTable, nRow - 1, lastCol + i, i18n("Merged with (%1, %2).").arg(nRow).arg(lastCol)); + setCellText(m_dataTable, nRow - 1, lastCol + i, i18n("Merged with (%1, %2).").tqarg(nRow).tqarg(lastCol)); m_dataTable->item(nRow-1, lastCol + i)->setEnabled(false); tableNode.node = new Node(0L); tableNode.node->tag = new Tag(*(n->tag)); @@ -713,11 +713,11 @@ TQString TableEditor::indent( int n ) TQString TableEditor::cellValue( int row, int col ) { if (!m_dataTable) - return TQString::null; + return TQString(); TQString str; Node *node = (*m_tableTags)[row][col].node; if (!node) - return TQString::null; + return TQString(); str = node->tag->toString(); str += m_dataTable->text(row, col); str += "</" + QuantaCommon::tagCase(node->tag->name) + ">"; @@ -758,7 +758,7 @@ TQString TableEditor::tableToString() TQString TableEditor::tagContent(Node *node) { if (!node) - return TQString::null; + return TQString(); TQString content; int bl, bc, el, ec; node->tag->endPos(bl, bc); @@ -775,7 +775,7 @@ TQString TableEditor::tagContent(Node *node) n->tag->beginPos(el, ec); ec--; } else { - return TQString::null; + return TQString(); } } content = m_write->text(bl, bc, el, ec); @@ -919,12 +919,12 @@ void TableEditor::slotRemoveRow() if ((*it3).merged) { TableNode *mainTableNode = &((*m_tableTags)[(*it3).mergedRow][(*it3).mergedCol]); - if (mainTableNode->node && !updatedMainNodes.contains(mainTableNode)) + if (mainTableNode->node && !updatedMainNodes.tqcontains(mainTableNode)) { int rowspan = mainTableNode->node->tag->attributeValue("rowspan", true).toInt(); rowspan--; if (rowspan > 1) - mainTableNode->node->tag->editAttribute("rowspan", TQString("%1").arg(rowspan)); + mainTableNode->node->tag->editAttribute("rowspan", TQString("%1").tqarg(rowspan)); else mainTableNode->node->tag->deleteAttribute("rowspan"); updatedMainNodes.append(mainTableNode); @@ -970,12 +970,12 @@ void TableEditor::slotRemoveCol() if ((*it2).merged) { TableNode *mainTableNode = &((*m_tableTags)[(*it2).mergedRow][(*it2).mergedCol]); - if (mainTableNode->node && !updatedMainNodes.contains(mainTableNode)) + if (mainTableNode->node && !updatedMainNodes.tqcontains(mainTableNode)) { int colspan = mainTableNode->node->tag->attributeValue("colspan", true).toInt(); colspan--; if (colspan > 1) - mainTableNode->node->tag->editAttribute("colspan", TQString("%1").arg(colspan)); + mainTableNode->node->tag->editAttribute("colspan", TQString("%1").tqarg(colspan)); else mainTableNode->node->tag->deleteAttribute("colspan"); updatedMainNodes.append(mainTableNode); @@ -1054,13 +1054,13 @@ void TableEditor::slotMergeCells() rCol = selection.rightCol(); TableNode *mainTableNode = &((*m_tableTags)[tRow][lCol]); if (rCol - lCol > 0) - mainTableNode->node->tag->editAttribute("colspan", TQString("%1").arg(rCol - lCol + 1)); + mainTableNode->node->tag->editAttribute("colspan", TQString("%1").tqarg(rCol - lCol + 1)); if (bRow - tRow > 0) - mainTableNode->node->tag->editAttribute("rowspan", TQString("%1").arg(bRow - tRow + 1)); + mainTableNode->node->tag->editAttribute("rowspan", TQString("%1").tqarg(bRow - tRow + 1)); for (int i = 0; i < bRow - tRow + 1; i++) for (int j = 0; j < rCol - lCol + 1; j++) { if (i != 0 || j != 0) { - setCellText(m_dataTable, tRow + i, lCol + j, i18n("Merged with (%1, %2).").arg(tRow + 1).arg(lCol + 1)); + setCellText(m_dataTable, tRow + i, lCol + j, i18n("Merged with (%1, %2).").tqarg(tRow + 1).tqarg(lCol + 1)); m_dataTable->item(tRow + i, lCol + j)->setEnabled(false); TableNode *tableNode = &((*m_tableTags)[tRow + i][lCol + j]); Node::deleteNode(tableNode->node); @@ -1163,7 +1163,7 @@ void TableEditor::slotEditChildTable() table = *it; if (table.row == m_row && table.col == m_col) { TQString cellData = m_dataTable->text(table.row, table.col); - int pos = cellData.find(table.nestedData); + int pos = cellData.tqfind(table.nestedData); if (pos == -1) { KMessageBox::error(this, i18n("Cannot edit the child table; you probably modified the cell containing the table manually."), i18n("Cannot Read Table")); error = true; @@ -1182,9 +1182,9 @@ void TableEditor::slotEditChildTable() baseNode = localParser->parse(w); tempDocCreated = true; //try to find the child table position - int pos2 = tableData.find(cellData); + int pos2 = tableData.tqfind(cellData); if (pos2 != -1) - pos2 = tableData.find(table.nestedData, pos2); + pos2 = tableData.tqfind(table.nestedData, pos2); else { KMessageBox::error(this, i18n("Cannot edit the child table; you probably modified the cell containing the table manually."), i18n("Cannot Read Table")); error = true; @@ -1192,8 +1192,8 @@ void TableEditor::slotEditChildTable() break; } tableData = tableData.left(pos2); - table.bLine = tableData.contains('\n'); - pos2 = tableData.findRev('\n'); + table.bLine = tableData.tqcontains('\n'); + pos2 = tableData.tqfindRev('\n'); if (pos2 != -1) { table.bCol = tableData.length() - pos2; } else { @@ -1214,7 +1214,7 @@ void TableEditor::slotEditChildTable() if (editor.exec()) { int length = table.nestedData.length(); (*it).nestedData = editor.readModifiedTable(); - cellData.replace(pos, length, (*it).nestedData); + cellData.tqreplace(pos, length, (*it).nestedData); setCellText(m_dataTable, table.row, table.col, cellData); } //cleanup on success @@ -1271,27 +1271,27 @@ void TableEditor::configureCell(int row, int col, Node * node) return; // Header (TH) or standard cell? item->setHeader(node->tag->name.lower() == "th"); - // Horizontal alignment - Qt::AlignmentFlags flags; + //Qt::Horizontal tqalignment + TQt::AlignmentFlags flags; TQString align = node->tag->attributeValue("align", true); if (align == "right") - flags = Qt::AlignRight; + flags = TQt::AlignRight; else if (align == "center") - flags = Qt::AlignHCenter; + flags = TQt::AlignHCenter; else if (align == "justify") - flags = Qt::AlignJustify; + flags = TQt::AlignJustify; else if (align.isEmpty() && item->header()) - flags = Qt::AlignHCenter; // TH is centered by default + flags = TQt::AlignHCenter; // TH is centered by default else - flags = Qt::AlignLeft; - item->setAlignment(flags); - // Vertical alignment + flags = TQt::AlignLeft; + item->tqsetAlignment(flags); + //Qt::Vertical tqalignment TQString valign = node->tag->attributeValue("valign", true); if (valign == "top") - flags = Qt::AlignTop; + flags = TQt::AlignTop; else if (valign == "bottom") - flags = Qt::AlignBottom; - else flags = Qt::AlignVCenter; + flags = TQt::AlignBottom; + else flags = TQt::AlignVCenter; item->setVAlignment(flags); } diff --git a/quanta/components/tableeditor/tableeditor.h b/quanta/components/tableeditor/tableeditor.h index 3b913811..f8e7cf40 100644 --- a/quanta/components/tableeditor/tableeditor.h +++ b/quanta/components/tableeditor/tableeditor.h @@ -47,9 +47,10 @@ class Parser; class TableEditor : public TableEditorS { Q_OBJECT + TQ_OBJECT public: - TableEditor( TQWidget* parent = 0, const char* name = 0 ); + TableEditor( TQWidget* tqparent = 0, const char* name = 0 ); ~TableEditor(); virtual bool setTableArea( int bLine, int bCol, int eLine, int eCol, Parser * docParser ); @@ -65,7 +66,7 @@ public: public slots: virtual void slotContextMenuRequested( int row, int col, const TQPoint & pos ); virtual void slotEditCell(); - // Wrapper for setText to use TableItem instead of QTableItem + // Wrapper for setText to use TableItem instead of TQTableItem virtual void slotEditCellText( int r, int ); virtual void slotEditRow(); virtual void slotEditCol(); diff --git a/quanta/components/tableeditor/tableeditors.ui b/quanta/components/tableeditor/tableeditors.ui index 88def66d..04af473c 100644 --- a/quanta/components/tableeditor/tableeditors.ui +++ b/quanta/components/tableeditor/tableeditors.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>TableEditorS</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>TableEditorS</cstring> </property> @@ -40,7 +40,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -78,11 +78,11 @@ <bool>true</bool> </property> </widget> - <widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="4"> + <widget class="TQTabWidget" row="0" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>tabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -93,7 +93,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="3" column="0" rowspan="1" colspan="4"> + <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -104,7 +104,7 @@ <cstring>tableData</cstring> </property> </widget> - <widget class="QTable" row="4" column="0" rowspan="1" colspan="4"> + <widget class="TQTable" row="4" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>tableData</cstring> </property> @@ -142,7 +142,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>276</width> <height>20</height> @@ -159,14 +159,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>276</width> <height>20</height> </size> </property> </spacer> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>rowSpinBox</cstring> </property> @@ -177,7 +177,7 @@ <number>0</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -188,7 +188,7 @@ <cstring>colSpinBox</cstring> </property> </widget> - <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="3"> + <widget class="TQLineEdit" row="2" column="1" rowspan="1" colspan="3"> <property name="name"> <cstring>captionText</cstring> </property> @@ -209,7 +209,7 @@ <string>&Table Properties</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -228,7 +228,7 @@ <cstring>captionText</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -239,7 +239,7 @@ <cstring>rowSpinBox</cstring> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>colSpinBox</cstring> </property> @@ -252,7 +252,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -263,7 +263,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QFrame" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQFrame" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>frame3</cstring> </property> @@ -280,7 +280,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTable" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQTable" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>headerTableData</cstring> </property> @@ -313,14 +313,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>340</width> <height>20</height> </size> </property> </spacer> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>headerRowSpinBox</cstring> </property> @@ -331,7 +331,7 @@ <number>0</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -342,7 +342,7 @@ <cstring>headerRowSpinBox</cstring> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>headerColSpinBox</cstring> </property> @@ -350,7 +350,7 @@ <number>999</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -361,7 +361,7 @@ <cstring>headerColSpinBox</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -374,7 +374,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>headerCheckBox</cstring> </property> @@ -392,7 +392,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -412,7 +412,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -423,7 +423,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QFrame" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQFrame" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>frame3_2</cstring> </property> @@ -440,7 +440,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTable" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQTable" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>footerTableData</cstring> </property> @@ -466,7 +466,7 @@ <enum>FollowStyle</enum> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>footerRowSpinBox</cstring> </property> @@ -477,7 +477,7 @@ <number>0</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4_2_2</cstring> </property> @@ -488,7 +488,7 @@ <cstring>footerRowSpinBox</cstring> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>footerColSpinBox</cstring> </property> @@ -496,7 +496,7 @@ <number>999</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4_3</cstring> </property> @@ -507,7 +507,7 @@ <cstring>footerColSpinBox</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel6_2</cstring> </property> @@ -528,7 +528,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>340</width> <height>20</height> @@ -537,7 +537,7 @@ </spacer> </grid> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>footerCheckBox</cstring> </property> @@ -555,7 +555,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -638,5 +638,5 @@ <tabstop>footerColSpinBox</tabstop> <tabstop>footerTableData</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/quanta/components/tableeditor/tableitem.cpp b/quanta/components/tableeditor/tableitem.cpp index 60625d95..b877df76 100644 --- a/quanta/components/tableeditor/tableitem.cpp +++ b/quanta/components/tableeditor/tableitem.cpp @@ -21,23 +21,23 @@ TableItem::TableItem(TQTable* table, EditType et) : TQTableItem(table, et) { setReplaceable(false); - m_halign = Qt::AlignLeft; - m_valign = Qt::AlignVCenter; + m_halign = TQt::AlignLeft; + m_valign = TQt::AlignVCenter; } TableItem::TableItem(TQTable* table, EditType et, const TQString& text) : TQTableItem(table, et, text) { setReplaceable(false); - m_halign = Qt::AlignLeft; - m_valign = Qt::AlignVCenter; + m_halign = TQt::AlignLeft; + m_valign = TQt::AlignVCenter; } 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; + m_halign = TQt::AlignLeft; + m_valign = TQt::AlignVCenter; } TQWidget* TableItem::createEditor() const @@ -84,9 +84,9 @@ void TableItem::paint(TQPainter* p, const TQColorGroup& cg, const TQRect& cr, bo p->drawText(4, 4, cr0.width()-8, cr0.height()-8, m_halign | m_valign | WordBreak, text()); } -TQSize TableItem::sizeHint() const +TQSize TableItem::tqsizeHint() const { - TQSize size = TQTableItem::sizeHint(); + TQSize size = TQTableItem::tqsizeHint(); size.setWidth(size.width()+8); size.setHeight(size.height()+8); return size; diff --git a/quanta/components/tableeditor/tableitem.h b/quanta/components/tableeditor/tableitem.h index 88c94e20..66d3b85b 100644 --- a/quanta/components/tableeditor/tableitem.h +++ b/quanta/components/tableeditor/tableitem.h @@ -20,31 +20,31 @@ #include <tqtable.h> #include <kdeversion.h> -class TableItem : public QTableItem +class TableItem : public TQTableItem { private: - Qt::AlignmentFlags m_halign; - Qt::AlignmentFlags m_valign; + TQt::AlignmentFlags m_halign; + TQt::AlignmentFlags m_valign; bool m_header; public: - // Standard constructors copied from QTableItem + // Standard constructors copied from TQTableItem TableItem(TQTable* table, EditType et); TableItem(TQTable* table, EditType et, const TQString& text); TableItem (TQTable* table, EditType et, const TQString& text, const TQPixmap& p); - // Use TQTextEdit instead of standard QLineEdit + // Use TQTextEdit instead of standard TQLineEdit virtual TQWidget* createEditor() const; - // Get text from QTextEdit + // Get text from TQTextEdit virtual void setContentFromEditor(TQWidget *w); - // Paint cell - handle alignment (horizontal and vertical) and bold for header + // Paint cell - handle tqalignment (horizontal and vertical) and bold for header virtual void paint(TQPainter* p, const TQColorGroup& cg, const TQRect& cr, bool selected); - // Return A bit larger sizeHint because TQTextEdit has some margin around - virtual TQSize sizeHint() const; + // Return A bit larger tqsizeHint because TQTextEdit has some margin around + virtual TQSize tqsizeHint() const; // Get and set vertical aligment - Qt::AlignmentFlags vAlignment() {return m_valign;} - void setVAlignment(Qt::AlignmentFlags flags) {m_valign = flags;} + TQt::AlignmentFlags vAlignment() {return m_valign;} + void setVAlignment(TQt::AlignmentFlags flags) {m_valign = flags;} // Get and set horizontal aligment - Qt::AlignmentFlags alignment() {return m_halign;} - void setAlignment(Qt::AlignmentFlags flags) {m_halign = flags;} + TQt::AlignmentFlags tqalignment() {return m_halign;} + void tqsetAlignment(TQt::AlignmentFlags flags) {m_halign = flags;} // Get and set header status (use true for TH, false for TD) bool header() {return m_header;} void setHeader(bool h) {m_header = h;} |