diff options
Diffstat (limited to 'lib/koproperty')
29 files changed, 156 insertions, 156 deletions
diff --git a/lib/koproperty/editor.cpp b/lib/koproperty/editor.cpp index 59983222..6ffdcf5c 100644 --- a/lib/koproperty/editor.cpp +++ b/lib/koproperty/editor.cpp @@ -27,7 +27,7 @@ #include "widget.h" #include <tqpushbutton.h> -#include <layout.h> +#include <tqlayout.h> #include <tqmap.h> #include <tqguardedptr.h> #include <tqheader.h> @@ -233,7 +233,7 @@ Editor::fill() } } -// repaint(); +// tqrepaint(); if (firstChild()) { @@ -271,12 +271,12 @@ Editor::addItem(const TQCString &name, EditorItem *parent) // Create child items item->setOpen(true); - if(!property->children()) + if(!property->tqchildren()) return; last = 0; - TQValueList<Property*>::ConstIterator endIt = property->children()->constEnd(); - for(TQValueList<Property*>::ConstIterator it = property->children()->constBegin(); it != endIt; ++it) { + TQValueList<Property*>::ConstIterator endIt = property->tqchildren()->constEnd(); + for(TQValueList<Property*>::ConstIterator it = property->tqchildren()->constBegin(); it != endIt; ++it) { //! \todo allow to have child prop with child items too if( *it && (*it)->isVisible() ) last = new EditorItem(this, item, *it, last); @@ -366,7 +366,7 @@ Editor::changeSetInternal(Set *set, bool preservePrevSelection, const TQCString& if (item) { d->itemToSelectLater = item; TQTimer::singleShot(10, this, TQT_SLOT(selectItemLater())); - //d->doNotSetFocusOnSelection = !hasParent(this, focusWidget()); + //d->doNotSetFocusOnSelection = !hasParent(this, tqfocusWidget()); //setSelected(item, true); //d->doNotSetFocusOnSelection = false; // ensureItemVisible(item); @@ -590,7 +590,7 @@ Editor::slotClicked(TQListViewItem *it) if (d->currentWidget) { if (d->currentWidget->visibleFlag()) { d->currentWidget->show(); - if (hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(kapp->focusWidget()) )) + if (hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(kapp->tqfocusWidget()) )) d->currentWidget->setFocus(); } } @@ -652,7 +652,7 @@ Editor::createWidgetForProperty(Property *property, bool changeWidgetProperty) this, TQT_SLOT(slotWidgetRejectInput(Widget*)) ); } - //update geometry earlier, because Widget::setValue() can depend on widget's geometry + //update tqgeometry earlier, because Widget::setValue() can depend on widget's tqgeometry updateEditorGeometry(d->currentItem, widget); if(widget && (!widget->property() || changeWidgetProperty)) @@ -720,10 +720,10 @@ Editor::updateGroupLabelsPosition() EditorGroupItem *group = dynamic_cast<EditorGroupItem*>(d->topItem->firstChild()); while(group) { - TQRect r = itemRect((TQListViewItem*) group); + TQRect r = tqitemRect((TQListViewItem*) group); if(group->label()) { group->label()->setGeometry(r); - group->label()->repaint(); + group->label()->tqrepaint(); } group = dynamic_cast<EditorGroupItem*>(group->nextSibling()); } @@ -747,8 +747,8 @@ Editor::showUndoButton( bool show ) if (!d->currentItem || !d->currentWidget || (d->currentWidget && d->currentWidget->isReadOnly())) return; - int y = viewportToContents(TQPoint(0, itemRect(d->currentItem).y())).y(); - TQRect geometry(columnWidth(0), y, columnWidth(1) + 1, d->currentItem->height()); + int y = viewportToContents(TQPoint(0, tqitemRect(d->currentItem).y())).y(); + TQRect tqgeometry(columnWidth(0), y, columnWidth(1) + 1, d->currentItem->height()); d->undoButton->resize(d->baseRowHeight, d->currentItem->height()); updateEditorGeometry(true, show); @@ -756,21 +756,21 @@ Editor::showUndoButton( bool show ) if (!show) { /* if (d->currentWidget) { if (d->currentWidget->leavesTheSpaceForRevertButton()) { - geometry.setWidth(geometry.width()-d->undoButton->width()); + tqgeometry.setWidth(tqgeometry.width()-d->undoButton->width()); } - d->currentWidget->resize(geometry.width(), geometry.height()); + d->currentWidget->resize(tqgeometry.width(), tqgeometry.height()); }*/ d->undoButton->hide(); return; } - TQPoint p = contentsToViewport(TQPoint(0, geometry.y())); - d->undoButton->move(geometry.x() + geometry.width() + TQPoint p = contentsToViewport(TQPoint(0, tqgeometry.y())); + d->undoButton->move(tqgeometry.x() + tqgeometry.width() -((d->currentWidget && d->currentWidget->hasBorders())?1:0)/*editor is moved by 1 to left*/ - d->undoButton->width(), p.y()); // if (d->currentWidget) { // d->currentWidget->move(d->currentWidget->x(), p.y()); -// d->currentWidget->resize(geometry.width()-d->undoButton->width(), geometry.height()); +// d->currentWidget->resize(tqgeometry.width()-d->undoButton->width(), tqgeometry.height()); // } d->undoButton->show(); } @@ -791,7 +791,7 @@ Editor::slotExpanded(TQListViewItem *item) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - repaint(); + tqrepaint(); } void @@ -815,7 +815,7 @@ Editor::slotCollapsed(TQListViewItem *item) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - repaint(); + tqrepaint(); } void @@ -826,7 +826,7 @@ Editor::slotColumnSizeChanged(int section, int oldSize, int newSize) Q_UNUSED(newSize); /*for (TQListViewItemIterator it(this); it.current(); ++it) { if (section == 0 && dynamic_cast<EditorGroupItem*>(it.current())) { - it.current()->repaint(); + it.current()->tqrepaint(); } }*/ /* @@ -843,7 +843,7 @@ Editor::slotColumnSizeChanged(int section, int oldSize, int newSize) } }*/ // repaintContents(); -// repaint(); +// tqrepaint(); updateEditorGeometry(); update(); } @@ -869,10 +869,10 @@ Editor::slotColumnSizeChanged(int section) } TQSize -Editor::sizeHint() const +Editor::tqsizeHint() const { return TQSize( TQFontMetrics(font()).width(columnText(0)+columnText(1)+" "), - KListView::sizeHint().height()); + KListView::tqsizeHint().height()); } void @@ -1021,7 +1021,7 @@ Editor::setSorting( int column, bool ascending ) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - repaint(); + tqrepaint(); } #include "editor.moc" diff --git a/lib/koproperty/editor.h b/lib/koproperty/editor.h index 05725529..c3ab0c2e 100644 --- a/lib/koproperty/editor.h +++ b/lib/koproperty/editor.h @@ -77,7 +77,7 @@ class KOPROPERTY_EXPORT Editor : public KListView virtual ~Editor(); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; virtual void setFocus(); virtual void setSorting( int column, bool ascending = true ); diff --git a/lib/koproperty/editoritem.cpp b/lib/koproperty/editoritem.cpp index dc1bb19e..653cbe0a 100644 --- a/lib/koproperty/editoritem.cpp +++ b/lib/koproperty/editoritem.cpp @@ -31,7 +31,7 @@ #include <tqheader.h> #include <tqstyle.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <kdebug.h> #include <kiconloader.h> @@ -98,7 +98,7 @@ class GroupWidgetBase : public TQWidget , m_isOpen(true) , m_mouseDown(false) { - setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1)); } void setText( const TQString &text ) @@ -121,9 +121,9 @@ class GroupWidgetBase : public TQWidget m_isOpen = set; } - virtual TQSize sizeHint () const + virtual TQSize tqsizeHint () const { - TQSize s( TQWidget::sizeHint() ); + TQSize s( TQWidget::tqsizeHint() ); s.setHeight(fontMetrics().height()*2); return s; } @@ -133,9 +133,9 @@ class GroupWidgetBase : public TQWidget TQRect r(rect()); TQPainter p(this); TQStyle::StyleFlags flags = m_mouseDown ? TQStyle::Style_Down : TQStyle::Style_Default; - kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, &p, r, palette().active(), flags); + kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, &p, r, tqpalette().active(), flags); - paintListViewExpander(&p, this, r.height()+2, palette().active(), isOpen()); + paintListViewExpander(&p, this, r.height()+2, tqpalette().active(), isOpen()); if (!m_miniicon.isNull()) { p.drawPixmap(24, (r.height()-m_miniicon.height())/2, m_miniicon); } @@ -143,7 +143,7 @@ class GroupWidgetBase : public TQWidget if (!m_titleStr.isNull()) { int indent = 16 + (m_miniicon.isNull() ? 0 : (m_miniicon.width()+4)); - p.setPen(palette().active().text()); + p.setPen(tqpalette().active().text()); TQFont f = p.font(); f.setBold(true); p.setFont(f); @@ -208,7 +208,7 @@ GroupContainer::GroupContainer(const TQString& title, TQWidget* parent) : TQWidget(parent) , d(new Private()) { - setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1)); d->lyr = new TQVBoxLayout(this); d->groupWidget = new GroupWidgetBase(this); d->groupWidget->setText( title ); @@ -245,7 +245,7 @@ bool GroupContainer::event( TQEvent * e ) { d->contents->show(); else d->contents->hide(); - d->lyr->invalidate(); + d->lyr->tqinvalidate(); update(); } } @@ -563,7 +563,7 @@ EditorGroupItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, in // return; /*p->setPen( KPROPEDITOR_ITEM_BORDER_COLOR ); //! \todo custom color? - p->setClipRect(listView()->itemRect(this)); + p->setClipRect(listView()->tqitemRect(this)); if(column == 1) p->translate(-listView()->columnWidth(0) + 20, 0); int totalWidth = listView()->columnWidth(0) + listView()->columnWidth(1) - 20; diff --git a/lib/koproperty/editoritem.h b/lib/koproperty/editoritem.h index fc703239..9f2c75c2 100644 --- a/lib/koproperty/editoritem.h +++ b/lib/koproperty/editoritem.h @@ -72,7 +72,7 @@ class EditorItem : public KListViewItem virtual void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align); /*! Reimplemented from KListViewItem to draw custom contents. It takes care of drawing the [+] and [-] - signs only if the item has children. + signs only if the item has tqchildren. */ virtual void paintBranches(TQPainter *p, const TQColorGroup &cg, int w, int y, int h); diff --git a/lib/koproperty/editors/booledit.cpp b/lib/koproperty/editors/booledit.cpp index 09d55e94..886f20d8 100644 --- a/lib/koproperty/editors/booledit.cpp +++ b/lib/koproperty/editors/booledit.cpp @@ -30,7 +30,7 @@ #include <tqtoolbutton.h> #include <tqpainter.h> #include <tqvariant.h> -#include <layout.h> +#include <tqlayout.h> #include <tqbitmap.h> using namespace KoProperty; @@ -45,8 +45,8 @@ BoolEdit::BoolEdit(Property *property, TQWidget *parent, const char *name) m_toggle->setFocusPolicy(TQ_WheelFocus); m_toggle->setUsesTextLabel(true); m_toggle->setTextPosition(TQToolButton::Right); - m_toggle->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); - //we're not using layout to because of problems with button size + m_toggle->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + //we're not using tqlayout to because of problems with button size m_toggle->move(0, 0); m_toggle->resize(width(), height()); setFocusWidget(m_toggle); diff --git a/lib/koproperty/editors/coloredit.cpp b/lib/koproperty/editors/coloredit.cpp index f72009e3..a9ab1f1a 100644 --- a/lib/koproperty/editors/coloredit.cpp +++ b/lib/koproperty/editors/coloredit.cpp @@ -21,7 +21,7 @@ #include "coloredit.h" #include <tqvariant.h> -#include <layout.h> +#include <tqlayout.h> #include <tqcolor.h> #include <tqpainter.h> @@ -36,7 +36,7 @@ ColorButton::ColorButton(Property *property, TQWidget *parent, const char *name) m_edit = new KColorCombo(this); m_edit->setFocusPolicy(TQ_NoFocus); connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotValueChanged(int))); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); setFocusWidget(m_edit); diff --git a/lib/koproperty/editors/combobox.cpp b/lib/koproperty/editors/combobox.cpp index 1dd35a8d..343a9ed9 100644 --- a/lib/koproperty/editors/combobox.cpp +++ b/lib/koproperty/editors/combobox.cpp @@ -19,7 +19,7 @@ */ #include "combobox.h" -#include <layout.h> +#include <tqlayout.h> #include <tqmap.h> #include <tqvariant.h> #include <tqpainter.h> @@ -37,7 +37,7 @@ ComboBox::ComboBox(Property *property, TQWidget *parent, const char *name) { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new KComboBox(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/cursoredit.cpp b/lib/koproperty/editors/cursoredit.cpp index 5ff0bb34..61d44499 100644 --- a/lib/koproperty/editors/cursoredit.cpp +++ b/lib/koproperty/editors/cursoredit.cpp @@ -118,13 +118,13 @@ CursorEdit::value() const void CursorEdit::setValue(const TQVariant &value, bool emitChange) { - ComboBox::setValue(value.toCursor().shape(), emitChange); + ComboBox::setValue(value.toCursor().tqshape(), emitChange); } void CursorEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) { - ComboBox::drawViewer(p, cg, r, value.toCursor().shape()); + ComboBox::drawViewer(p, cg, r, value.toCursor().tqshape()); } void diff --git a/lib/koproperty/editors/dateedit.cpp b/lib/koproperty/editors/dateedit.cpp index d6e5c751..0df8532a 100644 --- a/lib/koproperty/editors/dateedit.cpp +++ b/lib/koproperty/editors/dateedit.cpp @@ -23,7 +23,7 @@ #include <tqdatetimeedit.h> #include <tqrangecontrol.h> #include <tqobjectlist.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> #include <tqpainter.h> @@ -37,7 +37,7 @@ DateEdit::DateEdit(Property *property, TQWidget *parent, const char *name) { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new TQDateEdit(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/datetimeedit.cpp b/lib/koproperty/editors/datetimeedit.cpp index 9355f934..6e12641a 100644 --- a/lib/koproperty/editors/datetimeedit.cpp +++ b/lib/koproperty/editors/datetimeedit.cpp @@ -23,7 +23,7 @@ #include <tqdatetimeedit.h> #include <tqrangecontrol.h> #include <tqobjectlist.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqvariant.h> @@ -37,7 +37,7 @@ DateTimeEdit::DateTimeEdit(Property *property, TQWidget *parent, const char *nam { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new TQDateTimeEdit(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/fontedit.cpp b/lib/koproperty/editors/fontedit.cpp index 09cd7388..634641b8 100644 --- a/lib/koproperty/editors/fontedit.cpp +++ b/lib/koproperty/editors/fontedit.cpp @@ -24,7 +24,7 @@ #include <tqpushbutton.h> #include <tqpainter.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> #include <tqfont.h> #include <tqfontmetrics.h> @@ -47,7 +47,7 @@ class FontEditRequester : public KFontRequester FontEditRequester(TQWidget* parent) : KFontRequester(parent) { - label()->setPaletteBackgroundColor(palette().active().base()); + label()->setPaletteBackgroundColor(tqpalette().active().base()); label()->setMinimumWidth(0); label()->setFrameShape(TQFrame::Box); label()->setIndent(-1); @@ -55,13 +55,13 @@ class FontEditRequester : public KFontRequester label()->setFocusPolicy(TQ_ClickFocus); KAcceleratorManager::setNoAccel(label()); #endif - layout()->remove(label()); - layout()->remove(button());//->reparent(this, 0, TQPoint(0,0)); - delete layout(); + tqlayout()->remove(label()); + tqlayout()->remove(button());//->reparent(this, 0, TQPoint(0,0)); + delete tqlayout(); button()->setText(i18n("...")); TQToolTip::add(button(), i18n("Change font")); button()->setFocusPolicy(TQ_NoFocus); - button()->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + button()->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); TQFontMetrics fm(button()->font()); button()->setFixedWidth(fm.width(button()->text()+' ')); } diff --git a/lib/koproperty/editors/linestyledit.cpp b/lib/koproperty/editors/linestyledit.cpp index 5c3c5b51..e7f5b2f8 100644 --- a/lib/koproperty/editors/linestyledit.cpp +++ b/lib/koproperty/editors/linestyledit.cpp @@ -24,7 +24,7 @@ #include <tqpainter.h> #include <tqpixmap.h> #include <tqcombobox.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> using namespace KoProperty; @@ -140,7 +140,7 @@ LineStyleEdit::LineStyleEdit(Property *property, TQWidget *parent, const char *n { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new TQComboBox(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/pixmapedit.cpp b/lib/koproperty/editors/pixmapedit.cpp index 3742ae03..92ab746d 100644 --- a/lib/koproperty/editors/pixmapedit.cpp +++ b/lib/koproperty/editors/pixmapedit.cpp @@ -23,7 +23,7 @@ #include "editoritem.h" #include "property.h" -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqlabel.h> #include <tqcursor.h> @@ -58,22 +58,22 @@ PixmapEdit::PixmapEdit(Property *property, TQWidget *parent, const char *name) m_edit = new TQLabel(this, "m_edit"); TQToolTip::add(m_edit, i18n("Click to show image preview")); - m_edit->setAlignment(TQt::AlignLeft | TQt::AlignVCenter); + m_edit->tqsetAlignment(TQt::AlignLeft | TQt::AlignVCenter); m_edit->setMinimumHeight(5); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); m_edit->setBackgroundMode(TQt::PaletteBase); m_edit->setMouseTracking(true); setBackgroundMode(TQt::PaletteBase); m_button = new TQPushButton(i18n("..."), this, "m_button"); TQToolTip::add(m_button, i18n("Insert image from file")); - m_button->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_button->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); TQFontMetrics fm(m_button->font()); m_button->setFixedWidth(fm.width(m_button->text()+' ')); m_button->setFocusPolicy(TQ_NoFocus); m_popup = new TQLabel(0, "m_popup", TQt::WStyle_Customize|TQt::WStyle_NoBorder|TQt::WX11BypassWM|WStyle_StaysOnTop); - m_popup->setPaletteBackgroundColor(m_popup->palette().active().base()); + m_popup->setPaletteBackgroundColor(m_popup->tqpalette().active().base()); m_popup->setFrameStyle(TQFrame::Plain|TQFrame::Box); m_popup->setMargin(2); m_popup->setLineWidth(1); @@ -153,7 +153,7 @@ PixmapEdit::selectPixmapFileName() emit valueChanged(this); } #endif*/ - TQString caption( i18n("Insert Image From File (for \"%1\" property)").arg(property()->caption()) ); + TQString caption( i18n("Insert Image From File (for \"%1\" property)").tqarg(property()->caption()) ); #ifdef TQ_WS_WIN TQString recentDir; TQString fileName = TQFileDialog::getOpenFileName( diff --git a/lib/koproperty/editors/pointedit.cpp b/lib/koproperty/editors/pointedit.cpp index 30d3c7d6..6983dd68 100644 --- a/lib/koproperty/editors/pointedit.cpp +++ b/lib/koproperty/editors/pointedit.cpp @@ -22,7 +22,7 @@ #include "editoritem.h" #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqtooltip.h> @@ -41,10 +41,10 @@ PointEdit::PointEdit(Property *property, TQWidget *parent, const char *name) m_edit = new KActiveLabel(this); m_edit->setFocusPolicy(TQ_NoFocus); // m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN); - m_edit->setPaletteBackgroundColor(palette().active().base()); + m_edit->setPaletteBackgroundColor(tqpalette().active().base()); m_edit->setWordWrap( TQTextEdit::NoWrap ); // m_edit->setBackgroundMode(TQt::PaletteBase); -// m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); +// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); setEditor(m_edit); // setFocusWidget(m_edit); @@ -64,8 +64,8 @@ PointEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; m_edit->selectAll(false); - m_edit->setText(TQString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y())); - TQToolTip::add(this, TQString("%1, %2").arg(value.toPoint().x()).arg(value.toPoint().y())); + m_edit->setText(TQString(POINTEDIT_MASK).tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); + TQToolTip::add(this, TQString("%1, %2").tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); if (emitChange) emit valueChanged(this); @@ -76,10 +76,10 @@ PointEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, con { TQRect rect(r); rect.setBottom(r.bottom()+1); - Widget::drawViewer(p, cg, rect, TQString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y())); + Widget::drawViewer(p, cg, rect, TQString(POINTEDIT_MASK).tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y())); +// TQString("[ %1, %2 ]").tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); } void diff --git a/lib/koproperty/editors/rectedit.cpp b/lib/koproperty/editors/rectedit.cpp index c97451ea..ba6fec49 100644 --- a/lib/koproperty/editors/rectedit.cpp +++ b/lib/koproperty/editors/rectedit.cpp @@ -21,7 +21,7 @@ #include "editoritem.h" #include <tqvariant.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqtooltip.h> @@ -39,7 +39,7 @@ RectEdit::RectEdit(Property *property, TQWidget *parent, const char *name) setHasBorders(false); m_edit = new KActiveLabel(this); m_edit->setFocusPolicy(TQ_NoFocus); - m_edit->setPaletteBackgroundColor(palette().active().base()); + m_edit->setPaletteBackgroundColor(tqpalette().active().base()); m_edit->setWordWrap( TQTextEdit::NoWrap ); m_edit->setMinimumHeight(5); setEditor(m_edit); @@ -60,10 +60,10 @@ RectEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; m_edit->selectAll(false); - m_edit->setText(TQString(RECTEDIT_MASK).arg(value.toRect().x()). - arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height())); - TQToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").arg(value.toRect().x()). - arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height())); + m_edit->setText(TQString(RECTEDIT_MASK).tqarg(value.toRect().x()). + tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height())); + TQToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").tqarg(value.toRect().x()). + tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height())); if (emitChange) emit valueChanged(this); @@ -75,12 +75,12 @@ RectEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, cons TQRect rect(r); rect.setBottom(r.bottom()+1); Widget::drawViewer(p, cg, rect, - TQString(RECTEDIT_MASK).arg(value.toRect().x()).arg(value.toRect().y()) - .arg(value.toRect().width()).arg(value.toRect().height())); + TQString(RECTEDIT_MASK).tqarg(value.toRect().x()).tqarg(value.toRect().y()) + .tqarg(value.toRect().width()).tqarg(value.toRect().height())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()) -// .arg(value.toRect().width()).arg(value.toRect().height())); +// TQString("[ %1, %2, %3, %4 ]").tqarg(value.toRect().x()).tqarg(value.toRect().y()) +// .tqarg(value.toRect().width()).tqarg(value.toRect().height())); } void diff --git a/lib/koproperty/editors/sizeedit.cpp b/lib/koproperty/editors/sizeedit.cpp index b5dd6be5..05422119 100644 --- a/lib/koproperty/editors/sizeedit.cpp +++ b/lib/koproperty/editors/sizeedit.cpp @@ -22,7 +22,7 @@ #include "editoritem.h" #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqtooltip.h> @@ -41,9 +41,9 @@ SizeEdit::SizeEdit(Property *property, TQWidget *parent, const char *name) m_edit = new KActiveLabel(this); m_edit->setFocusPolicy(TQ_NoFocus); // m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN); - m_edit->setPaletteBackgroundColor(palette().active().base()); + m_edit->setPaletteBackgroundColor(tqpalette().active().base()); // m_edit->setBackgroundMode(TQt::PaletteBase); -// m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); +// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); setEditor(m_edit); // setFocusWidget(m_edit); @@ -63,8 +63,8 @@ SizeEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; m_edit->selectAll(false); - m_edit->setText(TQString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height())); - TQToolTip::add(this, TQString("%1 x %2").arg(value.toSize().width()).arg(value.toSize().height())); + m_edit->setText(TQString(SIZEEDIT_MASK).tqarg(value.toSize().width()).tqarg(value.toSize().height())); + TQToolTip::add(this, TQString("%1 x %2").tqarg(value.toSize().width()).tqarg(value.toSize().height())); if (emitChange) emit valueChanged(this); @@ -76,10 +76,10 @@ SizeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, cons TQRect rect(r); rect.setBottom(r.bottom()+1); Widget::drawViewer(p, cg, rect, - TQString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height())); + TQString(SIZEEDIT_MASK).tqarg(value.toSize().width()).tqarg(value.toSize().height())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height())); +// TQString("[ %1, %2 ]").tqarg(value.toSize().width()).tqarg(value.toSize().height())); } void diff --git a/lib/koproperty/editors/sizepolicyedit.cpp b/lib/koproperty/editors/sizepolicyedit.cpp index 0b13292b..125e0a26 100644 --- a/lib/koproperty/editors/sizepolicyedit.cpp +++ b/lib/koproperty/editors/sizepolicyedit.cpp @@ -22,7 +22,7 @@ #include "editoritem.h" #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqsizepolicy.h> #include <tqmap.h> @@ -42,7 +42,7 @@ SizePolicyEdit::SizePolicyEdit(Property *property, TQWidget *parent, const char m_edit = new TQLabel(this); m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN); m_edit->setBackgroundMode(TQt::PaletteBase); -// m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); +// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); setEditor(m_edit); // l->addWidget(m_edit); @@ -77,9 +77,9 @@ void SizePolicyEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; - m_edit->setText(TQString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())). - arg(findDescription(value.toSizePolicy().verData())). - arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch())); + m_edit->setText(TQString("%1/%2/%3/%4").tqarg(findDescription(value.toSizePolicy().horData())). + tqarg(findDescription(value.toSizePolicy().verData())). + tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch())); TQToolTip::add(this, m_edit->text()); if (emitChange) @@ -94,9 +94,9 @@ SizePolicyEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r TQRect rect(r); rect.setBottom(r.bottom()+1); Widget::drawViewer(p, cg, rect, - TQString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())). - arg(findDescription(value.toSizePolicy().verData())). - arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch())); + TQString("%1/%2/%3/%4").tqarg(findDescription(value.toSizePolicy().horData())). + tqarg(findDescription(value.toSizePolicy().verData())). + tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch())); } TQString diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp index d2020d2c..8e890419 100644 --- a/lib/koproperty/editors/spinbox.cpp +++ b/lib/koproperty/editors/spinbox.cpp @@ -22,7 +22,7 @@ #include "property.h" -#include <layout.h> +#include <tqlayout.h> #include <tqobjectlist.h> #include <tqvariant.h> #include <tqpainter.h> @@ -36,7 +36,7 @@ using namespace KoProperty; IntSpinBox::IntSpinBox(int lower, int upper, int step, int value, int base, IntEdit *parent, const char *name) : KIntSpinBox(lower, upper, step, value, base, parent, name) { - editor()->setAlignment(TQt::AlignLeft); + editor()->tqsetAlignment(TQt::AlignLeft); installEventFilter(editor()); installEventFilter(this); TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true ); @@ -179,7 +179,7 @@ IntEdit::setReadOnlyInternal(bool readOnly) DoubleSpinBox::DoubleSpinBox (double lower, double upper, double step, double value, int precision, DoubleEdit *parent) : KDoubleSpinBox(lower, upper, step, value, precision, parent) { - editor()->setAlignment(TQt::AlignLeft); + editor()->tqsetAlignment(TQt::AlignLeft); installEventFilter(editor()); installEventFilter(this); TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true ); @@ -247,7 +247,7 @@ DoubleEdit::DoubleEdit(Property *property, TQWidget *parent, const char *name) 0, precision.toInt(), this); if (!minValueText.isNull()) m_edit->setSpecialValueText(minValueText.toString()); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); setEditor(m_edit); diff --git a/lib/koproperty/editors/stringedit.cpp b/lib/koproperty/editors/stringedit.cpp index c78b6edb..55d8b3ed 100644 --- a/lib/koproperty/editors/stringedit.cpp +++ b/lib/koproperty/editors/stringedit.cpp @@ -20,7 +20,7 @@ #include "stringedit.h" -#include <layout.h> +#include <tqlayout.h> #include <tqlineedit.h> #include <tqvariant.h> @@ -31,7 +31,7 @@ StringEdit::StringEdit(Property *property, TQWidget *parent, const char *name) { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new TQLineEdit(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMargin(1); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/stringlistedit.cpp b/lib/koproperty/editors/stringlistedit.cpp index f5a1de39..56bf1145 100644 --- a/lib/koproperty/editors/stringlistedit.cpp +++ b/lib/koproperty/editors/stringlistedit.cpp @@ -21,7 +21,7 @@ #include "stringlistedit.h" #include <tqlineedit.h> -#include <layout.h> +#include <tqlayout.h> #include <tqdialog.h> #include <tqpainter.h> #include <tqvariant.h> @@ -46,12 +46,12 @@ StringListEdit::StringListEdit(Property *property, TQWidget *parent, const char m_edit = new TQLineEdit(this); m_edit->setLineWidth(0); m_edit->setReadOnly(true); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); m_selectButton = new TQPushButton("...", this); - m_selectButton->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding); + m_selectButton->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding); l->addWidget(m_selectButton); setFocusWidget(m_selectButton); @@ -87,10 +87,10 @@ StringListEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r void StringListEdit::showEditor() { - KDialogBase dialog(this->topLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"), + KDialogBase dialog(this->tqtopLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false); - KEditListBox *edit = new KEditListBox(i18n("Contents of %1").arg(property()->caption()), &dialog, "editlist"); + KEditListBox *edit = new KEditListBox(i18n("Contents of %1").tqarg(property()->caption()), &dialog, "editlist"); dialog.setMainWidget(edit); edit->insertStringList(m_list); diff --git a/lib/koproperty/editors/symbolcombo.cpp b/lib/koproperty/editors/symbolcombo.cpp index 9bb503d9..53394d54 100644 --- a/lib/koproperty/editors/symbolcombo.cpp +++ b/lib/koproperty/editors/symbolcombo.cpp @@ -20,7 +20,7 @@ #include <tqlineedit.h> #include <tqpushbutton.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqvariant.h> @@ -41,12 +41,12 @@ SymbolCombo::SymbolCombo(Property *property, TQWidget *parent, const char *name) m_edit = new TQLineEdit(this); m_edit->setLineWidth(0); m_edit->setReadOnly(true); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); m_edit->setMaxLength(1); l->addWidget(m_edit); m_select = new TQPushButton("...", this); - m_select->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding); + m_select->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding); m_select->setMinimumHeight(5); l->addWidget(m_select); @@ -61,7 +61,7 @@ TQVariant SymbolCombo::value() const { if (!(m_edit->text().isNull())) - return m_edit->text().at(0).unicode(); + return m_edit->text().tqat(0).tqunicode(); else return 0; } @@ -90,7 +90,7 @@ SymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, c void SymbolCombo::selectChar() { - KDialogBase dialog(this->topLevelWidget(), "charselect_dialog", true, i18n("Select Char"), + KDialogBase dialog(this->tqtopLevelWidget(), "charselect_dialog", true, i18n("Select Char"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false); KCharSelect *select = new KCharSelect(&dialog, "select_char"); diff --git a/lib/koproperty/editors/timeedit.cpp b/lib/koproperty/editors/timeedit.cpp index a6ede613..674d2c89 100644 --- a/lib/koproperty/editors/timeedit.cpp +++ b/lib/koproperty/editors/timeedit.cpp @@ -24,7 +24,7 @@ #include <tqrangecontrol.h> #include <tqobjectlist.h> #include <tqpainter.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> #include <tqdatetime.h> @@ -38,7 +38,7 @@ TimeEdit::TimeEdit(Property *property, TQWidget *parent, const char *name) { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new TQTimeEdit(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/urledit.cpp b/lib/koproperty/editors/urledit.cpp index 02734776..8c150de2 100644 --- a/lib/koproperty/editors/urledit.cpp +++ b/lib/koproperty/editors/urledit.cpp @@ -20,7 +20,7 @@ #include "urledit.h" -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> #include <kurlrequester.h> @@ -36,14 +36,14 @@ URLEdit::URLEdit(Property *property, TQWidget *parent, const char *name) { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new KURLRequester(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); setProperty(property); connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValueChanged(const TQString&))); - m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); + m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); } URLEdit::~URLEdit() diff --git a/lib/koproperty/factory.h b/lib/koproperty/factory.h index f4b0cf36..8aca5538 100644 --- a/lib/koproperty/factory.h +++ b/lib/koproperty/factory.h @@ -81,7 +81,7 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject \section custom_prop_composed Using Custom Properties to create composed properties Use a composed property when you need more than one editor for a property. Examples are rect, size or point properties. - If you create a composed property, both parent and children properties must have custom + If you create a composed property, both parent and tqchildren properties must have custom (different) types. Child properties are created in CustomProperty constructor of the <b>parent</b> type, by adding CustomProperty::property() as parent in Property constructor.\n @@ -89,7 +89,7 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject parent's Property::setValue() should be called, making sure that useCustomProperty argument is set to false.\n Parent's handleValue() should be set to false, unless you cannot store the property in a TQVariant. - You just need to update children's value, making sure that useCustomProperty argument is set + You just need to update tqchildren's value, making sure that useCustomProperty argument is set to false. \section custom_editor Using Custom Editors @@ -105,7 +105,7 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject \section custom_prop_composed Using Custom Properties with value that cannot be stored in a TQVariant You then need to set handleValue() to true. The Widget you create also have to call directly CustomProperty member to store the value. just make sure you call emitPropertyChanged() - when the proerty value changes. Also make sure to avoid infinite recursion if you use children properties. + when the proerty value changes. Also make sure to avoid infinite recursion if you use tqchildren properties. \author Cedric Pasteur <[email protected]> \author Alexander Dymo <[email protected]> diff --git a/lib/koproperty/property.cpp b/lib/koproperty/property.cpp index 6c4fa246..49ca2b6c 100644 --- a/lib/koproperty/property.cpp +++ b/lib/koproperty/property.cpp @@ -43,7 +43,7 @@ class PropertyPrivate : caption(0), listData(0), changed(false), storable(true), readOnly(false), visible(true), autosync(-1), custom(0), useCustomProperty(true), - sets(0), parent(0), children(0), relatedProperties(0), + sets(0), parent(0), tqchildren(0), relatedProperties(0), sortingKey(0) { } @@ -63,7 +63,7 @@ class PropertyPrivate delete caption; caption = 0; delete listData; - delete children; + delete tqchildren; delete relatedProperties; delete custom; delete sets; @@ -99,7 +99,7 @@ class PropertyPrivate // TQValueList<Set*> sets; Property *parent; - TQValueList<Property*> *children; + TQValueList<Property*> *tqchildren; //! list of properties with the same name (when intersecting buffers) TQValueList<Property*> *relatedProperties; @@ -564,9 +564,9 @@ Property::operator= (const Property &property) delete d->listData; d->listData = 0; } - if(d->children) { - delete d->children; - d->children = 0; + if(d->tqchildren) { + delete d->tqchildren; + d->tqchildren = 0; } if(d->relatedProperties) { delete d->relatedProperties; @@ -594,16 +594,16 @@ Property::operator= (const Property &property) } if(property.d->custom) { d->custom = FactoryManager::self()->createCustomProperty(this); - // updates all children value, using CustomProperty + // updates all tqchildren value, using CustomProperty setValue(property.value()); } else { d->value = property.d->value; - if(property.d->children) { - // no CustomProperty (should never happen), simply copy all children - d->children = new TQValueList<Property*>(); - TQValueList<Property*>::ConstIterator endIt = property.d->children->constEnd(); - for(TQValueList<Property*>::ConstIterator it = property.d->children->constBegin(); it != endIt; ++it) { + if(property.d->tqchildren) { + // no CustomProperty (should never happen), simply copy all tqchildren + d->tqchildren = new TQValueList<Property*>(); + TQValueList<Property*>::ConstIterator endIt = property.d->tqchildren->constEnd(); + for(TQValueList<Property*>::ConstIterator it = property.d->tqchildren->constBegin(); it != endIt; ++it) { Property *child = new Property( *(*it) ); addChild(child); } @@ -614,7 +614,7 @@ Property::operator= (const Property &property) d->relatedProperties = new TQValueList<Property*>( *(property.d->relatedProperties)); } - // update these later because they may have been changed when creating children + // update these later because they may have been changed when creating tqchildren d->oldValue = property.d->oldValue; d->changed = property.d->changed; d->sortingKey = property.d->sortingKey; @@ -631,16 +631,16 @@ Property::operator ==(const Property &prop) const ///////////////////////////////////////////////////////////////// const TQValueList<Property*>* -Property::children() const +Property::tqchildren() const { - return d->children; + return d->tqchildren; } Property* Property::child(const TQCString &name) { - TQValueList<Property*>::ConstIterator endIt = d->children->constEnd(); - for(TQValueList<Property*>::ConstIterator it = d->children->constBegin(); it != endIt; ++it) { + TQValueList<Property*>::ConstIterator endIt = d->tqchildren->constEnd(); + for(TQValueList<Property*>::ConstIterator it = d->tqchildren->constBegin(); it != endIt; ++it) { if((*it)->name() == name) return *it; } @@ -659,11 +659,11 @@ Property::addChild(Property *prop) if (!prop) return; - if(!d->children || tqFind( d->children->begin(), d->children->end(), prop) == d->children->end()) { // not in our list - if(!d->children) - d->children = new TQValueList<Property*>(); - d->children->append(prop); - prop->setSortingKey(d->children->count()); + if(!d->tqchildren || tqFind( d->tqchildren->begin(), d->tqchildren->end(), prop) == d->tqchildren->end()) { // not in our list + if(!d->tqchildren) + d->tqchildren = new TQValueList<Property*>(); + d->tqchildren->append(prop); + prop->setSortingKey(d->tqchildren->count()); prop->d->parent = this; } else { diff --git a/lib/koproperty/property.h b/lib/koproperty/property.h index 9f097c61..bc8a503e 100644 --- a/lib/koproperty/property.h +++ b/lib/koproperty/property.h @@ -104,7 +104,7 @@ enum PropertyType { //predefined custom types ValueFromList = 2000 /**<string value from a list*/, - Symbol = 2001 /**<unicode symbol code*/, + Symbol = 2001 /**<tqunicode symbol code*/, FontName /**<font name, e.g. "times new roman"*/, FileURL /**<url of a file*/, PictureFileURL /**<url of a pixmap*/, @@ -306,9 +306,9 @@ class KOPROPERTY_EXPORT Property /*! \return property icon's string. Can be empty. */ TQString icon() const; - /*! \return a list of all children for this property, or NULL of there - is no children for this property */ - const TQValueList<Property*>* children() const; + /*! \return a list of all tqchildren for this property, or NULL of there + is no tqchildren for this property */ + const TQValueList<Property*>* tqchildren() const; /*! \return a child property for \a name, or NULL if there is no property with that name. */ Property* child(const TQCString &name); @@ -407,7 +407,7 @@ class KOPROPERTY_EXPORT Property protected: /*! Adds \a prop as a child of this property. - The children will be owned by this property. */ + The tqchildren will be owned by this property. */ void addChild(Property *prop); /*! Adds \a set to this property. */ diff --git a/lib/koproperty/test/test.cpp b/lib/koproperty/test/test.cpp index 1c4678c9..df0ec956 100644 --- a/lib/koproperty/test/test.cpp +++ b/lib/koproperty/test/test.cpp @@ -65,10 +65,10 @@ Test::Test() m_set->addProperty(new Property("Bool", TQVariant(true, 4), "Bool"), group); m_set->addProperty(p = new Property("3 States", TQVariant(), "3 States", "", Boolean), group); p->setOption("3rdState", "None"); - m_set->addProperty(p = new Property("Date", TQDate::currentDate(),"Date"), group); + m_set->addProperty(p = new Property("Date", TQDate::tqcurrentDate(),"Date"), group); p->setIcon("date"); m_set->addProperty(new Property("Time", TQTime::currentTime(),"Time"), group); - m_set->addProperty(new Property("DateTime", TQDateTime::currentDateTime(),"Date/Time"), group); + m_set->addProperty(new Property("DateTime", TQDateTime::tqcurrentDateTime(),"Date/Time"), group); TQStringList list;//keys list << "myitem" << "otheritem" << "3rditem"; @@ -89,7 +89,7 @@ Test::Test() group = "ComplexGroup"; m_set->setGroupDescription(group, "Complex Group"); } - m_set->addProperty(new Property("Rect", this->geometry(),"Rect"), group); + m_set->addProperty(new Property("Rect", this->tqgeometry(),"Rect"), group); m_set->addProperty(new Property("Point", TQPoint(3,4), "Point"), group); m_set->addProperty(new Property("Size", TQPoint(3,4), "Size"), group); @@ -107,7 +107,7 @@ Test::Test() p->setIcon("fonts"); m_set->addProperty(new Property("Cursor", TQCursor(TQt::WaitCursor),"Cursor"), group); m_set->addProperty(new Property("LineStyle", 3, "Line Style", "", LineStyle), group); - m_set->addProperty(new Property("SizePolicy", sizePolicy(), "Size Policy"), group); + m_set->addProperty(new Property("SizePolicy", tqsizePolicy(), "Size Policy"), group); // kdDebug() << m_set->groupNames() << endl; diff --git a/lib/koproperty/widget.cpp b/lib/koproperty/widget.cpp index 3d6153ae..b0169a96 100644 --- a/lib/koproperty/widget.cpp +++ b/lib/koproperty/widget.cpp @@ -192,7 +192,7 @@ Widget::setEditor(TQWidget* editor) d->editor = editor; if (!d->editor) return; - d->editor->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + d->editor->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); d->editor->move(0,0); } diff --git a/lib/koproperty/widgetproxy.cpp b/lib/koproperty/widgetproxy.cpp index 1a4ba02b..a4558319 100644 --- a/lib/koproperty/widgetproxy.cpp +++ b/lib/koproperty/widgetproxy.cpp @@ -22,7 +22,7 @@ #include "widget.h" #include "factory.h" -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> namespace KoProperty { @@ -30,7 +30,7 @@ class WidgetProxyPrivate { public: WidgetProxyPrivate() - : property(0), widget(0), type(Invalid), layout(0) + : property(0), widget(0), type(Invalid), tqlayout(0) {} ~WidgetProxyPrivate() {} @@ -38,7 +38,7 @@ class WidgetProxyPrivate Widget *widget; PropertyType type; - TQHBoxLayout *layout; + TQHBoxLayout *tqlayout; }; } @@ -49,7 +49,7 @@ WidgetProxy::WidgetProxy(TQWidget *parent, const char *name) { d = new WidgetProxyPrivate(); d->property = new Property(); - d->layout = new TQHBoxLayout(this, 0, 0); + d->tqlayout = new TQHBoxLayout(this, 0, 0); } WidgetProxy::~WidgetProxy() @@ -118,7 +118,7 @@ WidgetProxy::setWidget() if (d->widget) { d->widget->reparent(this, TQPoint(0,0), true); - d->layout->addWidget(d->widget); + d->tqlayout->addWidget(d->widget); } } |