summaryrefslogtreecommitdiffstats
path: root/kexi/main/kexifinddialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/main/kexifinddialog.cpp')
-rw-r--r--kexi/main/kexifinddialog.cpp112
1 files changed, 56 insertions, 56 deletions
diff --git a/kexi/main/kexifinddialog.cpp b/kexi/main/kexifinddialog.cpp
index 58f693c0..d7474958 100644
--- a/kexi/main/kexifinddialog.cpp
+++ b/kexi/main/kexifinddialog.cpp
@@ -29,11 +29,11 @@
#include <kaction.h>
#include <kiconloader.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qguardedptr.h>
-#include <qlayout.h>
-#include <qaccel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqguardedptr.h>
+#include <tqlayout.h>
+#include <tqaccel.h>
//! @internal
class KexiFindDialog::Private
@@ -48,60 +48,60 @@ class KexiFindDialog::Private
}
//! Connects action \a action with appropriate signal \a member
//! and optionally adds accel that will receive shortcut for \a action
- //! at global scope of the dialog \a parent.
- void setActionAndAccel(KAction *action, QWidget* parent, const char* member)
+ //! at global scope of the dialog \a tqparent.
+ void setActionAndAccel(KAction *action, TQWidget* tqparent, const char* member)
{
if (!action)
return;
- QObject::connect(parent, member, action, SLOT(activate()));
+ TQObject::connect(tqparent, member, action, TQT_SLOT(activate()));
if (action->shortcut().isNull())
return;
- QAccel *accel = new QAccel(parent); // we want to handle dialog-wide shortcut as well
+ TQAccel *accel = new TQAccel(tqparent); // we want to handle dialog-wide shortcut as well
accels.append( accel );
accel->connectItem(
- accel->insertItem( action->shortcut() ), parent, member );
+ accel->insertItem( action->shortcut() ), tqparent, member );
}
- QStringList lookInColumnNames;
- QStringList lookInColumnCaptions;
- QString objectName; //!< for caption
- QGuardedPtr<KAction> findnextAction;
- QGuardedPtr<KAction> findprevAction;
- QGuardedPtr<KAction> replaceAction;
- QGuardedPtr<KAction> replaceallAction;
- QPtrList<QAccel> accels;
+ TQStringList lookInColumnNames;
+ TQStringList lookInColumnCaptions;
+ TQString objectName; //!< for caption
+ TQGuardedPtr<KAction> findnextAction;
+ TQGuardedPtr<KAction> findprevAction;
+ TQGuardedPtr<KAction> replaceAction;
+ TQGuardedPtr<KAction> replaceallAction;
+ TQPtrList<TQAccel> accels;
bool replaceMode : 1;
};
//------------------------------------------
-KexiFindDialog::KexiFindDialog( QWidget* parent )
- : KexiFindDialogBase(parent, "KexiFindDialog", false/*!modal*/,
- Qt::WType_Dialog|Qt::WStyle_NormalBorder|Qt::WStyle_Title
- |Qt::WStyle_SysMenu|Qt::WStyle_Customize|Qt::WStyle_Tool)
+KexiFindDialog::KexiFindDialog( TQWidget* tqparent )
+ : KexiFindDialogBase(tqparent, "KexiFindDialog", false/*!modal*/,
+ TQt::WType_Dialog|TQt::WStyle_NormalBorder|TQt::WStyle_Title
+ |TQt::WStyle_SysMenu|TQt::WStyle_Customize|TQt::WStyle_Tool)
, d( new Private() )
{
m_search->setCurrentItem((int)KexiSearchAndReplaceViewInterface::Options::SearchDown);
- layout()->setMargin( KDialog::marginHint() );
- layout()->setSpacing( KDialog::spacingHint() );
+ tqlayout()->setMargin( KDialog::marginHint() );
+ tqlayout()->setSpacing( KDialog::spacingHint() );
KAction *a = KStdAction::findNext(0, 0, 0);
m_btnFind->setText(a->text());
m_btnFind->setIconSet(a->iconSet());
delete a;
m_btnClose->setText(KStdGuiItem::close().text());
m_btnClose->setIconSet(KStdGuiItem::close().iconSet());
- connect(m_btnFind, SIGNAL(clicked()), this, SIGNAL(findNext()));
- connect(m_btnClose, SIGNAL(clicked()), this, SLOT(slotCloseClicked()));
- connect(m_btnReplace, SIGNAL(clicked()), this, SIGNAL(replaceNext()));
- connect(m_btnReplaceAll, SIGNAL(clicked()), this, SIGNAL(replaceAll()));
+ connect(m_btnFind, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(findNext()));
+ connect(m_btnClose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCloseClicked()));
+ connect(m_btnReplace, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(replaceNext()));
+ connect(m_btnReplaceAll, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(replaceAll()));
// clear message after the text is changed
- connect(m_textToFind, SIGNAL(textChanged()), this, SIGNAL(updateMessage()));
- connect(m_textToReplace, SIGNAL(textChanged()), this, SIGNAL(updateMessage()));
+ connect(m_textToFind, TQT_SIGNAL(textChanged()), this, TQT_SIGNAL(updateMessage()));
+ connect(m_textToReplace, TQT_SIGNAL(textChanged()), this, TQT_SIGNAL(updateMessage()));
d->replaceMode = true; //to force updating by setReplaceMode()
setReplaceMode(false);
- setLookInColumnList(QStringList(), QStringList());
+ setLookInColumnList(TQStringList(), TQStringList());
}
KexiFindDialog::~KexiFindDialog()
@@ -110,51 +110,51 @@ KexiFindDialog::~KexiFindDialog()
}
void KexiFindDialog::setActions( KAction *findnext, KAction *findprev,
- KAction *replace, KAction *replaceall )
+ KAction *tqreplace, KAction *replaceall )
{
d->findnextAction = findnext;
d->findprevAction = findprev;
- d->replaceAction = replace;
+ d->replaceAction = tqreplace;
d->replaceallAction = replaceall;
d->accels.clear();
- d->setActionAndAccel(d->findnextAction, this, SIGNAL(findNext()));
- d->setActionAndAccel(d->findprevAction, this, SIGNAL(findPrevious()));
- d->setActionAndAccel(d->replaceAction, this, SIGNAL(replaceNext()));
- d->setActionAndAccel(d->replaceallAction, this, SIGNAL(replaceAll()));
+ d->setActionAndAccel(d->findnextAction, this, TQT_SIGNAL(findNext()));
+ d->setActionAndAccel(d->findprevAction, this, TQT_SIGNAL(findPrevious()));
+ d->setActionAndAccel(d->replaceAction, this, TQT_SIGNAL(replaceNext()));
+ d->setActionAndAccel(d->replaceallAction, this, TQT_SIGNAL(replaceAll()));
}
-QStringList KexiFindDialog::lookInColumnNames() const
+TQStringList KexiFindDialog::lookInColumnNames() const
{
return d->lookInColumnNames;
}
-QStringList KexiFindDialog::lookInColumnCaptions() const
+TQStringList KexiFindDialog::lookInColumnCaptions() const
{
return d->lookInColumnCaptions;
}
-QString KexiFindDialog::currentLookInColumnName() const
+TQString KexiFindDialog::currentLookInColumnName() const
{
int index = m_lookIn->currentItem();
if (index <= 0 || index >= (int)d->lookInColumnNames.count())
- return QString::null;
+ return TQString();
else if (index == 1)
return "(field)";
return d->lookInColumnNames[index - 1/*"(All fields)"*/ - 1/*"(Current field)"*/];
}
-QVariant KexiFindDialog::valueToFind() const
+TQVariant KexiFindDialog::valueToFind() const
{
return m_textToFind->currentText();
}
-QVariant KexiFindDialog::valueToReplaceWith() const
+TQVariant KexiFindDialog::valueToReplaceWith() const
{
return m_textToReplace->currentText();
}
-void KexiFindDialog::setLookInColumnList(const QStringList& columnNames,
- const QStringList& columnCaptions)
+void KexiFindDialog::setLookInColumnList(const TQStringList& columnNames,
+ const TQStringList& columnCaptions)
{
d->lookInColumnNames = columnNames;
d->lookInColumnCaptions = columnCaptions;
@@ -164,7 +164,7 @@ void KexiFindDialog::setLookInColumnList(const QStringList& columnNames,
m_lookIn->insertStringList(d->lookInColumnCaptions);
}
-void KexiFindDialog::setCurrentLookInColumnName(const QString& columnName)
+void KexiFindDialog::setCurrentLookInColumnName(const TQString& columnName)
{
int index;
if (columnName.isEmpty())
@@ -172,10 +172,10 @@ void KexiFindDialog::setCurrentLookInColumnName(const QString& columnName)
else if (columnName == "(field)")
index = 1;
else {
- index = d->lookInColumnNames.findIndex( columnName );
+ index = d->lookInColumnNames.tqfindIndex( columnName );
if (index == -1) {
- kdWarning() << QString("KexiFindDialog::setCurrentLookInColumn(%1) column name not found on the list")
- .arg(columnName) << endl;
+ kdWarning() << TQString("KexiFindDialog::setCurrentLookInColumn(%1) column name not found on the list")
+ .tqarg(columnName) << endl;
return;
}
index = index + 1/*"(All fields)"*/ + 1/*"(Current field)"*/;
@@ -207,20 +207,20 @@ void KexiFindDialog::setReplaceMode(bool set)
updateGeometry();
}
-void KexiFindDialog::setObjectNameForCaption(const QString& name)
+void KexiFindDialog::setObjectNameForCaption(const TQString& name)
{
d->objectName = name;
if (d->replaceMode) {
if (name.isEmpty())
setCaption(i18n("Replace"));
else
- setCaption(i18n("Replace in \"%1\"").arg(name));
+ setCaption(i18n("Replace in \"%1\"").tqarg(name));
}
else {
if (name.isEmpty())
setCaption(i18n("Find"));
else
- setCaption(i18n("Find in \"%1\"").arg(name));
+ setCaption(i18n("Find in \"%1\"").tqarg(name));
}
}
@@ -230,10 +230,10 @@ void KexiFindDialog::setButtonsEnabled(bool enable)
m_btnReplace->setEnabled(enable);
m_btnReplaceAll->setEnabled(enable);
if (!enable)
- setObjectNameForCaption(QString::null);
+ setObjectNameForCaption(TQString());
}
-void KexiFindDialog::setMessage(const QString& message)
+void KexiFindDialog::setMessage(const TQString& message)
{
m_messageLabel->setText(message);
}
@@ -241,7 +241,7 @@ void KexiFindDialog::setMessage(const QString& message)
void KexiFindDialog::updateMessage( bool found )
{
if (found)
- setMessage(QString::null);
+ setMessage(TQString());
else
setMessage(i18n("The search item was not found"));
}
@@ -254,7 +254,7 @@ void KexiFindDialog::slotCloseClicked()
void KexiFindDialog::show()
{
m_textToFind->setFocus();
- QDialog::show();
+ TQDialog::show();
}
KexiSearchAndReplaceViewInterface::Options KexiFindDialog::options() const