summaryrefslogtreecommitdiffstats
path: root/kexi/widget/kexidbconnectionwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/widget/kexidbconnectionwidget.cpp')
-rw-r--r--kexi/widget/kexidbconnectionwidget.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/kexi/widget/kexidbconnectionwidget.cpp b/kexi/widget/kexidbconnectionwidget.cpp
index 5b1b4538..a048e929 100644
--- a/kexi/widget/kexidbconnectionwidget.cpp
+++ b/kexi/widget/kexidbconnectionwidget.cpp
@@ -35,16 +35,16 @@
#include <ktextedit.h>
#include <kprogress.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qthread.h>
-#include <qradiobutton.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqthread.h>
+#include <tqradiobutton.h>
//! Templorary hides db list
//! @todo reenable this when implemented
@@ -65,13 +65,13 @@ class KexiDBConnectionWidget::Private
//---------
-KexiDBConnectionWidget::KexiDBConnectionWidget( QWidget* parent, const char* name )
- : KexiDBConnectionWidgetBase( parent, name )
+KexiDBConnectionWidget::KexiDBConnectionWidget( TQWidget* tqparent, const char* name )
+ : KexiDBConnectionWidgetBase( tqparent, name )
, d(new Private())
{
iconLabel->setPixmap(DesktopIcon("network"));
- QVBoxLayout *driversComboLyr = new QVBoxLayout(frmEngine);
+ TQVBoxLayout *driversComboLyr = new TQVBoxLayout(frmEngine);
m_driversCombo = new KexiDBDriverComboBox(frmEngine, Kexi::driverManager().driversInfo(),
KexiDBDriverComboBox::ShowServerDrivers);
lblEngine->setBuddy( m_driversCombo );
@@ -82,11 +82,11 @@ KexiDBConnectionWidget::KexiDBConnectionWidget( QWidget* parent, const char* na
btnLoadDBList->hide();
#endif
btnLoadDBList->setIconSet(SmallIconSet("reload"));
- QToolTip::add(btnLoadDBList, i18n("Load database list from the server"));
- QWhatsThis::add(btnLoadDBList,
+ TQToolTip::add(btnLoadDBList, i18n("Load database list from the server"));
+ TQWhatsThis::add(btnLoadDBList,
i18n("Loads database list from the server, so you can select one using the \"Name\" combo box."));
- QHBoxLayout *hbox = new QHBoxLayout(frmBottom);
+ TQHBoxLayout *hbox = new TQHBoxLayout(frmBottom);
hbox->addStretch(2);
d->btnSaveChanges = new KPushButton(KGuiItem(i18n("Save Changes"), "filesave",
i18n("Save all changes made to this connection information"),
@@ -94,21 +94,21 @@ KexiDBConnectionWidget::KexiDBConnectionWidget( QWidget* parent, const char* na
frmBottom, "savechanges");
hbox->addWidget( d->btnSaveChanges );
hbox->addSpacing( KDialogBase::spacingHint() );
- QWidget::setTabOrder(titleEdit, d->btnSaveChanges);
- d->btnSaveChanges->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQWidget::setTabOrder(titleEdit, d->btnSaveChanges);
+ d->btnSaveChanges->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
d->btnTestConnection = new KPushButton(KGuiItem(i18n("&Test Connection"), "",
i18n("Test database connection"),
i18n("Tests database connection. You can ensure that valid connection information is provided.")),
frmBottom, "testConnection");
hbox->addWidget( d->btnTestConnection );
- QWidget::setTabOrder(d->btnSaveChanges, d->btnTestConnection);
- d->btnTestConnection->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQWidget::setTabOrder(d->btnSaveChanges, d->btnTestConnection);
+ d->btnTestConnection->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
- connect( locationBGrp, SIGNAL(clicked(int)), this, SLOT(slotLocationBGrpClicked(int)) );
- connect( chkPortDefault, SIGNAL(toggled(bool)), this , SLOT(slotCBToggled(bool)) );
- connect( btnLoadDBList, SIGNAL(clicked()), this, SIGNAL(loadDBList()) );
- connect( d->btnSaveChanges, SIGNAL(clicked()), this, SIGNAL(saveChanges()) );
+ connect( locationBGrp, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotLocationBGrpClicked(int)) );
+ connect( chkPortDefault, TQT_SIGNAL(toggled(bool)), this , TQT_SLOT(slotCBToggled(bool)) );
+ connect( btnLoadDBList, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(loadDBList()) );
+ connect( d->btnSaveChanges, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(saveChanges()) );
}
KexiDBConnectionWidget::~KexiDBConnectionWidget()
@@ -120,7 +120,7 @@ bool KexiDBConnectionWidget::connectionOnly() const
{ return d->connectionOnly; }
void KexiDBConnectionWidget::setDataInternal(const KexiProjectData& data, bool connectionOnly,
- const QString& shortcutFileName)
+ const TQString& shortcutFileName)
{
m_data = data;
d->connectionOnly = connectionOnly;
@@ -166,7 +166,7 @@ void KexiDBConnectionWidget::setDataInternal(const KexiProjectData& data, bool c
// chkSavePassword->hide();
}
else {
- if (!QFileInfo(shortcutFileName).isWritable()) {
+ if (!TQFileInfo(shortcutFileName).isWritable()) {
d->btnSaveChanges->setEnabled(false);
}
}
@@ -175,12 +175,12 @@ void KexiDBConnectionWidget::setDataInternal(const KexiProjectData& data, bool c
adjustSize();
}
-void KexiDBConnectionWidget::setData(const KexiProjectData& data, const QString& shortcutFileName)
+void KexiDBConnectionWidget::setData(const KexiProjectData& data, const TQString& shortcutFileName)
{
setDataInternal(data, false /*!connectionOnly*/, shortcutFileName);
}
-void KexiDBConnectionWidget::setData(const KexiDB::ConnectionData& data, const QString& shortcutFileName)
+void KexiDBConnectionWidget::setData(const KexiDB::ConnectionData& data, const TQString& shortcutFileName)
{
KexiProjectData pdata(data);
setDataInternal(pdata, true /*connectionOnly*/, shortcutFileName);
@@ -221,30 +221,30 @@ void KexiDBConnectionWidget::slotCBToggled(bool on)
//-----------
-KexiDBConnectionTabWidget::KexiDBConnectionTabWidget( QWidget* parent, const char* name )
- : KTabWidget( parent, name )
+KexiDBConnectionTabWidget::KexiDBConnectionTabWidget( TQWidget* tqparent, const char* name )
+ : KTabWidget( tqparent, name )
{
mainWidget = new KexiDBConnectionWidget( this, "mainWidget" );
- mainWidget->layout()->setMargin(KDialog::marginHint());
+ mainWidget->tqlayout()->setMargin(KDialog::marginHint());
addTab( mainWidget, i18n("Parameters") );
-// QVBox *page2 = new QVBox(this);
+// TQVBox *page2 = new TQVBox(this);
// page2->setMargin(KDialog::marginHint());
// page2->setSpacing(KDialog::spacingHint());
-// QLabel *lbl = new QLabel(i18n("&Description:"), page2);
+// TQLabel *lbl = new TQLabel(i18n("&Description:"), page2);
// m_descriptionEdit = new KTextEdit(page2);
// lbl->setBuddy(m_descriptionEdit);
detailsWidget = new KexiDBConnectionWidgetDetailsBase(this, "detailsWidget");
addTab( detailsWidget, i18n("Details") );
- connect( mainWidget->testConnectionButton(), SIGNAL(clicked()), this, SLOT(slotTestConnection()) );
+ connect( mainWidget->testConnectionButton(), TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTestConnection()) );
}
KexiDBConnectionTabWidget::~KexiDBConnectionTabWidget()
{
}
-void KexiDBConnectionTabWidget::setData(const KexiProjectData& data, const QString& shortcutFileName)
+void KexiDBConnectionTabWidget::setData(const KexiProjectData& data, const TQString& shortcutFileName)
{
mainWidget->setData( data, shortcutFileName );
detailsWidget->chkUseSocket->setChecked( data.constConnectionData()->useLocalSocketFile );
@@ -256,7 +256,7 @@ void KexiDBConnectionTabWidget::setData(const KexiProjectData& data, const QStri
}
void KexiDBConnectionTabWidget::setData(const KexiDB::ConnectionData& data,
- const QString& shortcutFileName)
+ const TQString& shortcutFileName)
{
mainWidget->setData( data, shortcutFileName );
detailsWidget->chkUseSocket->setChecked( data.useLocalSocketFile );
@@ -277,23 +277,23 @@ KexiProjectData KexiDBConnectionTabWidget::currentProjectData()
// if (d->isDatabaseShortcut) {
if (mainWidget->connectionOnly()) {
data.connectionData()->caption = mainWidget->titleEdit->text();
- data.setCaption( QString::null );
+ data.setCaption( TQString() );
data.connectionData()->description = detailsWidget->descriptionEdit->text();
- data.setDatabaseName( QString::null );
+ data.setDatabaseName( TQString() );
}
else {
- data.connectionData()->caption = QString::null; /* connection name is not specified... */
+ data.connectionData()->caption = TQString(); /* connection name is not specified... */
data.setCaption( mainWidget->titleEdit->text() );
data.setDescription( detailsWidget->descriptionEdit->text() );
data.setDatabaseName( mainWidget->nameCombo->currentText() );
}
// }
/* else {
- data.setCaption( QString::null );
+ data.setCaption( TQString() );
data.connectionData()->connName = config.readEntry("caption");
- data.setDescription( QString::null );
+ data.setDescription( TQString() );
data.connectionData()->description = config.readEntry("comment");
- data.setDatabaseName( QString::null );
+ data.setDatabaseName( TQString() );
}*/
data.connectionData()->driverName = mainWidget->driversCombo()->selectedDriverName();
@@ -303,11 +303,11 @@ KexiProjectData KexiDBConnectionTabWidget::currentProjectData()
}*/
data.connectionData()->hostName =
(mainWidget->remotehostRBtn->isChecked()/*remote*/) ? mainWidget->hostEdit->text()
- : QString::null;
+ : TQString();
data.connectionData()->port = mainWidget->chkPortDefault->isChecked()
? 0 : mainWidget->customPortEdit->value();
data.connectionData()->localSocketFileName = detailsWidget->chkSocketDefault->isChecked()
- ? QString::null : detailsWidget->customSocketEdit->url();
+ ? TQString() : detailsWidget->customSocketEdit->url();
data.connectionData()->useLocalSocketFile = detailsWidget->chkUseSocket->isChecked();
//UNSAFE!!!!
data.connectionData()->userName = mainWidget->userEdit->text();
@@ -337,7 +337,7 @@ void KexiDBConnectionTabWidget::slotTestConnection()
//! @todo set proper help ctxt ID
KexiDBConnectionDialog::KexiDBConnectionDialog(const KexiProjectData& data,
- const QString& shortcutFileName, const KGuiItem& acceptButtonGuiItem)
+ const TQString& shortcutFileName, const KGuiItem& acceptButtonGuiItem)
: KDialogBase(0, "dlg", true, i18n("Open Database"),
KDialogBase::User1|KDialogBase::Cancel|KDialogBase::Help,
KDialogBase::User1, false,
@@ -352,7 +352,7 @@ KexiDBConnectionDialog::KexiDBConnectionDialog(const KexiProjectData& data,
}
KexiDBConnectionDialog::KexiDBConnectionDialog(const KexiDB::ConnectionData& data,
- const QString& shortcutFileName, const KGuiItem& acceptButtonGuiItem)
+ const TQString& shortcutFileName, const KGuiItem& acceptButtonGuiItem)
: KDialogBase(0, "dlg", true, i18n("Connect to a Database Server"),
KDialogBase::User1|KDialogBase::Cancel|KDialogBase::Help,
KDialogBase::User1, false,
@@ -372,10 +372,10 @@ KexiDBConnectionDialog::~KexiDBConnectionDialog()
void KexiDBConnectionDialog::init()
{
- connect( this, SIGNAL(user1Clicked()), this, SLOT(accept()));
+ connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(accept()));
setMainWidget(tabWidget);
- connect(tabWidget->mainWidget, SIGNAL(saveChanges()), this, SIGNAL(saveChanges()));
- connect(tabWidget, SIGNAL(testConnection()), this, SIGNAL(testConnection()));
+ connect(tabWidget->mainWidget, TQT_SIGNAL(saveChanges()), this, TQT_SIGNAL(saveChanges()));
+ connect(tabWidget, TQT_SIGNAL(testConnection()), this, TQT_SIGNAL(testConnection()));
adjustSize();
resize(width(), tabWidget->height());