diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:34:15 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:34:15 -0600 |
commit | 031454e56009d576589c28757f6c6fcf4884095e (patch) | |
tree | ad4c9959d05a814c9090e8fe63ba27057903271b /src/gui | |
parent | 54011e0e1af8cd96162160ecf5d361a59a2c733e (diff) | |
download | tellico-031454e56009d576589c28757f6c6fcf4884095e.tar.gz tellico-031454e56009d576589c28757f6c6fcf4884095e.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/boolfieldwidget.cpp | 4 | ||||
-rw-r--r-- | src/gui/choicefieldwidget.cpp | 2 | ||||
-rw-r--r-- | src/gui/counteditem.cpp | 4 | ||||
-rw-r--r-- | src/gui/datewidget.cpp | 12 | ||||
-rw-r--r-- | src/gui/fieldwidget.cpp | 16 | ||||
-rw-r--r-- | src/gui/imagefieldwidget.cpp | 2 | ||||
-rw-r--r-- | src/gui/imagewidget.cpp | 12 | ||||
-rw-r--r-- | src/gui/kwidgetlister.cpp | 10 | ||||
-rw-r--r-- | src/gui/kwidgetlister.h | 6 | ||||
-rw-r--r-- | src/gui/lineedit.cpp | 10 | ||||
-rw-r--r-- | src/gui/linefieldwidget.cpp | 2 | ||||
-rw-r--r-- | src/gui/listview.cpp | 20 | ||||
-rw-r--r-- | src/gui/listview.h | 4 | ||||
-rw-r--r-- | src/gui/numberfieldwidget.cpp | 12 | ||||
-rw-r--r-- | src/gui/overlaywidget.cpp | 8 | ||||
-rw-r--r-- | src/gui/parafieldwidget.cpp | 6 | ||||
-rw-r--r-- | src/gui/ratingwidget.cpp | 16 | ||||
-rw-r--r-- | src/gui/richtextlabel.cpp | 12 | ||||
-rw-r--r-- | src/gui/richtextlabel.h | 4 | ||||
-rw-r--r-- | src/gui/stringmapdialog.cpp | 6 | ||||
-rw-r--r-- | src/gui/tablefieldwidget.cpp | 34 | ||||
-rw-r--r-- | src/gui/urlfieldwidget.cpp | 4 |
22 files changed, 103 insertions, 103 deletions
diff --git a/src/gui/boolfieldwidget.cpp b/src/gui/boolfieldwidget.cpp index a3a9649..cb8eff1 100644 --- a/src/gui/boolfieldwidget.cpp +++ b/src/gui/boolfieldwidget.cpp @@ -17,7 +17,7 @@ #include <tqlabel.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> using Tellico::GUI::BoolFieldWidget; @@ -31,7 +31,7 @@ BoolFieldWidget::BoolFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const TQString BoolFieldWidget::text() const { if(m_checkBox->isChecked()) { - return TQString::tqfromLatin1("true"); + return TQString::fromLatin1("true"); } return TQString(); diff --git a/src/gui/choicefieldwidget.cpp b/src/gui/choicefieldwidget.cpp index 83e31f9..a8f0044 100644 --- a/src/gui/choicefieldwidget.cpp +++ b/src/gui/choicefieldwidget.cpp @@ -17,7 +17,7 @@ #include <kcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> using Tellico::GUI::ChoiceFieldWidget; diff --git a/src/gui/counteditem.cpp b/src/gui/counteditem.cpp index 1be5bcd..536d08e 100644 --- a/src/gui/counteditem.cpp +++ b/src/gui/counteditem.cpp @@ -73,7 +73,7 @@ void CountedItem::paintCell(TQPainter* p_, const TQColorGroup& cg_, } TQFontMetrics fm = p_->fontMetrics(); - TQString numText = TQString::tqfromLatin1(" (%1)").tqarg(count()); + TQString numText = TQString::fromLatin1(" (%1)").arg(count()); // don't call CountedListViewItem::width() because that includes the count already int w = ListViewItem::width(fm, listView(), column_); int countWidth = fm.width(numText); @@ -106,7 +106,7 @@ int CountedItem::width(const TQFontMetrics& fm_, const TQListView* lv_, int colu // show count is only for first column if(column_ == 0) { - TQString numText = TQString::tqfromLatin1(" (%1)").tqarg(count()); + TQString numText = TQString::fromLatin1(" (%1)").arg(count()); w += fm_.width(numText) + 2; // add a little pad } return w; diff --git a/src/gui/datewidget.cpp b/src/gui/datewidget.cpp index c43ca26..31de509 100644 --- a/src/gui/datewidget.cpp +++ b/src/gui/datewidget.cpp @@ -27,14 +27,14 @@ #include <kcalendarsystem.h> #include <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> using Tellico::GUI::SpinBox; using Tellico::GUI::DateWidget; SpinBox::SpinBox(int min, int max, TQWidget *parent) : TQSpinBox(min, max, 1, parent) { - editor()->tqsetAlignment(AlignRight); + editor()->setAlignment(AlignRight); // I want to be able to omit the day // an empty string just removes the special value, so set white space setSpecialValueText(TQChar(' ')); @@ -71,7 +71,7 @@ DateWidget::DateWidget(TQWidget* parent_, const char* name_) : TQWidget(parent_, connect(m_yearSpin, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotDateChanged())); m_dateButton = new KPushButton(this); - m_dateButton->setIconSet(SmallIconSet(TQString::tqfromLatin1("date"))); + m_dateButton->setIconSet(SmallIconSet(TQString::fromLatin1("date"))); connect(m_dateButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotShowPicker())); l->addWidget(m_dateButton, 0); @@ -221,7 +221,7 @@ void DateWidget::clear() { m_daySpin->setValue(m_daySpin->minValue()); m_monthCombo->setCurrentItem(0); m_yearSpin->setValue(m_yearSpin->minValue()); - m_picker->setDate(TQDate::tqcurrentDate()); + m_picker->setDate(TQDate::currentDate()); m_daySpin->blockSignals(false); m_monthCombo->blockSignals(false); @@ -233,13 +233,13 @@ void DateWidget::slotShowPicker() { TQRect desk = KGlobalSettings::desktopGeometry(this); TQPoint popupPoint = mapToGlobal(TQPoint(0, 0)); - int dateFrameHeight = m_frame->tqsizeHint().height(); + int dateFrameHeight = m_frame->sizeHint().height(); if(popupPoint.y() + height() + dateFrameHeight > desk.bottom()) { popupPoint.setY(popupPoint.y() - dateFrameHeight); } else { popupPoint.setY(popupPoint.y() + height()); } - int dateFrameWidth = m_frame->tqsizeHint().width(); + int dateFrameWidth = m_frame->sizeHint().width(); if(popupPoint.x() + dateFrameWidth > desk.right()) { popupPoint.setX(desk.right() - dateFrameWidth); } diff --git a/src/gui/fieldwidget.cpp b/src/gui/fieldwidget.cpp index 3940fc4..653db95 100644 --- a/src/gui/fieldwidget.cpp +++ b/src/gui/fieldwidget.cpp @@ -28,7 +28,7 @@ #include <kurllabel.h> #include <klocale.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <tqregexp.h> #include <tqlabel.h> @@ -43,7 +43,7 @@ namespace { using Tellico::GUI::FieldWidget; -const TQRegExp FieldWidget::s_semiColon = TQRegExp(TQString::tqfromLatin1("\\s*;\\s*")); +const TQRegExp FieldWidget::s_semiColon = TQRegExp(TQString::fromLatin1("\\s*;\\s*")); FieldWidget* FieldWidget::create(Data::FieldPtr field_, TQWidget* parent_, const char* name_) { switch (field_->type()) { @@ -98,14 +98,14 @@ FieldWidget::FieldWidget(Data::FieldPtr field_, TQWidget* parent_, const char* n } Data::Field::Type type = field_->type(); - TQString s = i18n("Edit Label", "%1:").tqarg(field_->title()); + TQString s = i18n("Edit Label", "%1:").arg(field_->title()); if(type == Data::Field::URL) { // set URL to null for now m_label = new KURLLabel(TQString(), s, this); } else { m_label = new TQLabel(s, this); } - m_label->setFixedWidth(m_label->tqsizeHint().width()); + m_label->setFixedWidth(m_label->sizeHint().width()); l->addWidget(m_label); // expands indicates if the edit widget should expand to full width of widget @@ -120,7 +120,7 @@ FieldWidget::FieldWidget(Data::FieldPtr field_, TQWidget* parent_, const char* n m_editMultiple = new TQCheckBox(this); m_editMultiple->setChecked(true); - m_editMultiple->setFixedWidth(m_editMultiple->tqsizeHint().width()); // don't let it have any extra space + m_editMultiple->setFixedWidth(m_editMultiple->sizeHint().width()); // don't let it have any extra space connect(m_editMultiple, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setEnabled(bool))); l->addWidget(m_editMultiple); @@ -147,7 +147,7 @@ void FieldWidget::setEnabled(bool enabled_) { } int FieldWidget::labelWidth() const { - return m_label->tqsizeHint().width(); + return m_label->sizeHint().width(); } void FieldWidget::setLabelWidth(int width_) { @@ -182,7 +182,7 @@ void FieldWidget::registerWidget() { setFocusProxy(w); } - TQHBoxLayout* l = static_cast<TQHBoxLayout*>(tqlayout()); + TQHBoxLayout* l = static_cast<TQHBoxLayout*>(layout()); l->insertWidget(FIELD_EDIT_WIDGET_INDEX, w, m_expands ? 1 : 0 /*stretch*/); if(!m_expands) { l->insertStretch(FIELD_EDIT_WIDGET_INDEX+1, 1 /*stretch*/); @@ -192,7 +192,7 @@ void FieldWidget::registerWidget() { void FieldWidget::updateField(Data::FieldPtr oldField_, Data::FieldPtr newField_) { m_field = newField_; - m_label->setText(i18n("Edit Label", "%1:").tqarg(newField_->title())); + m_label->setText(i18n("Edit Label", "%1:").arg(newField_->title())); updateGeometry(); TQWhatsThis::add(this, newField_->description()); updateFieldHook(oldField_, newField_); diff --git a/src/gui/imagefieldwidget.cpp b/src/gui/imagefieldwidget.cpp index 9acc732..77f67b9 100644 --- a/src/gui/imagefieldwidget.cpp +++ b/src/gui/imagefieldwidget.cpp @@ -22,7 +22,7 @@ ImageFieldWidget::ImageFieldWidget(Data::FieldPtr field_, TQWidget* parent_, con : FieldWidget(field_, parent_, name_) { m_widget = new ImageWidget(this); - m_widget->setLinkOnlyChecked(field_->property(TQString::tqfromLatin1("link")) == Latin1Literal("true")); + m_widget->setLinkOnlyChecked(field_->property(TQString::fromLatin1("link")) == Latin1Literal("true")); connect(m_widget, TQT_SIGNAL(signalModified()), TQT_SIGNAL(modified())); registerWidget(); diff --git a/src/gui/imagewidget.cpp b/src/gui/imagewidget.cpp index 69e0560..e4e3d57 100644 --- a/src/gui/imagewidget.cpp +++ b/src/gui/imagewidget.cpp @@ -25,7 +25,7 @@ #include <kmessagebox.h> #include <tqwmatrix.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqcheckbox.h> #include <tqdragobject.h> @@ -44,9 +44,9 @@ ImageWidget::ImageWidget(TQWidget* parent_, const char* name_) : TQWidget(parent TQHBoxLayout* l = new TQHBoxLayout(this); l->setMargin(IMAGE_WIDGET_BUTTON_MARGIN); m_label = new TQLabel(this); - m_label->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored)); + m_label->setSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored)); m_label->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); - m_label->tqsetAlignment(TQt::AlignHCenter | TQt::AlignVCenter); + m_label->setAlignment(TQt::AlignHCenter | TQt::AlignVCenter); l->addWidget(m_label, 1); l->addSpacing(IMAGE_WIDGET_BUTTON_MARGIN); @@ -56,7 +56,7 @@ ImageWidget::ImageWidget(TQWidget* parent_, const char* name_) : TQWidget(parent KButtonBox* box = new KButtonBox(this,Qt::Vertical); box->addButton(i18n("Select Image..."), TQT_TQOBJECT(this), TQT_SLOT(slotGetImage())); box->addButton(i18n("Clear"), TQT_TQOBJECT(this), TQT_SLOT(slotClear())); - box->tqlayout(); + box->layout(); boxLayout->addWidget(box); boxLayout->addSpacing(8); @@ -179,7 +179,7 @@ void ImageWidget::mousePressEvent(TQMouseEvent* event_) { if(event_->button() == Qt::LeftButton) { // Store the position of the mouse press. // check if position is inside the label - if(m_label->tqgeometry().contains(event_->pos())) { + if(m_label->geometry().contains(event_->pos())) { m_dragStart = event_->pos(); } else { m_dragStart = TQPoint(); @@ -214,7 +214,7 @@ void ImageWidget::dropEvent(TQDropEvent* event_) { GUI::CursorSaver cs(TQt::busyCursor); if(TQImageDrag::decode(event_, image)) { // TQt reads PNG data by default - const TQString& id = ImageFactory::addImage(image, TQString::tqfromLatin1("PNG")); + const TQString& id = ImageFactory::addImage(image, TQString::fromLatin1("PNG")); if(!id.isEmpty() && id != m_imageID) { setImage(id); emit signalModified(); diff --git a/src/gui/kwidgetlister.cpp b/src/gui/kwidgetlister.cpp index 8574d28..896955c 100644 --- a/src/gui/kwidgetlister.cpp +++ b/src/gui/kwidgetlister.cpp @@ -36,7 +36,7 @@ #include <kpushbutton.h> #include <kiconloader.h> -#include <tqlayout.h> +#include <layout.h> #include <tqhbox.h> #include <assert.h> @@ -56,18 +56,18 @@ KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, TQWidget *parent, mLayout->addWidget( mButtonBox ); mBtnMore = new KPushButton( i18n("more widgets","More"), mButtonBox ); - mBtnMore->setIconSet(SmallIconSet(TQString::tqfromLatin1("down"))); + mBtnMore->setIconSet(SmallIconSet(TQString::fromLatin1("down"))); mButtonBox->setStretchFactor( mBtnMore, 0 ); mBtnFewer = new KPushButton( i18n("fewer widgets","Fewer"), mButtonBox ); - mBtnFewer->setIconSet(SmallIconSet(TQString::tqfromLatin1("up"))); + mBtnFewer->setIconSet(SmallIconSet(TQString::fromLatin1("up"))); mButtonBox->setStretchFactor( mBtnFewer, 0 ); TQWidget *spacer = new TQWidget( mButtonBox ); mButtonBox->setStretchFactor( spacer, 1 ); mBtnClear = new KPushButton( i18n("clear widgets","Clear"), mButtonBox ); - mBtnClear->setIconSet(SmallIconSet(TQString::tqfromLatin1("locationbar_erase"))); + mBtnClear->setIconSet(SmallIconSet(TQString::fromLatin1("locationbar_erase"))); mButtonBox->setStretchFactor( mBtnClear, 0 ); //---------- connect everything @@ -135,7 +135,7 @@ void KWidgetLister::addWidgetAtEnd(TQWidget *w) void KWidgetLister::removeLastWidget() { - // The tqlayout will take care that the + // The layout will take care that the // widget is removed from screen, too. mWidgetList.removeLast(); enableControls(); diff --git a/src/gui/kwidgetlister.h b/src/gui/kwidgetlister.h index 0124b65..262500c 100644 --- a/src/gui/kwidgetlister.h +++ b/src/gui/kwidgetlister.h @@ -71,19 +71,19 @@ protected slots: /** Called whenever the user clicks on the 'more' button. Reimplementations should call this method, because this implementation does all the dirty work with adding the widgets - to the tqlayout (through @ref addWidgetAtEnd) and enabling/disabling + to the layout (through @ref addWidgetAtEnd) and enabling/disabling the control buttons. */ virtual void slotMore(); /** Called whenever the user clicks on the 'fewer' button. Reimplementations should call this method, because this implementation does all the dirty work with removing the widgets - from the tqlayout (through @ref removelastWidget) and + from the layout (through @ref removelastWidget) and enabling/disabling the control buttons. */ virtual void slotFewer(); /** Called whenever the user clicks on the 'clear' button. Reimplementations should call this method, because this implementation does all the dirty work with removing all but - @ref mMinWidets widgets from the tqlayout and enabling/disabling + @ref mMinWidets widgets from the layout and enabling/disabling the control buttons. */ virtual void slotClear(); diff --git a/src/gui/lineedit.cpp b/src/gui/lineedit.cpp index cca7f7d..1936795 100644 --- a/src/gui/lineedit.cpp +++ b/src/gui/lineedit.cpp @@ -34,25 +34,25 @@ LineEdit::LineEdit(TQWidget* parent_, const char* name_) : KLineEdit(parent_, na void LineEdit::clear() { KLineEdit::clear(); m_drawHint = true; - tqrepaint(); + repaint(); } void LineEdit::setText(const TQString& text_) { m_drawHint = text_.isEmpty(); - tqrepaint(); + repaint(); KLineEdit::setText(text_); } void LineEdit::setHint(const TQString& hint_) { m_hint = hint_; m_drawHint = text().isEmpty(); - tqrepaint(); + repaint(); } void LineEdit::focusInEvent(TQFocusEvent* event_) { if(m_drawHint) { m_drawHint = false; - tqrepaint(); + repaint(); } KLineEdit::focusInEvent(event_); } @@ -60,7 +60,7 @@ void LineEdit::focusInEvent(TQFocusEvent* event_) { void LineEdit::focusOutEvent(TQFocusEvent* event_) { if(text().isEmpty()) { m_drawHint = true; - tqrepaint(); + repaint(); } KLineEdit::focusOutEvent(event_); } diff --git a/src/gui/linefieldwidget.cpp b/src/gui/linefieldwidget.cpp index cce1ade..3f3da1d 100644 --- a/src/gui/linefieldwidget.cpp +++ b/src/gui/linefieldwidget.cpp @@ -47,7 +47,7 @@ LineFieldWidget::LineFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const TQString LineFieldWidget::text() const { TQString text = m_lineEdit->text(); if(field()->flags() & Data::Field::AllowMultiple) { - text.replace(s_semiColon, TQString::tqfromLatin1("; ")); + text.replace(s_semiColon, TQString::fromLatin1("; ")); } return text.stripWhiteSpace(); } diff --git a/src/gui/listview.cpp b/src/gui/listview.cpp index f5595ea..4b8c250 100644 --- a/src/gui/listview.cpp +++ b/src/gui/listview.cpp @@ -147,14 +147,14 @@ int ListView::compare(int col, const GUI::ListViewItem* item1, GUI::ListViewItem void ListView::setShadeSortColumn(bool shade_) { if(m_shadeSortColumn != shade_) { m_shadeSortColumn = shade_; - tqrepaint(); + repaint(); } } #endif void ListView::slotUpdateColors() { #if !KDE_IS_VERSION(3,3,90) - m_backColor2 = viewport()->tqcolorGroup().base(); + m_backColor2 = viewport()->colorGroup().base(); if(m_backColor2 == TQt::black) { m_backColor2 = TQColor(50, 50, 50); // dark gray } else { @@ -180,8 +180,8 @@ void ListView::slotUpdateColors() { } } #endif - Tellico::updateContrastColor(viewport()->tqcolorGroup()); - tqrepaint(); + Tellico::updateContrastColor(viewport()->colorGroup()); + repaint(); } void ListView::slotSelectionChanged() { @@ -196,7 +196,7 @@ void ListView::slotSelectionChanged() { m_isClear = false; Data::EntryVec entries; - // now just find all the tqchildren or grandtqchildren that are entry items + // now just find all the children or grandchildren that are entry items for(GUI::ListViewItemListIt it(m_selectedItems); it.current(); ++it) { Data::EntryVec more = it.current()->entries(); for(Data::EntryVecIt entry = more.begin(); entry != more.end(); ++entry) { @@ -214,8 +214,8 @@ void ListView::slotDoubleClicked(TQListViewItem* item_) { return; } - // if it has tqchildren, just open it - // but some items delay tqchildren creation + // if it has children, just open it + // but some items delay children creation if(static_cast<ListViewItem*>(item_)->realChildCount() > 0) { item_->setOpen(!item_->isOpen()); } @@ -234,8 +234,8 @@ void ListView::drawContentsOffset(TQPainter* p, int ox, int oy, int cx, int cy, /* ****************** ListViewItem ********************* */ ListViewItem::~ListViewItem() { - // I think there's a bug in qt where the tqchildren of this item are deleted after the item itself - // as a result, there is no listView() pointer for the tqchildren, that obvious causes + // I think there's a bug in qt where the children of this item are deleted after the item itself + // as a result, there is no listView() pointer for the children, that obvious causes // a problem with updating the selection. So we MUST call clear() here ourselves! clear(); // be sure to remove from selected list when it's deleted @@ -300,7 +300,7 @@ TQColor ListViewItem::backgroundColor(int column_) { if(view->columns() > 1 && view->shadeSortColumn() && column_ == view->sortColumn()) { return isAlternate() ? view->alternateBackground2() : view->background2(); } - return isAlternate() ? view->alternateBackground() : view->viewport()->tqcolorGroup().base(); + return isAlternate() ? view->alternateBackground() : view->viewport()->colorGroup().base(); #endif } diff --git a/src/gui/listview.h b/src/gui/listview.h index 3f1c485..d54eab6 100644 --- a/src/gui/listview.h +++ b/src/gui/listview.h @@ -161,8 +161,8 @@ public: * @param alternate The alternate row color can be forced */ virtual TQColor backgroundColor(int column); // not virtual in KListViewItem!!! - virtual void paintCell(TQPainter* painter, const TQColorGroup& tqcolorGroup, - int column, int width, int tqalignment); + virtual void paintCell(TQPainter* painter, const TQColorGroup& colorGroup, + int column, int width, int alignment); ListView* listView () const { return static_cast<ListView*>(KListViewItem::listView()); } diff --git a/src/gui/numberfieldwidget.cpp b/src/gui/numberfieldwidget.cpp index f2cdaa8..c016bc6 100644 --- a/src/gui/numberfieldwidget.cpp +++ b/src/gui/numberfieldwidget.cpp @@ -17,7 +17,7 @@ #include <klineedit.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvalidator.h> using Tellico::GUI::NumberFieldWidget; @@ -41,7 +41,7 @@ void NumberFieldWidget::initLineEdit() { // regexp is any number of digits followed optionally by any number of // groups of a semi-colon followed optionally by a space, followed by digits - TQRegExp rx(TQString::tqfromLatin1("-?\\d*(; ?-?\\d*)*")); + TQRegExp rx(TQString::fromLatin1("-?\\d*(; ?-?\\d*)*")); m_lineEdit->setValidator(new TQRegExpValidator(rx, TQT_TQOBJECT(this))); } @@ -67,7 +67,7 @@ TQString NumberFieldWidget::text() const { TQString text = m_lineEdit->text(); if(field()->flags() & Data::Field::AllowMultiple) { - text.replace(s_semiColon, TQString::tqfromLatin1("; ")); + text.replace(s_semiColon, TQString::fromLatin1("; ")); } return text.simplifyWhiteSpace(); } @@ -116,19 +116,19 @@ void NumberFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_ TQString value = text(); if(wasLineEdit && !nowLineEdit) { - tqlayout()->remove(m_lineEdit); + layout()->remove(m_lineEdit); delete m_lineEdit; m_lineEdit = 0; initSpinBox(); } else if(!wasLineEdit && nowLineEdit) { - tqlayout()->remove(m_spinBox); + layout()->remove(m_spinBox); delete m_spinBox; m_spinBox = 0; initLineEdit(); } // should really be FIELD_EDIT_WIDGET_INDEX from fieldwidget.cpp - static_cast<TQBoxLayout*>(tqlayout())->insertWidget(2, widget(), 1 /*stretch*/); + static_cast<TQBoxLayout*>(layout())->insertWidget(2, widget(), 1 /*stretch*/); widget()->show(); setText(value); } diff --git a/src/gui/overlaywidget.cpp b/src/gui/overlaywidget.cpp index fd5c02b..7116ba2 100644 --- a/src/gui/overlaywidget.cpp +++ b/src/gui/overlaywidget.cpp @@ -13,7 +13,7 @@ #include "overlaywidget.h" -#include <tqlayout.h> +#include <layout.h> using Tellico::GUI::OverlayWidget; @@ -34,7 +34,7 @@ void OverlayWidget::setCorner(Corner corner_) { } void OverlayWidget::addWidget(TQWidget* widget_) { - tqlayout()->add(widget_); + layout()->add(widget_); adjustSize(); } @@ -70,9 +70,9 @@ void OverlayWidget::reposition() { } // Position in the toplevelwidget's coordinates - TQPoint pTopLevel = m_anchor->mapTo(tqtopLevelWidget(), p); + TQPoint pTopLevel = m_anchor->mapTo(topLevelWidget(), p); // Position in the widget's parentWidget coordinates - TQPoint pParent = parentWidget()->mapFrom(tqtopLevelWidget(), pTopLevel); + TQPoint pParent = parentWidget()->mapFrom(topLevelWidget(), pTopLevel); // keep it on the screen if(pParent.x() < 0) { pParent.rx() = 0; diff --git a/src/gui/parafieldwidget.cpp b/src/gui/parafieldwidget.cpp index 9aee35e..c03a28a 100644 --- a/src/gui/parafieldwidget.cpp +++ b/src/gui/parafieldwidget.cpp @@ -24,7 +24,7 @@ ParaFieldWidget::ParaFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const m_textEdit = new KTextEdit(this); m_textEdit->setTextFormat(TQt::PlainText); - if(field_->property(TQString::tqfromLatin1("spellcheck")) != Latin1Literal("false")) { + if(field_->property(TQString::fromLatin1("spellcheck")) != Latin1Literal("false")) { m_textEdit->setCheckSpellingEnabled(true); } connect(m_textEdit, TQT_SIGNAL(textChanged()), TQT_SIGNAL(modified())); @@ -34,7 +34,7 @@ ParaFieldWidget::ParaFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const TQString ParaFieldWidget::text() const { TQString text = m_textEdit->text(); - text.replace('\n', TQString::tqfromLatin1("<br/>")); + text.replace('\n', TQString::fromLatin1("<br/>")); return text; } @@ -42,7 +42,7 @@ void ParaFieldWidget::setText(const TQString& text_) { blockSignals(true); m_textEdit->blockSignals(true); - TQRegExp rx(TQString::tqfromLatin1("<br/?>"), false /*case-sensitive*/); + TQRegExp rx(TQString::fromLatin1("<br/?>"), false /*case-sensitive*/); TQString s = text_; s.replace(rx, TQChar('\n')); m_textEdit->setText(s); diff --git a/src/gui/ratingwidget.cpp b/src/gui/ratingwidget.cpp index ec5d717..a35c3fa 100644 --- a/src/gui/ratingwidget.cpp +++ b/src/gui/ratingwidget.cpp @@ -20,7 +20,7 @@ #include <kiconloader.h> #include <tqintdict.h> -#include <tqlayout.h> +#include <layout.h> namespace { static const int RATING_WIDGET_MAX_ICONS = 10; // same as in Field::ratingValues() @@ -43,7 +43,7 @@ const TQPixmap& RatingWidget::pixmap(const TQString& value_) { return *pixmaps[n]; } - TQString picName = TQString::tqfromLatin1("stars%1").tqarg(n); + TQString picName = TQString::fromLatin1("stars%1").arg(n); TQPixmap* pix = new TQPixmap(UserIcon(picName)); pixmaps.insert(n, pix); return *pix; @@ -51,8 +51,8 @@ const TQPixmap& RatingWidget::pixmap(const TQString& value_) { RatingWidget::RatingWidget(Data::FieldPtr field_, TQWidget* parent_, const char* name_/*=0*/) : TQHBox(parent_, name_), m_field(field_), m_currIndex(-1) { - m_pixOn = UserIcon(TQString::tqfromLatin1("star_on")); - m_pixOff = UserIcon(TQString::tqfromLatin1("star_off")); + m_pixOn = UserIcon(TQString::fromLatin1("star_on")); + m_pixOff = UserIcon(TQString::fromLatin1("star_off")); setSpacing(0); // find maximum width and height @@ -65,7 +65,7 @@ RatingWidget::RatingWidget(Data::FieldPtr field_, TQWidget* parent_, const char* } init(); - TQBoxLayout* l = dynamic_cast<TQBoxLayout*>(tqlayout()); + TQBoxLayout* l = dynamic_cast<TQBoxLayout*>(layout()); if(l) { l->addStretch(1); } @@ -86,8 +86,8 @@ void RatingWidget::init() { void RatingWidget::updateBounds() { bool ok; // not used; - m_min = Tellico::toUInt(m_field->property(TQString::tqfromLatin1("minimum")), &ok); - m_max = Tellico::toUInt(m_field->property(TQString::tqfromLatin1("maximum")), &ok); + m_min = Tellico::toUInt(m_field->property(TQString::fromLatin1("minimum")), &ok); + m_max = Tellico::toUInt(m_field->property(TQString::fromLatin1("maximum")), &ok); if(m_max > RATING_WIDGET_MAX_ICONS) { myDebug() << "RatingWidget::updateBounds() - max is too high: " << m_max << endl; m_max = RATING_WIDGET_MAX_ICONS; @@ -116,7 +116,7 @@ void RatingWidget::mousePressEvent(TQMouseEvent* event_) { } int idx; - TQWidget* child = tqchildAt(event_->pos()); + TQWidget* child = childAt(event_->pos()); if(child) { idx = m_widgets.findRef(static_cast<TQLabel*>(child)); // if the widget is clicked beyond the maximum value, clear it diff --git a/src/gui/richtextlabel.cpp b/src/gui/richtextlabel.cpp index 632f771..85a9dde 100644 --- a/src/gui/richtextlabel.cpp +++ b/src/gui/richtextlabel.cpp @@ -15,7 +15,7 @@ #include <kdebug.h> -#include <tqlayout.h> +#include <layout.h> using Tellico::GUI::RichTextLabel; @@ -27,8 +27,8 @@ RichTextLabel::RichTextLabel(const TQString& text, TQWidget* parent) : TQTextEdi init(); } -TQSize RichTextLabel::tqsizeHint() const { - return tqminimumSizeHint(); +TQSize RichTextLabel::sizeHint() const { + return minimumSizeHint(); } void RichTextLabel::init() { @@ -38,10 +38,10 @@ void RichTextLabel::init() { setFrameShape(TQFrame::NoFrame); viewport()->setMouseTracking(false); - setPaper(tqcolorGroup().background()); + setPaper(colorGroup().background()); - tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); - viewport()->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); + setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); + viewport()->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); } #include "richtextlabel.moc" diff --git a/src/gui/richtextlabel.h b/src/gui/richtextlabel.h index e8c4777..850f2d7 100644 --- a/src/gui/richtextlabel.h +++ b/src/gui/richtextlabel.h @@ -14,7 +14,7 @@ #ifndef TELLICO_GUI_RICHTEXTLABEL_H #define TELLICO_GUI_RICHTEXTLABEL_H -#include <tqtextedit.h> +#include <textedit.h> namespace Tellico { namespace GUI { @@ -30,7 +30,7 @@ public: RichTextLabel(TQWidget* parent); RichTextLabel(const TQString& text, TQWidget* parent); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; private: void init(); diff --git a/src/gui/stringmapdialog.cpp b/src/gui/stringmapdialog.cpp index fbd6f6a..62a12a3 100644 --- a/src/gui/stringmapdialog.cpp +++ b/src/gui/stringmapdialog.cpp @@ -19,7 +19,7 @@ #include <kbuttonbox.h> #include <kiconloader.h> -#include <tqlayout.h> +#include <layout.h> #include <tqheader.h> #include <tqhbox.h> #include <tqwhatsthis.h> @@ -55,9 +55,9 @@ StringMapDialog::StringMapDialog(const TQMap<TQString, TQString>& map_, TQWidget KButtonBox* bb = new KButtonBox(box); bb->addStretch(); TQPushButton* btn = bb->addButton(i18n("&Set"), TQT_TQOBJECT(this), TQT_SLOT(slotAdd())); - btn->setIconSet(BarIcon(TQString::tqfromLatin1("filenew"), KIcon::SizeSmall)); + btn->setIconSet(BarIcon(TQString::fromLatin1("filenew"), KIcon::SizeSmall)); btn = bb->addButton(i18n("&Delete"), TQT_TQOBJECT(this), TQT_SLOT(slotDelete())); - btn->setIconSet(BarIcon(TQString::tqfromLatin1("editdelete"), KIcon::SizeSmall)); + btn->setIconSet(BarIcon(TQString::fromLatin1("editdelete"), KIcon::SizeSmall)); l->addWidget(box); l->addStretch(1); diff --git a/src/gui/tablefieldwidget.cpp b/src/gui/tablefieldwidget.cpp index 449fbbb..81c9dba 100644 --- a/src/gui/tablefieldwidget.cpp +++ b/src/gui/tablefieldwidget.cpp @@ -34,7 +34,7 @@ TableFieldWidget::TableFieldWidget(Data::FieldPtr field_, TQWidget* parent_, con : FieldWidget(field_, parent_, name_), m_field(field_), m_row(-1), m_col(-1) { bool ok; - m_columns = Tellico::toUInt(field_->property(TQString::tqfromLatin1("columns")), &ok); + m_columns = Tellico::toUInt(field_->property(TQString::fromLatin1("columns")), &ok); if(!ok) { m_columns = 1; } else { @@ -77,17 +77,17 @@ TQString TableFieldWidget::text() const { for(int col = 0; col < m_table->numCols(); ++col) { str = m_table->text(row, col).simplifyWhiteSpace(); if(str.isEmpty()) { - cstack += TQString::tqfromLatin1("::"); + cstack += TQString::fromLatin1("::"); } else { - rowStr += cstack + str + TQString::tqfromLatin1("::"); + rowStr += cstack + str + TQString::fromLatin1("::"); cstack.truncate(0); } } if(rowStr.isEmpty()) { - rstack += TQString::tqfromLatin1("; "); + rstack += TQString::fromLatin1("; "); } else { rowStr.truncate(rowStr.length()-2); // remove last semi-colon and space - text += rstack + rowStr + TQString::tqfromLatin1("; "); + text += rstack + rowStr + TQString::fromLatin1("; "); rstack.truncate(0); } } @@ -123,7 +123,7 @@ void TableFieldWidget::setText(const TQString& text_) { int row; for(row = 0; row < static_cast<int>(list.count()); ++row) { for(int col = 0; col < m_table->numCols(); ++col) { - m_table->setText(row, col, list[row].section(TQString::tqfromLatin1("::"), col, col)); + m_table->setText(row, col, list[row].section(TQString::fromLatin1("::"), col, col)); } m_table->showRow(row); } @@ -182,7 +182,7 @@ void TableFieldWidget::slotRenameColumn() { name, &ok, this); if(ok && !newName.isEmpty()) { Data::FieldPtr newField = new Data::Field(*m_field); - newField->setProperty(TQString::tqfromLatin1("column%1").tqarg(m_col+1), newName); + newField->setProperty(TQString::fromLatin1("column%1").arg(m_col+1), newName); if(Kernel::self()->modifyField(newField)) { m_field = newField; labelColumns(m_field); @@ -201,9 +201,9 @@ bool TableFieldWidget::emptyRow(int row_) const { void TableFieldWidget::labelColumns(Data::FieldPtr field_) { for(int i = 0; i < m_columns; ++i) { - TQString s = field_->property(TQString::tqfromLatin1("column%1").tqarg(i+1)); + TQString s = field_->property(TQString::fromLatin1("column%1").arg(i+1)); if(s.isEmpty()) { - s = i18n("Column %1").tqarg(i+1); + s = i18n("Column %1").arg(i+1); } m_table->horizontalHeader()->setLabel(i, s); } @@ -211,7 +211,7 @@ void TableFieldWidget::labelColumns(Data::FieldPtr field_) { void TableFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_) { bool ok; - m_columns = Tellico::toUInt(newField_->property(TQString::tqfromLatin1("columns")), &ok); + m_columns = Tellico::toUInt(newField_->property(TQString::fromLatin1("columns")), &ok); if(!ok) { m_columns = 1; } else { @@ -238,7 +238,7 @@ bool TableFieldWidget::eventFilter(TQObject* obj_, TQEvent* ev_) { m_row = -1; m_col = col; KPopupMenu menu(this); - menu.insertItem(SmallIconSet(TQString::tqfromLatin1("edit")), i18n("Rename Column..."), + menu.insertItem(SmallIconSet(TQString::fromLatin1("edit")), i18n("Rename Column..."), this, TQT_SLOT(slotRenameColumn())); menu.exec(ev->globalPos()); return true; @@ -271,28 +271,28 @@ void TableFieldWidget::contextMenu(int row_, int col_, const TQPoint& p_) { int id; KPopupMenu menu(this); - menu.insertItem(SmallIconSet(TQString::tqfromLatin1("insrow")), i18n("Insert Row"), + menu.insertItem(SmallIconSet(TQString::fromLatin1("insrow")), i18n("Insert Row"), this, TQT_SLOT(slotInsertRow())); - menu.insertItem(SmallIconSet(TQString::tqfromLatin1("remrow")), i18n("Remove Row"), + menu.insertItem(SmallIconSet(TQString::fromLatin1("remrow")), i18n("Remove Row"), this, TQT_SLOT(slotRemoveRow())); - id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("1uparrow")), i18n("Move Row Up"), + id = menu.insertItem(SmallIconSet(TQString::fromLatin1("1uparrow")), i18n("Move Row Up"), this, TQT_SLOT(slotMoveRowUp())); if(m_row == 0) { menu.setItemEnabled(id, false); } - id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("1downarrow")), i18n("Move Row Down"), + id = menu.insertItem(SmallIconSet(TQString::fromLatin1("1downarrow")), i18n("Move Row Down"), this, TQT_SLOT(slotMoveRowDown())); if(m_row == m_table->numRows()-1) { menu.setItemEnabled(id, false); } menu.insertSeparator(); - id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("edit")), i18n("Rename Column..."), + id = menu.insertItem(SmallIconSet(TQString::fromLatin1("edit")), i18n("Rename Column..."), this, TQT_SLOT(slotRenameColumn())); if(m_col < 0 || m_col > m_columns-1) { menu.setItemEnabled(id, false); } menu.insertSeparator(); - menu.insertItem(SmallIconSet(TQString::tqfromLatin1("locationbar_erase")), i18n("Clear Table"), + menu.insertItem(SmallIconSet(TQString::fromLatin1("locationbar_erase")), i18n("Clear Table"), this, TQT_SLOT(clear())); menu.exec(p_); } diff --git a/src/gui/urlfieldwidget.cpp b/src/gui/urlfieldwidget.cpp index 0ecc37d..187f8bb 100644 --- a/src/gui/urlfieldwidget.cpp +++ b/src/gui/urlfieldwidget.cpp @@ -44,7 +44,7 @@ URLFieldWidget::URLFieldWidget(Data::FieldPtr field_, TQWidget* parent_, const c registerWidget(); // special case, remember if it's a relative url - m_isRelative = field_->property(TQString::tqfromLatin1("relative")) == Latin1Literal("true"); + m_isRelative = field_->property(TQString::fromLatin1("relative")) == Latin1Literal("true"); } URLFieldWidget::~URLFieldWidget() { @@ -80,7 +80,7 @@ void URLFieldWidget::clear() { } void URLFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_) { - m_isRelative = newField_->property(TQString::tqfromLatin1("relative")) == Latin1Literal("true"); + m_isRelative = newField_->property(TQString::fromLatin1("relative")) == Latin1Literal("true"); } void URLFieldWidget::slotOpenURL(const TQString& url_) { |