summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
commit2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch)
tree18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/gui
parent1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff)
downloadtellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz
tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip
TQt4 port tellico
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/boolfieldwidget.cpp24
-rw-r--r--src/gui/boolfieldwidget.h15
-rw-r--r--src/gui/choicefieldwidget.cpp22
-rw-r--r--src/gui/choicefieldwidget.h9
-rw-r--r--src/gui/collectiontypecombo.cpp8
-rw-r--r--src/gui/collectiontypecombo.h2
-rw-r--r--src/gui/combobox.cpp16
-rw-r--r--src/gui/combobox.h22
-rw-r--r--src/gui/counteditem.cpp28
-rw-r--r--src/gui/counteditem.h16
-rw-r--r--src/gui/datefieldwidget.cpp12
-rw-r--r--src/gui/datefieldwidget.h11
-rw-r--r--src/gui/datewidget.cpp100
-rw-r--r--src/gui/datewidget.h32
-rw-r--r--src/gui/fieldwidget.cpp78
-rw-r--r--src/gui/fieldwidget.h33
-rw-r--r--src/gui/imagefieldwidget.cpp14
-rw-r--r--src/gui/imagefieldwidget.h11
-rw-r--r--src/gui/imagewidget.cpp88
-rw-r--r--src/gui/imagewidget.h49
-rw-r--r--src/gui/kwidgetlister.cpp60
-rw-r--r--src/gui/kwidgetlister.h41
-rw-r--r--src/gui/lineedit.cpp66
-rw-r--r--src/gui/lineedit.h25
-rw-r--r--src/gui/linefieldwidget.cpp20
-rw-r--r--src/gui/linefieldwidget.h11
-rw-r--r--src/gui/listboxtext.cpp34
-rw-r--r--src/gui/listboxtext.h18
-rw-r--r--src/gui/listview.cpp94
-rw-r--r--src/gui/listview.h45
-rw-r--r--src/gui/numberfieldwidget.cpp46
-rw-r--r--src/gui/numberfieldwidget.h9
-rw-r--r--src/gui/overlaywidget.cpp34
-rw-r--r--src/gui/overlaywidget.h17
-rw-r--r--src/gui/parafieldwidget.cpp26
-rw-r--r--src/gui/parafieldwidget.h9
-rw-r--r--src/gui/previewdialog.cpp10
-rw-r--r--src/gui/previewdialog.h5
-rw-r--r--src/gui/progress.cpp4
-rw-r--r--src/gui/progress.h5
-rw-r--r--src/gui/ratingfieldwidget.cpp12
-rw-r--r--src/gui/ratingfieldwidget.h9
-rw-r--r--src/gui/ratingwidget.cpp52
-rw-r--r--src/gui/ratingwidget.h27
-rw-r--r--src/gui/richtextlabel.cpp20
-rw-r--r--src/gui/richtextlabel.h19
-rw-r--r--src/gui/stringmapdialog.cpp60
-rw-r--r--src/gui/stringmapdialog.h13
-rw-r--r--src/gui/tabcontrol.cpp26
-rw-r--r--src/gui/tabcontrol.h9
-rw-r--r--src/gui/tablefieldwidget.cpp110
-rw-r--r--src/gui/tablefieldwidget.h19
-rw-r--r--src/gui/urlfieldwidget.cpp24
-rw-r--r--src/gui/urlfieldwidget.h17
54 files changed, 805 insertions, 781 deletions
diff --git a/src/gui/boolfieldwidget.cpp b/src/gui/boolfieldwidget.cpp
index 5a8e88b..ae625be 100644
--- a/src/gui/boolfieldwidget.cpp
+++ b/src/gui/boolfieldwidget.cpp
@@ -15,29 +15,29 @@
#include "../field.h"
#include "../latin1literal.h"
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
using Tellico::GUI::BoolFieldWidget;
-BoolFieldWidget::BoolFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : FieldWidget(field_, parent_, name_) {
+BoolFieldWidget::BoolFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : FieldWidget(field_, tqparent_, name_) {
- m_checkBox = new QCheckBox(this);
- connect(m_checkBox, SIGNAL(clicked()), SIGNAL(modified()));
+ m_checkBox = new TQCheckBox(this);
+ connect(m_checkBox, TQT_SIGNAL(clicked()), TQT_SIGNAL(modified()));
registerWidget();
}
-QString BoolFieldWidget::text() const {
+TQString BoolFieldWidget::text() const {
if(m_checkBox->isChecked()) {
- return QString::fromLatin1("true");
+ return TQString::tqfromLatin1("true");
}
- return QString();
+ return TQString();
}
-void BoolFieldWidget::setText(const QString& text_) {
+void BoolFieldWidget::setText(const TQString& text_) {
blockSignals(true);
m_checkBox->blockSignals(true);
@@ -54,7 +54,7 @@ void BoolFieldWidget::clear() {
editMultiple(false);
}
-QWidget* BoolFieldWidget::widget() {
+TQWidget* BoolFieldWidget::widget() {
return m_checkBox;
}
diff --git a/src/gui/boolfieldwidget.h b/src/gui/boolfieldwidget.h
index 81af5a6..0181f31 100644
--- a/src/gui/boolfieldwidget.h
+++ b/src/gui/boolfieldwidget.h
@@ -17,8 +17,8 @@
#include "fieldwidget.h"
#include "../datavectors.h"
-class QCheckBox;
-class QString;
+class TQCheckBox;
+class TQString;
namespace Tellico {
namespace GUI {
@@ -28,22 +28,23 @@ namespace Tellico {
*/
class BoolFieldWidget : public FieldWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- BoolFieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ BoolFieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~BoolFieldWidget() {}
- virtual QString text() const;
- virtual void setText(const QString& text);
+ virtual TQString text() const;
+ virtual void setText(const TQString& text);
public slots:
virtual void clear();
protected:
- virtual QWidget* widget();
+ virtual TQWidget* widget();
private:
- QCheckBox* m_checkBox;
+ TQCheckBox* m_checkBox;
};
} // end GUI namespace
diff --git a/src/gui/choicefieldwidget.cpp b/src/gui/choicefieldwidget.cpp
index e9c6870..8e0240b 100644
--- a/src/gui/choicefieldwidget.cpp
+++ b/src/gui/choicefieldwidget.cpp
@@ -16,29 +16,29 @@
#include <kcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
using Tellico::GUI::ChoiceFieldWidget;
-ChoiceFieldWidget::ChoiceFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : FieldWidget(field_, parent_, name_), m_comboBox(0) {
+ChoiceFieldWidget::ChoiceFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : FieldWidget(field_, tqparent_, name_), m_comboBox(0) {
m_comboBox = new KComboBox(this);
- connect(m_comboBox, SIGNAL(activated(int)), SIGNAL(modified()));
+ connect(m_comboBox, TQT_SIGNAL(activated(int)), TQT_SIGNAL(modified()));
// always have empty choice
- m_comboBox->insertItem(QString::null);
+ m_comboBox->insertItem(TQString());
m_comboBox->insertStringList(field_->allowed());
m_comboBox->setMinimumWidth(5*fontMetrics().maxWidth());
registerWidget();
}
-QString ChoiceFieldWidget::text() const {
+TQString ChoiceFieldWidget::text() const {
return m_comboBox->currentText();
}
-void ChoiceFieldWidget::setText(const QString& text_) {
+void ChoiceFieldWidget::setText(const TQString& text_) {
blockSignals(true);
m_comboBox->blockSignals(true);
@@ -54,15 +54,15 @@ void ChoiceFieldWidget::clear() {
}
void ChoiceFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_) {
- QString value = text();
+ TQString value = text();
m_comboBox->clear();
// always have empty choice
- m_comboBox->insertItem(QString::null);
+ m_comboBox->insertItem(TQString());
m_comboBox->insertStringList(newField_->allowed());
m_comboBox->setCurrentText(value);
}
-QWidget* ChoiceFieldWidget::widget() {
+TQWidget* ChoiceFieldWidget::widget() {
return m_comboBox;
}
diff --git a/src/gui/choicefieldwidget.h b/src/gui/choicefieldwidget.h
index a2c40f5..35c40b9 100644
--- a/src/gui/choicefieldwidget.h
+++ b/src/gui/choicefieldwidget.h
@@ -27,19 +27,20 @@ namespace Tellico {
*/
class ChoiceFieldWidget : public FieldWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ChoiceFieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ ChoiceFieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~ChoiceFieldWidget() {}
- virtual QString text() const;
- virtual void setText(const QString& text);
+ virtual TQString text() const;
+ virtual void setText(const TQString& text);
public slots:
virtual void clear();
protected:
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual void updateFieldHook(Data::FieldPtr oldField, Data::FieldPtr newField);
private:
diff --git a/src/gui/collectiontypecombo.cpp b/src/gui/collectiontypecombo.cpp
index 66749a3..727d26f 100644
--- a/src/gui/collectiontypecombo.cpp
+++ b/src/gui/collectiontypecombo.cpp
@@ -17,7 +17,7 @@
using Tellico::GUI::CollectionTypeCombo;
-CollectionTypeCombo::CollectionTypeCombo(QWidget* parent_) : ComboBox(parent_) {
+CollectionTypeCombo::CollectionTypeCombo(TQWidget* tqparent_) : ComboBox(tqparent_) {
reset();
}
@@ -25,12 +25,12 @@ void CollectionTypeCombo::reset() {
clear();
// I want to sort the collection names
const CollectionNameMap nameMap = CollectionFactory::nameMap();
- QMap<QString, int> rNameMap;
+ TQMap<TQString, int> rNameMap;
for(CollectionNameMap::ConstIterator it = nameMap.begin(); it != nameMap.end(); ++it) {
rNameMap.insert(it.data(), it.key());
}
- const QValueList<int> collTypes = rNameMap.values();
- const QStringList collNames = rNameMap.keys();
+ const TQValueList<int> collTypes = rNameMap.values();
+ const TQStringList collNames = rNameMap.keys();
int custom = -1;
const int total = collTypes.count();
// when i equals the size, then go back and do custom
diff --git a/src/gui/collectiontypecombo.h b/src/gui/collectiontypecombo.h
index 8d3ef80..bcc9e7f 100644
--- a/src/gui/collectiontypecombo.h
+++ b/src/gui/collectiontypecombo.h
@@ -22,7 +22,7 @@ namespace GUI {
class CollectionTypeCombo : public ComboBox {
public:
- CollectionTypeCombo(QWidget* parent);
+ CollectionTypeCombo(TQWidget* tqparent);
void reset();
void setCurrentType(int type);
int currentType() const { return currentData().toInt(); }
diff --git a/src/gui/combobox.cpp b/src/gui/combobox.cpp
index 1aff29b..c5b3dfe 100644
--- a/src/gui/combobox.cpp
+++ b/src/gui/combobox.cpp
@@ -17,7 +17,7 @@
using Tellico::GUI::ComboBox;
-ComboBox::ComboBox(QWidget* parent_) : KComboBox(parent_) {
+ComboBox::ComboBox(TQWidget* tqparent_) : KComboBox(tqparent_) {
setEditable(false);
}
@@ -26,19 +26,19 @@ void ComboBox::clear() {
m_data.clear();
}
-void ComboBox::insertItem(const QString& s_, const QVariant& t_, int idx_/* =-1 */) {
+void ComboBox::insertItem(const TQString& s_, const TQVariant& t_, int idx_/* =-1 */) {
KComboBox::insertItem(s_, idx_);
if(idx_ < 0) {
m_data.push_back(t_);
} else {
while(idx_ > static_cast<int>(m_data.count())) {
- m_data.push_back(QVariant());
+ m_data.push_back(TQVariant());
}
m_data.insert(m_data.at(idx_), t_);
}
}
-void ComboBox::insertItems(const QStringList& s_, const QValueList<QVariant>& t_, int idx_ /*=-1*/) {
+void ComboBox::insertItems(const TQStringList& s_, const TQValueList<TQVariant>& t_, int idx_ /*=-1*/) {
if(s_.count() != t_.count()) {
kdWarning() << "ComboBox::insertItems() - must have equal number of items in list!" << endl;
return;
@@ -49,19 +49,19 @@ void ComboBox::insertItems(const QStringList& s_, const QValueList<QVariant>& t_
}
}
-const QVariant& ComboBox::currentData() const {
+const TQVariant& ComboBox::currentData() const {
return data(currentItem());
}
-const QVariant& ComboBox::data(uint idx_) const {
+const TQVariant& ComboBox::data(uint idx_) const {
if(idx_ >= m_data.count()) {
- static QVariant t; // inescapable
+ static TQVariant t; // inescapable
return t;
}
return m_data[idx_];
}
-void ComboBox::setCurrentData(const QVariant& data_) {
+void ComboBox::setCurrentData(const TQVariant& data_) {
for(uint i = 0; i < m_data.count(); ++i) {
if(m_data[i] == data_) {
setCurrentItem(i);
diff --git a/src/gui/combobox.h b/src/gui/combobox.h
index d02dbb8..98a411b 100644
--- a/src/gui/combobox.h
+++ b/src/gui/combobox.h
@@ -16,34 +16,34 @@
#include <kcombobox.h>
-#include <qvariant.h>
-#include <qvaluelist.h>
+#include <tqvariant.h>
+#include <tqvaluelist.h>
-class QString;
+class TQString;
namespace Tellico {
namespace GUI {
/**
- * A combobox for mapping a QVariant to each item.
+ * A combobox for mapping a TQVariant to each item.
*
* @author Robby Stephenson
*/
class ComboBox : public KComboBox {
public:
- ComboBox(QWidget* parent_);
+ ComboBox(TQWidget* tqparent_);
void clear();
- const QVariant& currentData() const;
- const QVariant& data(uint index) const;
- void insertItem(const QString& string, const QVariant& datum, int index = -1);
- void insertItems(const QStringList& strings, const QValueList<QVariant>& data, int index = -1);
+ const TQVariant& currentData() const;
+ const TQVariant& data(uint index) const;
+ void insertItem(const TQString& string, const TQVariant& datum, int index = -1);
+ void insertItems(const TQStringList& strings, const TQValueList<TQVariant>& data, int index = -1);
// set current item to match data
- void setCurrentData(const QVariant& data);
+ void setCurrentData(const TQVariant& data);
private:
- QValueList<QVariant> m_data;
+ TQValueList<TQVariant> m_data;
};
} // end namespace
diff --git a/src/gui/counteditem.cpp b/src/gui/counteditem.cpp
index 08b4f25..1be5bcd 100644
--- a/src/gui/counteditem.cpp
+++ b/src/gui/counteditem.cpp
@@ -18,12 +18,12 @@
#include <kglobalsettings.h>
#include <kstringhandler.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
using Tellico::GUI::CountedItem;
-int CountedItem::compare(QListViewItem* item_, int col_, bool asc_) const {
+int CountedItem::compare(TQListViewItem* item_, int col_, bool asc_) const {
GUI::ListView* lv = listView();
GUI::CountedItem* item = static_cast<GUI::CountedItem*>(item_);
if(lv->sortStyle() == GUI::ListView::SortByCount) {
@@ -39,7 +39,7 @@ int CountedItem::compare(QListViewItem* item_, int col_, bool asc_) const {
return GUI::ListViewItem::compare(item, col_, asc_);
}
-void CountedItem::paintCell(QPainter* p_, const QColorGroup& cg_,
+void CountedItem::paintCell(TQPainter* p_, const TQColorGroup& cg_,
int column_, int width_, int align_) {
if(!p_) {
return;
@@ -55,25 +55,25 @@ void CountedItem::paintCell(QPainter* p_, const QColorGroup& cg_,
// set a catchable text so that we can have our own implementation (see further down)
// but still benefit from KListView::paintCell
- QString oldText = text(column_);
+ TQString oldText = text(column_);
// if(oldText.isEmpty()) {
if(oldText == '\t') {
return; // avoid endless loop!
}
- setText(column_, QChar('\t'));
+ setText(column_, TQChar('\t'));
ListViewItem::paintCell(p_, cg_, column_, width_, align_);
setText(column_, oldText);
int marg = listView()->itemMargin();
int r = marg;
- const QPixmap* icon = pixmap(column_);
+ const TQPixmap* icon = pixmap(column_);
if(icon) {
r += icon->width() + marg;
}
- QFontMetrics fm = p_->fontMetrics();
- QString numText = QString::fromLatin1(" (%1)").arg(count());
+ TQFontMetrics fm = p_->fontMetrics();
+ 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);
@@ -85,8 +85,8 @@ void CountedItem::paintCell(QPainter* p_, const QColorGroup& cg_,
} else {
p_->setPen(cg_.text());
}
- QRect br(0, height(), r, 0);
- if(!oldText.isEmpty() && !oldText.startsWith(QChar('\t'))) {
+ TQRect br(0, height(), r, 0);
+ if(!oldText.isEmpty() && !oldText.startsWith(TQChar('\t'))) {
p_->drawText(r, 0, width_-marg-r, height(), align_ | AlignVCenter, oldText, -1, &br);
}
@@ -98,15 +98,15 @@ void CountedItem::paintCell(QPainter* p_, const QColorGroup& cg_,
}
p_->setPen(Tellico::contrastColor);
}
- p_->drawText(br.right(), 0, width_-marg-br.right(), height(), align_ | Qt::AlignVCenter, numText);
+ p_->drawText(br.right(), 0, width_-marg-br.right(), height(), align_ | TQt::AlignVCenter, numText);
}
-int CountedItem::width(const QFontMetrics& fm_, const QListView* lv_, int column_) const {
+int CountedItem::width(const TQFontMetrics& fm_, const TQListView* lv_, int column_) const {
int w = ListViewItem::width(fm_, lv_, column_);
// show count is only for first column
if(column_ == 0) {
- QString numText = QString::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/counteditem.h b/src/gui/counteditem.h
index 9ea0138..7e3b9a1 100644
--- a/src/gui/counteditem.h
+++ b/src/gui/counteditem.h
@@ -16,9 +16,9 @@
#include "listview.h"
-class QPainter;
-class QColorGroup;
-class QFontMetrics;
+class TQPainter;
+class TQColorGroup;
+class TQFontMetrics;
namespace Tellico {
namespace GUI {
@@ -28,16 +28,16 @@ namespace Tellico {
*/
class CountedItem : public GUI::ListViewItem {
public:
- CountedItem(ListView* parent) : ListViewItem(parent) {}
- CountedItem(ListViewItem* parent) : ListViewItem(parent) {}
+ CountedItem(ListView* tqparent) : ListViewItem(tqparent) {}
+ CountedItem(ListViewItem* tqparent) : ListViewItem(tqparent) {}
- virtual int compare(QListViewItem* item, int col, bool ascending) const;
+ virtual int compare(TQListViewItem* item, int col, bool ascending) const;
/**
* Paints the cell, adding the number count.
*/
- virtual void paintCell(QPainter* p, const QColorGroup& cg,
+ virtual void paintCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align);
- virtual int width(const QFontMetrics& fm, const QListView* lv, int c) const;
+ virtual int width(const TQFontMetrics& fm, const TQListView* lv, int c) const;
virtual int count() const { return childCount(); }
virtual int realChildCount() const { return count(); }
diff --git a/src/gui/datefieldwidget.cpp b/src/gui/datefieldwidget.cpp
index d0609d6..281cee6 100644
--- a/src/gui/datefieldwidget.cpp
+++ b/src/gui/datefieldwidget.cpp
@@ -17,20 +17,20 @@
using Tellico::GUI::DateFieldWidget;
-DateFieldWidget::DateFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : FieldWidget(field_, parent_, name_) {
+DateFieldWidget::DateFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : FieldWidget(field_, tqparent_, name_) {
m_widget = new DateWidget(this);
- connect(m_widget, SIGNAL(signalModified()), SIGNAL(modified()));
+ connect(m_widget, TQT_SIGNAL(signalModified()), TQT_SIGNAL(modified()));
registerWidget();
}
-QString DateFieldWidget::text() const {
+TQString DateFieldWidget::text() const {
return m_widget->text();
}
-void DateFieldWidget::setText(const QString& text_) {
+void DateFieldWidget::setText(const TQString& text_) {
blockSignals(true);
m_widget->blockSignals(true);
@@ -45,7 +45,7 @@ void DateFieldWidget::clear() {
editMultiple(false);
}
-QWidget* DateFieldWidget::widget() {
+TQWidget* DateFieldWidget::widget() {
return m_widget;
}
diff --git a/src/gui/datefieldwidget.h b/src/gui/datefieldwidget.h
index e3c2d55..573b7dc 100644
--- a/src/gui/datefieldwidget.h
+++ b/src/gui/datefieldwidget.h
@@ -17,7 +17,7 @@
#include "fieldwidget.h"
#include "../datavectors.h"
-class QString;
+class TQString;
namespace Tellico {
namespace GUI {
@@ -28,19 +28,20 @@ namespace Tellico {
*/
class DateFieldWidget : public FieldWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- DateFieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ DateFieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~DateFieldWidget() {}
- virtual QString text() const;
- virtual void setText(const QString& text);
+ virtual TQString text() const;
+ virtual void setText(const TQString& text);
public slots:
virtual void clear();
protected:
- virtual QWidget* widget();
+ virtual TQWidget* widget();
private:
DateWidget* m_widget;
diff --git a/src/gui/datewidget.cpp b/src/gui/datewidget.cpp
index 42e2d4c..054741a 100644
--- a/src/gui/datewidget.cpp
+++ b/src/gui/datewidget.cpp
@@ -26,22 +26,22 @@
#include <kglobalsettings.h>
#include <kcalendarsystem.h>
-#include <qvbox.h>
-#include <qlayout.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
using Tellico::GUI::SpinBox;
using Tellico::GUI::DateWidget;
-SpinBox::SpinBox(int min, int max, QWidget *parent) : QSpinBox(min, max, 1, parent)
+SpinBox::SpinBox(int min, int max, TQWidget *tqparent) : TQSpinBox(min, max, 1, tqparent)
{
- 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(QChar(' '));
+ setSpecialValueText(TQChar(' '));
}
-DateWidget::DateWidget(QWidget* parent_, const char* name_) : QWidget(parent_, name_) {
- QHBoxLayout* l = new QHBoxLayout(this, 0, 4);
+DateWidget::DateWidget(TQWidget* tqparent_, const char* name_) : TQWidget(tqparent_, name_) {
+ TQHBoxLayout* l = new TQHBoxLayout(this, 0, 4);
KLocale* locale = KGlobal::locale();
@@ -52,10 +52,10 @@ DateWidget::DateWidget(QWidget* parent_, const char* name_) : QWidget(parent_, n
m_monthCombo = new KComboBox(false, this);
l->addWidget(m_monthCombo, 1);
// allow empty item
- m_monthCombo->insertItem(QString::null);
- QDate d;
+ m_monthCombo->insertItem(TQString());
+ TQDate d;
for(int i = 1; ; ++i) {
- QString str = locale->calendar()->monthName(i, locale->calendar()->year(d));
+ TQString str = locale->calendar()->monthName(i, locale->calendar()->year(d));
if(str.isNull()) {
break;
}
@@ -66,87 +66,87 @@ DateWidget::DateWidget(QWidget* parent_, const char* name_) : QWidget(parent_, n
locale->calendar()->maxValidYear(), this);
l->addWidget(m_yearSpin, 1);
- connect(m_daySpin, SIGNAL(valueChanged(int)), SLOT(slotDateChanged()));
- connect(m_monthCombo, SIGNAL(activated(int)), SLOT(slotDateChanged()));
- connect(m_yearSpin, SIGNAL(valueChanged(int)), SLOT(slotDateChanged()));
+ connect(m_daySpin, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotDateChanged()));
+ connect(m_monthCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotDateChanged()));
+ connect(m_yearSpin, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotDateChanged()));
m_dateButton = new KPushButton(this);
- m_dateButton->setIconSet(SmallIconSet(QString::fromLatin1("date")));
- connect(m_dateButton, SIGNAL(clicked()), SLOT(slotShowPicker()));
+ m_dateButton->setIconSet(SmallIconSet(TQString::tqfromLatin1("date")));
+ connect(m_dateButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotShowPicker()));
l->addWidget(m_dateButton, 0);
- m_frame = new QVBox(0, 0, WType_Popup);
- m_frame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
+ m_frame = new TQVBox(0, 0, WType_Popup);
+ m_frame->setFrameStyle(TQFrame::PopupPanel | TQFrame::Raised);
m_frame->setLineWidth(3);
m_frame->hide();
m_picker = new KDatePicker(m_frame, 0); // must include name to get correct constructor
- connect(m_picker, SIGNAL(dateEntered(QDate)), SLOT(slotDateEntered(QDate)));
- connect(m_picker, SIGNAL(dateSelected(QDate)), SLOT(slotDateSelected(QDate)));
+ connect(m_picker, TQT_SIGNAL(dateEntered(TQDate)), TQT_SLOT(slotDateEntered(TQDate)));
+ connect(m_picker, TQT_SIGNAL(dateSelected(TQDate)), TQT_SLOT(slotDateSelected(TQDate)));
}
void DateWidget::slotDateChanged() {
int day = m_daySpin->value();
- day = QMIN(QMAX(day, m_daySpin->minValue()), m_daySpin->maxValue());
+ day = TQMIN(TQMAX(day, m_daySpin->minValue()), m_daySpin->maxValue());
int m = m_monthCombo->currentItem();
- m = QMIN(QMAX(m, 0), m_monthCombo->count()-1);
+ m = TQMIN(TQMAX(m, 0), m_monthCombo->count()-1);
int y = m_yearSpin->value();
- y = QMIN(QMAX(y, m_yearSpin->minValue()), m_yearSpin->maxValue());
+ y = TQMIN(TQMAX(y, m_yearSpin->minValue()), m_yearSpin->maxValue());
// if all are valid, set this date
if(day > m_daySpin->minValue() && m > 0 && y > m_yearSpin->minValue()) {
- QDate d(y, m, day);
+ TQDate d(y, m, day);
setDate(d);
}
emit signalModified();
}
-QDate DateWidget::date() const {
+TQDate DateWidget::date() const {
// possible for either day, month, or year to be empty
// in which case a null date is returned
int day = m_daySpin->value();
// min value is the empty one
if(day == m_daySpin->minValue()) {
- return QDate();
+ return TQDate();
}
int month = m_monthCombo->currentItem();
if(month == 0) {
- return QDate();
+ return TQDate();
}
int year = m_yearSpin->value();
if(year == m_yearSpin->minValue()) {
- return QDate();
+ return TQDate();
}
- return QDate(year, month, day);
+ return TQDate(year, month, day);
}
-QString DateWidget::text() const {
+TQString DateWidget::text() const {
// possible for either day, month, or year to be empty
// but not all three
bool empty = true;
// format is "year-month-day"
- QString s;
+ TQString s;
if(m_yearSpin->value() > m_yearSpin->minValue()) {
- s += QString::number(m_yearSpin->value());
+ s += TQString::number(m_yearSpin->value());
empty = false;
}
s += '-';
// first item is empty
if(m_monthCombo->currentItem() > 0) {
- s += QString::number(m_monthCombo->currentItem());
+ s += TQString::number(m_monthCombo->currentItem());
empty = false;
}
s += '-';
if(m_daySpin->value() > m_daySpin->minValue()) {
- s += QString::number(m_daySpin->value());
+ s += TQString::number(m_daySpin->value());
empty = false;
}
- return empty ? QString() : s;
+ return empty ? TQString() : s;
}
-void DateWidget::setDate(const QDate& date_) {
+void DateWidget::setDate(const TQDate& date_) {
m_daySpin->blockSignals(true);
m_monthCombo->blockSignals(true);
m_yearSpin->blockSignals(true);
@@ -162,19 +162,19 @@ void DateWidget::setDate(const QDate& date_) {
m_yearSpin->blockSignals(false);
}
-void DateWidget::setDate(const QString& date_) {
+void DateWidget::setDate(const TQString& date_) {
m_daySpin->blockSignals(true);
m_monthCombo->blockSignals(true);
m_yearSpin->blockSignals(true);
- QStringList s = QStringList::split('-', date_, true);
+ TQStringList s = TQStringList::split('-', date_, true);
bool ok = true;
int y = s.count() > 0 ? s[0].toInt(&ok) : m_yearSpin->minValue();
if(!ok) {
y = m_yearSpin->minValue();
ok = true;
}
- y = QMIN(QMAX(y, m_yearSpin->minValue()), m_yearSpin->maxValue());
+ y = TQMIN(TQMAX(y, m_yearSpin->minValue()), m_yearSpin->maxValue());
m_yearSpin->setValue(y);
int m = s.count() > 1 ? s[1].toInt(&ok) : 0;
@@ -182,12 +182,12 @@ void DateWidget::setDate(const QString& date_) {
m = 0;
ok = true;
}
- m = QMIN(QMAX(m, 0), m_monthCombo->count()-1);
+ m = TQMIN(TQMAX(m, 0), m_monthCombo->count()-1);
m_monthCombo->setCurrentItem(m);
// need to update number of days in month
// for now set date to 1
- QDate date(y, (m == 0 ? 1 : m), 1);
+ TQDate date(y, (m == 0 ? 1 : m), 1);
m_daySpin->blockSignals(true);
m_daySpin->setMaxValue(KGlobal::locale()->calendar()->daysInMonth(date));
m_daySpin->blockSignals(false);
@@ -196,7 +196,7 @@ void DateWidget::setDate(const QString& date_) {
if(!ok) {
day = m_daySpin->minValue();
}
- day = QMIN(QMAX(day, m_daySpin->minValue()), m_daySpin->maxValue());
+ day = TQMIN(TQMAX(day, m_daySpin->minValue()), m_daySpin->maxValue());
m_daySpin->setValue(day);
m_daySpin->blockSignals(false);
@@ -205,7 +205,7 @@ void DateWidget::setDate(const QString& date_) {
// if all are valid, set this date
if(day > m_daySpin->minValue() && m > 0 && y > m_yearSpin->minValue()) {
- QDate d(y, m, day);
+ TQDate d(y, m, day);
m_picker->blockSignals(true);
m_picker->setDate(d);
m_picker->blockSignals(false);
@@ -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(QDate::currentDate());
+ m_picker->setDate(TQDate::tqcurrentDate());
m_daySpin->blockSignals(false);
m_monthCombo->blockSignals(false);
@@ -230,16 +230,16 @@ void DateWidget::clear() {
}
void DateWidget::slotShowPicker() {
- QRect desk = KGlobalSettings::desktopGeometry(this);
- QPoint popupPoint = mapToGlobal(QPoint(0, 0));
+ 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);
}
@@ -253,7 +253,7 @@ void DateWidget::slotShowPicker() {
m_frame->move(popupPoint);
- QDate d = date();
+ TQDate d = date();
if(d.isValid()) {
m_picker->setDate(d);
}
@@ -261,7 +261,7 @@ void DateWidget::slotShowPicker() {
m_frame->show();
}
-void DateWidget::slotDateSelected(QDate date_) {
+void DateWidget::slotDateSelected(TQDate date_) {
if(date_.isValid()) {
setDate(date_);
emit signalModified();
@@ -269,7 +269,7 @@ void DateWidget::slotDateSelected(QDate date_) {
}
}
-void DateWidget::slotDateEntered(QDate date_) {
+void DateWidget::slotDateEntered(TQDate date_) {
if(date_.isValid()) {
setDate(date_);
emit signalModified();
diff --git a/src/gui/datewidget.h b/src/gui/datewidget.h
index 93d7bcb..9575af9 100644
--- a/src/gui/datewidget.h
+++ b/src/gui/datewidget.h
@@ -14,40 +14,42 @@
#ifndef TELLICODATEWIDGET_H
#define TELLICODATEWIDGET_H
-#include <qspinbox.h>
-#include <qdatetime.h>
+#include <tqspinbox.h>
+#include <tqdatetime.h>
class KComboBox;
class KPushButton;
class KDatePicker;
-class QVBox;
-class QString;
+class TQVBox;
+class TQString;
namespace Tellico {
namespace GUI {
-class SpinBox : public QSpinBox {
+class SpinBox : public TQSpinBox {
Q_OBJECT
+ TQ_OBJECT
public:
- SpinBox(int min, int max, QWidget *parent);
+ SpinBox(int min, int max, TQWidget *tqparent);
};
/**
* @author Robby Stephenson
*/
-class DateWidget : public QWidget {
+class DateWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- DateWidget(QWidget* parent, const char* name = 0);
+ DateWidget(TQWidget* tqparent, const char* name = 0);
~DateWidget() {}
- QDate date() const;
- QString text() const;
- void setDate(const QDate& date);
- void setDate(const QString& date);
+ TQDate date() const;
+ TQString text() const;
+ void setDate(const TQDate& date);
+ void setDate(const TQString& date);
void clear();
signals:
@@ -56,8 +58,8 @@ signals:
private slots:
void slotDateChanged();
void slotShowPicker();
- void slotDateSelected(QDate newDate);
- void slotDateEntered(QDate newDate);
+ void slotDateSelected(TQDate newDate);
+ void slotDateEntered(TQDate newDate);
private:
SpinBox* m_daySpin;
@@ -65,7 +67,7 @@ private:
SpinBox* m_yearSpin;
KPushButton* m_dateButton;
- QVBox* m_frame;
+ TQVBox* m_frame;
KDatePicker* m_picker;
};
diff --git a/src/gui/fieldwidget.cpp b/src/gui/fieldwidget.cpp
index 6a9fc66..0983217 100644
--- a/src/gui/fieldwidget.cpp
+++ b/src/gui/fieldwidget.cpp
@@ -28,13 +28,13 @@
#include <kurllabel.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
namespace {
// if you change this, update numberfieldwidget, too
@@ -43,40 +43,40 @@ namespace {
using Tellico::GUI::FieldWidget;
-const QRegExp FieldWidget::s_semiColon = QRegExp(QString::fromLatin1("\\s*;\\s*"));
+const TQRegExp FieldWidget::s_semiColon = TQRegExp(TQString::tqfromLatin1("\\s*;\\s*"));
-FieldWidget* FieldWidget::create(Data::FieldPtr field_, QWidget* parent_, const char* name_) {
+FieldWidget* FieldWidget::create(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_) {
switch (field_->type()) {
case Data::Field::Line:
- return new GUI::LineFieldWidget(field_, parent_, name_);
+ return new GUI::LineFieldWidget(field_, tqparent_, name_);
case Data::Field::Para:
- return new GUI::ParaFieldWidget(field_, parent_, name_);
+ return new GUI::ParaFieldWidget(field_, tqparent_, name_);
case Data::Field::Bool:
- return new GUI::BoolFieldWidget(field_, parent_, name_);
+ return new GUI::BoolFieldWidget(field_, tqparent_, name_);
case Data::Field::Number:
- return new GUI::NumberFieldWidget(field_, parent_, name_);
+ return new GUI::NumberFieldWidget(field_, tqparent_, name_);
case Data::Field::Choice:
- return new GUI::ChoiceFieldWidget(field_, parent_, name_);
+ return new GUI::ChoiceFieldWidget(field_, tqparent_, name_);
case Data::Field::Table:
case Data::Field::Table2:
- return new GUI::TableFieldWidget(field_, parent_, name_);
+ return new GUI::TableFieldWidget(field_, tqparent_, name_);
case Data::Field::Date:
- return new GUI::DateFieldWidget(field_, parent_, name_);
+ return new GUI::DateFieldWidget(field_, tqparent_, name_);
case Data::Field::URL:
- return new GUI::URLFieldWidget(field_, parent_, name_);
+ return new GUI::URLFieldWidget(field_, tqparent_, name_);
case Data::Field::Image:
- return new GUI::ImageFieldWidget(field_, parent_, name_);
+ return new GUI::ImageFieldWidget(field_, tqparent_, name_);
case Data::Field::Rating:
- return new GUI::RatingFieldWidget(field_, parent_, name_);
+ return new GUI::RatingFieldWidget(field_, tqparent_, name_);
case Data::Field::ReadOnly:
case Data::Field::Dependent:
@@ -89,23 +89,23 @@ FieldWidget* FieldWidget::create(Data::FieldPtr field_, QWidget* parent_, const
}
}
-FieldWidget::FieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : QWidget(parent_, name_), m_field(field_) {
- QHBoxLayout* l = new QHBoxLayout(this, 2, 2); // parent, margin, spacing
+FieldWidget::FieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : TQWidget(tqparent_, name_), m_field(field_) {
+ TQHBoxLayout* l = new TQHBoxLayout(this, 2, 2); // tqparent, margin, spacing
l->addSpacing(4); // add some more space in the columns between widgets
- if(QCString(style().name()).lower().find("keramik", 0, false) > -1) {
+ if(TQCString(tqstyle().name()).lower().tqfind("keramik", 0, false) > -1) {
l->setMargin(1);
}
Data::Field::Type type = field_->type();
- QString 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(QString::null, s, this);
+ m_label = new KURLLabel(TQString(), s, this);
} else {
- m_label = new QLabel(s, this);
+ 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
@@ -118,15 +118,15 @@ FieldWidget::FieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* na
|| type == Data::Field::Image
|| type == Data::Field::Date);
- m_editMultiple = new QCheckBox(this);
+ m_editMultiple = new TQCheckBox(this);
m_editMultiple->setChecked(true);
- m_editMultiple->setFixedWidth(m_editMultiple->sizeHint().width()); // don't let it have any extra space
- connect(m_editMultiple, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
+ 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);
- QWhatsThis::add(this, field_->description());
+ TQWhatsThis::add(this, field_->description());
// after letting the subclass get created, insert default value
- QTimer::singleShot(0, this, SLOT(insertDefault()));
+ TQTimer::singleShot(0, this, TQT_SLOT(insertDefault()));
}
void FieldWidget::insertDefault() {
@@ -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_) {
@@ -166,23 +166,23 @@ void FieldWidget::editMultiple(bool show_) {
// FIXME: maybe modified should only be signaled when the button is toggle on
if(show_) {
m_editMultiple->show();
- connect(m_editMultiple, SIGNAL(clicked()), this, SIGNAL(modified()));
+ connect(m_editMultiple, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(modified()));
} else {
m_editMultiple->hide();
- disconnect(m_editMultiple, SIGNAL(clicked()), this, SIGNAL(modified()));
+ disconnect(m_editMultiple, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(modified()));
}
// the widget length needs to be updated since it gets shorter
widget()->updateGeometry();
}
void FieldWidget::registerWidget() {
- QWidget* w = widget();
+ TQWidget* w = widget();
m_label->setBuddy(w);
if(w->isFocusEnabled()) {
setFocusProxy(w);
}
- QHBoxLayout* l = static_cast<QHBoxLayout*>(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,9 +192,9 @@ 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();
- QWhatsThis::add(this, newField_->description());
+ TQWhatsThis::add(this, newField_->description());
updateFieldHook(oldField_, newField_);
}
diff --git a/src/gui/fieldwidget.h b/src/gui/fieldwidget.h
index dd34ebb..1bd9582 100644
--- a/src/gui/fieldwidget.h
+++ b/src/gui/fieldwidget.h
@@ -16,12 +16,12 @@
#include "../datavectors.h"
-#include <qwidget.h>
-#include <qregexp.h>
+#include <tqwidget.h>
+#include <tqregexp.h>
-class QLabel;
-class QCheckBox;
-class QString;
+class TQLabel;
+class TQCheckBox;
+class TQString;
namespace Tellico {
namespace Data {
@@ -35,16 +35,17 @@ namespace Tellico {
*
* @author Robby Stephenson
*/
-class FieldWidget : public QWidget {
+class FieldWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- FieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ FieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~FieldWidget() {}
Data::FieldPtr field() const { return m_field; }
- virtual QString text() const = 0;
- virtual void setText(const QString& text) = 0;
+ virtual TQString text() const = 0;
+ virtual void setText(const TQString& text) = 0;
int labelWidth() const;
void setLabelWidth(int width);
@@ -55,10 +56,10 @@ public:
void updateField(Data::FieldPtr oldField, Data::FieldPtr newField);
// only used by LineFieldWidget, really
- virtual void addCompletionObjectItem(const QString&) {}
+ virtual void addCompletionObjectItem(const TQString&) {}
// factory function
- static FieldWidget* create(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ static FieldWidget* create(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
public slots:
virtual void insertDefault();
@@ -69,19 +70,19 @@ signals:
virtual void modified();
protected:
- QLabel* label() { return m_label; } // needed so the URLField can handle clicks on the label
- virtual QWidget* widget() = 0;
+ TQLabel* label() { return m_label; } // needed so the URLField can handle clicks on the label
+ virtual TQWidget* widget() = 0;
void registerWidget();
// not all widgets have to be updated when the field changes
virtual void updateFieldHook(Data::FieldPtr, Data::FieldPtr) {}
- static const QRegExp s_semiColon;
+ static const TQRegExp s_semiColon;
private:
Data::FieldPtr m_field;
- QLabel* m_label;
- QCheckBox* m_editMultiple;
+ TQLabel* m_label;
+ TQCheckBox* m_editMultiple;
bool m_expands;
};
diff --git a/src/gui/imagefieldwidget.cpp b/src/gui/imagefieldwidget.cpp
index 2cb9b40..253f5f3 100644
--- a/src/gui/imagefieldwidget.cpp
+++ b/src/gui/imagefieldwidget.cpp
@@ -18,21 +18,21 @@
using Tellico::GUI::ImageFieldWidget;
-ImageFieldWidget::ImageFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : FieldWidget(field_, parent_, name_) {
+ImageFieldWidget::ImageFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : FieldWidget(field_, tqparent_, name_) {
m_widget = new ImageWidget(this);
- m_widget->setLinkOnlyChecked(field_->property(QString::fromLatin1("link")) == Latin1Literal("true"));
- connect(m_widget, SIGNAL(signalModified()), SIGNAL(modified()));
+ m_widget->setLinkOnlyChecked(field_->property(TQString::tqfromLatin1("link")) == Latin1Literal("true"));
+ connect(m_widget, TQT_SIGNAL(signalModified()), TQT_SIGNAL(modified()));
registerWidget();
}
-QString ImageFieldWidget::text() const {
+TQString ImageFieldWidget::text() const {
return m_widget->id();
}
-void ImageFieldWidget::setText(const QString& text_) {
+void ImageFieldWidget::setText(const TQString& text_) {
blockSignals(true);
m_widget->blockSignals(true);
@@ -47,7 +47,7 @@ void ImageFieldWidget::clear() {
editMultiple(false);
}
-QWidget* ImageFieldWidget::widget() {
+TQWidget* ImageFieldWidget::widget() {
return m_widget;
}
diff --git a/src/gui/imagefieldwidget.h b/src/gui/imagefieldwidget.h
index b5ebea5..81b952d 100644
--- a/src/gui/imagefieldwidget.h
+++ b/src/gui/imagefieldwidget.h
@@ -17,7 +17,7 @@
#include "fieldwidget.h"
#include "../datavectors.h"
-class QString;
+class TQString;
namespace Tellico {
namespace GUI {
@@ -28,19 +28,20 @@ namespace Tellico {
*/
class ImageFieldWidget : public FieldWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ImageFieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ ImageFieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~ImageFieldWidget() {}
- virtual QString text() const;
- virtual void setText(const QString& text);
+ virtual TQString text() const;
+ virtual void setText(const TQString& text);
public slots:
virtual void clear();
protected:
- virtual QWidget* widget();
+ virtual TQWidget* widget();
private:
ImageWidget* m_widget;
diff --git a/src/gui/imagewidget.cpp b/src/gui/imagewidget.cpp
index 92f75c3..575c734 100644
--- a/src/gui/imagewidget.cpp
+++ b/src/gui/imagewidget.cpp
@@ -24,12 +24,12 @@
#include <kurldrag.h>
#include <kmessagebox.h>
-#include <qwmatrix.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qdragobject.h>
-#include <qapplication.h> // needed for drag distance
+#include <tqwmatrix.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqdragobject.h>
+#include <tqapplication.h> // needed for drag distance
namespace {
static const uint IMAGE_WIDGET_BUTTON_MARGIN = 8;
@@ -40,28 +40,28 @@ namespace {
using Tellico::GUI::ImageWidget;
-ImageWidget::ImageWidget(QWidget* parent_, const char* name_) : QWidget(parent_, name_) {
- QHBoxLayout* l = new QHBoxLayout(this);
+ImageWidget::ImageWidget(TQWidget* tqparent_, const char* name_) : TQWidget(tqparent_, name_) {
+ TQHBoxLayout* l = new TQHBoxLayout(this);
l->setMargin(IMAGE_WIDGET_BUTTON_MARGIN);
- m_label = new QLabel(this);
- m_label->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored));
- m_label->setFrameStyle(QFrame::Panel | QFrame::Sunken);
- m_label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
+ m_label = new TQLabel(this);
+ m_label->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored));
+ m_label->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
+ m_label->tqsetAlignment(TQt::AlignHCenter | TQt::AlignVCenter);
l->addWidget(m_label, 1);
l->addSpacing(IMAGE_WIDGET_BUTTON_MARGIN);
- QVBoxLayout* boxLayout = new QVBoxLayout(l);
+ TQVBoxLayout* boxLayout = new TQVBoxLayout(l);
boxLayout->addStretch(1);
- KButtonBox* box = new KButtonBox(this, Vertical);
- box->addButton(i18n("Select Image..."), this, SLOT(slotGetImage()));
- box->addButton(i18n("Clear"), this, SLOT(slotClear()));
- box->layout();
+ 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();
boxLayout->addWidget(box);
boxLayout->addSpacing(8);
- m_cbLinkOnly = new QCheckBox(i18n("Save link only"), this);
- connect(m_cbLinkOnly, SIGNAL(clicked()), SLOT(slotLinkOnlyClicked()));
+ m_cbLinkOnly = new TQCheckBox(i18n("Save link only"), this);
+ connect(m_cbLinkOnly, TQT_SIGNAL(clicked()), TQT_SLOT(slotLinkOnlyClicked()));
boxLayout->addWidget(m_cbLinkOnly);
boxLayout->addStretch(1);
@@ -71,7 +71,7 @@ ImageWidget::ImageWidget(QWidget* parent_, const char* name_) : QWidget(parent_,
setAcceptDrops(true);
}
-void ImageWidget::setImage(const QString& id_) {
+void ImageWidget::setImage(const TQString& id_) {
if(id_.isEmpty()) {
slotClear();
return;
@@ -83,7 +83,7 @@ void ImageWidget::setImage(const QString& id_) {
m_cbLinkOnly->setEnabled(link);
// if we're using a link, then the original URL _is_ the id
m_originalURL = link ? id_ : KURL();
- m_scaled = QPixmap();
+ m_scaled = TQPixmap();
scale();
update();
@@ -95,8 +95,8 @@ void ImageWidget::setLinkOnlyChecked(bool link_) {
void ImageWidget::slotClear() {
// m_image = Data::Image();
- m_imageID = QString();
- m_pixmap = QPixmap();
+ m_imageID = TQString();
+ m_pixmap = TQPixmap();
m_scaled = m_pixmap;
m_originalURL = KURL();
@@ -123,7 +123,7 @@ void ImageWidget::scale() {
newHeight = static_cast<int>(static_cast<double>(ph)*ww/static_cast<double>(pw));
}
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale(static_cast<double>(newWidth)/pw, static_cast<double>(newHeight)/ph);
m_scaled = m_pixmap.xForm(wm);
} else {
@@ -132,7 +132,7 @@ void ImageWidget::scale() {
m_label->setPixmap(m_scaled);
}
-void ImageWidget::resizeEvent(QResizeEvent *) {
+void ImageWidget::resizeEvent(TQResizeEvent *) {
if(m_pixmap.isNull()) {
return;
}
@@ -142,7 +142,7 @@ void ImageWidget::resizeEvent(QResizeEvent *) {
}
void ImageWidget::slotGetImage() {
- KURL url = KFileDialog::getImageOpenURL(QString::null, this);
+ KURL url = KFileDialog::getImageOpenURL(TQString(), this);
if(url.isEmpty() || !url.isValid()) {
return;
}
@@ -168,53 +168,53 @@ void ImageWidget::slotLinkOnlyClicked() {
// so it needs to be added to the cache all over again
// probably could do this without downloading the image all over again,
// but I'm not going to do that right now
- const QString& id = ImageFactory::addImage(m_originalURL, false, KURL(), link);
+ const TQString& id = ImageFactory::addImage(m_originalURL, false, KURL(), link);
// same image, so no need to call setImage
m_imageID = id;
emit signalModified();
}
-void ImageWidget::mousePressEvent(QMouseEvent* event_) {
+void ImageWidget::mousePressEvent(TQMouseEvent* event_) {
// Only interested in LMB
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().tqcontains(event_->pos())) {
m_dragStart = event_->pos();
} else {
- m_dragStart = QPoint();
+ m_dragStart = TQPoint();
}
}
}
-void ImageWidget::mouseMoveEvent(QMouseEvent* event_) {
- int delay = QApplication::startDragDistance();
+void ImageWidget::mouseMoveEvent(TQMouseEvent* event_) {
+ int delay = TQApplication::startDragDistance();
// Only interested in LMB
if(event_->state() & Qt::LeftButton) {
// only allow drag is the image is non-null, and the drag start point isn't null and the user dragged far enough
if(!m_imageID.isEmpty() && !m_dragStart.isNull() && (m_dragStart - event_->pos()).manhattanLength() > delay) {
const Data::Image& img = ImageFactory::imageById(m_imageID);
if(!img.isNull()) {
- QImageDrag* drag = new QImageDrag(img, this);
+ TQImageDrag* drag = new TQImageDrag(img, this);
drag->dragCopy();
}
}
}
}
-void ImageWidget::dragEnterEvent(QDragEnterEvent* event_) {
- event_->accept(KURLDrag::canDecode(event_) || QImageDrag::canDecode(event_) || QTextDrag::canDecode(event_));
+void ImageWidget::dragEnterEvent(TQDragEnterEvent* event_) {
+ event_->accept(KURLDrag::canDecode(event_) || TQImageDrag::canDecode(event_) || TQTextDrag::canDecode(event_));
}
-void ImageWidget::dropEvent(QDropEvent* event_) {
- QImage image;
+void ImageWidget::dropEvent(TQDropEvent* event_) {
+ TQImage image;
KURL::List urls;
- QString text;
+ TQString text;
- GUI::CursorSaver cs(Qt::busyCursor);
- if(QImageDrag::decode(event_, image)) {
- // Qt reads PNG data by default
- const QString& id = ImageFactory::addImage(image, QString::fromLatin1("PNG"));
+ 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"));
if(!id.isEmpty() && id != m_imageID) {
setImage(id);
emit signalModified();
@@ -230,7 +230,7 @@ void ImageWidget::dropEvent(QDropEvent* event_) {
}
// kdDebug() << "ImageWidget::dropEvent() - " << url.prettyURL() << endl;
loadImage(url);
- } else if(QTextDrag::decode(event_, text)) {
+ } else if(TQTextDrag::decode(event_, text)) {
KURL url(text);
if(url.isEmpty() || !url.isValid()) {
return;
@@ -244,7 +244,7 @@ void ImageWidget::loadImage(const KURL& url_) {
GUI::CursorSaver cs;
// if we're linking only, then we want the image id to be the same as the url
- const QString& id = ImageFactory::addImage(url_, false, KURL(), link);
+ const TQString& id = ImageFactory::addImage(url_, false, KURL(), link);
if(id != m_imageID) {
setImage(id);
emit signalModified();
diff --git a/src/gui/imagewidget.h b/src/gui/imagewidget.h
index 7780be4..76a7304 100644
--- a/src/gui/imagewidget.h
+++ b/src/gui/imagewidget.h
@@ -15,16 +15,16 @@
#define TELLICOIMAGEWIDGET_H
#include <kurl.h>
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qpoint.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
-class QLabel;
-class QResizeEvent;
-class QMouseEvent;
-class QDragEnterEvent;
-class QDropEvent;
-class QCheckBox;
+class TQLabel;
+class TQResizeEvent;
+class TQMouseEvent;
+class TQDragEnterEvent;
+class TQDropEvent;
+class TQCheckBox;
namespace Tellico {
namespace GUI {
@@ -32,15 +32,16 @@ namespace Tellico {
/**
* @author Robby Stephenson
*/
-class ImageWidget : public QWidget {
+class ImageWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ImageWidget(QWidget* parent, const char* name = 0);
+ ImageWidget(TQWidget* tqparent, const char* name = 0);
virtual ~ImageWidget() {}
- const QString& id() const { return m_imageID; }
- void setImage(const QString& id);
+ const TQString& id() const { return m_imageID; }
+ void setImage(const TQString& id);
void setLinkOnlyChecked(bool l);
public slots:
@@ -50,11 +51,11 @@ signals:
void signalModified();
protected:
- virtual void resizeEvent(QResizeEvent* ev);
- virtual void mousePressEvent(QMouseEvent* ev);
- virtual void mouseMoveEvent(QMouseEvent* ev);
- virtual void dragEnterEvent(QDragEnterEvent* ev);
- virtual void dropEvent(QDropEvent* ev);
+ virtual void resizeEvent(TQResizeEvent* ev);
+ virtual void mousePressEvent(TQMouseEvent* ev);
+ virtual void mouseMoveEvent(TQMouseEvent* ev);
+ virtual void dragEnterEvent(TQDragEnterEvent* ev);
+ virtual void dropEvent(TQDropEvent* ev);
private slots:
void slotGetImage();
@@ -64,13 +65,13 @@ private:
void scale();
void loadImage(const KURL& url);
- QString m_imageID;
- QPixmap m_pixmap;
- QPixmap m_scaled;
- QLabel* m_label;
- QCheckBox* m_cbLinkOnly;
+ TQString m_imageID;
+ TQPixmap m_pixmap;
+ TQPixmap m_scaled;
+ TQLabel* m_label;
+ TQCheckBox* m_cbLinkOnly;
KURL m_originalURL;
- QPoint m_dragStart;
+ TQPoint m_dragStart;
};
} // end GUI namespace
diff --git a/src/gui/kwidgetlister.cpp b/src/gui/kwidgetlister.cpp
index 80bf31b..ea51900 100644
--- a/src/gui/kwidgetlister.cpp
+++ b/src/gui/kwidgetlister.cpp
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -36,47 +36,47 @@
#include <kpushbutton.h>
#include <kiconloader.h>
-#include <qlayout.h>
-#include <qhbox.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
#include <assert.h>
-KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, QWidget *parent, const char* name )
- : QWidget( parent, name )
+KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, TQWidget *tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
mWidgetList.setAutoDelete(TRUE);
- mMinWidgets = QMAX( minWidgets, 1 );
- mMaxWidgets = QMAX( maxWidgets, mMinWidgets + 1 );
+ mMinWidgets = TQMAX( minWidgets, 1 );
+ mMaxWidgets = TQMAX( maxWidgets, mMinWidgets + 1 );
//--------- the button box
- mLayout = new QVBoxLayout(this, 0, 4);
- mButtonBox = new QHBox(this);
+ mLayout = new TQVBoxLayout(this, 0, 4);
+ mButtonBox = new TQHBox(this);
mButtonBox->setSpacing(4);
mLayout->addWidget( mButtonBox );
mBtnMore = new KPushButton( i18n("more widgets","More"), mButtonBox );
- mBtnMore->setIconSet(SmallIconSet(QString::fromLatin1("down")));
+ mBtnMore->setIconSet(SmallIconSet(TQString::tqfromLatin1("down")));
mButtonBox->setStretchFactor( mBtnMore, 0 );
mBtnFewer = new KPushButton( i18n("fewer widgets","Fewer"), mButtonBox );
- mBtnFewer->setIconSet(SmallIconSet(QString::fromLatin1("up")));
+ mBtnFewer->setIconSet(SmallIconSet(TQString::tqfromLatin1("up")));
mButtonBox->setStretchFactor( mBtnFewer, 0 );
- QWidget *spacer = new QWidget( mButtonBox );
+ TQWidget *spacer = new TQWidget( mButtonBox );
mButtonBox->setStretchFactor( spacer, 1 );
mBtnClear = new KPushButton( i18n("clear widgets","Clear"), mButtonBox );
- mBtnClear->setIconSet(SmallIconSet(QString::fromLatin1("locationbar_erase")));
+ mBtnClear->setIconSet(SmallIconSet(TQString::tqfromLatin1("locationbar_erase")));
mButtonBox->setStretchFactor( mBtnClear, 0 );
//---------- connect everything
- connect( mBtnMore, SIGNAL(clicked()),
- this, SLOT(slotMore()) );
- connect( mBtnFewer, SIGNAL(clicked()),
- this, SLOT(slotFewer()) );
- connect( mBtnClear, SIGNAL(clicked()),
- this, SLOT(slotClear()) );
+ connect( mBtnMore, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotMore()) );
+ connect( mBtnFewer, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotFewer()) );
+ connect( mBtnClear, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClear()) );
enableControls();
}
@@ -112,7 +112,7 @@ void KWidgetLister::slotClear()
setNumberOfShownWidgetsTo( mMinWidgets );
// clear remaining widgets
- QPtrListIterator<QWidget> it( mWidgetList );
+ TQPtrListIterator<TQWidget> it( mWidgetList );
for ( it.toFirst() ; it.current() ; ++it )
clearWidget( (*it) );
@@ -121,11 +121,11 @@ void KWidgetLister::slotClear()
emit clearWidgets();
}
-void KWidgetLister::addWidgetAtEnd(QWidget *w)
+void KWidgetLister::addWidgetAtEnd(TQWidget *w)
{
if (!w) w = this->createWidget(this);
- mLayout->insertWidget( mLayout->findWidget( mButtonBox ), w );
+ mLayout->insertWidget( mLayout->tqfindWidget( mButtonBox ), w );
mWidgetList.append( w );
w->show();
enableControls();
@@ -135,26 +135,26 @@ void KWidgetLister::addWidgetAtEnd(QWidget *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();
emit widgetRemoved();
}
-void KWidgetLister::clearWidget( QWidget* /*aWidget*/ )
+void KWidgetLister::clearWidget( TQWidget* /*aWidget*/ )
{
}
-QWidget* KWidgetLister::createWidget( QWidget* parent )
+TQWidget* KWidgetLister::createWidget( TQWidget* tqparent )
{
- return new QWidget( parent );
+ return new TQWidget( tqparent );
}
void KWidgetLister::setNumberOfShownWidgetsTo( int aNum )
{
- int superfluousWidgets = QMAX( (int)mWidgetList.count() - aNum, 0 );
- int missingWidgets = QMAX( aNum - (int)mWidgetList.count(), 0 );
+ int superfluousWidgets = TQMAX( (int)mWidgetList.count() - aNum, 0 );
+ int missingWidgets = TQMAX( aNum - (int)mWidgetList.count(), 0 );
// remove superfluous widgets
for ( ; superfluousWidgets ; superfluousWidgets-- )
diff --git a/src/gui/kwidgetlister.h b/src/gui/kwidgetlister.h
index e02b54c..c57f1e4 100644
--- a/src/gui/kwidgetlister.h
+++ b/src/gui/kwidgetlister.h
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -32,12 +32,12 @@
#ifndef _KWIDGETLISTER_H_
#define _KWIDGETLISTER_H_
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
class KPushButton;
-class QVBoxLayout;
-class QHBox;
+class TQVBoxLayout;
+class TQHBox;
/** Simple widget that nonetheless does a lot of the dirty work for
the filter edit widgets (@ref KMSearchpatternEdit and @ref
@@ -59,30 +59,31 @@ class QHBox;
*/
-class KWidgetLister : public QWidget
+class KWidgetLister : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWidgetLister( int minWidgets=1, int maxWidgets=8, QWidget* parent=0, const char* name=0 );
+ KWidgetLister( int minWidgets=1, int maxWidgets=8, TQWidget* tqparent=0, const char* name=0 );
virtual ~KWidgetLister();
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();
@@ -96,8 +97,8 @@ protected:
when showing it on screen. Make sure you call this
implementaion, though, since you cannot put the widget on screen
from derived classes (@p mLayout is private).
- Make sure the parent of the QWidget to add is this KWidgetLister. */
- virtual void addWidgetAtEnd(QWidget *w =0);
+ Make sure the tqparent of the TQWidget to add is this KWidgetLister. */
+ virtual void addWidgetAtEnd(TQWidget *w =0);
/** Removes a single (always the last) widget. Doesn't care if there
are still only @ref mMinWidgets left on screen and whether it
should enable/disable any controls. It simply does what it is
@@ -108,12 +109,12 @@ protected:
virtual void removeLastWidget();
/** Called to clear a given widget. The default implementation does
nothing. */
- virtual void clearWidget( QWidget* );
+ virtual void clearWidget( TQWidget* );
/** Because QT 2.x does not support signals/slots in template
classes, we are forced to emulate this by forcing the
implementers of subclasses of KWidgetLister to reimplement this
function which replaces the "@p new @p T" call. */
- virtual QWidget* createWidget( QWidget *parent );
+ virtual TQWidget* createWidget( TQWidget *tqparent );
/** Sets the number of widgets on scrren to exactly @p aNum. Doesn't
check if @p aNum is inside the range @p
[mMinWidgets,mMaxWidgets]. */
@@ -121,7 +122,7 @@ protected:
/** The list of widgets. Note that this list is set to auto-delete,
meaning that widgets that are removed from the screen by either
@ref slotFewer or @ref slotClear will be destroyed! */
- QPtrList<QWidget> mWidgetList;
+ TQPtrList<TQWidget> mWidgetList;
/** The minimum number of widgets that are to stay on screen. */
int mMinWidgets;
/** The maximum number of widgets that are to be shown on screen. */
@@ -131,7 +132,7 @@ signals:
/** This signal is emitted whenever a widget was added */
void widgetAdded();
/** This signal is emitted whenever a widget was added */
- void widgetAdded(QWidget *);
+ void widgetAdded(TQWidget *);
/** This signal is emitted whenever a widget was removed */
void widgetRemoved();
/** This signal is emitted whenever the clear button is clicked */
@@ -141,8 +142,8 @@ private:
void enableControls();
KPushButton *mBtnMore, *mBtnFewer, *mBtnClear;
- QVBoxLayout *mLayout;
- QHBox *mButtonBox;
+ TQVBoxLayout *mLayout;
+ TQHBox *mButtonBox;
};
diff --git a/src/gui/lineedit.cpp b/src/gui/lineedit.cpp
index 6248880..68a403d 100644
--- a/src/gui/lineedit.cpp
+++ b/src/gui/lineedit.cpp
@@ -17,55 +17,55 @@
#include <kactioncollection.h>
#include <kspell.h>
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
using Tellico::GUI::LineEdit;
-LineEdit::LineEdit(QWidget* parent_, const char* name_) : KLineEdit(parent_, name_)
+LineEdit::LineEdit(TQWidget* tqparent_, const char* name_) : KLineEdit(tqparent_, name_)
, m_drawHint(false)
, m_allowSpellCheck(false)
, m_enableSpellCheck(true)
, m_spell(0) {
- m_spellAction = KStdAction::spelling(this, SLOT(slotCheckSpelling()), new KActionCollection(this));
+ m_spellAction = KStdAction::spelling(TQT_TQOBJECT(this), TQT_SLOT(slotCheckSpelling()), new KActionCollection(this));
}
void LineEdit::clear() {
KLineEdit::clear();
m_drawHint = true;
- repaint();
+ tqrepaint();
}
-void LineEdit::setText(const QString& text_) {
+void LineEdit::setText(const TQString& text_) {
m_drawHint = text_.isEmpty();
- repaint();
+ tqrepaint();
KLineEdit::setText(text_);
}
-void LineEdit::setHint(const QString& hint_) {
+void LineEdit::setHint(const TQString& hint_) {
m_hint = hint_;
m_drawHint = text().isEmpty();
- repaint();
+ tqrepaint();
}
-void LineEdit::focusInEvent(QFocusEvent* event_) {
+void LineEdit::focusInEvent(TQFocusEvent* event_) {
if(m_drawHint) {
m_drawHint = false;
- repaint();
+ tqrepaint();
}
KLineEdit::focusInEvent(event_);
}
-void LineEdit::focusOutEvent(QFocusEvent* event_) {
+void LineEdit::focusOutEvent(TQFocusEvent* event_) {
if(text().isEmpty()) {
m_drawHint = true;
- repaint();
+ tqrepaint();
}
KLineEdit::focusOutEvent(event_);
}
-void LineEdit::drawContents(QPainter* painter_) {
+void LineEdit::drawContents(TQPainter* painter_) {
// draw the regular line edit first
KLineEdit::drawContents(painter_);
@@ -75,12 +75,12 @@ void LineEdit::drawContents(QPainter* painter_) {
}
// save current pen
- QPen oldPen = painter_->pen();
+ TQPen oldPen = painter_->pen();
// follow lead of kdepim and amarok, use disabled text color
- painter_->setPen(palette().color(QPalette::Disabled, QColorGroup::Text));
+ painter_->setPen(palette().color(TQPalette::Disabled, TQColorGroup::Text));
- QRect rect = contentsRect();
+ TQRect rect = contentsRect();
// again, follow kdepim and amarok lead, and pad by 2 pixels
rect.rLeft() += 2;
painter_->drawText(rect, AlignAuto | AlignVCenter, m_hint);
@@ -89,14 +89,14 @@ void LineEdit::drawContents(QPainter* painter_) {
painter_->setPen(oldPen);
}
-QPopupMenu* LineEdit::createPopupMenu() {
- QPopupMenu* popup = KLineEdit::createPopupMenu();
+TQPopupMenu* LineEdit::createPopupMenu() {
+ TQPopupMenu* popup = KLineEdit::createPopupMenu();
if(!popup) {
return popup;
}
- if(m_allowSpellCheck && echoMode() == QLineEdit::Normal && !isReadOnly()) {
+ if(m_allowSpellCheck && echoMode() == TQLineEdit::Normal && !isReadOnly()) {
popup->insertSeparator();
m_spellAction->plug(popup);
@@ -110,22 +110,22 @@ void LineEdit::slotCheckSpelling() {
delete m_spell;
// re-use the action string to get translations
m_spell = new KSpell(this, m_spellAction->text(),
- this, SLOT(slotSpellCheckReady(KSpell*)), 0, true, true);
-
- connect(m_spell, SIGNAL(death()),
- SLOT(spellCheckerFinished()));
- connect(m_spell, SIGNAL(misspelling( const QString &, const QStringList &, unsigned int)),
- SLOT(spellCheckerMisspelling( const QString &, const QStringList &, unsigned int)));
- connect(m_spell, SIGNAL(corrected(const QString &, const QString &, unsigned int)),
- SLOT(spellCheckerCorrected(const QString &, const QString &, unsigned int)));
+ TQT_TQOBJECT(this), TQT_SLOT(slotSpellCheckReady(KSpell*)), 0, true, true);
+
+ connect(m_spell, TQT_SIGNAL(death()),
+ TQT_SLOT(spellCheckerFinished()));
+ connect(m_spell, TQT_SIGNAL(misspelling( const TQString &, const TQStringList &, unsigned int)),
+ TQT_SLOT(spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int)));
+ connect(m_spell, TQT_SIGNAL(corrected(const TQString &, const TQString &, unsigned int)),
+ TQT_SLOT(spellCheckerCorrected(const TQString &, const TQString &, unsigned int)));
}
void LineEdit::slotSpellCheckReady(KSpell* spell) {
spell->check(text());
- connect(spell, SIGNAL(done(const QString&)), SLOT(slotSpellCheckDone(const QString&)));
+ connect(spell, TQT_SIGNAL(done(const TQString&)), TQT_SLOT(slotSpellCheckDone(const TQString&)));
}
-void LineEdit::slotSpellCheckDone(const QString& newText) {
+void LineEdit::slotSpellCheckDone(const TQString& newText) {
if(newText != text()) {
setText(newText);
}
@@ -136,11 +136,11 @@ void LineEdit::spellCheckerFinished() {
m_spell = 0;
}
-void LineEdit::spellCheckerMisspelling(const QString &text, const QStringList&, unsigned int pos) {
+void LineEdit::spellCheckerMisspelling(const TQString &text, const TQStringList&, unsigned int pos) {
setSelection(pos, pos + text.length());
}
-void LineEdit::spellCheckerCorrected(const QString& oldWord, const QString& newWord, unsigned int pos) {
+void LineEdit::spellCheckerCorrected(const TQString& oldWord, const TQString& newWord, unsigned int pos) {
if(oldWord != newWord) {
setSelection(pos, pos + oldWord.length());
insert(newWord);
diff --git a/src/gui/lineedit.h b/src/gui/lineedit.h
index af7d81b..1c42cbe 100644
--- a/src/gui/lineedit.h
+++ b/src/gui/lineedit.h
@@ -16,7 +16,7 @@
#include <klineedit.h>
-#include <qstring.h>
+#include <tqstring.h>
class KAction;
class KSpell;
@@ -29,12 +29,13 @@ namespace Tellico {
*/
class LineEdit : public KLineEdit {
Q_OBJECT
+ TQ_OBJECT
public:
- LineEdit(QWidget* parent = 0, const char* name = 0);
+ LineEdit(TQWidget* tqparent = 0, const char* name = 0);
- virtual void setText(const QString& text);
- void setHint(const QString& hint);
+ virtual void setText(const TQString& text);
+ void setHint(const TQString& hint);
// by default, spell check is not allowed, and no popupmenu item is created
void setAllowSpellCheck(bool b) { m_allowSpellCheck = b; }
@@ -45,21 +46,21 @@ public slots:
void clear();
protected:
- virtual void focusInEvent(QFocusEvent* event);
- virtual void focusOutEvent(QFocusEvent* event);
- virtual void drawContents(QPainter* painter);
- virtual QPopupMenu* createPopupMenu();
+ virtual void focusInEvent(TQFocusEvent* event);
+ virtual void focusOutEvent(TQFocusEvent* event);
+ virtual void drawContents(TQPainter* painter);
+ virtual TQPopupMenu* createPopupMenu();
private slots:
void slotCheckSpelling();
void slotSpellCheckReady(KSpell* spell);
- void slotSpellCheckDone(const QString& text);
- void spellCheckerMisspelling(const QString& text, const QStringList&, unsigned int pos);
- void spellCheckerCorrected(const QString& oldText, const QString& newText, unsigned int pos);
+ void slotSpellCheckDone(const TQString& text);
+ void spellCheckerMisspelling(const TQString& text, const TQStringList&, unsigned int pos);
+ void spellCheckerCorrected(const TQString& oldText, const TQString& newText, unsigned int pos);
void spellCheckerFinished();
private:
- QString m_hint;
+ TQString m_hint;
bool m_drawHint;
KAction* m_spellAction;
bool m_allowSpellCheck;
diff --git a/src/gui/linefieldwidget.cpp b/src/gui/linefieldwidget.cpp
index 1535832..acc5e33 100644
--- a/src/gui/linefieldwidget.cpp
+++ b/src/gui/linefieldwidget.cpp
@@ -21,13 +21,13 @@
using Tellico::GUI::LineFieldWidget;
-LineFieldWidget::LineFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : FieldWidget(field_, parent_, name_) {
+LineFieldWidget::LineFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : FieldWidget(field_, tqparent_, name_) {
m_lineEdit = new GUI::LineEdit(this);
m_lineEdit->setAllowSpellCheck(true);
m_lineEdit->setEnableSpellCheck(field_->formatFlag() != Data::Field::FormatName);
- connect(m_lineEdit, SIGNAL(textChanged(const QString&)), SIGNAL(modified()));
+ connect(m_lineEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SIGNAL(modified()));
registerWidget();
@@ -40,19 +40,19 @@ LineFieldWidget::LineFieldWidget(Data::FieldPtr field_, QWidget* parent_, const
}
if(field_->name() == Latin1Literal("isbn")) {
- m_lineEdit->setValidator(new ISBNValidator(this));
+ m_lineEdit->setValidator(new ISBNValidator(TQT_TQOBJECT(this)));
}
}
-QString LineFieldWidget::text() const {
- QString text = m_lineEdit->text();
+TQString LineFieldWidget::text() const {
+ TQString text = m_lineEdit->text();
if(field()->flags() & Data::Field::AllowMultiple) {
- text.replace(s_semiColon, QString::fromLatin1("; "));
+ text.tqreplace(s_semiColon, TQString::tqfromLatin1("; "));
}
return text.stripWhiteSpace();
}
-void LineFieldWidget::setText(const QString& text_) {
+void LineFieldWidget::setText(const TQString& text_) {
blockSignals(true);
m_lineEdit->blockSignals(true);
m_lineEdit->setText(text_);
@@ -65,7 +65,7 @@ void LineFieldWidget::clear() {
editMultiple(false);
}
-void LineFieldWidget::addCompletionObjectItem(const QString& text_) {
+void LineFieldWidget::addCompletionObjectItem(const TQString& text_) {
m_lineEdit->completionObject()->addItem(text_);
}
@@ -83,7 +83,7 @@ void LineFieldWidget::updateFieldHook(Data::FieldPtr oldField_, Data::FieldPtr n
}
}
-QWidget* LineFieldWidget::widget() {
+TQWidget* LineFieldWidget::widget() {
return m_lineEdit;
}
diff --git a/src/gui/linefieldwidget.h b/src/gui/linefieldwidget.h
index 70dc175..cdbfb28 100644
--- a/src/gui/linefieldwidget.h
+++ b/src/gui/linefieldwidget.h
@@ -26,20 +26,21 @@ namespace Tellico {
*/
class LineFieldWidget : public FieldWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- LineFieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ LineFieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~LineFieldWidget() {}
- virtual QString text() const;
- virtual void setText(const QString& text);
- virtual void addCompletionObjectItem(const QString& text);
+ virtual TQString text() const;
+ virtual void setText(const TQString& text);
+ virtual void addCompletionObjectItem(const TQString& text);
public slots:
virtual void clear();
protected:
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual void updateFieldHook(Data::FieldPtr oldField, Data::FieldPtr newField);
private:
diff --git a/src/gui/listboxtext.cpp b/src/gui/listboxtext.cpp
index 8ec6fa2..0d33a7c 100644
--- a/src/gui/listboxtext.cpp
+++ b/src/gui/listboxtext.cpp
@@ -14,34 +14,34 @@
#include "listboxtext.h"
#include "../tellico_utils.h"
-#include <qpainter.h>
+#include <tqpainter.h>
using Tellico::GUI::ListBoxText;
-ListBoxText::ListBoxText(QListBox* listbox_, const QString& text_)
- : QListBoxText(listbox_, text_), m_colored(false) {
+ListBoxText::ListBoxText(TQListBox* listbox_, const TQString& text_)
+ : TQListBoxText(listbox_, text_), m_colored(false) {
}
-ListBoxText::ListBoxText(QListBox* listbox_, const QString& text_, QListBoxItem* after_)
- : QListBoxText(listbox_, text_, after_), m_colored(false) {
+ListBoxText::ListBoxText(TQListBox* listbox_, const TQString& text_, TQListBoxItem* after_)
+ : TQListBoxText(listbox_, text_, after_), m_colored(false) {
}
-int ListBoxText::width(const QListBox* listbox_) const {
+int ListBoxText::width(const TQListBox* listbox_) const {
if(m_colored) {
- QFont font = listbox_->font();
+ TQFont font = listbox_->font();
font.setBold(true);
font.setItalic(true);
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
return fm.width(text()) + 6;
} else {
- return QListBoxText::width(listbox_);
+ return TQListBoxText::width(listbox_);
}
}
// I don't want the height to change when colored
// so all the items are at the same level for multi-column boxes
-int ListBoxText::height(const QListBox* listbox_) const {
- return QListBoxText::height(listbox_);
+int ListBoxText::height(const TQListBox* listbox_) const {
+ return TQListBoxText::height(listbox_);
}
void ListBoxText::setColored(bool colored_) {
@@ -51,15 +51,15 @@ void ListBoxText::setColored(bool colored_) {
}
}
-void ListBoxText::setText(const QString& text_) {
- QListBoxText::setText(text_);
+void ListBoxText::setText(const TQString& text_) {
+ TQListBoxText::setText(text_);
listBox()->triggerUpdate(true);
}
-// mostly copied from QListBoxText::paint() in Qt 3.1.1
-void ListBoxText::paint(QPainter* painter_) {
+// mostly copied from TQListBoxText::paint() in TQt 3.1.1
+void ListBoxText::paint(TQPainter* painter_) {
if(m_colored) {
- QFont font = painter_->font();
+ TQFont font = painter_->font();
font.setBold(true);
font.setItalic(true);
painter_->setFont(font);
@@ -68,7 +68,7 @@ void ListBoxText::paint(QPainter* painter_) {
}
}
int itemHeight = height(listBox());
- QFontMetrics fm = painter_->fontMetrics();
+ TQFontMetrics fm = painter_->fontMetrics();
int yPos = ((itemHeight - fm.height()) / 2) + fm.ascent();
painter_->drawText(3, yPos, text());
}
diff --git a/src/gui/listboxtext.h b/src/gui/listboxtext.h
index 3cfe2db..03edc95 100644
--- a/src/gui/listboxtext.h
+++ b/src/gui/listboxtext.h
@@ -14,31 +14,31 @@
#ifndef TELLICO_GUI_LISTBOXTEXT_H
#define TELLICO_GUI_LISTBOXTEXT_H
-#include <qlistbox.h>
+#include <tqlistbox.h>
namespace Tellico {
namespace GUI {
/**
- * ListBoxText subclasses QListBoxText so that @ref setText() can be made public,
+ * ListBoxText subclasses TQListBoxText so that @ref setText() can be made public,
* and the font color can be changed
*
* @author Robby Stephenson
*/
-class ListBoxText : public QListBoxText {
+class ListBoxText : public TQListBoxText {
public:
- ListBoxText(QListBox* listbox, const QString& text);
- ListBoxText(QListBox* listbox, const QString& text, QListBoxItem* after);
+ ListBoxText(TQListBox* listbox, const TQString& text);
+ ListBoxText(TQListBox* listbox, const TQString& text, TQListBoxItem* after);
- virtual int width(const QListBox* box) const;
- virtual int height(const QListBox* box) const;
+ virtual int width(const TQListBox* box) const;
+ virtual int height(const TQListBox* box) const;
bool isColored() const { return m_colored; }
void setColored(bool colored);
- void setText(const QString& text);
+ void setText(const TQString& text);
protected:
- virtual void paint(QPainter* painter);
+ virtual void paint(TQPainter* painter);
private:
bool m_colored;
diff --git a/src/gui/listview.cpp b/src/gui/listview.cpp
index d93174c..1816da6 100644
--- a/src/gui/listview.cpp
+++ b/src/gui/listview.cpp
@@ -18,26 +18,26 @@
#include <kapplication.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qheader.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
using Tellico::GUI::ListView;
using Tellico::GUI::ListViewItem;
-ListView::ListView(QWidget* parent_, const char* name_) : KListView(parent_, name_/*=0*/),
+ListView::ListView(TQWidget* tqparent_, const char* name_) : KListView(tqparent_, name_/*=0*/),
m_sortStyle(SortByText), m_isClear(true) {
- setSelectionMode(QListView::Extended);
- connect(this, SIGNAL(selectionChanged()),
- SLOT(slotSelectionChanged()));
- connect(this, SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(slotDoubleClicked(QListViewItem*)));
+ setSelectionMode(TQListView::Extended);
+ connect(this, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotSelectionChanged()));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(slotDoubleClicked(TQListViewItem*)));
#if !KDE_IS_VERSION(3,3,90)
m_shadeSortColumn = false;
// call it once to initialize
slotUpdateColors();
#endif
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), SLOT(slotUpdateColors()));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(slotUpdateColors()));
m_comparisons.setAutoDelete(true);
}
@@ -71,8 +71,8 @@ bool ListView::isSelectable(ListViewItem* item_) const {
}
// selecting multiple items is ok
- // only when parent is open. Be careful to check for existence of parent
- if(item_->parent() && !item_->parent()->isOpen()) {
+ // only when tqparent is open. Be careful to check for existence of tqparent
+ if(item_->tqparent() && !item_->tqparent()->isOpen()) {
return false;
}
@@ -111,7 +111,7 @@ int ListView::lastVisibleColumn() const {
return header()->mapToSection(col);
}
-void ListView::setColumnText(int column, const QString& label) {
+void ListView::setColumnText(int column, const TQString& label) {
ListViewComparison* comp = m_comparisons.take(columnText(column));
KListView::setColumnText(column, label);
if(comp) {
@@ -121,7 +121,7 @@ void ListView::setColumnText(int column, const QString& label) {
void ListView::setComparison(int column, ListViewComparison* comp) {
if(comp) {
- m_comparisons.replace(columnText(column), comp);
+ m_comparisons.tqreplace(columnText(column), comp);
}
}
@@ -135,7 +135,7 @@ void ListView::clearComparisons() {
int ListView::compare(int col, const GUI::ListViewItem* item1, GUI::ListViewItem* item2, bool asc) {
if(col >= 0 && col < static_cast<int>(m_comparisons.count())) {
- ListViewComparison* com = m_comparisons.find(columnText(col));
+ ListViewComparison* com = m_comparisons.tqfind(columnText(col));
if(com) {
return com->compare(col, item1, item2, asc);
}
@@ -147,16 +147,16 @@ 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();
- if(m_backColor2 == Qt::black) {
- m_backColor2 = QColor(50, 50, 50); // dark gray
+ m_backColor2 = viewport()->tqcolorGroup().base();
+ if(m_backColor2 == TQt::black) {
+ m_backColor2 = TQColor(50, 50, 50); // dark gray
} else {
int h,s,v;
m_backColor2.hsv(&h, &s, &v);
@@ -168,8 +168,8 @@ void ListView::slotUpdateColors() {
}
m_altColor2 = alternateBackground();
- if(m_altColor2 == Qt::black) {
- m_altColor2 = QColor(50, 50, 50); // dark gray
+ if(m_altColor2 == TQt::black) {
+ m_altColor2 = TQColor(50, 50, 50); // dark gray
} else {
int h,s,v;
m_altColor2.hsv(&h, &s, &v);
@@ -180,8 +180,8 @@ void ListView::slotUpdateColors() {
}
}
#endif
- Tellico::updateContrastColor(viewport()->colorGroup());
- repaint();
+ Tellico::updateContrastColor(viewport()->tqcolorGroup());
+ tqrepaint();
}
void ListView::slotSelectionChanged() {
@@ -196,11 +196,11 @@ 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) {
- if(!entries.contains(entry)) {
+ if(!entries.tqcontains(entry)) {
entries.append(entry);
}
}
@@ -209,13 +209,13 @@ void ListView::slotSelectionChanged() {
Controller::self()->slotUpdateSelection(this, entries);
}
-void ListView::slotDoubleClicked(QListViewItem* item_) {
+void ListView::slotDoubleClicked(TQListViewItem* item_) {
if(!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());
}
@@ -224,7 +224,7 @@ void ListView::slotDoubleClicked(QListViewItem* item_) {
item->doubleClicked();
}
-void ListView::drawContentsOffset(QPainter* p, int ox, int oy, int cx, int cy, int cw, int ch) {
+void ListView::drawContentsOffset(TQPainter* p, int ox, int oy, int cx, int cy, int cw, int ch) {
bool oldUpdatesEnabled = isUpdatesEnabled();
setUpdatesEnabled(false);
KListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch);
@@ -234,8 +234,8 @@ void ListView::drawContentsOffset(QPainter* p, int ox, int oy, int cx, int cy, i
/* ****************** 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
@@ -246,14 +246,14 @@ ListViewItem::~ListViewItem() {
}
void ListViewItem::clear() {
- QListViewItem* item = firstChild();
+ TQListViewItem* item = firstChild();
while(item) {
delete item;
item = firstChild();
}
}
-int ListViewItem::compare(QListViewItem* item_, int col_, bool asc_) const {
+int ListViewItem::compare(TQListViewItem* item_, int col_, bool asc_) const {
int res = compareWeight(item_, col_, asc_);
if(res != 0) {
return res;
@@ -262,7 +262,7 @@ int ListViewItem::compare(QListViewItem* item_, int col_, bool asc_) const {
return res == 0 ? KListViewItem::compare(item_, col_, asc_) : res;
}
-int ListViewItem::compareWeight(QListViewItem* item_, int col_, bool asc_) const {
+int ListViewItem::compareWeight(TQListViewItem* item_, int col_, bool asc_) const {
Q_UNUSED(col_);
// I want the sorting to be independent of sort order
GUI::ListViewItem* i = static_cast<GUI::ListViewItem*>(item_);
@@ -292,7 +292,7 @@ void ListViewItem::setSelected(bool s_) {
}
}
-QColor ListViewItem::backgroundColor(int column_) {
+TQColor ListViewItem::backgroundColor(int column_) {
#if KDE_IS_VERSION(3,3,90)
return KListViewItem::backgroundColor(column_);
#else
@@ -300,43 +300,43 @@ QColor 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
}
-void ListViewItem::paintCell(QPainter* p_, const QColorGroup& cg_,
+void ListViewItem::paintCell(TQPainter* p_, const TQColorGroup& cg_,
int column_, int width_, int align_) {
// taken from klistview.cpp
// I can't call KListViewItem::paintCell since KListViewItem::backgroundCOlor(int) is
// not virtual. I need to be sure to call ListViewItem::backgroundColor(int);
- QColorGroup cg = cg_;
- const QPixmap* pm = listView()->viewport()->backgroundPixmap();
+ TQColorGroup cg = cg_;
+ const TQPixmap* pm = listView()->viewport()->backgroundPixmap();
if(pm && !pm->isNull()) {
- cg.setBrush(QColorGroup::Base, QBrush(backgroundColor(column_), *pm));
- QPoint o = p_->brushOrigin();
+ cg.setBrush(TQColorGroup::Base, TQBrush(backgroundColor(column_), *pm));
+ TQPoint o = p_->brushOrigin();
p_->setBrushOrigin(o.x()-listView()->contentsX(), o.y()-listView()->contentsY());
} else {
- cg.setColor(listView()->viewport()->backgroundMode() == Qt::FixedColor ?
- QColorGroup::Background : QColorGroup::Base,
+ cg.setColor(listView()->viewport()->backgroundMode() == TQt::FixedColor ?
+ TQColorGroup::Background : TQColorGroup::Base,
backgroundColor(column_));
}
// don't call KListViewItem::paintCell() since that also does alternate painting, etc...
- QListViewItem::paintCell(p_, cg, column_, width_, align_);
+ TQListViewItem::paintCell(p_, cg, column_, width_, align_);
// borrowed from amarok, draw line to left of cell
if(!isSelected()) {
- p_->setPen(QPen(listView()->alternateBackground(), 0, Qt::SolidLine));
+ p_->setPen(TQPen(listView()->alternateBackground(), 0, TQt::SolidLine));
p_->drawLine(width_-1, 0, width_-1, height()-1);
}
}
Tellico::Data::EntryVec ListViewItem::entries() const {
Data::EntryVec entries;
- for(QListViewItem* child = firstChild(); child; child = child->nextSibling()) {
+ for(TQListViewItem* child = firstChild(); child; child = child->nextSibling()) {
Data::EntryVec more = static_cast<GUI::ListViewItem*>(child)->entries();
for(Data::EntryVecIt entry = more.begin(); entry != more.end(); ++entry) {
- if(!entries.contains(entry)) {
+ if(!entries.tqcontains(entry)) {
entries.append(entry);
}
}
diff --git a/src/gui/listview.h b/src/gui/listview.h
index 4c5ade7..8f31977 100644
--- a/src/gui/listview.h
+++ b/src/gui/listview.h
@@ -20,15 +20,15 @@
#include <klistview.h>
#include <kdeversion.h>
-#include <qdict.h>
+#include <tqdict.h>
namespace Tellico {
class ListViewComparison;
namespace GUI {
class ListViewItem;
-typedef QPtrList<ListViewItem> ListViewItemList;
-typedef QPtrListIterator<ListViewItem> ListViewItemListIt;
+typedef TQPtrList<ListViewItem> ListViewItemList;
+typedef TQPtrListIterator<ListViewItem> ListViewItemListIt;
/**
* A ListView keeps track of the selected items and allows subclasses to determine
@@ -42,6 +42,7 @@ typedef QPtrListIterator<ListViewItem> ListViewItemListIt;
*/
class ListView : public KListView {
Q_OBJECT
+ TQ_OBJECT
friend class ListViewItem; // needed so the ListViewItem d'tor can update selection list
@@ -51,7 +52,7 @@ public:
SortByCount = 1
};
- ListView(QWidget* parent, const char* name = 0);
+ ListView(TQWidget* tqparent, const char* name = 0);
virtual ~ListView();
void clearSelection();
@@ -74,7 +75,7 @@ public:
int firstVisibleColumn() const;
int lastVisibleColumn() const;
- virtual void setColumnText(int column, const QString& label);
+ virtual void setColumnText(int column, const TQString& label);
void setComparison(int column, ListViewComparison* comp);
void removeComparison(int column);
@@ -85,8 +86,8 @@ public:
// taken from KDE bug 59791
void setShadeSortColumn(bool shade_);
bool shadeSortColumn() const { return m_shadeSortColumn; }
- const QColor& background2() const { return m_backColor2; }
- const QColor& alternateBackground2() const { return m_altColor2; }
+ const TQColor& background2() const { return m_backColor2; }
+ const TQColor& alternateBackground2() const { return m_altColor2; }
#endif
protected slots:
@@ -97,11 +98,11 @@ protected slots:
virtual void slotSelectionChanged();
protected:
- virtual void drawContentsOffset(QPainter* p, int ox, int oy, int cx, int cy, int cw, int ch);
+ virtual void drawContentsOffset(TQPainter* p, int ox, int oy, int cx, int cy, int cw, int ch);
private slots:
void slotUpdateColors();
- void slotDoubleClicked(QListViewItem* item);
+ void slotDoubleClicked(TQListViewItem* item);
private:
/**
@@ -115,11 +116,11 @@ private:
SortStyle m_sortStyle;
bool m_isClear;
ListViewItemList m_selectedItems;
- QDict<ListViewComparison> m_comparisons;
+ TQDict<ListViewComparison> m_comparisons;
#if !KDE_IS_VERSION(3,3,90)
bool m_shadeSortColumn;
- QColor m_backColor2;
- QColor m_altColor2;
+ TQColor m_backColor2;
+ TQColor m_altColor2;
#endif
};
@@ -131,11 +132,11 @@ private:
*/
class ListViewItem : public KListViewItem {
public:
- ListViewItem(ListView* parent) : KListViewItem(parent), m_sortWeight(-1) {}
- ListViewItem(ListView* parent, QListViewItem* after) : KListViewItem(parent, after), m_sortWeight(-1) {}
- ListViewItem(ListViewItem* parent) : KListViewItem(parent), m_sortWeight(-1) {}
- ListViewItem(ListView* parent, const QString& text) : KListViewItem(parent, text), m_sortWeight(-1) {}
- ListViewItem(ListViewItem* parent, const QString& text) : KListViewItem(parent, text), m_sortWeight(-1) {}
+ ListViewItem(ListView* tqparent) : KListViewItem(tqparent), m_sortWeight(-1) {}
+ ListViewItem(ListView* tqparent, TQListViewItem* after) : KListViewItem(tqparent, after), m_sortWeight(-1) {}
+ ListViewItem(ListViewItem* tqparent) : KListViewItem(tqparent), m_sortWeight(-1) {}
+ ListViewItem(ListView* tqparent, const TQString& text) : KListViewItem(tqparent, text), m_sortWeight(-1) {}
+ ListViewItem(ListViewItem* tqparent, const TQString& text) : KListViewItem(tqparent, text), m_sortWeight(-1) {}
virtual ~ListViewItem();
virtual int realChildCount() const { return childCount(); }
@@ -149,7 +150,7 @@ public:
int sortWeight() const { return m_sortWeight; }
void setSortWeight(int w) { m_sortWeight = w; }
- virtual int compare(QListViewItem* item, int col, bool ascending) const;
+ virtual int compare(TQListViewItem* item, int col, bool ascending) const;
virtual void setSelected(bool selected);
/**
@@ -159,9 +160,9 @@ public:
* @param column The column number
* @param alternate The alternate row color can be forced
*/
- virtual QColor backgroundColor(int column); // not virtual in KListViewItem!!!
- virtual void paintCell(QPainter* painter, const QColorGroup& colorGroup,
- int column, int width, int alignment);
+ virtual TQColor backgroundColor(int column); // not virtual in KListViewItem!!!
+ virtual void paintCell(TQPainter* painter, const TQColorGroup& tqcolorGroup,
+ int column, int width, int tqalignment);
ListView* listView () const { return static_cast<ListView*>(KListViewItem::listView()); }
@@ -169,7 +170,7 @@ public:
virtual Data::EntryVec entries() const;
private:
- int compareWeight(QListViewItem* item, int col, bool ascending) const;
+ int compareWeight(TQListViewItem* item, int col, bool ascending) const;
int m_sortWeight;
};
diff --git a/src/gui/numberfieldwidget.cpp b/src/gui/numberfieldwidget.cpp
index 027b1e9..9f249c6 100644
--- a/src/gui/numberfieldwidget.cpp
+++ b/src/gui/numberfieldwidget.cpp
@@ -17,13 +17,13 @@
#include <klineedit.h>
-#include <qlayout.h>
-#include <qvalidator.h>
+#include <tqlayout.h>
+#include <tqvalidator.h>
using Tellico::GUI::NumberFieldWidget;
-NumberFieldWidget::NumberFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : FieldWidget(field_, parent_, name_), m_lineEdit(0), m_spinBox(0) {
+NumberFieldWidget::NumberFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : FieldWidget(field_, tqparent_, name_), m_lineEdit(0), m_spinBox(0) {
if(field_->flags() & Data::Field::AllowMultiple) {
initLineEdit();
@@ -36,43 +36,43 @@ NumberFieldWidget::NumberFieldWidget(Data::FieldPtr field_, QWidget* parent_, co
void NumberFieldWidget::initLineEdit() {
m_lineEdit = new KLineEdit(this);
- connect(m_lineEdit, SIGNAL(textChanged(const QString&)), SIGNAL(modified()));
- // connect(kl, SIGNAL(returnPressed(const QString&)), this, SLOT(slotHandleReturn()));
+ connect(m_lineEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SIGNAL(modified()));
+ // connect(kl, TQT_SIGNAL(returnPressed(const TQString&)), this, TQT_SLOT(slotHandleReturn()));
// 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
- QRegExp rx(QString::fromLatin1("-?\\d*(; ?-?\\d*)*"));
- m_lineEdit->setValidator(new QRegExpValidator(rx, this));
+ TQRegExp rx(TQString::tqfromLatin1("-?\\d*(; ?-?\\d*)*"));
+ m_lineEdit->setValidator(new TQRegExpValidator(rx, TQT_TQOBJECT(this)));
}
void NumberFieldWidget::initSpinBox() {
// intentionally allow only positive numbers
m_spinBox = new GUI::SpinBox(-1, INT_MAX, this);
- connect(m_spinBox, SIGNAL(valueChanged(int)), SIGNAL(modified()));
- // QSpinBox doesn't emit valueChanged if you edit the value with
+ connect(m_spinBox, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(modified()));
+ // TQSpinBox doesn't emit valueChanged if you edit the value with
// the lineEdit until you change the keyboard focus
- connect(m_spinBox->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), SIGNAL(modified()));
+ connect(m_spinBox->child("qt_spinbox_edit"), TQT_SIGNAL(textChanged(const TQString&)), TQT_SIGNAL(modified()));
// I want to allow no value, so set space as special text. Empty text is ignored
- m_spinBox->setSpecialValueText(QChar(' '));
+ m_spinBox->setSpecialValueText(TQChar(' '));
}
-QString NumberFieldWidget::text() const {
+TQString NumberFieldWidget::text() const {
if(isSpinBox()) {
// minValue = special empty text
if(m_spinBox->value() > m_spinBox->minValue()) {
- return QString::number(m_spinBox->value());
+ return TQString::number(m_spinBox->value());
}
- return QString();
+ return TQString();
}
- QString text = m_lineEdit->text();
+ TQString text = m_lineEdit->text();
if(field()->flags() & Data::Field::AllowMultiple) {
- text.replace(s_semiColon, QString::fromLatin1("; "));
+ text.tqreplace(s_semiColon, TQString::tqfromLatin1("; "));
}
return text.simplifyWhiteSpace();
}
-void NumberFieldWidget::setText(const QString& text_) {
+void NumberFieldWidget::setText(const TQString& text_) {
blockSignals(true);
if(isSpinBox()) {
@@ -114,26 +114,26 @@ void NumberFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_
return;
}
- QString value = text();
+ 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<QBoxLayout*>(layout())->insertWidget(2, widget(), 1 /*stretch*/);
+ static_cast<TQBoxLayout*>(tqlayout())->insertWidget(2, widget(), 1 /*stretch*/);
widget()->show();
setText(value);
}
-QWidget* NumberFieldWidget::widget() {
+TQWidget* NumberFieldWidget::widget() {
if(isSpinBox()) {
return m_spinBox;
}
diff --git a/src/gui/numberfieldwidget.h b/src/gui/numberfieldwidget.h
index c0fed9d..6c9fd82 100644
--- a/src/gui/numberfieldwidget.h
+++ b/src/gui/numberfieldwidget.h
@@ -28,19 +28,20 @@ namespace Tellico {
*/
class NumberFieldWidget : public FieldWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- NumberFieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ NumberFieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~NumberFieldWidget() {}
- virtual QString text() const;
- virtual void setText(const QString& text);
+ virtual TQString text() const;
+ virtual void setText(const TQString& text);
public slots:
virtual void clear();
protected:
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual void updateFieldHook(Data::FieldPtr oldField, Data::FieldPtr newField);
private:
diff --git a/src/gui/overlaywidget.cpp b/src/gui/overlaywidget.cpp
index 6214ca8..54d27fe 100644
--- a/src/gui/overlaywidget.cpp
+++ b/src/gui/overlaywidget.cpp
@@ -13,11 +13,11 @@
#include "overlaywidget.h"
-#include <qlayout.h>
+#include <tqlayout.h>
using Tellico::GUI::OverlayWidget;
-OverlayWidget::OverlayWidget(QWidget* parent, QWidget* anchor) : QFrame(parent)
+OverlayWidget::OverlayWidget(TQWidget* tqparent, TQWidget* anchor) : TQFrame(tqparent)
, m_anchor(anchor)
, m_corner(TopRight) {
m_anchor->installEventFilter(this);
@@ -33,8 +33,8 @@ void OverlayWidget::setCorner(Corner corner_) {
reposition();
}
-void OverlayWidget::addWidget(QWidget* widget_) {
- layout()->add(widget_);
+void OverlayWidget::addWidget(TQWidget* widget_) {
+ tqlayout()->add(widget_);
adjustSize();
}
@@ -43,10 +43,10 @@ void OverlayWidget::reposition() {
return;
}
- setMaximumSize(parentWidget()->size());
+ setMaximumSize(tqparentWidget()->size());
adjustSize();
- QPoint p;
+ TQPoint p;
switch(m_corner) {
case BottomLeft:
@@ -70,9 +70,9 @@ void OverlayWidget::reposition() {
}
// Position in the toplevelwidget's coordinates
- QPoint pTopLevel = m_anchor->mapTo(topLevelWidget(), p);
- // Position in the widget's parentWidget coordinates
- QPoint pParent = parentWidget()->mapFrom(topLevelWidget(), pTopLevel);
+ TQPoint pTopLevel = m_anchor->mapTo(tqtopLevelWidget(), p);
+ // Position in the widget's tqparentWidget coordinates
+ TQPoint pParent = tqparentWidget()->mapFrom(tqtopLevelWidget(), pTopLevel);
// keep it on the screen
if(pParent.x() < 0) {
pParent.rx() = 0;
@@ -80,25 +80,25 @@ void OverlayWidget::reposition() {
move(pParent);
}
-bool OverlayWidget::eventFilter(QObject* object_, QEvent* event_) {
- if(object_ == m_anchor && (event_->type() == QEvent::Move || event_->type() == QEvent::Resize)) {
+bool OverlayWidget::eventFilter(TQObject* object_, TQEvent* event_) {
+ if(TQT_BASE_OBJECT(object_) == TQT_BASE_OBJECT(m_anchor) && (event_->type() == TQEvent::Move || event_->type() == TQEvent::Resize)) {
reposition();
}
- return QFrame::eventFilter(object_, event_);
+ return TQFrame::eventFilter(object_, event_);
}
-void OverlayWidget::resizeEvent(QResizeEvent* event_) {
+void OverlayWidget::resizeEvent(TQResizeEvent* event_) {
reposition();
- QFrame::resizeEvent(event_);
+ TQFrame::resizeEvent(event_);
}
-bool OverlayWidget::event(QEvent* event_) {
- if(event_->type() == QEvent::ChildInserted) {
+bool OverlayWidget::event(TQEvent* event_) {
+ if(event_->type() == TQEvent::ChildInserted) {
adjustSize();
}
- return QFrame::event(event_);
+ return TQFrame::event(event_);
}
#include "overlaywidget.moc"
diff --git a/src/gui/overlaywidget.h b/src/gui/overlaywidget.h
index 7b4453e..80eb245 100644
--- a/src/gui/overlaywidget.h
+++ b/src/gui/overlaywidget.h
@@ -17,7 +17,7 @@
#ifndef TELLICO_GUI_OVERLAYWIDGET_H
#define TELLICO_GUI_OVERLAYWIDGET_H
-#include <qframe.h>
+#include <tqframe.h>
namespace Tellico {
namespace GUI {
@@ -25,26 +25,27 @@ namespace Tellico {
/**
* @author Robby Stephenson
*/
-class OverlayWidget : public QFrame {
+class OverlayWidget : public TQFrame {
Q_OBJECT
+ TQ_OBJECT
public:
- OverlayWidget(QWidget* parent, QWidget* anchor);
+ OverlayWidget(TQWidget* tqparent, TQWidget* anchor);
void setCorner(Corner corner);
Corner corner() const { return m_corner; }
- void addWidget(QWidget* widget);
+ void addWidget(TQWidget* widget);
protected:
- void resizeEvent(QResizeEvent* event);
- bool eventFilter(QObject* object, QEvent* event);
- bool event(QEvent* event);
+ void resizeEvent(TQResizeEvent* event);
+ bool eventFilter(TQObject* object, TQEvent* event);
+ bool event(TQEvent* event);
private:
void reposition();
- QWidget* m_anchor;
+ TQWidget* m_anchor;
Corner m_corner;
};
diff --git a/src/gui/parafieldwidget.cpp b/src/gui/parafieldwidget.cpp
index 9941e34..ba3b583 100644
--- a/src/gui/parafieldwidget.cpp
+++ b/src/gui/parafieldwidget.cpp
@@ -19,32 +19,32 @@
using Tellico::GUI::ParaFieldWidget;
-ParaFieldWidget::ParaFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : FieldWidget(field_, parent_, name_) {
+ParaFieldWidget::ParaFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : FieldWidget(field_, tqparent_, name_) {
m_textEdit = new KTextEdit(this);
- m_textEdit->setTextFormat(Qt::PlainText);
- if(field_->property(QString::fromLatin1("spellcheck")) != Latin1Literal("false")) {
+ m_textEdit->setTextFormat(TQt::PlainText);
+ if(field_->property(TQString::tqfromLatin1("spellcheck")) != Latin1Literal("false")) {
m_textEdit->setCheckSpellingEnabled(true);
}
- connect(m_textEdit, SIGNAL(textChanged()), SIGNAL(modified()));
+ connect(m_textEdit, TQT_SIGNAL(textChanged()), TQT_SIGNAL(modified()));
registerWidget();
}
-QString ParaFieldWidget::text() const {
- QString text = m_textEdit->text();
- text.replace('\n', QString::fromLatin1("<br/>"));
+TQString ParaFieldWidget::text() const {
+ TQString text = m_textEdit->text();
+ text.tqreplace('\n', TQString::tqfromLatin1("<br/>"));
return text;
}
-void ParaFieldWidget::setText(const QString& text_) {
+void ParaFieldWidget::setText(const TQString& text_) {
blockSignals(true);
m_textEdit->blockSignals(true);
- QRegExp rx(QString::fromLatin1("<br/?>"), false /*case-sensitive*/);
- QString s = text_;
- s.replace(rx, QChar('\n'));
+ TQRegExp rx(TQString::tqfromLatin1("<br/?>"), false /*case-sensitive*/);
+ TQString s = text_;
+ s.tqreplace(rx, TQChar('\n'));
m_textEdit->setText(s);
m_textEdit->blockSignals(false);
@@ -56,7 +56,7 @@ void ParaFieldWidget::clear() {
editMultiple(false);
}
-QWidget* ParaFieldWidget::widget() {
+TQWidget* ParaFieldWidget::widget() {
return m_textEdit;
}
diff --git a/src/gui/parafieldwidget.h b/src/gui/parafieldwidget.h
index ac9801f..f672bfb 100644
--- a/src/gui/parafieldwidget.h
+++ b/src/gui/parafieldwidget.h
@@ -27,19 +27,20 @@ namespace Tellico {
*/
class ParaFieldWidget : public FieldWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ParaFieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ ParaFieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~ParaFieldWidget() {}
- virtual QString text() const;
- virtual void setText(const QString& text);
+ virtual TQString text() const;
+ virtual void setText(const TQString& text);
public slots:
virtual void clear();
protected:
- virtual QWidget* widget();
+ virtual TQWidget* widget();
private:
KTextEdit* m_textEdit;
diff --git a/src/gui/previewdialog.cpp b/src/gui/previewdialog.cpp
index 4c0d8e1..856fcd0 100644
--- a/src/gui/previewdialog.cpp
+++ b/src/gui/previewdialog.cpp
@@ -22,16 +22,16 @@
using Tellico::GUI::PreviewDialog;
-PreviewDialog::PreviewDialog(QWidget* parent_)
- : KDialogBase(parent_, "template preview dialog", false /* modal */,
+PreviewDialog::PreviewDialog(TQWidget* tqparent_)
+ : KDialogBase(tqparent_, "template preview dialog", false /* modal */,
i18n("Template Preview"), KDialogBase::Ok)
, m_tempDir(new KTempDir()) {
m_tempDir->setAutoDelete(true);
- connect(this, SIGNAL(finished()), SLOT(delayedDestruct()));
+ connect(this, TQT_SIGNAL(finished()), TQT_SLOT(delayedDestruct()));
m_view = new EntryView(this);
setMainWidget(m_view->view());
- setInitialSize(QSize(600, 500));
+ setInitialSize(TQSize(600, 500));
}
PreviewDialog::~PreviewDialog() {
@@ -39,7 +39,7 @@ PreviewDialog::~PreviewDialog() {
m_tempDir = 0;
}
-void PreviewDialog::setXSLTFile(const QString& file_) {
+void PreviewDialog::setXSLTFile(const TQString& file_) {
m_view->setXSLTFile(file_);
}
diff --git a/src/gui/previewdialog.h b/src/gui/previewdialog.h
index a386a94..a0f7893 100644
--- a/src/gui/previewdialog.h
+++ b/src/gui/previewdialog.h
@@ -28,12 +28,13 @@ namespace Tellico {
class PreviewDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- PreviewDialog(QWidget* parent);
+ PreviewDialog(TQWidget* tqparent);
~PreviewDialog();
- void setXSLTFile(const QString& file);
+ void setXSLTFile(const TQString& file);
void setXSLTOptions(StyleOptions options);
void showEntry(Data::EntryPtr entry);
diff --git a/src/gui/progress.cpp b/src/gui/progress.cpp
index 36baaf1..725d7a0 100644
--- a/src/gui/progress.cpp
+++ b/src/gui/progress.cpp
@@ -16,10 +16,10 @@
using Tellico::GUI::Progress;
-Progress::Progress(QWidget* parent_) : KProgress(parent_) {
+Progress::Progress(TQWidget* tqparent_) : KProgress(tqparent_) {
}
-Progress::Progress(int totalSteps_, QWidget* parent_) : KProgress(totalSteps_, parent_) {
+Progress::Progress(int totalSteps_, TQWidget* tqparent_) : KProgress(totalSteps_, tqparent_) {
}
bool Progress::isDone() const {
diff --git a/src/gui/progress.h b/src/gui/progress.h
index b58de2f..4e01853 100644
--- a/src/gui/progress.h
+++ b/src/gui/progress.h
@@ -24,10 +24,11 @@ namespace Tellico {
*/
class Progress : public KProgress {
Q_OBJECT
+ TQ_OBJECT
public:
- Progress(QWidget* parent);
- Progress(int totalSteps, QWidget* parent);
+ Progress(TQWidget* tqparent);
+ Progress(int totalSteps, TQWidget* tqparent);
bool isDone() const;
void setDone();
diff --git a/src/gui/ratingfieldwidget.cpp b/src/gui/ratingfieldwidget.cpp
index 4b0de71..3887725 100644
--- a/src/gui/ratingfieldwidget.cpp
+++ b/src/gui/ratingfieldwidget.cpp
@@ -17,19 +17,19 @@
using Tellico::GUI::RatingFieldWidget;
-RatingFieldWidget::RatingFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : FieldWidget(field_, parent_, name_) {
+RatingFieldWidget::RatingFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : FieldWidget(field_, tqparent_, name_) {
m_rating = new RatingWidget(field_, this);
- connect(m_rating, SIGNAL(modified()), SIGNAL(modified()));
+ connect(m_rating, TQT_SIGNAL(modified()), TQT_SIGNAL(modified()));
registerWidget();
}
-QString RatingFieldWidget::text() const {
+TQString RatingFieldWidget::text() const {
return m_rating->text();
}
-void RatingFieldWidget::setText(const QString& text_) {
+void RatingFieldWidget::setText(const TQString& text_) {
blockSignals(true);
m_rating->blockSignals(true);
@@ -52,7 +52,7 @@ void RatingFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_
m_rating->updateField(newField_);
}
-QWidget* RatingFieldWidget::widget() {
+TQWidget* RatingFieldWidget::widget() {
return m_rating;
}
diff --git a/src/gui/ratingfieldwidget.h b/src/gui/ratingfieldwidget.h
index 369dbec..f985ea2 100644
--- a/src/gui/ratingfieldwidget.h
+++ b/src/gui/ratingfieldwidget.h
@@ -26,19 +26,20 @@ namespace Tellico {
*/
class RatingFieldWidget : public FieldWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- RatingFieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ RatingFieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~RatingFieldWidget() {}
- virtual QString text() const;
- virtual void setText(const QString& text);
+ virtual TQString text() const;
+ virtual void setText(const TQString& text);
public slots:
virtual void clear();
protected:
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual void updateFieldHook(Data::FieldPtr oldField, Data::FieldPtr newField);
private:
diff --git a/src/gui/ratingwidget.cpp b/src/gui/ratingwidget.cpp
index 4921f21..4bfa9ec 100644
--- a/src/gui/ratingwidget.cpp
+++ b/src/gui/ratingwidget.cpp
@@ -19,8 +19,8 @@
#include <kiconloader.h>
-#include <qintdict.h>
-#include <qlayout.h>
+#include <tqintdict.h>
+#include <tqlayout.h>
namespace {
static const int RATING_WIDGET_MAX_ICONS = 10; // same as in Field::ratingValues()
@@ -29,10 +29,10 @@ namespace {
using Tellico::GUI::RatingWidget;
-const QPixmap& RatingWidget::pixmap(const QString& value_) {
- static QIntDict<QPixmap> pixmaps;
+const TQPixmap& RatingWidget::pixmap(const TQString& value_) {
+ static TQIntDict<TQPixmap> pixmaps;
if(pixmaps.isEmpty()) {
- pixmaps.insert(-1, new QPixmap());
+ pixmaps.insert(-1, new TQPixmap());
}
bool ok;
int n = Tellico::toUInt(value_, &ok);
@@ -43,29 +43,29 @@ const QPixmap& RatingWidget::pixmap(const QString& value_) {
return *pixmaps[n];
}
- QString picName = QString::fromLatin1("stars%1").arg(n);
- QPixmap* pix = new QPixmap(UserIcon(picName));
+ TQString picName = TQString::tqfromLatin1("stars%1").tqarg(n);
+ TQPixmap* pix = new TQPixmap(UserIcon(picName));
pixmaps.insert(n, pix);
return *pix;
}
-RatingWidget::RatingWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : QHBox(parent_, name_), m_field(field_), m_currIndex(-1) {
- m_pixOn = UserIcon(QString::fromLatin1("star_on"));
- m_pixOff = UserIcon(QString::fromLatin1("star_off"));
+RatingWidget::RatingWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : TQHBox(tqparent_, name_), m_field(field_), m_currIndex(-1) {
+ m_pixOn = UserIcon(TQString::tqfromLatin1("star_on"));
+ m_pixOff = UserIcon(TQString::tqfromLatin1("star_off"));
setSpacing(0);
// find maximum width and height
- int w = QMAX(RATING_WIDGET_MAX_STAR_SIZE, QMAX(m_pixOn.width(), m_pixOff.width()));
- int h = QMAX(RATING_WIDGET_MAX_STAR_SIZE, QMAX(m_pixOn.height(), m_pixOff.height()));
+ int w = TQMAX(RATING_WIDGET_MAX_STAR_SIZE, TQMAX(m_pixOn.width(), m_pixOff.width()));
+ int h = TQMAX(RATING_WIDGET_MAX_STAR_SIZE, TQMAX(m_pixOn.height(), m_pixOff.height()));
for(int i = 0; i < RATING_WIDGET_MAX_ICONS; ++i) {
- QLabel* l = new QLabel(this);
+ TQLabel* l = new TQLabel(this);
l->setFixedSize(w, h);
m_widgets.append(l);
}
init();
- QBoxLayout* l = dynamic_cast<QBoxLayout*>(layout());
+ TQBoxLayout* l = dynamic_cast<TQBoxLayout*>(tqlayout());
if(l) {
l->addStretch(1);
}
@@ -73,21 +73,21 @@ RatingWidget::RatingWidget(Data::FieldPtr field_, QWidget* parent_, const char*
void RatingWidget::init() {
updateBounds();
- m_total = QMIN(m_max, static_cast<int>(m_widgets.count()));
+ m_total = TQMIN(m_max, static_cast<int>(m_widgets.count()));
uint i = 0;
for( ; static_cast<int>(i) < m_total; ++i) {
m_widgets.at(i)->setPixmap(m_pixOff);
}
for( ; i < m_widgets.count(); ++i) {
- m_widgets.at(i)->setPixmap(QPixmap());
+ m_widgets.at(i)->setPixmap(TQPixmap());
}
update();
}
void RatingWidget::updateBounds() {
bool ok; // not used;
- m_min = Tellico::toUInt(m_field->property(QString::fromLatin1("minimum")), &ok);
- m_max = Tellico::toUInt(m_field->property(QString::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;
@@ -106,19 +106,19 @@ void RatingWidget::update() {
m_widgets.at(i)->setPixmap(m_pixOff);
}
- QHBox::update();
+ TQHBox::update();
}
-void RatingWidget::mousePressEvent(QMouseEvent* event_) {
+void RatingWidget::mousePressEvent(TQMouseEvent* event_) {
// only react to left button
if(event_->button() != Qt::LeftButton) {
return;
}
int idx;
- QWidget* child = childAt(event_->pos());
+ TQWidget* child = tqchildAt(event_->pos());
if(child) {
- idx = m_widgets.findRef(static_cast<QLabel*>(child));
+ idx = m_widgets.tqfindRef(static_cast<TQLabel*>(child));
// if the widget is clicked beyond the maximum value, clear it
// remember total and min are values, but index is zero-based!
if(idx > m_total-1) {
@@ -141,12 +141,12 @@ void RatingWidget::clear() {
update();
}
-QString RatingWidget::text() const {
+TQString RatingWidget::text() const {
// index is index of the list, which is zero-based. Add 1!
- return m_currIndex == -1 ? QString::null : QString::number(m_currIndex+1);
+ return m_currIndex == -1 ? TQString() : TQString::number(m_currIndex+1);
}
-void RatingWidget::setText(const QString& text_) {
+void RatingWidget::setText(const TQString& text_) {
bool ok;
// text is value, subtract one to get index
m_currIndex = Tellico::toUInt(text_, &ok)-1;
diff --git a/src/gui/ratingwidget.h b/src/gui/ratingwidget.h
index 99665b3..9a3e477 100644
--- a/src/gui/ratingwidget.h
+++ b/src/gui/ratingwidget.h
@@ -16,10 +16,10 @@
#include "../datavectors.h"
-#include <qhbox.h>
-#include <qptrlist.h>
-#include <qlabel.h>
-#include <qpixmap.h>
+#include <tqhbox.h>
+#include <tqptrlist.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
namespace Tellico {
namespace Data {
@@ -30,20 +30,21 @@ namespace Tellico {
/**
* @author Robby Stephenson
*/
-class RatingWidget : public QHBox {
+class RatingWidget : public TQHBox {
Q_OBJECT
+ TQ_OBJECT
-typedef QPtrList<QLabel> LabelList;
+typedef TQPtrList<TQLabel> LabelList;
public:
- RatingWidget(Data::FieldPtr field, QWidget* parent, const char* name = 0);
+ RatingWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name = 0);
void clear();
- QString text() const;
- void setText(const QString& text);
+ TQString text() const;
+ void setText(const TQString& text);
void updateField(Data::FieldPtr field);
- static const QPixmap& pixmap(const QString& value);
+ static const TQPixmap& pixmap(const TQString& value);
public slots:
void update();
@@ -52,7 +53,7 @@ signals:
void modified();
protected:
- virtual void mousePressEvent(QMouseEvent* e);
+ virtual void mousePressEvent(TQMouseEvent* e);
private:
void init();
@@ -66,8 +67,8 @@ private:
int m_min;
int m_max;
- QPixmap m_pixOn;
- QPixmap m_pixOff;
+ TQPixmap m_pixOn;
+ TQPixmap m_pixOff;
};
} // end GUI namespace
diff --git a/src/gui/richtextlabel.cpp b/src/gui/richtextlabel.cpp
index a4cdde4..a0b3a01 100644
--- a/src/gui/richtextlabel.cpp
+++ b/src/gui/richtextlabel.cpp
@@ -15,33 +15,33 @@
#include <kdebug.h>
-#include <qlayout.h>
+#include <tqlayout.h>
using Tellico::GUI::RichTextLabel;
-RichTextLabel::RichTextLabel(QWidget* parent) : QTextEdit(parent) {
+RichTextLabel::RichTextLabel(TQWidget* tqparent) : TQTextEdit(tqparent) {
init();
}
-RichTextLabel::RichTextLabel(const QString& text, QWidget* parent) : QTextEdit(text, QString::null, parent) {
+RichTextLabel::RichTextLabel(const TQString& text, TQWidget* tqparent) : TQTextEdit(text, TQString(), tqparent) {
init();
}
-QSize RichTextLabel::sizeHint() const {
- return minimumSizeHint();
+TQSize RichTextLabel::tqsizeHint() const {
+ return tqminimumSizeHint();
}
void RichTextLabel::init() {
setReadOnly(true);
- setTextFormat(Qt::RichText);
+ setTextFormat(TQt::RichText);
- setFrameShape(QFrame::NoFrame);
+ setFrameShape(TQFrame::NoFrame);
viewport()->setMouseTracking(false);
- setPaper(colorGroup().background());
+ setPaper(tqcolorGroup().background());
- setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding));
- viewport()->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::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 f45a328..9f57fb6 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 <qtextedit.h>
+#include <tqtextedit.h>
namespace Tellico {
namespace GUI {
@@ -22,22 +22,23 @@ namespace Tellico {
/**
* @author Robby Stephenson
*/
-class RichTextLabel : public QTextEdit {
+class RichTextLabel : public TQTextEdit {
Q_OBJECT
+ TQ_OBJECT
public:
- RichTextLabel(QWidget* parent);
- RichTextLabel(const QString& text, QWidget* parent);
+ RichTextLabel(TQWidget* tqparent);
+ RichTextLabel(const TQString& text, TQWidget* tqparent);
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
private:
void init();
// redefine these to disable selection
- void contentsMousePressEvent(QMouseEvent*) {}
- void contentsMouseMoveEvent(QMouseEvent*) {}
- void contentsMouseReleaseEvent(QMouseEvent*) {}
- void contentsMouseDoubleClickEvent(QMouseEvent*) {}
+ void contentsMousePressEvent(TQMouseEvent*) {}
+ void contentsMouseMoveEvent(TQMouseEvent*) {}
+ void contentsMouseReleaseEvent(TQMouseEvent*) {}
+ void contentsMouseDoubleClickEvent(TQMouseEvent*) {}
};
} // end namespace
diff --git a/src/gui/stringmapdialog.cpp b/src/gui/stringmapdialog.cpp
index 4a5374f..c542fe5 100644
--- a/src/gui/stringmapdialog.cpp
+++ b/src/gui/stringmapdialog.cpp
@@ -19,33 +19,33 @@
#include <kbuttonbox.h>
#include <kiconloader.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
+#include <tqpushbutton.h>
using Tellico::StringMapDialog;
-StringMapDialog::StringMapDialog(const QMap<QString, QString>& map_, QWidget* parent_, const char* name_/*=0*/, bool modal_/*=false*/)
- : KDialogBase(parent_, name_, modal_, QString::null, Ok|Cancel) {
- QWidget* page = new QWidget(this);
- QVBoxLayout* l = new QVBoxLayout(page, 0, KDialog::spacingHint());
+StringMapDialog::StringMapDialog(const TQMap<TQString, TQString>& map_, TQWidget* tqparent_, const char* name_/*=0*/, bool modal_/*=false*/)
+ : KDialogBase(tqparent_, name_, modal_, TQString(), Ok|Cancel) {
+ TQWidget* page = new TQWidget(this);
+ TQVBoxLayout* l = new TQVBoxLayout(page, 0, KDialog::spacingHint());
m_listView = new KListView(page);
m_listView->setAllColumnsShowFocus(true);
m_listView->setShowSortIndicator(true);
- m_listView->addColumn(QString::null);
- m_listView->addColumn(QString::null);
+ m_listView->addColumn(TQString());
+ m_listView->addColumn(TQString());
m_listView->header()->hide(); // hide header since neither column has a label initially
- m_listView->setColumnWidthMode(0, QListView::Maximum);
- m_listView->setColumnWidthMode(1, QListView::Maximum);
- m_listView->setResizeMode(QListView::AllColumns);
- connect(m_listView, SIGNAL(currentChanged(QListViewItem*)), SLOT(slotUpdate(QListViewItem*)));
- connect(m_listView, SIGNAL(clicked(QListViewItem*)), SLOT(slotUpdate(QListViewItem*)));
+ m_listView->setColumnWidthMode(0, TQListView::Maximum);
+ m_listView->setColumnWidthMode(1, TQListView::Maximum);
+ m_listView->setResizeMode(TQListView::AllColumns);
+ connect(m_listView, TQT_SIGNAL(currentChanged(TQListViewItem*)), TQT_SLOT(slotUpdate(TQListViewItem*)));
+ connect(m_listView, TQT_SIGNAL(clicked(TQListViewItem*)), TQT_SLOT(slotUpdate(TQListViewItem*)));
l->addWidget(m_listView);
- QHBox* box = new QHBox(page);
+ TQHBox* box = new TQHBox(page);
box->setMargin(4);
box->setSpacing(KDialog::spacingHint());
@@ -54,16 +54,16 @@ StringMapDialog::StringMapDialog(const QMap<QString, QString>& map_, QWidget* pa
m_edit2 = new KLineEdit(box);
KButtonBox* bb = new KButtonBox(box);
bb->addStretch();
- QPushButton* btn = bb->addButton(i18n("&Set"), this, SLOT(slotAdd()));
- btn->setIconSet(BarIcon(QString::fromLatin1("filenew"), KIcon::SizeSmall));
- btn = bb->addButton(i18n("&Delete"), this, SLOT(slotDelete()));
- btn->setIconSet(BarIcon(QString::fromLatin1("editdelete"), KIcon::SizeSmall));
+ TQPushButton* btn = bb->addButton(i18n("&Set"), TQT_TQOBJECT(this), TQT_SLOT(slotAdd()));
+ btn->setIconSet(BarIcon(TQString::tqfromLatin1("filenew"), KIcon::SizeSmall));
+ btn = bb->addButton(i18n("&Delete"), TQT_TQOBJECT(this), TQT_SLOT(slotDelete()));
+ btn->setIconSet(BarIcon(TQString::tqfromLatin1("editdelete"), KIcon::SizeSmall));
l->addWidget(box);
l->addStretch(1);
setMainWidget(page);
- for(QMap<QString, QString>::ConstIterator it = map_.begin(); it != map_.end(); ++it) {
+ for(TQMap<TQString, TQString>::ConstIterator it = map_.begin(); it != map_.end(); ++it) {
if(!it.data().isEmpty()) {
(void) new KListViewItem(m_listView, it.key(), it.data());
}
@@ -74,12 +74,12 @@ StringMapDialog::StringMapDialog(const QMap<QString, QString>& map_, QWidget* pa
}
void StringMapDialog::slotAdd() {
- QString s1 = m_edit1->text();
- QString s2 = m_edit2->text();
+ TQString s1 = m_edit1->text();
+ TQString s2 = m_edit2->text();
if(s1.isEmpty() && s2.isEmpty()) {
return;
}
- QListViewItem* item = m_listView->currentItem();
+ TQListViewItem* item = m_listView->currentItem();
if(item && s1 == item->text(0)) { // only update values if same key
item->setText(1, s2);
} else {
@@ -97,7 +97,7 @@ void StringMapDialog::slotDelete() {
m_listView->setSelected(m_listView->currentItem(), true);
}
-void StringMapDialog::slotUpdate(QListViewItem* item_) {
+void StringMapDialog::slotUpdate(TQListViewItem* item_) {
if(item_) {
m_edit1->setText(item_->text(0));
m_edit2->setText(item_->text(1));
@@ -108,15 +108,15 @@ void StringMapDialog::slotUpdate(QListViewItem* item_) {
}
}
-void StringMapDialog::setLabels(const QString& label1_, const QString& label2_) {
+void StringMapDialog::setLabels(const TQString& label1_, const TQString& label2_) {
m_listView->header()->setLabel(0, label1_);
m_listView->header()->setLabel(1, label2_);
m_listView->header()->show();
}
-QMap<QString, QString> StringMapDialog::stringMap() {
- QMap<QString, QString> map;
- for(QListViewItem* item = m_listView->firstChild(); item; item = item->nextSibling()) {
+TQMap<TQString, TQString> StringMapDialog::stringMap() {
+ TQMap<TQString, TQString> map;
+ for(TQListViewItem* item = m_listView->firstChild(); item; item = item->nextSibling()) {
map.insert(item->text(0), item->text(1));
}
return map;
diff --git a/src/gui/stringmapdialog.h b/src/gui/stringmapdialog.h
index 311df70..a0dec9f 100644
--- a/src/gui/stringmapdialog.h
+++ b/src/gui/stringmapdialog.h
@@ -16,12 +16,12 @@
class KLineEdit;
class KListView;
-class QListViewItem;
+class TQListViewItem;
#include <kdialogbase.h>
template <typename T1, typename T2>
-class QMap;
+class TQMap;
namespace Tellico {
@@ -38,9 +38,10 @@ namespace Tellico {
*/
class StringMapDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- StringMapDialog(const QMap<QString, QString>& stringMap, QWidget* parent, const char* name=0, bool modal=false);
+ StringMapDialog(const TQMap<TQString, TQString>& stringMap, TQWidget* tqparent, const char* name=0, bool modal=false);
/**
* Sets the titles for the key and value columns.
@@ -48,18 +49,18 @@ public:
* @param label1 The name of the key string
* @param label2 The name of the value string
*/
- void setLabels(const QString& label1, const QString& label2);
+ void setLabels(const TQString& label1, const TQString& label2);
/**
* Returns the modified string map.
*
* @return The modified string map
*/
- QMap<QString, QString> stringMap();
+ TQMap<TQString, TQString> stringMap();
private slots:
void slotAdd();
void slotDelete();
- void slotUpdate(QListViewItem* item);
+ void slotUpdate(TQListViewItem* item);
protected:
KListView* m_listView;
diff --git a/src/gui/tabcontrol.cpp b/src/gui/tabcontrol.cpp
index 145f632..208d8e4 100644
--- a/src/gui/tabcontrol.cpp
+++ b/src/gui/tabcontrol.cpp
@@ -13,25 +13,25 @@
#include "tabcontrol.h"
-#include <qtabbar.h>
-#include <qobjectlist.h>
+#include <tqtabbar.h>
+#include <tqobjectlist.h>
using Tellico::GUI::TabControl;
-TabControl::TabControl(QWidget* parent_, const char* name_/*=0*/)
- : QTabWidget(parent_, name_) {
+TabControl::TabControl(TQWidget* tqparent_, const char* name_/*=0*/)
+ : TQTabWidget(tqparent_, name_) {
}
-QTabBar* TabControl::tabBar() const {
- return QTabWidget::tabBar();
+TQTabBar* TabControl::tabBar() const {
+ return TQTabWidget::tabBar();
}
void TabControl::setFocusToFirstChild() {
- QWidget* page = currentPage();
+ TQWidget* page = currentPage();
Q_ASSERT(page);
- QObjectList* list = page->queryList("QWidget");
- for(QObjectListIt it(*list); it.current(); ++it) {
- QWidget* w = static_cast<QWidget*>(it.current());
+ TQObjectList* list = page->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ for(TQObjectListIt it(*list); it.current(); ++it) {
+ TQWidget* w = TQT_TQWIDGET(it.current());
if(w->isFocusEnabled()) {
w->setFocus();
break;
@@ -43,7 +43,7 @@ void TabControl::setFocusToFirstChild() {
// have to loop backwards since count() gets decremented on delete
void TabControl::clear() {
for(int i = count(); i > 0; --i) {
- QWidget* w = page(i-1);
+ TQWidget* w = page(i-1);
if(w) {
removePage(w);
delete w;
@@ -52,8 +52,8 @@ void TabControl::clear() {
}
void TabControl::setTabBarHidden(bool hide_) {
- QWidget* rightcorner = cornerWidget(TopRight);
- QWidget* leftcorner = cornerWidget(TopLeft);
+ TQWidget* rightcorner = cornerWidget(TopRight);
+ TQWidget* leftcorner = cornerWidget(TopLeft);
if(hide_) {
if(leftcorner) {
diff --git a/src/gui/tabcontrol.h b/src/gui/tabcontrol.h
index 20d22f5..a99c94b 100644
--- a/src/gui/tabcontrol.h
+++ b/src/gui/tabcontrol.h
@@ -14,7 +14,7 @@
#ifndef TABCONTROL_H
#define TABCONTROL_H
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
namespace Tellico {
namespace GUI {
@@ -22,16 +22,17 @@ namespace Tellico {
/**
* @author Robby Stephenson
*/
-class TabControl : public QTabWidget {
+class TabControl : public TQTabWidget {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- TabControl(QWidget* parent, const char* name=0);
+ TabControl(TQWidget* tqparent, const char* name=0);
- QTabBar* tabBar() const;
+ TQTabBar* tabBar() const;
void setTabBarHidden(bool hide);
/**
diff --git a/src/gui/tablefieldwidget.cpp b/src/gui/tablefieldwidget.cpp
index 30f89b4..bac3ea0 100644
--- a/src/gui/tablefieldwidget.cpp
+++ b/src/gui/tablefieldwidget.cpp
@@ -21,7 +21,7 @@
#include <kiconloader.h>
#include <kinputdialog.h>
-#include <qtable.h>
+#include <tqtable.h>
namespace {
static const int MIN_TABLE_ROWS = 5;
@@ -30,18 +30,18 @@ namespace {
using Tellico::GUI::TableFieldWidget;
-TableFieldWidget::TableFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : FieldWidget(field_, parent_, name_), m_field(field_), m_row(-1), m_col(-1) {
+TableFieldWidget::TableFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : FieldWidget(field_, tqparent_, name_), m_field(field_), m_row(-1), m_col(-1) {
bool ok;
- m_columns = Tellico::toUInt(field_->property(QString::fromLatin1("columns")), &ok);
+ m_columns = Tellico::toUInt(field_->property(TQString::tqfromLatin1("columns")), &ok);
if(!ok) {
m_columns = 1;
} else {
- m_columns = QMIN(m_columns, MAX_TABLE_COLS); // max of 5 columns
+ m_columns = TQMIN(m_columns, MAX_TABLE_COLS); // max of 5 columns
}
- m_table = new QTable(MIN_TABLE_ROWS, m_columns, this);
+ m_table = new TQTable(MIN_TABLE_ROWS, m_columns, this);
labelColumns(m_field);
// allow renaming of column titles
m_table->horizontalHeader()->setClickEnabled(true);
@@ -49,45 +49,45 @@ TableFieldWidget::TableFieldWidget(Data::FieldPtr field_, QWidget* parent_, cons
m_table->verticalHeader()->setClickEnabled(true);
m_table->verticalHeader()->installEventFilter(this);
- connect(m_table->verticalHeader(), SIGNAL(indexChange(int, int, int)), SIGNAL(modified()));
+ connect(m_table->verticalHeader(), TQT_SIGNAL(indexChange(int, int, int)), TQT_SIGNAL(modified()));
m_table->setDragEnabled(false);
- m_table->setFocusStyle(QTable::FollowStyle);
+ m_table->setFocusStyle(TQTable::FollowStyle);
m_table->setRowMovingEnabled(true); // rows can be moved
m_table->setColumnMovingEnabled(false); // columns remain fixed
m_table->setColumnStretchable(m_columns-1, true);
m_table->adjustColumn(m_columns-1);
- m_table->setSelectionMode(QTable::NoSelection);
- m_table->setHScrollBarMode(QScrollView::AlwaysOff);
+ m_table->setSelectionMode(TQTable::NoSelection);
+ m_table->setHScrollBarMode(TQScrollView::AlwaysOff);
- connect(m_table, SIGNAL(valueChanged(int, int)), SIGNAL(modified()));
- connect(m_table, SIGNAL(currentChanged(int, int)), SLOT(slotCheckRows(int, int)));
- connect(m_table, SIGNAL(valueChanged(int, int)), SLOT(slotResizeColumn(int, int)));
- connect(m_table, SIGNAL(contextMenuRequested(int, int, const QPoint&)), SLOT(contextMenu(int, int, const QPoint&)));
+ connect(m_table, TQT_SIGNAL(valueChanged(int, int)), TQT_SIGNAL(modified()));
+ connect(m_table, TQT_SIGNAL(currentChanged(int, int)), TQT_SLOT(slotCheckRows(int, int)));
+ connect(m_table, TQT_SIGNAL(valueChanged(int, int)), TQT_SLOT(slotResizeColumn(int, int)));
+ connect(m_table, TQT_SIGNAL(contextMenuRequested(int, int, const TQPoint&)), TQT_SLOT(contextMenu(int, int, const TQPoint&)));
registerWidget();
}
-QString TableFieldWidget::text() const {
- QString text, str, rstack, cstack, rowStr;
+TQString TableFieldWidget::text() const {
+ TQString text, str, rstack, cstack, rowStr;
for(int row = 0; row < m_table->numRows(); ++row) {
rowStr.truncate(0);
cstack.truncate(0);
for(int col = 0; col < m_table->numCols(); ++col) {
str = m_table->text(row, col).simplifyWhiteSpace();
if(str.isEmpty()) {
- cstack += QString::fromLatin1("::");
+ cstack += TQString::tqfromLatin1("::");
} else {
- rowStr += cstack + str + QString::fromLatin1("::");
+ rowStr += cstack + str + TQString::tqfromLatin1("::");
cstack.truncate(0);
}
}
if(rowStr.isEmpty()) {
- rstack += QString::fromLatin1("; ");
+ rstack += TQString::tqfromLatin1("; ");
} else {
rowStr.truncate(rowStr.length()-2); // remove last semi-colon and space
- text += rstack + rowStr + QString::fromLatin1("; ");
+ text += rstack + rowStr + TQString::tqfromLatin1("; ");
rstack.truncate(0);
}
}
@@ -114,8 +114,8 @@ QString TableFieldWidget::text() const {
return text;
}
-void TableFieldWidget::setText(const QString& text_) {
- QStringList list = Data::Field::split(text_, true);
+void TableFieldWidget::setText(const TQString& text_) {
+ TQStringList list = Data::Field::split(text_, true);
// add additional rows if needed
if(static_cast<int>(list.count()) > m_table->numRows()) {
m_table->insertRows(m_table->numRows(), list.count()-m_table->numRows());
@@ -123,12 +123,12 @@ void TableFieldWidget::setText(const QString& 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(QString::fromLatin1("::"), col, col));
+ m_table->setText(row, col, list[row].section(TQString::tqfromLatin1("::"), col, col));
}
m_table->showRow(row);
}
// remove any un-needed rows
- int minRow = QMAX(row, MIN_TABLE_ROWS);
+ int minRow = TQMAX(row, MIN_TABLE_ROWS);
for(row = m_table->numRows()-1; row >= minRow; --row) {
m_table->removeRow(row);
}
@@ -145,7 +145,7 @@ void TableFieldWidget::clear() {
wasEmpty = false;
}
for(int col = 0; col < m_table->numCols(); ++col) {
- m_table->setText(row, col, QString::null);
+ m_table->setText(row, col, TQString());
}
if(row >= MIN_TABLE_ROWS) {
m_table->removeRow(row);
@@ -158,7 +158,7 @@ void TableFieldWidget::clear() {
}
}
-QWidget* TableFieldWidget::widget() {
+TQWidget* TableFieldWidget::widget() {
return m_table;
}
@@ -176,13 +176,13 @@ void TableFieldWidget::slotRenameColumn() {
if(m_col < 0 || m_col >= m_columns) {
return;
}
- QString name = m_table->horizontalHeader()->label(m_col);
+ TQString name = m_table->horizontalHeader()->label(m_col);
bool ok;
- QString newName = KInputDialog::getText(i18n("Rename Column"), i18n("New column name:"),
+ TQString newName = KInputDialog::getText(i18n("Rename Column"), i18n("New column name:"),
name, &ok, this);
if(ok && !newName.isEmpty()) {
Data::FieldPtr newField = new Data::Field(*m_field);
- newField->setProperty(QString::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) {
- QString s = field_->property(QString::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,11 +211,11 @@ void TableFieldWidget::labelColumns(Data::FieldPtr field_) {
void TableFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_) {
bool ok;
- m_columns = Tellico::toUInt(newField_->property(QString::fromLatin1("columns")), &ok);
+ m_columns = Tellico::toUInt(newField_->property(TQString::tqfromLatin1("columns")), &ok);
if(!ok) {
m_columns = 1;
} else {
- m_columns = QMIN(m_columns, MAX_TABLE_COLS); // max of 5 columns
+ m_columns = TQMIN(m_columns, MAX_TABLE_COLS); // max of 5 columns
}
if(m_columns != m_table->numCols()) {
m_table->setNumCols(m_columns);
@@ -224,11 +224,11 @@ void TableFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_)
labelColumns(newField_);
}
-bool TableFieldWidget::eventFilter(QObject* obj_, QEvent* ev_) {
- if(ev_->type() == QEvent::MouseButtonPress
- && static_cast<QMouseEvent*>(ev_)->button() == Qt::RightButton) {
- if(obj_ == m_table->horizontalHeader()) {
- QMouseEvent* ev = static_cast<QMouseEvent*>(ev_);
+bool TableFieldWidget::eventFilter(TQObject* obj_, TQEvent* ev_) {
+ if(ev_->type() == TQEvent::MouseButtonPress
+ && TQT_TQMOUSEEVENT(ev_)->button() == Qt::RightButton) {
+ if(TQT_BASE_OBJECT(obj_) == TQT_BASE_OBJECT(m_table->horizontalHeader())) {
+ TQMouseEvent* ev = TQT_TQMOUSEEVENT(ev_);
// might be scrolled
int pos = ev->x() + m_table->horizontalHeader()->offset();
int col = m_table->horizontalHeader()->sectionAt(pos);
@@ -238,12 +238,12 @@ bool TableFieldWidget::eventFilter(QObject* obj_, QEvent* ev_) {
m_row = -1;
m_col = col;
KPopupMenu menu(this);
- menu.insertItem(SmallIconSet(QString::fromLatin1("edit")), i18n("Rename Column..."),
- this, SLOT(slotRenameColumn()));
+ menu.insertItem(SmallIconSet(TQString::tqfromLatin1("edit")), i18n("Rename Column..."),
+ this, TQT_SLOT(slotRenameColumn()));
menu.exec(ev->globalPos());
return true;
- } else if(obj_ == m_table->verticalHeader()) {
- QMouseEvent* ev = static_cast<QMouseEvent*>(ev_);
+ } else if(TQT_BASE_OBJECT(obj_) == TQT_BASE_OBJECT(m_table->verticalHeader())) {
+ TQMouseEvent* ev = TQT_TQMOUSEEVENT(ev_);
// might be scrolled
int pos = ev->y() + m_table->verticalHeader()->offset();
int row = m_table->verticalHeader()->sectionAt(pos);
@@ -260,7 +260,7 @@ bool TableFieldWidget::eventFilter(QObject* obj_, QEvent* ev_) {
return FieldWidget::eventFilter(obj_, ev_);
}
-void TableFieldWidget::contextMenu(int row_, int col_, const QPoint& p_) {
+void TableFieldWidget::contextMenu(int row_, int col_, const TQPoint& p_) {
// might get called with col == -1 for clicking on vertical header
// but a negative row means clicking outside bounds of table
if(row_ < 0) {
@@ -271,29 +271,29 @@ void TableFieldWidget::contextMenu(int row_, int col_, const QPoint& p_) {
int id;
KPopupMenu menu(this);
- menu.insertItem(SmallIconSet(QString::fromLatin1("insrow")), i18n("Insert Row"),
- this, SLOT(slotInsertRow()));
- menu.insertItem(SmallIconSet(QString::fromLatin1("remrow")), i18n("Remove Row"),
- this, SLOT(slotRemoveRow()));
- id = menu.insertItem(SmallIconSet(QString::fromLatin1("1uparrow")), i18n("Move Row Up"),
- this, SLOT(slotMoveRowUp()));
+ menu.insertItem(SmallIconSet(TQString::tqfromLatin1("insrow")), i18n("Insert Row"),
+ this, TQT_SLOT(slotInsertRow()));
+ menu.insertItem(SmallIconSet(TQString::tqfromLatin1("remrow")), i18n("Remove Row"),
+ this, TQT_SLOT(slotRemoveRow()));
+ 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(QString::fromLatin1("1downarrow")), i18n("Move Row Down"),
- this, SLOT(slotMoveRowDown()));
+ 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(QString::fromLatin1("edit")), i18n("Rename Column..."),
- this, SLOT(slotRenameColumn()));
+ 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(QString::fromLatin1("locationbar_erase")), i18n("Clear Table"),
- this, SLOT(clear()));
+ menu.insertItem(SmallIconSet(TQString::tqfromLatin1("locationbar_erase")), i18n("Clear Table"),
+ this, TQT_SLOT(clear()));
menu.exec(p_);
}
diff --git a/src/gui/tablefieldwidget.h b/src/gui/tablefieldwidget.h
index da9157d..03060b2 100644
--- a/src/gui/tablefieldwidget.h
+++ b/src/gui/tablefieldwidget.h
@@ -14,8 +14,8 @@
#ifndef TABLEFIELDWIDGET_H
#define TABLEFIELDWIDGET_H
-class QTable;
-class QEvent;
+class TQTable;
+class TQEvent;
#include "fieldwidget.h"
#include "../datavectors.h"
@@ -28,28 +28,29 @@ namespace Tellico {
*/
class TableFieldWidget : public FieldWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- TableFieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ TableFieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~TableFieldWidget() {}
- virtual QString text() const;
- virtual void setText(const QString& text);
+ virtual TQString text() const;
+ virtual void setText(const TQString& text);
/**
* Event filter used to popup the menu
*/
- bool eventFilter(QObject* obj, QEvent* ev);
+ bool eventFilter(TQObject* obj, TQEvent* ev);
public slots:
virtual void clear();
protected:
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual void updateFieldHook(Data::FieldPtr oldField, Data::FieldPtr newField);
private slots:
- void contextMenu(int row, int col, const QPoint& p);
+ void contextMenu(int row, int col, const TQPoint& p);
void slotCheckRows(int row, int col);
void slotResizeColumn(int row, int col);
void slotRenameColumn();
@@ -62,7 +63,7 @@ private:
bool emptyRow(int row) const;
void labelColumns(Data::FieldPtr field);
- QTable* m_table;
+ TQTable* m_table;
int m_columns;
Data::FieldPtr m_field;
int m_row;
diff --git a/src/gui/urlfieldwidget.cpp b/src/gui/urlfieldwidget.cpp
index f3c2afd..3c7c720 100644
--- a/src/gui/urlfieldwidget.cpp
+++ b/src/gui/urlfieldwidget.cpp
@@ -25,26 +25,26 @@ using Tellico::GUI::URLFieldWidget;
// subclass of KURLCompletion is needed so the KURLLabel
// can open relative links. I don't want to have to have to update
// the base directory of the completion every time a new document is opened
-QString URLFieldWidget::URLCompletion::makeCompletion(const QString& text_) {
+TQString URLFieldWidget::URLCompletion::makeCompletion(const TQString& text_) {
// KURLCompletion::makeCompletion() uses an internal variable instead
// of calling KURLCompletion::dir() so need to set the base dir before completing
setDir(Kernel::self()->URL().directory());
return KURLCompletion::makeCompletion(text_);
}
-URLFieldWidget::URLFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/)
- : FieldWidget(field_, parent_, name_), m_run(0) {
+URLFieldWidget::URLFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/)
+ : FieldWidget(field_, tqparent_, name_), m_run(0) {
m_requester = new KURLRequester(this);
m_requester->lineEdit()->setCompletionObject(new URLCompletion());
m_requester->lineEdit()->setAutoDeleteCompletionObject(true);
- connect(m_requester, SIGNAL(textChanged(const QString&)), SIGNAL(modified()));
- connect(m_requester, SIGNAL(textChanged(const QString&)), label(), SLOT(setURL(const QString&)));
- connect(label(), SIGNAL(leftClickedURL(const QString&)), SLOT(slotOpenURL(const QString&)));
+ connect(m_requester, TQT_SIGNAL(textChanged(const TQString&)), TQT_SIGNAL(modified()));
+ connect(m_requester, TQT_SIGNAL(textChanged(const TQString&)), label(), TQT_SLOT(setURL(const TQString&)));
+ connect(label(), TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(slotOpenURL(const TQString&)));
registerWidget();
// special case, remember if it's a relative url
- m_isRelative = field_->property(QString::fromLatin1("relative")) == Latin1Literal("true");
+ m_isRelative = field_->property(TQString::tqfromLatin1("relative")) == Latin1Literal("true");
}
URLFieldWidget::~URLFieldWidget() {
@@ -53,7 +53,7 @@ URLFieldWidget::~URLFieldWidget() {
}
}
-QString URLFieldWidget::text() const {
+TQString URLFieldWidget::text() const {
if(m_isRelative) {
return KURL::relativeURL(Kernel::self()->URL(), m_requester->url());
}
@@ -63,7 +63,7 @@ QString URLFieldWidget::text() const {
return KURL(m_requester->url()).url();
}
-void URLFieldWidget::setText(const QString& text_) {
+void URLFieldWidget::setText(const TQString& text_) {
blockSignals(true);
m_requester->blockSignals(true);
@@ -80,10 +80,10 @@ void URLFieldWidget::clear() {
}
void URLFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_) {
- m_isRelative = newField_->property(QString::fromLatin1("relative")) == Latin1Literal("true");
+ m_isRelative = newField_->property(TQString::tqfromLatin1("relative")) == Latin1Literal("true");
}
-void URLFieldWidget::slotOpenURL(const QString& url_) {
+void URLFieldWidget::slotOpenURL(const TQString& url_) {
if(url_.isEmpty()) {
return;
}
@@ -91,7 +91,7 @@ void URLFieldWidget::slotOpenURL(const QString& url_) {
m_run = new KRun(KURL(Kernel::self()->URL(), url_));
}
-QWidget* URLFieldWidget::widget() {
+TQWidget* URLFieldWidget::widget() {
return m_requester;
}
diff --git a/src/gui/urlfieldwidget.h b/src/gui/urlfieldwidget.h
index 70e9505..15c8087 100644
--- a/src/gui/urlfieldwidget.h
+++ b/src/gui/urlfieldwidget.h
@@ -21,7 +21,7 @@ class KURLRequester;
#include <krun.h>
#include <kurlcompletion.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
namespace Tellico {
namespace GUI {
@@ -31,34 +31,35 @@ namespace Tellico {
*/
class URLFieldWidget : public FieldWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- URLFieldWidget(Data::FieldPtr field, QWidget* parent, const char* name=0);
+ URLFieldWidget(Data::FieldPtr field, TQWidget* tqparent, const char* name=0);
virtual ~URLFieldWidget();
- virtual QString text() const;
- virtual void setText(const QString& text);
+ virtual TQString text() const;
+ virtual void setText(const TQString& text);
public slots:
virtual void clear();
protected:
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual void updateFieldHook(Data::FieldPtr oldField, Data::FieldPtr newField);
protected slots:
- void slotOpenURL(const QString& url);
+ void slotOpenURL(const TQString& url);
private:
class URLCompletion : public KURLCompletion {
public:
URLCompletion() : KURLCompletion() {}
- virtual QString makeCompletion(const QString& text);
+ virtual TQString makeCompletion(const TQString& text);
};
KURLRequester* m_requester;
bool m_isRelative : 1;
- QGuardedPtr<KRun> m_run;
+ TQGuardedPtr<KRun> m_run;
};
} // end GUI namespace