summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-16 09:57:51 -0600
committerTimothy Pearson <[email protected]>2011-12-16 09:57:51 -0600
commit2781e27b871150395a5a82e221684108641002b2 (patch)
tree57f4d7c01a48faef1a840fbe0de8f4ec1e5f606f /src/gui
parent031454e56009d576589c28757f6c6fcf4884095e (diff)
downloadtellico-2781e27b871150395a5a82e221684108641002b2.tar.gz
tellico-2781e27b871150395a5a82e221684108641002b2.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 031454e56009d576589c28757f6c6fcf4884095e.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/boolfieldwidget.cpp4
-rw-r--r--src/gui/choicefieldwidget.cpp2
-rw-r--r--src/gui/counteditem.cpp4
-rw-r--r--src/gui/datewidget.cpp12
-rw-r--r--src/gui/fieldwidget.cpp16
-rw-r--r--src/gui/imagefieldwidget.cpp2
-rw-r--r--src/gui/imagewidget.cpp12
-rw-r--r--src/gui/kwidgetlister.cpp10
-rw-r--r--src/gui/kwidgetlister.h6
-rw-r--r--src/gui/lineedit.cpp10
-rw-r--r--src/gui/linefieldwidget.cpp2
-rw-r--r--src/gui/listview.cpp20
-rw-r--r--src/gui/listview.h4
-rw-r--r--src/gui/numberfieldwidget.cpp12
-rw-r--r--src/gui/overlaywidget.cpp8
-rw-r--r--src/gui/parafieldwidget.cpp6
-rw-r--r--src/gui/ratingwidget.cpp16
-rw-r--r--src/gui/richtextlabel.cpp12
-rw-r--r--src/gui/richtextlabel.h4
-rw-r--r--src/gui/stringmapdialog.cpp6
-rw-r--r--src/gui/tablefieldwidget.cpp34
-rw-r--r--src/gui/urlfieldwidget.cpp4
22 files changed, 103 insertions, 103 deletions
diff --git a/src/gui/boolfieldwidget.cpp b/src/gui/boolfieldwidget.cpp
index cb8eff1..a3a9649 100644
--- a/src/gui/boolfieldwidget.cpp
+++ b/src/gui/boolfieldwidget.cpp
@@ -17,7 +17,7 @@
#include <tqlabel.h>
#include <tqcheckbox.h>
-#include <layout.h>
+#include <tqlayout.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::fromLatin1("true");
+ return TQString::tqfromLatin1("true");
}
return TQString();
diff --git a/src/gui/choicefieldwidget.cpp b/src/gui/choicefieldwidget.cpp
index a8f0044..83e31f9 100644
--- a/src/gui/choicefieldwidget.cpp
+++ b/src/gui/choicefieldwidget.cpp
@@ -17,7 +17,7 @@
#include <kcombobox.h>
#include <tqlabel.h>
-#include <layout.h>
+#include <tqlayout.h>
using Tellico::GUI::ChoiceFieldWidget;
diff --git a/src/gui/counteditem.cpp b/src/gui/counteditem.cpp
index 536d08e..1be5bcd 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::fromLatin1(" (%1)").arg(count());
+ TQString numText = TQString::tqfromLatin1(" (%1)").tqarg(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::fromLatin1(" (%1)").arg(count());
+ TQString numText = TQString::tqfromLatin1(" (%1)").tqarg(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 31de509..c43ca26 100644
--- a/src/gui/datewidget.cpp
+++ b/src/gui/datewidget.cpp
@@ -27,14 +27,14 @@
#include <kcalendarsystem.h>
#include <tqvbox.h>
-#include <layout.h>
+#include <tqlayout.h>
using Tellico::GUI::SpinBox;
using Tellico::GUI::DateWidget;
SpinBox::SpinBox(int min, int max, TQWidget *parent) : TQSpinBox(min, max, 1, parent)
{
- editor()->setAlignment(AlignRight);
+ editor()->tqsetAlignment(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::fromLatin1("date")));
+ m_dateButton->setIconSet(SmallIconSet(TQString::tqfromLatin1("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::currentDate());
+ m_picker->setDate(TQDate::tqcurrentDate());
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->sizeHint().height();
+ int dateFrameHeight = m_frame->tqsizeHint().height();
if(popupPoint.y() + height() + dateFrameHeight > desk.bottom()) {
popupPoint.setY(popupPoint.y() - dateFrameHeight);
} else {
popupPoint.setY(popupPoint.y() + height());
}
- int dateFrameWidth = m_frame->sizeHint().width();
+ int dateFrameWidth = m_frame->tqsizeHint().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 653db95..3940fc4 100644
--- a/src/gui/fieldwidget.cpp
+++ b/src/gui/fieldwidget.cpp
@@ -28,7 +28,7 @@
#include <kurllabel.h>
#include <klocale.h>
-#include <layout.h>
+#include <tqlayout.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::fromLatin1("\\s*;\\s*"));
+const TQRegExp FieldWidget::s_semiColon = TQRegExp(TQString::tqfromLatin1("\\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:").arg(field_->title());
+ TQString s = i18n("Edit Label", "%1:").tqarg(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->sizeHint().width());
+ m_label->setFixedWidth(m_label->tqsizeHint().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->sizeHint().width()); // don't let it have any extra space
+ m_editMultiple->setFixedWidth(m_editMultiple->tqsizeHint().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->sizeHint().width();
+ return m_label->tqsizeHint().width();
}
void FieldWidget::setLabelWidth(int width_) {
@@ -182,7 +182,7 @@ void FieldWidget::registerWidget() {
setFocusProxy(w);
}
- TQHBoxLayout* l = static_cast<TQHBoxLayout*>(layout());
+ TQHBoxLayout* l = static_cast<TQHBoxLayout*>(tqlayout());
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:").arg(newField_->title()));
+ m_label->setText(i18n("Edit Label", "%1:").tqarg(newField_->title()));
updateGeometry();
TQWhatsThis::add(this, newField_->description());
updateFieldHook(oldField_, newField_);
diff --git a/src/gui/imagefieldwidget.cpp b/src/gui/imagefieldwidget.cpp
index 77f67b9..9acc732 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::fromLatin1("link")) == Latin1Literal("true"));
+ m_widget->setLinkOnlyChecked(field_->property(TQString::tqfromLatin1("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 e4e3d57..69e0560 100644
--- a/src/gui/imagewidget.cpp
+++ b/src/gui/imagewidget.cpp
@@ -25,7 +25,7 @@
#include <kmessagebox.h>
#include <tqwmatrix.h>
-#include <layout.h>
+#include <tqlayout.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->setSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored));
+ m_label->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored));
m_label->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
- m_label->setAlignment(TQt::AlignHCenter | TQt::AlignVCenter);
+ m_label->tqsetAlignment(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->layout();
+ box->tqlayout();
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->geometry().contains(event_->pos())) {
+ if(m_label->tqgeometry().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::fromLatin1("PNG"));
+ const TQString& id = ImageFactory::addImage(image, TQString::tqfromLatin1("PNG"));
if(!id.isEmpty() && id != m_imageID) {
setImage(id);
emit signalModified();
diff --git a/src/gui/kwidgetlister.cpp b/src/gui/kwidgetlister.cpp
index 896955c..8574d28 100644
--- a/src/gui/kwidgetlister.cpp
+++ b/src/gui/kwidgetlister.cpp
@@ -36,7 +36,7 @@
#include <kpushbutton.h>
#include <kiconloader.h>
-#include <layout.h>
+#include <tqlayout.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::fromLatin1("down")));
+ mBtnMore->setIconSet(SmallIconSet(TQString::tqfromLatin1("down")));
mButtonBox->setStretchFactor( mBtnMore, 0 );
mBtnFewer = new KPushButton( i18n("fewer widgets","Fewer"), mButtonBox );
- mBtnFewer->setIconSet(SmallIconSet(TQString::fromLatin1("up")));
+ mBtnFewer->setIconSet(SmallIconSet(TQString::tqfromLatin1("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::fromLatin1("locationbar_erase")));
+ mBtnClear->setIconSet(SmallIconSet(TQString::tqfromLatin1("locationbar_erase")));
mButtonBox->setStretchFactor( mBtnClear, 0 );
//---------- connect everything
@@ -135,7 +135,7 @@ void KWidgetLister::addWidgetAtEnd(TQWidget *w)
void KWidgetLister::removeLastWidget()
{
- // The layout will take care that the
+ // The tqlayout 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 262500c..0124b65 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 layout (through @ref addWidgetAtEnd) and enabling/disabling
+ to the tqlayout (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 layout (through @ref removelastWidget) and
+ from the tqlayout (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 layout and enabling/disabling
+ @ref mMinWidets widgets from the tqlayout and enabling/disabling
the control buttons. */
virtual void slotClear();
diff --git a/src/gui/lineedit.cpp b/src/gui/lineedit.cpp
index 1936795..cca7f7d 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;
- repaint();
+ tqrepaint();
}
void LineEdit::setText(const TQString& text_) {
m_drawHint = text_.isEmpty();
- repaint();
+ tqrepaint();
KLineEdit::setText(text_);
}
void LineEdit::setHint(const TQString& hint_) {
m_hint = hint_;
m_drawHint = text().isEmpty();
- repaint();
+ tqrepaint();
}
void LineEdit::focusInEvent(TQFocusEvent* event_) {
if(m_drawHint) {
m_drawHint = false;
- repaint();
+ tqrepaint();
}
KLineEdit::focusInEvent(event_);
}
@@ -60,7 +60,7 @@ void LineEdit::focusInEvent(TQFocusEvent* event_) {
void LineEdit::focusOutEvent(TQFocusEvent* event_) {
if(text().isEmpty()) {
m_drawHint = true;
- repaint();
+ tqrepaint();
}
KLineEdit::focusOutEvent(event_);
}
diff --git a/src/gui/linefieldwidget.cpp b/src/gui/linefieldwidget.cpp
index 3f3da1d..cce1ade 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::fromLatin1("; "));
+ text.replace(s_semiColon, TQString::tqfromLatin1("; "));
}
return text.stripWhiteSpace();
}
diff --git a/src/gui/listview.cpp b/src/gui/listview.cpp
index 4b8c250..f5595ea 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_;
- repaint();
+ tqrepaint();
}
}
#endif
void ListView::slotUpdateColors() {
#if !KDE_IS_VERSION(3,3,90)
- m_backColor2 = viewport()->colorGroup().base();
+ m_backColor2 = viewport()->tqcolorGroup().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()->colorGroup());
- repaint();
+ Tellico::updateContrastColor(viewport()->tqcolorGroup());
+ tqrepaint();
}
void ListView::slotSelectionChanged() {
@@ -196,7 +196,7 @@ void ListView::slotSelectionChanged() {
m_isClear = false;
Data::EntryVec entries;
- // now just find all the children or grandchildren that are entry items
+ // now just find all the tqchildren or grandtqchildren 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 children, just open it
- // but some items delay children creation
+ // if it has tqchildren, just open it
+ // but some items delay tqchildren 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 children of this item are deleted after the item itself
- // as a result, there is no listView() pointer for the children, that obvious causes
+ // 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
// 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()->colorGroup().base();
+ return isAlternate() ? view->alternateBackground() : view->viewport()->tqcolorGroup().base();
#endif
}
diff --git a/src/gui/listview.h b/src/gui/listview.h
index d54eab6..3f1c485 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& colorGroup,
- int column, int width, int alignment);
+ virtual void paintCell(TQPainter* painter, const TQColorGroup& tqcolorGroup,
+ int column, int width, int tqalignment);
ListView* listView () const { return static_cast<ListView*>(KListViewItem::listView()); }
diff --git a/src/gui/numberfieldwidget.cpp b/src/gui/numberfieldwidget.cpp
index c016bc6..f2cdaa8 100644
--- a/src/gui/numberfieldwidget.cpp
+++ b/src/gui/numberfieldwidget.cpp
@@ -17,7 +17,7 @@
#include <klineedit.h>
-#include <layout.h>
+#include <tqlayout.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::fromLatin1("-?\\d*(; ?-?\\d*)*"));
+ TQRegExp rx(TQString::tqfromLatin1("-?\\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::fromLatin1("; "));
+ text.replace(s_semiColon, TQString::tqfromLatin1("; "));
}
return text.simplifyWhiteSpace();
}
@@ -116,19 +116,19 @@ void NumberFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_
TQString value = text();
if(wasLineEdit && !nowLineEdit) {
- layout()->remove(m_lineEdit);
+ tqlayout()->remove(m_lineEdit);
delete m_lineEdit;
m_lineEdit = 0;
initSpinBox();
} else if(!wasLineEdit && nowLineEdit) {
- layout()->remove(m_spinBox);
+ tqlayout()->remove(m_spinBox);
delete m_spinBox;
m_spinBox = 0;
initLineEdit();
}
// should really be FIELD_EDIT_WIDGET_INDEX from fieldwidget.cpp
- static_cast<TQBoxLayout*>(layout())->insertWidget(2, widget(), 1 /*stretch*/);
+ static_cast<TQBoxLayout*>(tqlayout())->insertWidget(2, widget(), 1 /*stretch*/);
widget()->show();
setText(value);
}
diff --git a/src/gui/overlaywidget.cpp b/src/gui/overlaywidget.cpp
index 7116ba2..fd5c02b 100644
--- a/src/gui/overlaywidget.cpp
+++ b/src/gui/overlaywidget.cpp
@@ -13,7 +13,7 @@
#include "overlaywidget.h"
-#include <layout.h>
+#include <tqlayout.h>
using Tellico::GUI::OverlayWidget;
@@ -34,7 +34,7 @@ void OverlayWidget::setCorner(Corner corner_) {
}
void OverlayWidget::addWidget(TQWidget* widget_) {
- layout()->add(widget_);
+ tqlayout()->add(widget_);
adjustSize();
}
@@ -70,9 +70,9 @@ void OverlayWidget::reposition() {
}
// Position in the toplevelwidget's coordinates
- TQPoint pTopLevel = m_anchor->mapTo(topLevelWidget(), p);
+ TQPoint pTopLevel = m_anchor->mapTo(tqtopLevelWidget(), p);
// Position in the widget's parentWidget coordinates
- TQPoint pParent = parentWidget()->mapFrom(topLevelWidget(), pTopLevel);
+ TQPoint pParent = parentWidget()->mapFrom(tqtopLevelWidget(), 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 c03a28a..9aee35e 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::fromLatin1("spellcheck")) != Latin1Literal("false")) {
+ if(field_->property(TQString::tqfromLatin1("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::fromLatin1("<br/>"));
+ text.replace('\n', TQString::tqfromLatin1("<br/>"));
return text;
}
@@ -42,7 +42,7 @@ void ParaFieldWidget::setText(const TQString& text_) {
blockSignals(true);
m_textEdit->blockSignals(true);
- TQRegExp rx(TQString::fromLatin1("<br/?>"), false /*case-sensitive*/);
+ TQRegExp rx(TQString::tqfromLatin1("<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 a35c3fa..ec5d717 100644
--- a/src/gui/ratingwidget.cpp
+++ b/src/gui/ratingwidget.cpp
@@ -20,7 +20,7 @@
#include <kiconloader.h>
#include <tqintdict.h>
-#include <layout.h>
+#include <tqlayout.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::fromLatin1("stars%1").arg(n);
+ TQString picName = TQString::tqfromLatin1("stars%1").tqarg(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::fromLatin1("star_on"));
- m_pixOff = UserIcon(TQString::fromLatin1("star_off"));
+ m_pixOn = UserIcon(TQString::tqfromLatin1("star_on"));
+ m_pixOff = UserIcon(TQString::tqfromLatin1("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*>(layout());
+ TQBoxLayout* l = dynamic_cast<TQBoxLayout*>(tqlayout());
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::fromLatin1("minimum")), &ok);
- m_max = Tellico::toUInt(m_field->property(TQString::fromLatin1("maximum")), &ok);
+ m_min = Tellico::toUInt(m_field->property(TQString::tqfromLatin1("minimum")), &ok);
+ m_max = Tellico::toUInt(m_field->property(TQString::tqfromLatin1("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 = childAt(event_->pos());
+ TQWidget* child = tqchildAt(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 85a9dde..632f771 100644
--- a/src/gui/richtextlabel.cpp
+++ b/src/gui/richtextlabel.cpp
@@ -15,7 +15,7 @@
#include <kdebug.h>
-#include <layout.h>
+#include <tqlayout.h>
using Tellico::GUI::RichTextLabel;
@@ -27,8 +27,8 @@ RichTextLabel::RichTextLabel(const TQString& text, TQWidget* parent) : TQTextEdi
init();
}
-TQSize RichTextLabel::sizeHint() const {
- return minimumSizeHint();
+TQSize RichTextLabel::tqsizeHint() const {
+ return tqminimumSizeHint();
}
void RichTextLabel::init() {
@@ -38,10 +38,10 @@ void RichTextLabel::init() {
setFrameShape(TQFrame::NoFrame);
viewport()->setMouseTracking(false);
- setPaper(colorGroup().background());
+ setPaper(tqcolorGroup().background());
- setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
- viewport()->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
+ tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
+ viewport()->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
}
#include "richtextlabel.moc"
diff --git a/src/gui/richtextlabel.h b/src/gui/richtextlabel.h
index 850f2d7..e8c4777 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 <textedit.h>
+#include <tqtextedit.h>
namespace Tellico {
namespace GUI {
@@ -30,7 +30,7 @@ public:
RichTextLabel(TQWidget* parent);
RichTextLabel(const TQString& text, TQWidget* parent);
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
private:
void init();
diff --git a/src/gui/stringmapdialog.cpp b/src/gui/stringmapdialog.cpp
index 62a12a3..fbd6f6a 100644
--- a/src/gui/stringmapdialog.cpp
+++ b/src/gui/stringmapdialog.cpp
@@ -19,7 +19,7 @@
#include <kbuttonbox.h>
#include <kiconloader.h>
-#include <layout.h>
+#include <tqlayout.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::fromLatin1("filenew"), KIcon::SizeSmall));
+ btn->setIconSet(BarIcon(TQString::tqfromLatin1("filenew"), KIcon::SizeSmall));
btn = bb->addButton(i18n("&Delete"), TQT_TQOBJECT(this), TQT_SLOT(slotDelete()));
- btn->setIconSet(BarIcon(TQString::fromLatin1("editdelete"), KIcon::SizeSmall));
+ btn->setIconSet(BarIcon(TQString::tqfromLatin1("editdelete"), KIcon::SizeSmall));
l->addWidget(box);
l->addStretch(1);
diff --git a/src/gui/tablefieldwidget.cpp b/src/gui/tablefieldwidget.cpp
index 81c9dba..449fbbb 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::fromLatin1("columns")), &ok);
+ m_columns = Tellico::toUInt(field_->property(TQString::tqfromLatin1("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::fromLatin1("::");
+ cstack += TQString::tqfromLatin1("::");
} else {
- rowStr += cstack + str + TQString::fromLatin1("::");
+ rowStr += cstack + str + TQString::tqfromLatin1("::");
cstack.truncate(0);
}
}
if(rowStr.isEmpty()) {
- rstack += TQString::fromLatin1("; ");
+ rstack += TQString::tqfromLatin1("; ");
} else {
rowStr.truncate(rowStr.length()-2); // remove last semi-colon and space
- text += rstack + rowStr + TQString::fromLatin1("; ");
+ text += rstack + rowStr + TQString::tqfromLatin1("; ");
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::fromLatin1("::"), col, col));
+ m_table->setText(row, col, list[row].section(TQString::tqfromLatin1("::"), 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::fromLatin1("column%1").arg(m_col+1), newName);
+ newField->setProperty(TQString::tqfromLatin1("column%1").tqarg(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::fromLatin1("column%1").arg(i+1));
+ TQString s = field_->property(TQString::tqfromLatin1("column%1").tqarg(i+1));
if(s.isEmpty()) {
- s = i18n("Column %1").arg(i+1);
+ s = i18n("Column %1").tqarg(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::fromLatin1("columns")), &ok);
+ m_columns = Tellico::toUInt(newField_->property(TQString::tqfromLatin1("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::fromLatin1("edit")), i18n("Rename Column..."),
+ menu.insertItem(SmallIconSet(TQString::tqfromLatin1("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::fromLatin1("insrow")), i18n("Insert Row"),
+ menu.insertItem(SmallIconSet(TQString::tqfromLatin1("insrow")), i18n("Insert Row"),
this, TQT_SLOT(slotInsertRow()));
- menu.insertItem(SmallIconSet(TQString::fromLatin1("remrow")), i18n("Remove Row"),
+ menu.insertItem(SmallIconSet(TQString::tqfromLatin1("remrow")), i18n("Remove Row"),
this, TQT_SLOT(slotRemoveRow()));
- id = menu.insertItem(SmallIconSet(TQString::fromLatin1("1uparrow")), i18n("Move Row Up"),
+ id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("1uparrow")), i18n("Move Row Up"),
this, TQT_SLOT(slotMoveRowUp()));
if(m_row == 0) {
menu.setItemEnabled(id, false);
}
- id = menu.insertItem(SmallIconSet(TQString::fromLatin1("1downarrow")), i18n("Move Row Down"),
+ id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("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::fromLatin1("edit")), i18n("Rename Column..."),
+ id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("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::fromLatin1("locationbar_erase")), i18n("Clear Table"),
+ menu.insertItem(SmallIconSet(TQString::tqfromLatin1("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 187f8bb..0ecc37d 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::fromLatin1("relative")) == Latin1Literal("true");
+ m_isRelative = field_->property(TQString::tqfromLatin1("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::fromLatin1("relative")) == Latin1Literal("true");
+ m_isRelative = newField_->property(TQString::tqfromLatin1("relative")) == Latin1Literal("true");
}
void URLFieldWidget::slotOpenURL(const TQString& url_) {