From 94844816550ad672ccfcdc25659c625546239998 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:32:11 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- lib/koproperty/editor.cpp | 48 +++++++++++++++---------------- lib/koproperty/editor.h | 2 +- lib/koproperty/editoritem.cpp | 20 ++++++------- lib/koproperty/editoritem.h | 2 +- lib/koproperty/editors/booledit.cpp | 6 ++-- lib/koproperty/editors/coloredit.cpp | 4 +-- lib/koproperty/editors/combobox.cpp | 4 +-- lib/koproperty/editors/cursoredit.cpp | 4 +-- lib/koproperty/editors/dateedit.cpp | 4 +-- lib/koproperty/editors/datetimeedit.cpp | 4 +-- lib/koproperty/editors/fontedit.cpp | 12 ++++---- lib/koproperty/editors/linestyledit.cpp | 4 +-- lib/koproperty/editors/pixmapedit.cpp | 12 ++++---- lib/koproperty/editors/pointedit.cpp | 14 ++++----- lib/koproperty/editors/rectedit.cpp | 20 ++++++------- lib/koproperty/editors/sizeedit.cpp | 14 ++++----- lib/koproperty/editors/sizepolicyedit.cpp | 16 +++++------ lib/koproperty/editors/spinbox.cpp | 8 +++--- lib/koproperty/editors/stringedit.cpp | 4 +-- lib/koproperty/editors/stringlistedit.cpp | 10 +++---- lib/koproperty/editors/symbolcombo.cpp | 10 +++---- lib/koproperty/editors/timeedit.cpp | 4 +-- lib/koproperty/editors/urledit.cpp | 6 ++-- lib/koproperty/factory.h | 6 ++-- lib/koproperty/property.cpp | 44 ++++++++++++++-------------- lib/koproperty/property.h | 10 +++---- lib/koproperty/test/test.cpp | 8 +++--- lib/koproperty/widget.cpp | 2 +- lib/koproperty/widgetproxy.cpp | 10 +++---- 29 files changed, 156 insertions(+), 156 deletions(-) (limited to 'lib/koproperty') diff --git a/lib/koproperty/editor.cpp b/lib/koproperty/editor.cpp index 6ffdcf5c..59983222 100644 --- a/lib/koproperty/editor.cpp +++ b/lib/koproperty/editor.cpp @@ -27,7 +27,7 @@ #include "widget.h" #include -#include +#include #include #include #include @@ -233,7 +233,7 @@ Editor::fill() } } -// tqrepaint(); +// repaint(); if (firstChild()) { @@ -271,12 +271,12 @@ Editor::addItem(const TQCString &name, EditorItem *parent) // Create child items item->setOpen(true); - if(!property->tqchildren()) + if(!property->children()) return; last = 0; - TQValueList::ConstIterator endIt = property->tqchildren()->constEnd(); - for(TQValueList::ConstIterator it = property->tqchildren()->constBegin(); it != endIt; ++it) { + TQValueList::ConstIterator endIt = property->children()->constEnd(); + for(TQValueList::ConstIterator it = property->children()->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, tqfocusWidget()); + //d->doNotSetFocusOnSelection = !hasParent(this, focusWidget()); //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->tqfocusWidget()) )) + if (hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(kapp->focusWidget()) )) d->currentWidget->setFocus(); } } @@ -652,7 +652,7 @@ Editor::createWidgetForProperty(Property *property, bool changeWidgetProperty) this, TQT_SLOT(slotWidgetRejectInput(Widget*)) ); } - //update tqgeometry earlier, because Widget::setValue() can depend on widget's tqgeometry + //update geometry earlier, because Widget::setValue() can depend on widget's geometry updateEditorGeometry(d->currentItem, widget); if(widget && (!widget->property() || changeWidgetProperty)) @@ -720,10 +720,10 @@ Editor::updateGroupLabelsPosition() EditorGroupItem *group = dynamic_cast(d->topItem->firstChild()); while(group) { - TQRect r = tqitemRect((TQListViewItem*) group); + TQRect r = itemRect((TQListViewItem*) group); if(group->label()) { group->label()->setGeometry(r); - group->label()->tqrepaint(); + group->label()->repaint(); } group = dynamic_cast(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, tqitemRect(d->currentItem).y())).y(); - TQRect tqgeometry(columnWidth(0), y, columnWidth(1) + 1, d->currentItem->height()); + int y = viewportToContents(TQPoint(0, itemRect(d->currentItem).y())).y(); + TQRect geometry(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()) { - tqgeometry.setWidth(tqgeometry.width()-d->undoButton->width()); + geometry.setWidth(geometry.width()-d->undoButton->width()); } - d->currentWidget->resize(tqgeometry.width(), tqgeometry.height()); + d->currentWidget->resize(geometry.width(), geometry.height()); }*/ d->undoButton->hide(); return; } - TQPoint p = contentsToViewport(TQPoint(0, tqgeometry.y())); - d->undoButton->move(tqgeometry.x() + tqgeometry.width() + TQPoint p = contentsToViewport(TQPoint(0, geometry.y())); + d->undoButton->move(geometry.x() + geometry.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(tqgeometry.width()-d->undoButton->width(), tqgeometry.height()); +// d->currentWidget->resize(geometry.width()-d->undoButton->width(), geometry.height()); // } d->undoButton->show(); } @@ -791,7 +791,7 @@ Editor::slotExpanded(TQListViewItem *item) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - tqrepaint(); + repaint(); } void @@ -815,7 +815,7 @@ Editor::slotCollapsed(TQListViewItem *item) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - tqrepaint(); + repaint(); } 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(it.current())) { - it.current()->tqrepaint(); + it.current()->repaint(); } }*/ /* @@ -843,7 +843,7 @@ Editor::slotColumnSizeChanged(int section, int oldSize, int newSize) } }*/ // repaintContents(); -// tqrepaint(); +// repaint(); updateEditorGeometry(); update(); } @@ -869,10 +869,10 @@ Editor::slotColumnSizeChanged(int section) } TQSize -Editor::tqsizeHint() const +Editor::sizeHint() const { return TQSize( TQFontMetrics(font()).width(columnText(0)+columnText(1)+" "), - KListView::tqsizeHint().height()); + KListView::sizeHint().height()); } void @@ -1021,7 +1021,7 @@ Editor::setSorting( int column, bool ascending ) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - tqrepaint(); + repaint(); } #include "editor.moc" diff --git a/lib/koproperty/editor.h b/lib/koproperty/editor.h index c3ab0c2e..05725529 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 tqsizeHint() const; + virtual TQSize sizeHint() 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 653cbe0a..dc1bb19e 100644 --- a/lib/koproperty/editoritem.cpp +++ b/lib/koproperty/editoritem.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include @@ -98,7 +98,7 @@ class GroupWidgetBase : public TQWidget , m_isOpen(true) , m_mouseDown(false) { - tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1)); + setSizePolicy(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 tqsizeHint () const + virtual TQSize sizeHint () const { - TQSize s( TQWidget::tqsizeHint() ); + TQSize s( TQWidget::sizeHint() ); 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, tqpalette().active(), flags); + kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, &p, r, palette().active(), flags); - paintListViewExpander(&p, this, r.height()+2, tqpalette().active(), isOpen()); + paintListViewExpander(&p, this, r.height()+2, palette().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(tqpalette().active().text()); + p.setPen(palette().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()) { - tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1)); + setSizePolicy(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->tqinvalidate(); + d->lyr->invalidate(); 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()->tqitemRect(this)); + p->setClipRect(listView()->itemRect(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 9f2c75c2..fc703239 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 tqchildren. + signs only if the item has children. */ 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 886f20d8..09d55e94 100644 --- a/lib/koproperty/editors/booledit.cpp +++ b/lib/koproperty/editors/booledit.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include 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->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); - //we're not using tqlayout to because of problems with button size + m_toggle->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + //we're not using layout 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 a9ab1f1a..f72009e3 100644 --- a/lib/koproperty/editors/coloredit.cpp +++ b/lib/koproperty/editors/coloredit.cpp @@ -21,7 +21,7 @@ #include "coloredit.h" #include -#include +#include #include #include @@ -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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(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 343a9ed9..1dd35a8d 100644 --- a/lib/koproperty/editors/combobox.cpp +++ b/lib/koproperty/editors/combobox.cpp @@ -19,7 +19,7 @@ */ #include "combobox.h" -#include +#include #include #include #include @@ -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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(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 61d44499..5ff0bb34 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().tqshape(), emitChange); + ComboBox::setValue(value.toCursor().shape(), emitChange); } void CursorEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) { - ComboBox::drawViewer(p, cg, r, value.toCursor().tqshape()); + ComboBox::drawViewer(p, cg, r, value.toCursor().shape()); } void diff --git a/lib/koproperty/editors/dateedit.cpp b/lib/koproperty/editors/dateedit.cpp index 0df8532a..d6e5c751 100644 --- a/lib/koproperty/editors/dateedit.cpp +++ b/lib/koproperty/editors/dateedit.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include @@ -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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(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 6e12641a..9355f934 100644 --- a/lib/koproperty/editors/datetimeedit.cpp +++ b/lib/koproperty/editors/datetimeedit.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include @@ -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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(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 634641b8..09cd7388 100644 --- a/lib/koproperty/editors/fontedit.cpp +++ b/lib/koproperty/editors/fontedit.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include @@ -47,7 +47,7 @@ class FontEditRequester : public KFontRequester FontEditRequester(TQWidget* parent) : KFontRequester(parent) { - label()->setPaletteBackgroundColor(tqpalette().active().base()); + label()->setPaletteBackgroundColor(palette().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 - tqlayout()->remove(label()); - tqlayout()->remove(button());//->reparent(this, 0, TQPoint(0,0)); - delete tqlayout(); + layout()->remove(label()); + layout()->remove(button());//->reparent(this, 0, TQPoint(0,0)); + delete layout(); button()->setText(i18n("...")); TQToolTip::add(button(), i18n("Change font")); button()->setFocusPolicy(TQ_NoFocus); - button()->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + button()->setSizePolicy(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 e7f5b2f8..5c3c5b51 100644 --- a/lib/koproperty/editors/linestyledit.cpp +++ b/lib/koproperty/editors/linestyledit.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include 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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(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 92ab746d..3742ae03 100644 --- a/lib/koproperty/editors/pixmapedit.cpp +++ b/lib/koproperty/editors/pixmapedit.cpp @@ -23,7 +23,7 @@ #include "editoritem.h" #include "property.h" -#include +#include #include #include #include @@ -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->tqsetAlignment(TQt::AlignLeft | TQt::AlignVCenter); + m_edit->setAlignment(TQt::AlignLeft | TQt::AlignVCenter); m_edit->setMinimumHeight(5); - m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); + m_edit->setSizePolicy(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->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_button->setSizePolicy(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->tqpalette().active().base()); + m_popup->setPaletteBackgroundColor(m_popup->palette().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)").tqarg(property()->caption()) ); + TQString caption( i18n("Insert Image From File (for \"%1\" property)").arg(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 6983dd68..30d3c7d6 100644 --- a/lib/koproperty/editors/pointedit.cpp +++ b/lib/koproperty/editors/pointedit.cpp @@ -22,7 +22,7 @@ #include "editoritem.h" #include -#include +#include #include #include @@ -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(tqpalette().active().base()); + m_edit->setPaletteBackgroundColor(palette().active().base()); m_edit->setWordWrap( TQTextEdit::NoWrap ); // m_edit->setBackgroundMode(TQt::PaletteBase); -// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); +// m_edit->setSizePolicy(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).tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); - TQToolTip::add(this, TQString("%1, %2").tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); + 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())); 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).tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); + Widget::drawViewer(p, cg, rect, TQString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2 ]").tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); +// TQString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y())); } void diff --git a/lib/koproperty/editors/rectedit.cpp b/lib/koproperty/editors/rectedit.cpp index ba6fec49..c97451ea 100644 --- a/lib/koproperty/editors/rectedit.cpp +++ b/lib/koproperty/editors/rectedit.cpp @@ -21,7 +21,7 @@ #include "editoritem.h" #include -#include +#include #include #include @@ -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(tqpalette().active().base()); + m_edit->setPaletteBackgroundColor(palette().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).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())); + 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())); 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).tqarg(value.toRect().x()).tqarg(value.toRect().y()) - .tqarg(value.toRect().width()).tqarg(value.toRect().height())); + TQString(RECTEDIT_MASK).arg(value.toRect().x()).arg(value.toRect().y()) + .arg(value.toRect().width()).arg(value.toRect().height())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2, %3, %4 ]").tqarg(value.toRect().x()).tqarg(value.toRect().y()) -// .tqarg(value.toRect().width()).tqarg(value.toRect().height())); +// TQString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()) +// .arg(value.toRect().width()).arg(value.toRect().height())); } void diff --git a/lib/koproperty/editors/sizeedit.cpp b/lib/koproperty/editors/sizeedit.cpp index 05422119..b5dd6be5 100644 --- a/lib/koproperty/editors/sizeedit.cpp +++ b/lib/koproperty/editors/sizeedit.cpp @@ -22,7 +22,7 @@ #include "editoritem.h" #include -#include +#include #include #include @@ -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(tqpalette().active().base()); + m_edit->setPaletteBackgroundColor(palette().active().base()); // m_edit->setBackgroundMode(TQt::PaletteBase); -// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); +// m_edit->setSizePolicy(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).tqarg(value.toSize().width()).tqarg(value.toSize().height())); - TQToolTip::add(this, TQString("%1 x %2").tqarg(value.toSize().width()).tqarg(value.toSize().height())); + 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())); 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).tqarg(value.toSize().width()).tqarg(value.toSize().height())); + TQString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2 ]").tqarg(value.toSize().width()).tqarg(value.toSize().height())); +// TQString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height())); } void diff --git a/lib/koproperty/editors/sizepolicyedit.cpp b/lib/koproperty/editors/sizepolicyedit.cpp index 125e0a26..0b13292b 100644 --- a/lib/koproperty/editors/sizepolicyedit.cpp +++ b/lib/koproperty/editors/sizepolicyedit.cpp @@ -22,7 +22,7 @@ #include "editoritem.h" #include -#include +#include #include #include #include @@ -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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); +// m_edit->setSizePolicy(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").tqarg(findDescription(value.toSizePolicy().horData())). - tqarg(findDescription(value.toSizePolicy().verData())). - tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch())); + 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())); 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").tqarg(findDescription(value.toSizePolicy().horData())). - tqarg(findDescription(value.toSizePolicy().verData())). - tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch())); + TQString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())). + arg(findDescription(value.toSizePolicy().verData())). + arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch())); } TQString diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp index 8e890419..d2020d2c 100644 --- a/lib/koproperty/editors/spinbox.cpp +++ b/lib/koproperty/editors/spinbox.cpp @@ -22,7 +22,7 @@ #include "property.h" -#include +#include #include #include #include @@ -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()->tqsetAlignment(TQt::AlignLeft); + editor()->setAlignment(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()->tqsetAlignment(TQt::AlignLeft); + editor()->setAlignment(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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(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 55d8b3ed..c78b6edb 100644 --- a/lib/koproperty/editors/stringedit.cpp +++ b/lib/koproperty/editors/stringedit.cpp @@ -20,7 +20,7 @@ #include "stringedit.h" -#include +#include #include #include @@ -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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(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 56bf1145..f5a1de39 100644 --- a/lib/koproperty/editors/stringlistedit.cpp +++ b/lib/koproperty/editors/stringlistedit.cpp @@ -21,7 +21,7 @@ #include "stringlistedit.h" #include -#include +#include #include #include #include @@ -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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); m_selectButton = new TQPushButton("...", this); - m_selectButton->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding); + m_selectButton->setSizePolicy(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->tqtopLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"), + KDialogBase dialog(this->topLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false); - KEditListBox *edit = new KEditListBox(i18n("Contents of %1").tqarg(property()->caption()), &dialog, "editlist"); + KEditListBox *edit = new KEditListBox(i18n("Contents of %1").arg(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 53394d54..9bb503d9 100644 --- a/lib/koproperty/editors/symbolcombo.cpp +++ b/lib/koproperty/editors/symbolcombo.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); m_edit->setMaxLength(1); l->addWidget(m_edit); m_select = new TQPushButton("...", this); - m_select->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding); + m_select->setSizePolicy(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().tqat(0).tqunicode(); + return m_edit->text().at(0).unicode(); else return 0; } @@ -90,7 +90,7 @@ SymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, c void SymbolCombo::selectChar() { - KDialogBase dialog(this->tqtopLevelWidget(), "charselect_dialog", true, i18n("Select Char"), + KDialogBase dialog(this->topLevelWidget(), "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 674d2c89..a6ede613 100644 --- a/lib/koproperty/editors/timeedit.cpp +++ b/lib/koproperty/editors/timeedit.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include @@ -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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(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 8c150de2..02734776 100644 --- a/lib/koproperty/editors/urledit.cpp +++ b/lib/koproperty/editors/urledit.cpp @@ -20,7 +20,7 @@ #include "urledit.h" -#include +#include #include #include @@ -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->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->setSizePolicy(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->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); + m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); } URLEdit::~URLEdit() diff --git a/lib/koproperty/factory.h b/lib/koproperty/factory.h index 8aca5538..f4b0cf36 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 tqchildren properties must have custom + If you create a composed property, both parent and children properties must have custom (different) types. Child properties are created in CustomProperty constructor of the parent 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 tqchildren's value, making sure that useCustomProperty argument is set + You just need to update children'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 tqchildren properties. + when the proerty value changes. Also make sure to avoid infinite recursion if you use children properties. \author Cedric Pasteur \author Alexander Dymo diff --git a/lib/koproperty/property.cpp b/lib/koproperty/property.cpp index 49ca2b6c..6c4fa246 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), tqchildren(0), relatedProperties(0), + sets(0), parent(0), children(0), relatedProperties(0), sortingKey(0) { } @@ -63,7 +63,7 @@ class PropertyPrivate delete caption; caption = 0; delete listData; - delete tqchildren; + delete children; delete relatedProperties; delete custom; delete sets; @@ -99,7 +99,7 @@ class PropertyPrivate // TQValueList sets; Property *parent; - TQValueList *tqchildren; + TQValueList *children; //! list of properties with the same name (when intersecting buffers) TQValueList *relatedProperties; @@ -564,9 +564,9 @@ Property::operator= (const Property &property) delete d->listData; d->listData = 0; } - if(d->tqchildren) { - delete d->tqchildren; - d->tqchildren = 0; + if(d->children) { + delete d->children; + d->children = 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 tqchildren value, using CustomProperty + // updates all children value, using CustomProperty setValue(property.value()); } else { d->value = property.d->value; - if(property.d->tqchildren) { - // no CustomProperty (should never happen), simply copy all tqchildren - d->tqchildren = new TQValueList(); - TQValueList::ConstIterator endIt = property.d->tqchildren->constEnd(); - for(TQValueList::ConstIterator it = property.d->tqchildren->constBegin(); it != endIt; ++it) { + if(property.d->children) { + // no CustomProperty (should never happen), simply copy all children + d->children = new TQValueList(); + TQValueList::ConstIterator endIt = property.d->children->constEnd(); + for(TQValueList::ConstIterator it = property.d->children->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.d->relatedProperties)); } - // update these later because they may have been changed when creating tqchildren + // update these later because they may have been changed when creating children 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::tqchildren() const +Property::children() const { - return d->tqchildren; + return d->children; } Property* Property::child(const TQCString &name) { - TQValueList::ConstIterator endIt = d->tqchildren->constEnd(); - for(TQValueList::ConstIterator it = d->tqchildren->constBegin(); it != endIt; ++it) { + TQValueList::ConstIterator endIt = d->children->constEnd(); + for(TQValueList::ConstIterator it = d->children->constBegin(); it != endIt; ++it) { if((*it)->name() == name) return *it; } @@ -659,11 +659,11 @@ Property::addChild(Property *prop) if (!prop) return; - 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(); - d->tqchildren->append(prop); - prop->setSortingKey(d->tqchildren->count()); + 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(); + d->children->append(prop); + prop->setSortingKey(d->children->count()); prop->d->parent = this; } else { diff --git a/lib/koproperty/property.h b/lib/koproperty/property.h index bc8a503e..9f097c61 100644 --- a/lib/koproperty/property.h +++ b/lib/koproperty/property.h @@ -104,7 +104,7 @@ enum PropertyType { //predefined custom types ValueFromList = 2000 /*** tqchildren() const; + /*! \return a list of all children for this property, or NULL of there + is no children for this property */ + const TQValueList* children() 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 tqchildren will be owned by this property. */ + The children 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 df0ec956..1c4678c9 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::tqcurrentDate(),"Date"), group); + m_set->addProperty(p = new Property("Date", TQDate::currentDate(),"Date"), group); p->setIcon("date"); m_set->addProperty(new Property("Time", TQTime::currentTime(),"Time"), group); - m_set->addProperty(new Property("DateTime", TQDateTime::tqcurrentDateTime(),"Date/Time"), group); + m_set->addProperty(new Property("DateTime", TQDateTime::currentDateTime(),"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->tqgeometry(),"Rect"), group); + m_set->addProperty(new Property("Rect", this->geometry(),"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", tqsizePolicy(), "Size Policy"), group); + m_set->addProperty(new Property("SizePolicy", sizePolicy(), "Size Policy"), group); // kdDebug() << m_set->groupNames() << endl; diff --git a/lib/koproperty/widget.cpp b/lib/koproperty/widget.cpp index b0169a96..3d6153ae 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->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + d->editor->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); d->editor->move(0,0); } diff --git a/lib/koproperty/widgetproxy.cpp b/lib/koproperty/widgetproxy.cpp index a4558319..1a4ba02b 100644 --- a/lib/koproperty/widgetproxy.cpp +++ b/lib/koproperty/widgetproxy.cpp @@ -22,7 +22,7 @@ #include "widget.h" #include "factory.h" -#include +#include #include namespace KoProperty { @@ -30,7 +30,7 @@ class WidgetProxyPrivate { public: WidgetProxyPrivate() - : property(0), widget(0), type(Invalid), tqlayout(0) + : property(0), widget(0), type(Invalid), layout(0) {} ~WidgetProxyPrivate() {} @@ -38,7 +38,7 @@ class WidgetProxyPrivate Widget *widget; PropertyType type; - TQHBoxLayout *tqlayout; + TQHBoxLayout *layout; }; } @@ -49,7 +49,7 @@ WidgetProxy::WidgetProxy(TQWidget *parent, const char *name) { d = new WidgetProxyPrivate(); d->property = new Property(); - d->tqlayout = new TQHBoxLayout(this, 0, 0); + d->layout = 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->tqlayout->addWidget(d->widget); + d->layout->addWidget(d->widget); } } -- cgit v1.2.1