From 9d9fe02a944fe0719c2475739411727a729251ad Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:14:26 -0600 Subject: Rename old tq methods that no longer need a unique name --- src/common/gui/editlistbox.cpp | 2 +- src/common/gui/hexword_gui.cpp | 4 ++-- src/common/gui/hexword_gui.h | 4 ++-- src/common/gui/key_gui.h | 2 +- src/common/gui/list_view.cpp | 16 ++++++++-------- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/common/gui') diff --git a/src/common/gui/editlistbox.cpp b/src/common/gui/editlistbox.cpp index b881e0f..ca2c675 100644 --- a/src/common/gui/editlistbox.cpp +++ b/src/common/gui/editlistbox.cpp @@ -53,7 +53,7 @@ void EditListBox::init(uint nbColumns, TQWidget *view) _moveDownButton = 0; _removeAllButton = 0; _resetButton = 0; - tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); + setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); TQGridLayout *grid = new TQGridLayout(this, 1, 1, 0, KDialog::spacingHint()); uint row = 0; diff --git a/src/common/gui/hexword_gui.cpp b/src/common/gui/hexword_gui.cpp index bf1430c..3030d65 100644 --- a/src/common/gui/hexword_gui.cpp +++ b/src/common/gui/hexword_gui.cpp @@ -125,12 +125,12 @@ bool GenericHexWordEditor::event(TQEvent *e) return TQLineEdit::event(e); } -TQSize GenericHexWordEditor::tqsizeHint() const +TQSize GenericHexWordEditor::sizeHint() const { return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); } -TQSize GenericHexWordEditor::tqminimumSizeHint() const +TQSize GenericHexWordEditor::minimumSizeHint() const { return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); } diff --git a/src/common/gui/hexword_gui.h b/src/common/gui/hexword_gui.h index a973291..2be2a75 100644 --- a/src/common/gui/hexword_gui.h +++ b/src/common/gui/hexword_gui.h @@ -35,8 +35,8 @@ Q_OBJECT TQ_OBJECT public: GenericHexWordEditor(uint nbChars, bool hasBlankValue, TQWidget *parent); - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; signals: void modified(); diff --git a/src/common/gui/key_gui.h b/src/common/gui/key_gui.h index 5afce35..f40c5d2 100644 --- a/src/common/gui/key_gui.h +++ b/src/common/gui/key_gui.h @@ -77,7 +77,7 @@ public: ParentType::_widget->clear(); } void fixMinimumWidth() { - ParentType::_widget->setMinimumWidth(ParentType::_widget->tqsizeHint().width()); + ParentType::_widget->setMinimumWidth(ParentType::_widget->sizeHint().width()); } protected: diff --git a/src/common/gui/list_view.cpp b/src/common/gui/list_view.cpp index 52bd32b..1e0cb66 100644 --- a/src/common/gui/list_view.cpp +++ b/src/common/gui/list_view.cpp @@ -62,8 +62,8 @@ bool ListView::eventFilter(TQObject *o, TQEvent *e) break; } case TQEvent::FocusOut: { - //qDebug("focus out %i %i=%i", tqApp->tqfocusWidget(), tqfocusWidget(), (*it)->_editWidgets[i]); - if ( tqApp->tqfocusWidget() && tqfocusWidget()==(*it)->_editWidgets[i] ) break; + //qDebug("focus out %i %i=%i", tqApp->focusWidget(), focusWidget(), (*it)->_editWidgets[i]); + if ( tqApp->focusWidget() && focusWidget()==(*it)->_editWidgets[i] ) break; //qDebug("ext"); TQCustomEvent *e = new TQCustomEvent(9999); TQApplication::postEvent(o, e); @@ -95,7 +95,7 @@ void ListViewToolTip::maybeTip(const TQPoint &p) if ( _listView==0 ) return; const TQListViewItem* item = _listView->itemAt(p); if ( item==0 ) return; - TQRect rect = _listView->tqitemRect(item); + TQRect rect = _listView->itemRect(item); if ( !rect.isValid() ) return; int col = _listView->header()->sectionAt(p.x()); TQString text = _listView->tooltip(*item, col); @@ -149,7 +149,7 @@ void EditListViewItem::startRename() _renaming = true; _editWidgets.resize(lv->columns()); for (uint i=0; i<_editWidgets.count(); i++) { - TQRect r = lv->tqitemRect(this); + TQRect r = lv->itemRect(this); r = TQRect(lv->viewportToContents(r.topLeft()), r.size()); r.setLeft(lv->header()->sectionPos(i)); r.setWidth(lv->header()->sectionSize(i) - 1); @@ -162,7 +162,7 @@ void EditListViewItem::startRename() if ( _editWidgets[i]==0 ) continue; _editWidgets[i]->installEventFilter(lv); lv->addChild(_editWidgets[i], r.x(), r.y()); - uint w = TQMIN(r.width(), _editWidgets[i]->tqsizeHint().width()); + uint w = TQMIN(r.width(), _editWidgets[i]->sizeHint().width()); _editWidgets[i]->resize(w, r.height()); lv->viewport()->setFocusProxy(_editWidgets[i]); _editWidgets[i]->setFocus(); @@ -191,9 +191,9 @@ void EditListViewItem::removeEditBox() void EditListViewItem::editDone(int col, const TQWidget *edit) { - if ( edit->tqmetaObject()->findProperty("text", true)!=-1 ) + if ( edit->metaObject()->findProperty("text", true)!=-1 ) emit listView()->itemRenamed(this, col, edit->property("text").toString()); - else if ( edit->tqmetaObject()->findProperty("currentText", true)!=-1 ) + else if ( edit->metaObject()->findProperty("currentText", true)!=-1 ) emit listView()->itemRenamed(this, col, edit->property("currentText").toString()); } @@ -215,7 +215,7 @@ int EditListViewItem::width(const TQFontMetrics &fm, const TQListView *lv, int c int w = KListViewItem::width(fm, lv, col); TQWidget *edit = editWidgetFactory(col); if ( edit==0 ) return w; - w = TQMAX(w, edit->tqsizeHint().width()); + w = TQMAX(w, edit->sizeHint().width()); delete edit; return w; } -- cgit v1.2.1