summaryrefslogtreecommitdiffstats
path: root/kexi/main/startup
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/main/startup
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/main/startup')
-rw-r--r--kexi/main/startup/KexiConnSelector.cpp148
-rw-r--r--kexi/main/startup/KexiConnSelector.h21
-rw-r--r--kexi/main/startup/KexiConnSelectorBase.ui34
-rw-r--r--kexi/main/startup/KexiDBTitlePage.cpp6
-rw-r--r--kexi/main/startup/KexiDBTitlePage.h5
-rw-r--r--kexi/main/startup/KexiDBTitlePageBase.ui12
-rw-r--r--kexi/main/startup/KexiNewPrjTypeSelector.ui10
-rw-r--r--kexi/main/startup/KexiNewProjectWizard.cpp112
-rw-r--r--kexi/main/startup/KexiNewProjectWizard.h21
-rw-r--r--kexi/main/startup/KexiOpenExistingFile.ui28
-rw-r--r--kexi/main/startup/KexiProjectSelector.cpp58
-rw-r--r--kexi/main/startup/KexiProjectSelector.h12
-rw-r--r--kexi/main/startup/KexiProjectSelectorBase.ui12
-rw-r--r--kexi/main/startup/KexiServerDBNamePage.ui24
-rw-r--r--kexi/main/startup/KexiStartup.cpp216
-rw-r--r--kexi/main/startup/KexiStartup.h26
-rw-r--r--kexi/main/startup/KexiStartupDialog.cpp190
-rw-r--r--kexi/main/startup/KexiStartupDialog.h29
-rw-r--r--kexi/main/startup/KexiStartupDialogTemplatesPage.cpp56
-rw-r--r--kexi/main/startup/KexiStartupDialogTemplatesPage.h17
-rw-r--r--kexi/main/startup/KexiStartupFileDialog.cpp156
-rw-r--r--kexi/main/startup/KexiStartupFileDialog.h33
-rw-r--r--kexi/main/startup/KexiStartupFileDialogBase_win.h36
-rw-r--r--kexi/main/startup/KexiStartupFileDialog_win.cpp222
-rw-r--r--kexi/main/startup/KexiStartup_p.cpp32
-rw-r--r--kexi/main/startup/KexiStartup_p.h11
26 files changed, 769 insertions, 758 deletions
diff --git a/kexi/main/startup/KexiConnSelector.cpp b/kexi/main/startup/KexiConnSelector.cpp
index 454f1e08..a6c4d160 100644
--- a/kexi/main/startup/KexiConnSelector.cpp
+++ b/kexi/main/startup/KexiConnSelector.cpp
@@ -40,19 +40,19 @@
#include <ktoolbarbutton.h>
#include <kactionclasses.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qtextedit.h>
-#include <qgroupbox.h>
-#include <qwidgetstack.h>
-#include <qbuttongroup.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqtextedit.h>
+#include <tqgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqbuttongroup.h>
ConnectionDataLVItem::ConnectionDataLVItem(KexiDB::ConnectionData *data,
- const KexiDB::Driver::Info& info, QListView *list)
- : QListViewItem(list)
+ const KexiDB::Driver::Info& info, TQListView *list)
+ : TQListViewItem(list)
, m_data(data)
{
update(info);
@@ -65,13 +65,13 @@ ConnectionDataLVItem::~ConnectionDataLVItem()
void ConnectionDataLVItem::update(const KexiDB::Driver::Info& info)
{
setText(0, m_data->caption+" ");
- const QString &sfile = i18n("File");
- QString drvname = info.caption.isEmpty() ? m_data->driverName : info.caption;
+ const TQString &sfile = i18n("File");
+ TQString drvname = info.caption.isEmpty() ? m_data->driverName : info.caption;
if (info.fileBased)
setText(1, sfile + " ("+drvname+") " );
else
setText(1, drvname+" " );
- setText(2, (info.fileBased ? (QString("<")+sfile.lower()+">") : m_data->serverInfoString(true))+" " );
+ setText(2, (info.fileBased ? (TQString("<")+sfile.lower()+">") : m_data->serverInfoString(true))+" " );
}
/*================================================================*/
@@ -87,11 +87,11 @@ public:
{
}
- QWidget* openExistingWidget;
+ TQWidget* openExistingWidget;
KexiPrjTypeSelector* prjTypeSelector;
- QString startDirOrVariable;
- QWidgetStack *stack;
- QGuardedPtr<KexiDBConnectionSet> conn_set;
+ TQString startDirOrVariable;
+ TQWidgetStack *stack;
+ TQGuardedPtr<KexiDBConnectionSet> conn_set;
KexiDB::DriverManager manager;
bool conn_sel_shown;//! helper
bool file_sel_shown;
@@ -101,34 +101,34 @@ public:
/*================================================================*/
KexiConnSelectorWidget::KexiConnSelectorWidget( KexiDBConnectionSet& conn_set,
- const QString& startDirOrVariable, QWidget* parent, const char* name )
- : QWidget( parent, name )
+ const TQString& startDirOrVariable, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
,d(new KexiConnSelectorWidgetPrivate())
{
d->conn_set = &conn_set;
d->startDirOrVariable = startDirOrVariable;
- QString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
- const QPixmap &icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
+ TQString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
+ const TQPixmap &icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
setIcon( icon );
- QVBoxLayout* globalLyr = new QVBoxLayout( this );
+ TQVBoxLayout* globalLyr = new TQVBoxLayout( this );
//create header with radio buttons
- d->openExistingWidget = new QWidget(this, "openExistingWidget");
- QVBoxLayout* openExistingWidgetLyr = new QVBoxLayout( d->openExistingWidget );
-// QLabel* lbl = new QLabel(i18n("<b>Select existing Kexi project to open:</b>"), openExistingWidget);
+ d->openExistingWidget = new TQWidget(this, "openExistingWidget");
+ TQVBoxLayout* openExistingWidgetLyr = new TQVBoxLayout( d->openExistingWidget );
+// TQLabel* lbl = new TQLabel(i18n("<b>Select existing Kexi project to open:</b>"), openExistingWidget);
// openExistingWidgetLyr->addWidget( lbl );
d->prjTypeSelector = new KexiPrjTypeSelector( d->openExistingWidget );
- connect(d->prjTypeSelector->buttonGroup,SIGNAL(clicked(int)),this,SLOT(slotPrjTypeSelected(int)));
+ connect(d->prjTypeSelector->buttonGroup,TQT_SIGNAL(clicked(int)),this,TQT_SLOT(slotPrjTypeSelected(int)));
openExistingWidgetLyr->addWidget( d->prjTypeSelector );
openExistingWidgetLyr->addSpacing( KDialogBase::spacingHint() );
- QFrame* line = new QFrame( d->openExistingWidget, "line" );
- line->setFrameShape( QFrame::HLine );
- line->setFrameShadow( QFrame::Sunken );
+ TQFrame* line = new TQFrame( d->openExistingWidget, "line" );
+ line->setFrameShape( TQFrame::HLine );
+ line->setFrameShadow( TQFrame::Sunken );
openExistingWidgetLyr->addWidget( line );
globalLyr->addWidget(d->openExistingWidget);
- d->stack = new QWidgetStack(this, "stack");
+ d->stack = new TQWidgetStack(this, "stack");
globalLyr->addWidget(d->stack);
// m_file = new KexiOpenExistingFile( this, "KexiOpenExistingFile");
@@ -136,28 +136,28 @@ KexiConnSelectorWidget::KexiConnSelectorWidget( KexiDBConnectionSet& conn_set,
m_fileDlg = 0;
// addWidget(m_file);
-// connect(m_file->btn_advanced,SIGNAL(clicked()),this,SLOT(showAdvancedConn()));
+// connect(m_file->btn_advanced,TQT_SIGNAL(clicked()),this,TQT_SLOT(showAdvancedConn()));
m_remote = new KexiConnSelectorBase(d->stack, "conn_sel");
m_remote->icon->setPixmap( DesktopIcon("network") );
m_remote->icon->setFixedSize( m_remote->icon->pixmap()->size() );
// m_remote->btn_back->setIconSet( SmallIconSet("1uparrow") );
- connect(m_remote->btn_add, SIGNAL(clicked()), this, SLOT(slotRemoteAddBtnClicked()));
- connect(m_remote->btn_edit, SIGNAL(clicked()), this, SLOT(slotRemoteEditBtnClicked()));
- connect(m_remote->btn_remove, SIGNAL(clicked()), this, SLOT(slotRemoteRemoveBtnClicked()));
- QToolTip::add(m_remote->btn_add, i18n("Add a new database connection"));
- QToolTip::add(m_remote->btn_edit, i18n("Edit selected database connection"));
- QToolTip::add(m_remote->btn_remove, i18n("Remove selected database connections"));
+ connect(m_remote->btn_add, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoteAddBtnClicked()));
+ connect(m_remote->btn_edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoteEditBtnClicked()));
+ connect(m_remote->btn_remove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoteRemoveBtnClicked()));
+ TQToolTip::add(m_remote->btn_add, i18n("Add a new database connection"));
+ TQToolTip::add(m_remote->btn_edit, i18n("Edit selected database connection"));
+ TQToolTip::add(m_remote->btn_remove, i18n("Remove selected database connections"));
d->stack->addWidget(m_remote);
- if (m_remote->layout())
- m_remote->layout()->setMargin(0);
-// connect(m_remote->btn_back,SIGNAL(clicked()),this,SLOT(showSimpleConn()));
- connect(m_remote->list,SIGNAL(doubleClicked(QListViewItem*)),
- this,SLOT(slotConnectionItemExecuted(QListViewItem*)));
- connect(m_remote->list,SIGNAL(returnPressed(QListViewItem*)),
- this,SLOT(slotConnectionItemExecuted(QListViewItem*)));
- connect(m_remote->list,SIGNAL(selectionChanged()),
- this,SLOT(slotConnectionSelectionChanged()));
+ if (m_remote->tqlayout())
+ m_remote->tqlayout()->setMargin(0);
+// connect(m_remote->btn_back,TQT_SIGNAL(clicked()),this,TQT_SLOT(showSimpleConn()));
+ connect(m_remote->list,TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this,TQT_SLOT(slotConnectionItemExecuted(TQListViewItem*)));
+ connect(m_remote->list,TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this,TQT_SLOT(slotConnectionItemExecuted(TQListViewItem*)));
+ connect(m_remote->list,TQT_SIGNAL(selectionChanged()),
+ this,TQT_SLOT(slotConnectionSelectionChanged()));
}
KexiConnSelectorWidget::~KexiConnSelectorWidget()
@@ -167,7 +167,7 @@ KexiConnSelectorWidget::~KexiConnSelectorWidget()
/*void KexiConnSelectorWidget::disconnectShowSimpleConnButton()
{
- m_remote->btn_back->disconnect(this,SLOT(showSimpleConn()));
+ m_remote->btn_back->disconnect(this,TQT_SLOT(showSimpleConn()));
}*/
void KexiConnSelectorWidget::showAdvancedConn()
@@ -197,8 +197,8 @@ void KexiConnSelectorWidget::slotPrjTypeSelected(int id)
if (m_remote->list->firstChild()) {
m_remote->list->setSelected(m_remote->list->firstChild(),true);
}
- m_remote->descriptionEdit->setPaletteBackgroundColor(palette().active().background());
- m_remote->descGroupBox->layout()->setMargin(2);
+ m_remote->descriptionEdit->setPaletteBackgroundColor(tqpalette().active().background());
+ m_remote->descGroupBox->tqlayout()->setMargin(2);
m_remote->list->setFocus();
slotConnectionSelectionChanged();
}
@@ -222,15 +222,15 @@ void KexiConnSelectorWidget::showSimpleConn()
m_fileDlg = new KexiStartupFileDialog( d->startDirOrVariable, KexiStartupFileDialog::Opening,
d->stack, "openExistingFileDlg");
m_fileDlg->setConfirmOverwrites( d->confirmOverwrites );
-// static_cast<QVBoxLayout*>(m_file->layout())->insertWidget( 2, m_fileDlg );
+// static_cast<TQVBoxLayout*>(m_file->tqlayout())->insertWidget( 2, m_fileDlg );
d->stack->addWidget(m_fileDlg);
- for (QWidget *w = parentWidget(true);w;w=w->parentWidget(true)) {
+ for (TQWidget *w = tqparentWidget(true);w;w=w->tqparentWidget(true)) {
if (w->isDialog()) {
-//#ifndef Q_WS_WIN
- connect(m_fileDlg,SIGNAL(rejected()),static_cast<QDialog*>(w),SLOT(reject()));
+//#ifndef TQ_WS_WIN
+ connect(m_fileDlg,TQT_SIGNAL(rejected()),static_cast<TQDialog*>(w),TQT_SLOT(reject()));
//#endif
-// connect(m_fileDlg,SIGNAL(cancelled()),static_cast<QDialog*>(w),SLOT(reject()));
+// connect(m_fileDlg,TQT_SIGNAL(cancelled()),static_cast<TQDialog*>(w),TQT_SLOT(reject()));
break;
}
}
@@ -248,7 +248,7 @@ int KexiConnSelectorWidget::selectedConnectionType() const
if (selectedConnectionType()!=KexiConnSelectorWidget::ServerBased)
return 0;
ConnectionDataLVItem *item = 0; // = static_cast<ConnectionDataLVItem*>(m_remote->list->selectedItem());
- for (QListViewItemIterator it(m_remote->list); it.current(); ++it) {
+ for (TQListViewItemIterator it(m_remote->list); it.current(); ++it) {
if (it.current()->isSelected()) {
if (item)
return 0; //multiple
@@ -266,21 +266,21 @@ KexiDB::ConnectionData* KexiConnSelectorWidget::selectedConnectionData() const
return item->data();
}
-QString KexiConnSelectorWidget::selectedFileName()
+TQString KexiConnSelectorWidget::selectedFileName()
{
if (selectedConnectionType()!=KexiConnSelectorWidget::FileBased)
- return QString::null;
+ return TQString();
return m_fileDlg->currentFileName();
}
-void KexiConnSelectorWidget::setSelectedFileName(const QString& fileName)
+void KexiConnSelectorWidget::setSelectedFileName(const TQString& fileName)
{
if (selectedConnectionType()!=KexiConnSelectorWidget::FileBased)
return;
return m_fileDlg->setSelection(fileName);
}
-void KexiConnSelectorWidget::slotConnectionItemExecuted(QListViewItem *item)
+void KexiConnSelectorWidget::slotConnectionItemExecuted(TQListViewItem *item)
{
emit connectionItemExecuted(static_cast<ConnectionDataLVItem*>(item));
}
@@ -291,7 +291,7 @@ void KexiConnSelectorWidget::slotConnectionSelectionChanged()
//update buttons availability
/* ConnectionDataLVItem *singleItem = 0;
bool multi = false;
- for (QListViewItemIterator it(m_remote->list); it.current(); ++it) {
+ for (TQListViewItemIterator it(m_remote->list); it.current(); ++it) {
if (it.current()->isSelected()) {
if (singleItem) {
singleItem = 0;
@@ -304,18 +304,18 @@ void KexiConnSelectorWidget::slotConnectionSelectionChanged()
}*/
m_remote->btn_edit->setEnabled(item);
m_remote->btn_remove->setEnabled(item);
- m_remote->descriptionEdit->setText(item ? item->data()->description : QString::null);
+ m_remote->descriptionEdit->setText(item ? item->data()->description : TQString());
emit connectionItemHighlighted(item);
}
-QListView* KexiConnSelectorWidget::connectionsList() const
+TQListView* KexiConnSelectorWidget::connectionsList() const
{
return m_remote->list;
}
void KexiConnSelectorWidget::setFocus()
{
- QWidget::setFocus();
+ TQWidget::setFocus();
if (d->stack->visibleWidget()==m_fileDlg)
m_fileDlg->setFocus(); //m_fileDlg->locationWidget()->setFocus();
else
@@ -348,20 +348,20 @@ bool KexiConnSelectorWidget::confirmOverwrites() const
return d->confirmOverwrites;
}
-/*static QString msgUnfinished() {
+/*static TQString msgUnfinished() {
return i18n("To define or change a connection, use command line options or click on .kexis file. "
- "You can find example .kexis file at <a href=\"%1\">here</a>.").arg("") //temporary, please do not change for 0.8!
+ "You can find example .kexis file at <a href=\"%1\">here</a>.").tqarg("") //temporary, please do not change for 0.8!
+ "\nhttp://www.kexi-project.org/resources/testdb.kexis"; */
-// .arg("http://websvn.kde.org/*checkout*/branches/kexi/0.9/koffice/kexi/tests/startup/testdb.kexis");
+// .tqarg("http://websvn.kde.org/*checkout*/branches/kexi/0.9/koffice/kexi/tests/startup/testdb.kexis");
//}
void KexiConnSelectorWidget::slotRemoteAddBtnClicked()
{
KexiDB::ConnectionData data;
- KexiDBConnectionDialog dlg(data, QString::null,
+ KexiDBConnectionDialog dlg(data, TQString(),
KGuiItem(i18n("&Add"), "button_ok", i18n("Add database connection")) );
dlg.setCaption(i18n("Add New Database Connection"));
- if (QDialog::Accepted!=dlg.exec())
+ if (TQDialog::Accepted!=dlg.exec())
return;
//store this conn. data
@@ -383,10 +383,10 @@ void KexiConnSelectorWidget::slotRemoteEditBtnClicked()
ConnectionDataLVItem* item = static_cast<ConnectionDataLVItem*>(m_remote->list->selectedItem());
if (!item)
return;
- KexiDBConnectionDialog dlg(*item->data(), QString::null,
+ KexiDBConnectionDialog dlg(*item->data(), TQString(),
KGuiItem(i18n("&Save"), "filesave", i18n("Save changes made to this database connection")) );
dlg.setCaption(i18n("Edit Database Connection"));
- if (QDialog::Accepted!=dlg.exec())
+ if (TQDialog::Accepted!=dlg.exec())
return;
KexiDB::ConnectionData *newData = new KexiDB::ConnectionData( *dlg.currentProjectData().connectionData() );
@@ -407,11 +407,11 @@ void KexiConnSelectorWidget::slotRemoteRemoveBtnClicked()
return;
if (KMessageBox::Continue!=KMessageBox::warningContinueCancel(0,
i18n("Do you want to remove database connection \"%1\" from the list of available connections?")
- .arg(item->data()->serverInfoString(true)), QString::null, KStdGuiItem::del(), QString::null,
+ .tqarg(item->data()->serverInfoString(true)), TQString(), KStdGuiItem::del(), TQString(),
KMessageBox::Notify|KMessageBox::Dangerous))
return;
- QListViewItem* nextItem = item->itemBelow();
+ TQListViewItem* nextItem = item->itemBelow();
if (!nextItem)
nextItem = item->itemAbove();
if (!d->conn_set->removeConnectionData(item->data()))
@@ -426,7 +426,7 @@ void KexiConnSelectorWidget::slotRemoteRemoveBtnClicked()
void KexiConnSelectorWidget::hideConnectonIcon()
{
m_remote->icon->setFixedWidth(0);
- m_remote->icon->setPixmap(QPixmap());
+ m_remote->icon->setPixmap(TQPixmap());
}
#include "KexiConnSelector.moc"
diff --git a/kexi/main/startup/KexiConnSelector.h b/kexi/main/startup/KexiConnSelector.h
index a52dd8ae..2f4a9fe9 100644
--- a/kexi/main/startup/KexiConnSelector.h
+++ b/kexi/main/startup/KexiConnSelector.h
@@ -27,16 +27,16 @@
#include <kdialogbase.h>
#include <klistview.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KexiConnSelectorBase;
//! helper class
-class ConnectionDataLVItem : public QListViewItem
+class ConnectionDataLVItem : public TQListViewItem
{
public:
ConnectionDataLVItem(KexiDB::ConnectionData *data,
- const KexiDB::Driver::Info& info, QListView *list);
+ const KexiDB::Driver::Info& info, TQListView *list);
~ConnectionDataLVItem();
void update(const KexiDB::Driver::Info& info);
@@ -52,9 +52,10 @@ class KexiConnSelectorWidgetPrivate;
/*! Widget that allows to select a database connection (without choosing database itself)
*/
-class KEXIMAIN_EXPORT KexiConnSelectorWidget : public QWidget
+class KEXIMAIN_EXPORT KexiConnSelectorWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ConnType { FileBased=1, ServerBased=2 };
@@ -65,8 +66,8 @@ class KEXIMAIN_EXPORT KexiConnSelectorWidget : public QWidget
(it can also contain a configuration variable name with ":" prefix as described
in KRecentDirs documentation). */
KexiConnSelectorWidget( KexiDBConnectionSet& conn_set,
- const QString& startDirOrVariable,
- QWidget* parent = 0, const char* name = 0 );
+ const TQString& startDirOrVariable,
+ TQWidget* tqparent = 0, const char* name = 0 );
virtual ~KexiConnSelectorWidget();
@@ -86,16 +87,16 @@ class KEXIMAIN_EXPORT KexiConnSelectorWidget : public QWidget
has been selected.
@see selectedConnectionType()
*/
- QString selectedFileName();
+ TQString selectedFileName();
/*! Sets selected filename to \a fileName.
Only works when selectedConnectionType()==FileBased. */
- void setSelectedFileName(const QString& fileName);
+ void setSelectedFileName(const TQString& fileName);
// //! Usable when we want to do other things for "back" button
// void disconnectShowSimpleConnButton();
- QListView* connectionsList() const;
+ TQListView* connectionsList() const;
KexiConnSelectorBase *m_remote;
// KexiOpenExistingFile *m_file;
@@ -125,7 +126,7 @@ class KEXIMAIN_EXPORT KexiConnSelectorWidget : public QWidget
void hideConnectonIcon();
protected slots:
- void slotConnectionItemExecuted(QListViewItem *item);
+ void slotConnectionItemExecuted(TQListViewItem *item);
void slotRemoteAddBtnClicked();
void slotRemoteEditBtnClicked();
void slotRemoteRemoveBtnClicked();
diff --git a/kexi/main/startup/KexiConnSelectorBase.ui b/kexi/main/startup/KexiConnSelectorBase.ui
index dde800f3..908404c0 100644
--- a/kexi/main/startup/KexiConnSelectorBase.ui
+++ b/kexi/main/startup/KexiConnSelectorBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiConnSelectorBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiConnSelectorBase</cstring>
</property>
@@ -27,7 +27,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QListView" row="1" column="0" rowspan="1" colspan="6">
+ <widget class="TQListView" row="1" column="0" rowspan="1" colspan="6">
<column>
<property name="text">
<string>Name</string>
@@ -72,7 +72,7 @@
<verstretch>1</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>60</height>
@@ -91,7 +91,7 @@
<enum>LastColumn</enum>
</property>
</widget>
- <widget class="QPushButton" row="2" column="4">
+ <widget class="TQPushButton" row="2" column="4">
<property name="name">
<cstring>btn_edit</cstring>
</property>
@@ -107,7 +107,7 @@
<string>&amp;Edit...</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="3">
+ <widget class="TQPushButton" row="2" column="3">
<property name="name">
<cstring>btn_add</cstring>
</property>
@@ -123,7 +123,7 @@
<string>&amp;Add...</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="5">
+ <widget class="TQPushButton" row="2" column="5">
<property name="name">
<cstring>btn_remove</cstring>
</property>
@@ -149,7 +149,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -166,18 +166,18 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>41</height>
</size>
</property>
</spacer>
- <widget class="QGroupBox" row="2" column="0" rowspan="2" colspan="2">
+ <widget class="TQGroupBox" row="2" column="0" rowspan="2" colspan="2">
<property name="name">
<cstring>descGroupBox</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>80</height>
@@ -193,7 +193,7 @@
<property name="margin">
<number>2</number>
</property>
- <widget class="QTextEdit">
+ <widget class="TQTextEdit">
<property name="name">
<cstring>descriptionEdit</cstring>
</property>
@@ -205,7 +205,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>50</height>
@@ -229,7 +229,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLabel" row="0" column="1" rowspan="1" colspan="5">
+ <widget class="TQLabel" row="0" column="1" rowspan="1" colspan="5">
<property name="name">
<cstring>label</cstring>
</property>
@@ -246,14 +246,14 @@
&lt;p&gt;You will see existing Kexi projects available for the selected connection. Here you may also add, edit or remove connections from the list.
</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
<property name="buddy" stdset="0">
<cstring>list</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>icon</cstring>
</property>
@@ -268,7 +268,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop</set>
</property>
</widget>
@@ -281,5 +281,5 @@
<tabstop>btn_remove</tabstop>
<tabstop>descriptionEdit</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/main/startup/KexiDBTitlePage.cpp b/kexi/main/startup/KexiDBTitlePage.cpp
index 3b048793..4d686039 100644
--- a/kexi/main/startup/KexiDBTitlePage.cpp
+++ b/kexi/main/startup/KexiDBTitlePage.cpp
@@ -19,10 +19,10 @@
#include "KexiDBTitlePage.h"
-#include <qlabel.h>
+#include <tqlabel.h>
-KexiDBTitlePage::KexiDBTitlePage( const QString& labelText, QWidget* parent, const char* name )
- : KexiDBTitlePageBase( parent, name )
+KexiDBTitlePage::KexiDBTitlePage( const TQString& labelText, TQWidget* tqparent, const char* name )
+ : KexiDBTitlePageBase( tqparent, name )
{
if (!labelText.isEmpty())
label->setText(labelText);
diff --git a/kexi/main/startup/KexiDBTitlePage.h b/kexi/main/startup/KexiDBTitlePage.h
index 98341946..15030c7b 100644
--- a/kexi/main/startup/KexiDBTitlePage.h
+++ b/kexi/main/startup/KexiDBTitlePage.h
@@ -22,15 +22,16 @@
#include "KexiDBTitlePageBase.h"
-//! @short A helper widget used to displaying a line edit with a label and layout
+//! @short A helper widget used to displaying a line edit with a label and tqlayout
class KEXIMAIN_EXPORT KexiDBTitlePage : public KexiDBTitlePageBase
{
Q_OBJECT
+ TQ_OBJECT
public:
//! Constructs title page. \a labelText can be provided to change default
//! "Project caption:" label.
- KexiDBTitlePage( const QString& labelText, QWidget* parent = 0, const char* name = 0 );
+ KexiDBTitlePage( const TQString& labelText, TQWidget* tqparent = 0, const char* name = 0 );
~KexiDBTitlePage();
protected slots:
diff --git a/kexi/main/startup/KexiDBTitlePageBase.ui b/kexi/main/startup/KexiDBTitlePageBase.ui
index 991bc73f..1770a6dd 100644
--- a/kexi/main/startup/KexiDBTitlePageBase.ui
+++ b/kexi/main/startup/KexiDBTitlePageBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiDBTitlePageBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiDBTitlePageBase</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>label</cstring>
</property>
@@ -40,7 +40,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>111</height>
@@ -57,7 +57,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -76,7 +76,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
@@ -87,7 +87,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
</includehints>
diff --git a/kexi/main/startup/KexiNewPrjTypeSelector.ui b/kexi/main/startup/KexiNewPrjTypeSelector.ui
index 30adfb06..16226307 100644
--- a/kexi/main/startup/KexiNewPrjTypeSelector.ui
+++ b/kexi/main/startup/KexiNewPrjTypeSelector.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiNewPrjTypeSelector</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiNewPrjTypeSelector</cstring>
</property>
@@ -29,7 +29,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -58,7 +58,7 @@
<enum>LastColumn</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>lbl</cstring>
</property>
@@ -74,7 +74,7 @@
<string>Kexi will create a new database project. Select a storage method which will be used to store the new project.
</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
@@ -87,7 +87,7 @@
<functions>
<function access="private" specifier="non virtual">init()</function>
</functions>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/kexi/main/startup/KexiNewProjectWizard.cpp b/kexi/main/startup/KexiNewProjectWizard.cpp
index 15102864..9e897e8f 100644
--- a/kexi/main/startup/KexiNewProjectWizard.cpp
+++ b/kexi/main/startup/KexiNewProjectWizard.cpp
@@ -43,12 +43,12 @@
#include <kmessagebox.h>
#include <klineedit.h>
-#include <qobjectlist.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qheader.h>
+#include <tqobjectlist.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqheader.h>
//! @internal
class KexiNewProjectWizardPrivate
@@ -69,12 +69,12 @@ class KexiNewProjectWizardPrivate
}
// KListView *lv_types;
KListViewItem *lvi_file, *lvi_server;
- QString chk_file_txt, chk_server_txt; //!< helper
+ TQString chk_file_txt, chk_server_txt; //!< helper
- QString server_db_name_dblist_lbl_txt; //!< helper
+ TQString server_db_name_dblist_lbl_txt; //!< helper
//for displaying db list of the selected conn.
- QGuardedPtr<KexiDB::ConnectionData> conndata_to_show;
+ TQGuardedPtr<KexiDB::ConnectionData> conndata_to_show;
KexiProjectSet *project_set_to_show;
KexiGUIMessageHandler* msgHandler;
@@ -84,8 +84,8 @@ class KexiNewProjectWizardPrivate
};
KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set,
- QWidget *parent, const char *name, bool modal, WFlags f)
-: KWizard(parent, name, modal, f)
+ TQWidget *tqparent, const char *name, bool modal, WFlags f)
+: KWizard(tqparent, name, modal, f)
, d(new KexiNewProjectWizardPrivate() )
{
d->msgHandler = new KexiGUIMessageHandler(this);
@@ -96,15 +96,15 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set,
//page: type selector
m_prjtype_sel = new KexiNewPrjTypeSelector(this, "KexiNewPrjTypeSelector");
// lv_types = new KListView(m_prjtype_sel, "types listview");
-// m_prjtype_sel->lv_types->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum, 0, 2));
+// m_prjtype_sel->lv_types->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum, 0, 2));
#if KDE_IS_VERSION(3,3,9)
m_prjtype_sel->lv_types->setShadeSortColumn(false);
#endif
m_prjtype_sel->lv_types->header()->hide();
m_prjtype_sel->lv_types->setSorting(-1);
- m_prjtype_sel->lv_types->setAlternateBackground(QColor()); //disable altering
+ m_prjtype_sel->lv_types->setAlternateBackground(TQColor()); //disable altering
m_prjtype_sel->lv_types->setItemMargin( KDialogBase::marginHint() );
- QString none;
+ TQString none;
d->lvi_file = new KListViewItem( m_prjtype_sel->lv_types, i18n("New Project Stored in File") );
d->lvi_file->setPixmap(0,
KGlobal::iconLoader()->loadIcon( KMimeType::mimeType(
@@ -118,31 +118,31 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set,
d->lvi_server->setMultiLinesEnabled( true );
// m_prjtype_sel->lv_types->resize(d->m_prjtype_sel->lv_types->width(), d->lvi_file->height()*3);
m_prjtype_sel->lv_types->setFocus();
-// QString txt_dns = i18n("Don't show me this question again.");
+// TQString txt_dns = i18n("Don't show me this question again.");
// d->chk_file_txt = m_prjtype_sel->chk_always->text() +"\n"+txt_dns;
// d->chk_server_txt = i18n("Always &use database server for creating new projects.")
// +"\n"+txt_dns;
- connect(m_prjtype_sel->lv_types,SIGNAL(executed(QListViewItem*)),this,SLOT(slotLvTypesExecuted(QListViewItem*)));
- connect(m_prjtype_sel->lv_types,SIGNAL(returnPressed(QListViewItem*)),this,SLOT(slotLvTypesExecuted(QListViewItem*)));
- connect(m_prjtype_sel->lv_types,SIGNAL(selectionChanged( QListViewItem*)),this,SLOT(slotLvTypesSelected(QListViewItem*)));
+ connect(m_prjtype_sel->lv_types,TQT_SIGNAL(executed(TQListViewItem*)),this,TQT_SLOT(slotLvTypesExecuted(TQListViewItem*)));
+ connect(m_prjtype_sel->lv_types,TQT_SIGNAL(returnPressed(TQListViewItem*)),this,TQT_SLOT(slotLvTypesExecuted(TQListViewItem*)));
+ connect(m_prjtype_sel->lv_types,TQT_SIGNAL(selectionChanged( TQListViewItem*)),this,TQT_SLOT(slotLvTypesSelected(TQListViewItem*)));
-// static_cast<QVBoxLayout*>(m_prjtype_sel->layout())->insertWidget(1,d->m_prjtype_sel->lv_types);
-// static_cast<QVBoxLayout*>(m_prjtype_sel->layout())->insertStretch(3,1);
+// static_cast<TQVBoxLayout*>(m_prjtype_sel->tqlayout())->insertWidget(1,d->m_prjtype_sel->lv_types);
+// static_cast<TQVBoxLayout*>(m_prjtype_sel->tqlayout())->insertStretch(3,1);
// updateGeometry();
addPage(m_prjtype_sel, i18n("Select Storage Method"));
-// d->m_prjtype_sel->lv_types->setMinimumHeight(QMAX(d->lvi_file->height(),d->lvi_server->height())+25);
+// d->m_prjtype_sel->lv_types->setMinimumHeight(TQMAX(d->lvi_file->height(),d->lvi_server->height())+25);
//page: db title
- m_db_title = new KexiDBTitlePage(QString::null, this, "KexiDBTitlePage");
+ m_db_title = new KexiDBTitlePage(TQString(), this, "KexiDBTitlePage");
addPage(m_db_title, i18n("Select Project's Caption"));
//page: connection selector
- m_conn_sel_widget = new QWidget(this);
- QVBoxLayout* conn_sel_lyr = new QVBoxLayout(m_conn_sel_widget);
- QLabel *conn_sel_label = new QLabel(i18n("Enter a new Kexi project's file name:"), m_conn_sel_widget);
- conn_sel_label->setAlignment(Qt::AlignAuto|Qt::AlignTop|Qt::WordBreak);
+ m_conn_sel_widget = new TQWidget(this);
+ TQVBoxLayout* conn_sel_lyr = new TQVBoxLayout(m_conn_sel_widget);
+ TQLabel *conn_sel_label = new TQLabel(i18n("Enter a new Kexi project's file name:"), m_conn_sel_widget);
+ conn_sel_label->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak);
conn_sel_lyr->addWidget( conn_sel_label );
conn_sel_lyr->addSpacing(KDialogBase::spacingHint());
@@ -167,32 +167,32 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set,
m_conn_sel->m_fileDlg->setMode( KexiStartupFileDialog::SavingFileBasedDB );
// m_conn_sel->m_fileDlg->setMode( KFile::LocalOnly | KFile::File );
// m_conn_sel->m_fileDlg->setOperationMode( KFileDialog::Saving );
-////js connect(m_conn_sel->m_fileDlg,SIGNAL(rejected()),this,SLOT(reject()));
-// connect(m_conn_sel->m_fileDlg,SIGNAL(fileHighlighted(const QString&)),this,SLOT(slotFileHighlighted(const QString&)));
- connect(m_conn_sel->m_fileDlg,SIGNAL(accepted()),this,SLOT(accept()));
+////js connect(m_conn_sel->m_fileDlg,TQT_SIGNAL(rejected()),this,TQT_SLOT(reject()));
+// connect(m_conn_sel->m_fileDlg,TQT_SIGNAL(fileHighlighted(const TQString&)),this,TQT_SLOT(slotFileHighlighted(const TQString&)));
+ connect(m_conn_sel->m_fileDlg,TQT_SIGNAL(accepted()),this,TQT_SLOT(accept()));
m_conn_sel->showAdvancedConn();
- connect(m_conn_sel,SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
- this,SLOT(next()));
+ connect(m_conn_sel,TQT_SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
+ this,TQT_SLOT(next()));
addPage(m_conn_sel_widget, i18n("Select Project's Location"));
//page: server db name
m_server_db_name = new KexiServerDBNamePage(this, "KexiServerDBNamePage");
d->server_db_name_dblist_lbl_txt = i18n("Existing project databases on <b>%1</b> database server:");
- connect(m_server_db_name->le_caption, SIGNAL(textChanged(const QString&)),
- this,SLOT(slotServerDBCaptionTxtChanged(const QString&)));
- connect(m_server_db_name->le_dbname, SIGNAL(textChanged(const QString&)),
- this,SLOT(slotServerDBNameTxtChanged(const QString&)));
- connect(m_server_db_name->le_caption, SIGNAL(returnPressed()),
- this,SLOT(accept()));
- connect(m_server_db_name->le_dbname, SIGNAL(returnPressed()),
- this,SLOT(accept()));
+ connect(m_server_db_name->le_caption, TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(slotServerDBCaptionTxtChanged(const TQString&)));
+ connect(m_server_db_name->le_dbname, TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(slotServerDBNameTxtChanged(const TQString&)));
+ connect(m_server_db_name->le_caption, TQT_SIGNAL(returnPressed()),
+ this,TQT_SLOT(accept()));
+ connect(m_server_db_name->le_dbname, TQT_SIGNAL(returnPressed()),
+ this,TQT_SLOT(accept()));
m_server_db_name->le_caption->setText(i18n("New database"));
- m_server_db_name->le_dbname->setValidator(new KexiUtils::IdentifierValidator(this, "id_val"));
+ m_server_db_name->le_dbname->setValidator(new KexiUtils::IdentifierValidator(TQT_TQOBJECT(this), "id_val"));
m_project_selector = new KexiProjectSelectorWidget(
m_server_db_name->frm_dblist, "KexiProjectSelectorWidget", 0, false, false );
GLUE_WIDGET(m_project_selector, m_server_db_name->frm_dblist);
- m_project_selector->setFocusPolicy(NoFocus);
+ m_project_selector->setFocusPolicy(TQ_NoFocus);
m_project_selector->setSelectable(false);
addPage(m_server_db_name, i18n("Select Project's Caption & Database Name"));
@@ -217,12 +217,12 @@ void KexiNewProjectWizard::show()
KWizard::show();
}
-void KexiNewProjectWizard::slotLvTypesExecuted(QListViewItem *)
+void KexiNewProjectWizard::slotLvTypesExecuted(TQListViewItem *)
{
next();
}
-void KexiNewProjectWizard::slotLvTypesSelected(QListViewItem *item)
+void KexiNewProjectWizard::slotLvTypesSelected(TQListViewItem *item)
{
/* if (item==d->lvi_file) {
m_prjtype_sel->chk_always->setText(d->chk_file_txt);
@@ -234,7 +234,7 @@ void KexiNewProjectWizard::slotLvTypesSelected(QListViewItem *item)
setAppropriate( m_server_db_name, item==d->lvi_server );
}
-void KexiNewProjectWizard::showPage(QWidget *page)
+void KexiNewProjectWizard::showPage(TQWidget *page)
{
if (page==m_prjtype_sel) {//p 1
m_prjtype_sel->lv_types->setFocus();
@@ -247,7 +247,7 @@ void KexiNewProjectWizard::showPage(QWidget *page)
} else if (page==m_conn_sel_widget) {//p 3
if (m_prjtype_sel->lv_types->currentItem()==d->lvi_file) {
m_conn_sel->showSimpleConn();
- QString fn = KexiUtils::string2FileName( m_db_title->le_caption->text() );
+ TQString fn = KexiUtils::string2FileName( m_db_title->le_caption->text() );
if (!fn.endsWith(".kexi"))
fn += ".kexi";
m_conn_sel->m_fileDlg->setLocationText(fn);
@@ -301,7 +301,7 @@ void KexiNewProjectWizard::next()
return;
}
m_project_selector->label->setText(
- d->server_db_name_dblist_lbl_txt.arg(m_conn_sel->selectedConnectionData()->serverInfoString(false)) );
+ d->server_db_name_dblist_lbl_txt.tqarg(m_conn_sel->selectedConnectionData()->serverInfoString(false)) );
m_server_db_name->le_caption->setFocus();
}
@@ -313,9 +313,9 @@ void KexiNewProjectWizard::accept()
{
if (m_prjtype_sel->lv_types->currentItem()==d->lvi_file) {//FILE:
//check if new db file name is ok
- kdDebug() << "********** sender() " << sender()->className() << endl;
+ kdDebug() << "********** TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())) " << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->className() << endl;
if (sender()==finishButton()) { /*(only if signal does not come from filedialog)*/
- kdDebug() << "********** sender()==finishButton() ********" << endl;
+ kdDebug() << "********** TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))==finishButton() ********" << endl;
// if (!m_conn_sel->m_fileDlg->checkURL()) {
if (!m_conn_sel->m_fileDlg->checkFileName()) {
return;
@@ -329,7 +329,7 @@ void KexiNewProjectWizard::accept()
m_server_db_name->le_caption->setFocus();
return;
}
- QString dbname = m_server_db_name->le_dbname->text().stripWhiteSpace();
+ TQString dbname = m_server_db_name->le_dbname->text().stripWhiteSpace();
if (dbname.isEmpty()) {
KMessageBox::information(this, i18n("Enter project's database name."));
m_server_db_name->le_dbname->setText("");
@@ -342,8 +342,8 @@ void KexiNewProjectWizard::accept()
if (KMessageBox::Continue!=KMessageBox::warningContinueCancel( this, "<qt>"
+i18n("<b>A project with database name \"%1\" already exists</b>"
"<p>Do you want to delete it and create a new one?")
- .arg( m_server_db_name->le_dbname->text() ), QString::null, KStdGuiItem::del(),
- QString::null, KMessageBox::Notify|KMessageBox::Dangerous ))
+ .tqarg( m_server_db_name->le_dbname->text() ), TQString(), KStdGuiItem::del(),
+ TQString(), KMessageBox::Notify|KMessageBox::Dangerous ))
{
m_server_db_name->le_dbname->setFocus();
return;
@@ -369,14 +369,14 @@ void KexiNewProjectWizard::done(int r)
KWizard::done(r);
}
-QString KexiNewProjectWizard::projectDBName() const
+TQString KexiNewProjectWizard::projectDBName() const
{
if (m_prjtype_sel->lv_types->currentItem()==d->lvi_server)
return m_server_db_name->le_dbname->text();
return m_conn_sel->selectedFileName();
}
-QString KexiNewProjectWizard::projectCaption() const
+TQString KexiNewProjectWizard::projectCaption() const
{
if (m_prjtype_sel->lv_types->currentItem()==d->lvi_server) {
return m_server_db_name->le_caption->text();
@@ -391,19 +391,19 @@ KexiDB::ConnectionData* KexiNewProjectWizard::projectConnectionData() const
return m_conn_sel->selectedConnectionData();
}
-void KexiNewProjectWizard::slotServerDBCaptionTxtChanged(const QString &capt)
+void KexiNewProjectWizard::slotServerDBCaptionTxtChanged(const TQString &capt)
{
if (m_server_db_name->le_dbname->text().isEmpty())
d->le_dbname_autofill=true;
if (d->le_dbname_autofill) {
d->le_dbname_txtchanged_disable = true;
- QString captionAsId = KexiUtils::string2Identifier(capt);
+ TQString captionAsId = KexiUtils::string2Identifier(capt);
m_server_db_name->le_dbname->setText(captionAsId);
d->le_dbname_txtchanged_disable = false;
}
}
-void KexiNewProjectWizard::slotServerDBNameTxtChanged(const QString &)
+void KexiNewProjectWizard::slotServerDBNameTxtChanged(const TQString &)
{
if (d->le_dbname_txtchanged_disable)
return;
diff --git a/kexi/main/startup/KexiNewProjectWizard.h b/kexi/main/startup/KexiNewProjectWizard.h
index 9f9eaa62..18dab257 100644
--- a/kexi/main/startup/KexiNewProjectWizard.h
+++ b/kexi/main/startup/KexiNewProjectWizard.h
@@ -25,7 +25,7 @@
#include <kwizard.h>
-class QListViewItem;
+class TQListViewItem;
class KexiNewPrjTypeSelector;
class KexiConnSelectorWidget;
@@ -37,17 +37,18 @@ class KexiProjectSelectorWidget;
class KEXIMAIN_EXPORT KexiNewProjectWizard : public KWizard
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiNewProjectWizard(KexiDBConnectionSet& conn_set, QWidget *parent=0,
+ KexiNewProjectWizard(KexiDBConnectionSet& conn_set, TQWidget *tqparent=0,
const char *name=0, bool modal=false, WFlags f=0);
~KexiNewProjectWizard();
/*! \return name for a new project's database if server-based project
type was selected. Returns file name if file-based project was selected. */
- QString projectDBName() const;
+ TQString projectDBName() const;
/*! \return name for a new project. Used for both file- and serever- based projects. */
- QString projectCaption() const;
+ TQString projectCaption() const;
/*! \return data of selected connection for new project,
if server-based project type was selected.
@@ -63,17 +64,17 @@ class KEXIMAIN_EXPORT KexiNewProjectWizard : public KWizard
void setConfirmOverwrites(bool set);
protected slots:
- void slotLvTypesSelected(QListViewItem *);
- void slotLvTypesExecuted(QListViewItem *);
- void slotServerDBCaptionTxtChanged(const QString &capt);
- void slotServerDBNameTxtChanged(const QString &n);
+ void slotLvTypesSelected(TQListViewItem *);
+ void slotLvTypesExecuted(TQListViewItem *);
+ void slotServerDBCaptionTxtChanged(const TQString &capt);
+ void slotServerDBNameTxtChanged(const TQString &n);
virtual void done(int r);
virtual void next();
virtual void accept();
protected:
- virtual void showPage(QWidget *page);
+ virtual void showPage(TQWidget *page);
KexiNewPrjTypeSelector *m_prjtype_sel;
KexiDBTitlePage *m_db_title;
@@ -81,7 +82,7 @@ class KEXIMAIN_EXPORT KexiNewProjectWizard : public KWizard
KexiProjectSelectorWidget* m_project_selector;
KexiConnSelectorWidget *m_conn_sel;
- QWidget *m_conn_sel_widget;
+ TQWidget *m_conn_sel_widget;
KexiNewProjectWizardPrivate *d;
};
diff --git a/kexi/main/startup/KexiOpenExistingFile.ui b/kexi/main/startup/KexiOpenExistingFile.ui
index ae4c05a9..101be957 100644
--- a/kexi/main/startup/KexiOpenExistingFile.ui
+++ b/kexi/main/startup/KexiOpenExistingFile.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KexiOpenExistingFile</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiOpenExistingFile</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>lbl</cstring>
</property>
@@ -35,15 +35,15 @@
<string>&lt;b&gt;Select existing Kexi project file to open:&lt;/b&gt;
</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>line</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>8</height>
@@ -56,32 +56,32 @@
<enum>Sunken</enum>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>spacer</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>6</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>6</height>
</size>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btn_advanced</cstring>
</property>
@@ -97,7 +97,7 @@
<string>&amp;Advanced </string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>label</cstring>
</property>
@@ -112,7 +112,7 @@
<property name="text">
<string>Click "Advanced" button if you want to find an existing project on a server rather than a file.</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
@@ -123,5 +123,5 @@
<tabstops>
<tabstop>btn_advanced</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/main/startup/KexiProjectSelector.cpp b/kexi/main/startup/KexiProjectSelector.cpp
index c28ab6d5..55aa930f 100644
--- a/kexi/main/startup/KexiProjectSelector.cpp
+++ b/kexi/main/startup/KexiProjectSelector.cpp
@@ -29,10 +29,10 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlistview.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
#include <assert.h>
@@ -44,7 +44,7 @@ public:
{
selectable = true;
}
- QPixmap fileicon, dbicon;
+ TQPixmap fileicon, dbicon;
bool showProjectNameColumn : 1;
bool showConnectionColumns : 1;
bool selectable : 1;
@@ -53,12 +53,12 @@ public:
/*================================================================*/
//! helper class
-class ProjectDataLVItem : public QListViewItem
+class ProjectDataLVItem : public TQListViewItem
{
public:
ProjectDataLVItem(KexiProjectData *d,
const KexiDB::Driver::Info& info, KexiProjectSelectorWidget *selector )
- : QListViewItem(selector->list)
+ : TQListViewItem(selector->list)
, data(d)
{
int colnum = 0;
@@ -69,14 +69,14 @@ public:
setText(colnum++, data->databaseName()+" ");
if (selector->d->showConnectionColumns) {
- QString drvname = info.caption.isEmpty() ? cdata->driverName : info.caption;
+ TQString drvname = info.caption.isEmpty() ? cdata->driverName : info.caption;
if (info.fileBased) {
setText(colnum++, i18n("File") + " ("+drvname+") " );
} else {
setText(colnum++, drvname+" " );
}
- QString conn;
+ TQString conn;
if (!cdata->caption.isEmpty())
conn = cdata->caption + ": ";
conn += cdata->serverInfoString();
@@ -91,24 +91,24 @@ public:
/*================================================================*/
/*!
- * Constructs a KexiProjectSelector which is a child of 'parent', with the
+ * Constructs a KexiProjectSelector which is a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'
*/
KexiProjectSelectorWidget::KexiProjectSelectorWidget(
- QWidget* parent, const char* name,
+ TQWidget* tqparent, const char* name,
KexiProjectSet* prj_set, bool showProjectNameColumn,
bool showConnectionColumns )
- : KexiProjectSelectorBase( parent, name )
+ : KexiProjectSelectorBase( tqparent, name )
,m_prj_set(prj_set)
,d(new KexiProjectSelectorWidgetPrivate())
{
d->showProjectNameColumn = showProjectNameColumn;
d->showConnectionColumns = showConnectionColumns;
- QString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
+ TQString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
d->fileicon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
setIcon( d->fileicon );
d->dbicon = SmallIcon("database");
-// list->setHScrollBarMode( QScrollView::AlwaysOn );
+// list->setHScrollBarMode( TQScrollView::AlwaysOn );
if (!d->showConnectionColumns) {
list->removeColumn(2);
@@ -121,9 +121,9 @@ KexiProjectSelectorWidget::KexiProjectSelectorWidget(
//show projects
setProjectSet( m_prj_set );
- connect(list,SIGNAL(doubleClicked(QListViewItem*)),this,SLOT(slotItemExecuted(QListViewItem*)));
- connect(list,SIGNAL(returnPressed(QListViewItem*)),this,SLOT(slotItemExecuted(QListViewItem*)));
- connect(list,SIGNAL(selectionChanged()),this,SLOT(slotItemSelected()));
+ connect(list,TQT_SIGNAL(doubleClicked(TQListViewItem*)),this,TQT_SLOT(slotItemExecuted(TQListViewItem*)));
+ connect(list,TQT_SIGNAL(returnPressed(TQListViewItem*)),this,TQT_SLOT(slotItemExecuted(TQListViewItem*)));
+ connect(list,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(slotItemSelected()));
}
/*!
@@ -142,7 +142,7 @@ KexiProjectData* KexiProjectSelectorWidget::selectedProjectData() const
return 0;
}
-void KexiProjectSelectorWidget::slotItemExecuted(QListViewItem *item)
+void KexiProjectSelectorWidget::slotItemExecuted(TQListViewItem *item)
{
if (!d->selectable)
return;
@@ -204,7 +204,7 @@ void KexiProjectSelectorWidget::setSelectable(bool set)
return;
d->selectable = set;
//update items' state
- QListViewItemIterator it( list );
+ TQListViewItemIterator it( list );
while ( it.current() ) {
it.current()->setSelectable( d->selectable );
}
@@ -217,19 +217,19 @@ bool KexiProjectSelectorWidget::isSelectable() const
/*================================================================*/
-KexiProjectSelectorDialog::KexiProjectSelectorDialog( QWidget *parent, const char *name,
+KexiProjectSelectorDialog::KexiProjectSelectorDialog( TQWidget *tqparent, const char *name,
KexiProjectSet* prj_set, bool showProjectNameColumn, bool showConnectionColumns)
: KDialogBase( Plain, i18n("Open Recent Project"),
#ifndef KEXI_NO_UNFINISHED
//! @todo re-add Help when doc is available
Help |
#endif
- Ok | Cancel, Ok, parent, name )
+ Ok | Cancel, Ok, tqparent, name )
{
init(prj_set, showProjectNameColumn, showConnectionColumns);
}
-KexiProjectSelectorDialog::KexiProjectSelectorDialog( QWidget *parent, const char *name,
+KexiProjectSelectorDialog::KexiProjectSelectorDialog( TQWidget *tqparent, const char *name,
KexiDB::ConnectionData* cdata,
bool showProjectNameColumn, bool showConnectionColumns)
: KDialogBase(
@@ -238,7 +238,7 @@ KexiProjectSelectorDialog::KexiProjectSelectorDialog( QWidget *parent, const cha
//! @todo re-add Help when doc is available
Help |
#endif
- Ok | Cancel, Ok, parent, name, true/*modal*/, false/*sep*/ )
+ Ok | Cancel, Ok, tqparent, name, true/*modal*/, false/*sep*/ )
{
setButtonGuiItem(Ok, KGuiItem(i18n("&Open"), "fileopen", i18n("Open Database Connection")));
assert(cdata);
@@ -248,7 +248,7 @@ KexiProjectSelectorDialog::KexiProjectSelectorDialog( QWidget *parent, const cha
init(prj_set, showProjectNameColumn, showConnectionColumns);
m_sel->label->setText( i18n("Select a project on <b>%1</b> database server to open:")
- .arg(cdata->serverInfoString(false)) );
+ .tqarg(cdata->serverInfoString(false)) );
}
KexiProjectSelectorDialog::~KexiProjectSelectorDialog()
@@ -260,17 +260,17 @@ void KexiProjectSelectorDialog::init(KexiProjectSet* prj_set, bool showProjectNa
{
setSizeGripEnabled(true);
- QVBoxLayout *lyr = new QVBoxLayout(plainPage(), 0, KDialogBase::spacingHint(), "lyr");
+ TQVBoxLayout *lyr = new TQVBoxLayout(plainPage(), 0, KDialogBase::spacingHint(), "lyr");
m_sel = new KexiProjectSelectorWidget(plainPage(), "sel",
prj_set, showProjectNameColumn, showConnectionColumns);
lyr->addWidget(m_sel);
setIcon(*m_sel->icon());
m_sel->setFocus();
- connect(m_sel,SIGNAL(projectExecuted(KexiProjectData*)),
- this,SLOT(slotProjectExecuted(KexiProjectData*)));
- connect(m_sel,SIGNAL(selectionChanged(KexiProjectData*)),
- this,SLOT(slotProjectSelectionChanged(KexiProjectData*)));
+ connect(m_sel,TQT_SIGNAL(projectExecuted(KexiProjectData*)),
+ this,TQT_SLOT(slotProjectExecuted(KexiProjectData*)));
+ connect(m_sel,TQT_SIGNAL(selectionChanged(KexiProjectData*)),
+ this,TQT_SLOT(slotProjectSelectionChanged(KexiProjectData*)));
}
KexiProjectData* KexiProjectSelectorDialog::selectedProjectData() const
diff --git a/kexi/main/startup/KexiProjectSelector.h b/kexi/main/startup/KexiProjectSelector.h
index 3151be3b..91c13712 100644
--- a/kexi/main/startup/KexiProjectSelector.h
+++ b/kexi/main/startup/KexiProjectSelector.h
@@ -24,7 +24,7 @@
#include "kexiprojectset.h"
#include <kdialogbase.h>
-#include <qwidgetstack.h>
+#include <tqwidgetstack.h>
class KexiNewFileDBWidget;
class KexiProjectSelectorWidgetPrivate;
@@ -34,6 +34,7 @@ class KexiProjectSelectorWidgetPrivate;
class KEXIMAIN_EXPORT KexiProjectSelectorWidget : public KexiProjectSelectorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
// enum ConnType { FileBased=1, ServerBased=2 };
@@ -44,7 +45,7 @@ public:
information about database driver and connection columns are added.
\a prj_set may be NULL - you can assign a set later with setProjectSet().
*/
- KexiProjectSelectorWidget( QWidget* parent = 0, const char* name = 0,
+ KexiProjectSelectorWidget( TQWidget* tqparent = 0, const char* name = 0,
KexiProjectSet* prj_set = 0, bool showProjectNameColumn = true,
bool showConnectionColumns = true );
@@ -77,7 +78,7 @@ signals:
void selectionChanged(KexiProjectData*);
protected slots:
- void slotItemExecuted(QListViewItem*);
+ void slotItemExecuted(TQListViewItem*);
void slotItemSelected();
virtual void languageChange() { KexiProjectSelectorBase::languageChange(); }
@@ -93,11 +94,12 @@ protected:
class KexiProjectSelectorDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Constructor 1, used for displaying recent projects list
Label "there are recently opened projects" is displayed automatically
*/
- KexiProjectSelectorDialog( QWidget *parent, const char *name,
+ KexiProjectSelectorDialog( TQWidget *tqparent, const char *name,
KexiProjectSet* prj_set,
bool showProjectNameColumn = true, bool showConnectionColumns = true);
@@ -105,7 +107,7 @@ public:
Label "Select one of these existing projects on server" is displayed automatically
You should test if project set was properly loaded using projectSet()->error().
*/
- KexiProjectSelectorDialog( QWidget *parent, const char *name,
+ KexiProjectSelectorDialog( TQWidget *tqparent, const char *name,
KexiDB::ConnectionData* cdata,
bool showProjectNameColumn = true, bool showConnectionColumns = true);
diff --git a/kexi/main/startup/KexiProjectSelectorBase.ui b/kexi/main/startup/KexiProjectSelectorBase.ui
index 4d51751b..aa36a55a 100644
--- a/kexi/main/startup/KexiProjectSelectorBase.ui
+++ b/kexi/main/startup/KexiProjectSelectorBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiProjectSelectorBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiProjectSelectorBase</cstring>
</property>
@@ -27,7 +27,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>label</cstring>
</property>
@@ -43,11 +43,11 @@
<string>&lt;b&gt;There are Kexi projects you have recently opened.&lt;/b&gt; Select one you wish to open:
</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
- <widget class="QListView">
+ <widget class="TQListView">
<column>
<property name="text">
<string>Project Name</string>
@@ -103,7 +103,7 @@
<verstretch>1</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>60</height>
@@ -124,5 +124,5 @@
<tabstops>
<tabstop>list</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/main/startup/KexiServerDBNamePage.ui b/kexi/main/startup/KexiServerDBNamePage.ui
index 3ea61dc3..0d20fe3e 100644
--- a/kexi/main/startup/KexiServerDBNamePage.ui
+++ b/kexi/main/startup/KexiServerDBNamePage.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KexiServerDBNamePage</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiServerDBNamePage</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -24,7 +24,7 @@
<string>Project caption: </string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -32,7 +32,7 @@
<string>Project's database name: </string>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>le_caption</cstring>
</property>
@@ -44,18 +44,18 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>le_dbname</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
@@ -72,7 +72,7 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>70</width>
<height>20</height>
@@ -89,14 +89,14 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>70</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QFrame" row="4" column="0" rowspan="1" colspan="3">
+ <widget class="TQFrame" row="4" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>frm_dblist</cstring>
</property>
@@ -128,7 +128,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>12</height>
@@ -137,5 +137,5 @@
</spacer>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/main/startup/KexiStartup.cpp b/kexi/main/startup/KexiStartup.cpp
index 19ae8d28..54d977e4 100644
--- a/kexi/main/startup/KexiStartup.cpp
+++ b/kexi/main/startup/KexiStartup.cpp
@@ -18,7 +18,7 @@
*/
#include "KexiStartup.h"
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
# include "KexiStartup_p_win.h"
#else
# include "KexiStartup_p.h"
@@ -52,9 +52,9 @@
#include <unistd.h>
-#include <qcstring.h>
-#include <qapplication.h>
-#include <qlayout.h>
+#include <tqcstring.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
namespace Kexi {
static KStaticDeleter<KexiStartupHandler> Kexi_startupHandlerDeleter;
@@ -92,13 +92,13 @@ class KexiStartupHandlerPrivate
KexiDBShortcutFile *shortcutFile;
KexiDBConnShortcutFile *connShortcutFile;
KexiDBConnectionDialog *connDialog;
- QString shortcutFileGroupKey;
+ TQString shortcutFileGroupKey;
KexiStartupDialog *startupDialog;
};
//---------------------------------
-static bool stripQuotes(const QString &item, QString &name)
+static bool stripQuotes(const TQString &item, TQString &name)
{
if (item.left(1)=="\"" && item.right(1)=="\"") {
name = item.mid(1, item.length()-2);
@@ -111,7 +111,7 @@ static bool stripQuotes(const QString &item, QString &name)
void updateProgressBar(KProgressDialog *pd, char *buffer, int buflen)
{
char *p = buffer;
- QCString line(80);
+ TQCString line(80);
for (int i=0; i<buflen; i++, p++) {
if ((i==0 || buffer[i-1]=='\n') && buffer[i]=='%') {
bool ok;
@@ -120,13 +120,13 @@ void updateProgressBar(KProgressDialog *pd, char *buffer, int buflen)
++i;
line="";
for (;i<buflen && *p>='0' && *p<='9'; j++, i++, p++)
- line+=QChar(*p);
+ line+=TQChar(*p).latin1();
--i; --p;
int percent = line.toInt(&ok);
if (ok && percent>=0 && percent<=100 && pd->progressBar()->progress()<percent) {
// kdDebug() << percent << endl;
pd->progressBar()->setProgress(percent);
- qApp->processEvents(100);
+ tqApp->tqprocessEvents(100);
}
}
}
@@ -134,36 +134,36 @@ void updateProgressBar(KProgressDialog *pd, char *buffer, int buflen)
//---------------------------------
-KexiDBPasswordDialog::KexiDBPasswordDialog(QWidget *parent, KexiDB::ConnectionData& cdata, bool showDetailsButton)
+KexiDBPasswordDialog::KexiDBPasswordDialog(TQWidget *tqparent, KexiDB::ConnectionData& cdata, bool showDetailsButton)
: KPasswordDialog( KPasswordDialog::Password, false/*keep*/,
- showDetailsButton ? (int)KDialogBase::User1 : 0, parent )
+ showDetailsButton ? (int)KDialogBase::User1 : 0, tqparent )
, m_cdata(&cdata)
, m_showConnectionDetailsRequested(false)
{
- QString msg = "<H2>" + i18n("Opening database") + "</H2><p>"
+ TQString msg = "<H2>" + i18n("Opening database") + "</H2><p>"
+ i18n("Please enter the password.") + "</p>";
/* msg += cdata.userName.isEmpty() ?
"<p>"+i18n("Please enter the password.")
- : "<p>"+i18n("Please enter the password for user.").arg("<b>"+cdata.userName+"</b>");*/
+ : "<p>"+i18n("Please enter the password for user.").tqarg("<b>"+cdata.userName+"</b>");*/
- QString srv = cdata.serverInfoString(false);
+ TQString srv = cdata.serverInfoString(false);
if (srv.isEmpty() || srv.lower()=="localhost")
srv = i18n("local database server");
- msg += ("</p><p>"+i18n("Database server: %1").arg(QString("<nobr>")+srv+"</nobr>")+"</p>");
+ msg += ("</p><p>"+i18n("Database server: %1").tqarg(TQString("<nobr>")+srv+"</nobr>")+"</p>");
- QString usr;
+ TQString usr;
if (cdata.userName.isEmpty())
usr = i18n("unspecified user", "(unspecified)");
else
usr = cdata.userName;
- msg += ("<p>"+i18n("Username: %1").arg(usr)+"</p>");
+ msg += ("<p>"+i18n("Username: %1").tqarg(usr)+"</p>");
setPrompt( msg );
if (showDetailsButton) {
- connect( this, SIGNAL(user1Clicked()),
- this, SLOT(slotShowConnectionDetails()) );
+ connect( this, TQT_SIGNAL(user1Clicked()),
+ this, TQT_SLOT(slotShowConnectionDetails()) );
setButtonText(KDialogBase::User1, i18n("&Details")+ " >>");
}
setButtonOK(KGuiItem(i18n("&Open"), "fileopen"));
@@ -175,10 +175,10 @@ KexiDBPasswordDialog::~KexiDBPasswordDialog()
void KexiDBPasswordDialog::done(int r)
{
- if (r == QDialog::Accepted) {
- m_cdata->password = QString::fromLatin1(password());
+ if (r == TQDialog::Accepted) {
+ m_cdata->password = TQString::tqfromLatin1(password());
}
-// if (d->showConnectionDetailsExecuted || ret == QDialog::Accepted) {
+// if (d->showConnectionDetailsExecuted || ret == TQDialog::Accepted) {
/* } else {
m_action = Exit;
return true;
@@ -195,7 +195,7 @@ void KexiDBPasswordDialog::slotShowConnectionDetails()
//---------------------------------
KexiStartupHandler::KexiStartupHandler()
- : QObject(0,"KexiStartupHandler")
+ : TQObject(0,"KexiStartupHandler")
, KexiStartupData()
, d( new KexiStartupHandlerPrivate() )
{
@@ -206,13 +206,13 @@ KexiStartupHandler::~KexiStartupHandler()
delete d;
}
-bool KexiStartupHandler::getAutoopenObjects(KCmdLineArgs *args, const QCString &action_name)
+bool KexiStartupHandler::getAutoopenObjects(KCmdLineArgs *args, const TQCString &action_name)
{
QCStringList list = args->getOptionList(action_name);
QCStringList::ConstIterator it;
bool atLeastOneFound = false;
for ( it = list.constBegin(); it!=list.constEnd(); ++it) {
- QString type_name, obj_name, item=*it;
+ TQString type_name, obj_name, item=*it;
int idx;
bool name_required = true;
if (action_name=="new") {
@@ -221,7 +221,7 @@ bool KexiStartupHandler::getAutoopenObjects(KCmdLineArgs *args, const QCString &
name_required = false;
}
else {//open, design, text...
- QString defaultType;
+ TQString defaultType;
if (action_name=="execute")
defaultType = "macro";
else
@@ -231,7 +231,7 @@ bool KexiStartupHandler::getAutoopenObjects(KCmdLineArgs *args, const QCString &
if (stripQuotes(item, obj_name)) {
type_name = defaultType;
}
- else if ((idx = item.find(':'))!=-1) {
+ else if ((idx = item.tqfind(':'))!=-1) {
//option with type name specified:
type_name = item.left(idx).lower();
obj_name = item.mid(idx+1);
@@ -274,7 +274,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
KexiDB::ConnectionData cdata;
- const QString connectionShortcutFileName( args->getOption("connection") );
+ const TQString connectionShortcutFileName( args->getOption("connection") );
if (!connectionShortcutFileName.isEmpty()) {
KexiDBConnShortcutFile connectionShortcut( connectionShortcutFileName );
if (!connectionShortcut.loadConnectionData(cdata)) {
@@ -283,7 +283,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
KMessageBox::sorry( 0, "<qt>"
+i18n("Could not read connection information from connection shortcut "
"file <nobr>\"%1\"</nobr>.<br><br>Check whether the file has valid contents.")
- .arg(QDir::convertSeparators(connectionShortcut.fileName())));
+ .tqarg(TQDir::convertSeparators(connectionShortcut.fileName())));
return false;
}
}
@@ -291,11 +291,11 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (!args->getOption("dbdriver").isEmpty())
cdata.driverName = args->getOption("dbdriver");
- QString fileType( args->getOption("type").lower() );
+ TQString fileType( args->getOption("type").lower() );
if (args->count()>0 && (!fileType.isEmpty() && fileType!="project" && fileType!="shortcut" && fileType!="connection")) {
KMessageBox::sorry( 0,
i18n("You have specified invalid argument (\"%1\") for \"type\" command-line option.")
- .arg(fileType));
+ .tqarg(fileType));
return false;
}
@@ -330,7 +330,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (qstrcmp("--password",argv[i])==0
|| qstrcmp("-password",argv[i])==0)
{
- QCString pwd(argv[i+1]);
+ TQCString pwd(argv[i+1]);
if (!pwd.isEmpty()) {
pwd.fill(' ');
pwd[0]='x';
@@ -341,7 +341,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
}
*/
- const QString portStr = args->getOption("port");
+ const TQString portStr = args->getOption("port");
if (!portStr.isEmpty()) {
bool ok;
const int p = portStr.toInt(&ok);
@@ -364,7 +364,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
const bool dropDB = args->isSet("dropdb");
const bool openExisting = !createDB && !dropDB;
const bool readOnly = args->isSet("readonly");
- const QString couldnotMsg = QString::fromLatin1("\n")
+ const TQString couldnotMsg = TQString::tqfromLatin1("\n")
+i18n("Could not start Kexi application this way.");
if (createDB && dropDB) {
@@ -388,13 +388,13 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (cdata.password.isEmpty()) {
delete d->passwordDialog;
d->passwordDialog = new KexiDBPasswordDialog(0, cdata, true);
-// connect( d->passwordDialog, SIGNAL(user1Clicked()),
-// this, SLOT(slotShowConnectionDetails()) );
+// connect( d->passwordDialog, TQT_SIGNAL(user1Clicked()),
+// this, TQT_SLOT(slotShowConnectionDetails()) );
const int ret = d->passwordDialog->exec();
- if (d->passwordDialog->showConnectionDetailsRequested() || ret == QDialog::Accepted) {
-// if ( ret == QDialog::Accepted ) {
- // if (QDialog::Accepted == KPasswordDialog::getPassword(pwd, msg)) {
-//moved cdata.password = QString(pwd);
+ if (d->passwordDialog->showConnectionDetailsRequested() || ret == TQDialog::Accepted) {
+// if ( ret == TQDialog::Accepted ) {
+ // if (TQDialog::Accepted == KPasswordDialog::getPassword(pwd, msg)) {
+//moved cdata.password = TQString(pwd);
// }
} else {
m_action = Exit;
@@ -416,17 +416,17 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
//database filenames, shortcut filenames or db names on a server
if (args->count()>=1) {
- QString prjName;
- QString fileName;
+ TQString prjName;
+ TQString fileName;
if (fileDriverSelected) {
- fileName = QFile::decodeName(args->arg(0));
+ fileName = TQFile::decodeName(args->arg(0));
}
else {
- prjName = QString::fromLocal8Bit(args->arg(0));
+ prjName = TQString::fromLocal8Bit(args->arg(0));
}
if (fileDriverSelected) {
- QFileInfo finfo(fileName);
+ TQFileInfo finfo(fileName);
prjName = finfo.fileName(); //filename only, to avoid messy names like when Kexi is started with "../../db" arg
cdata.setFileName( finfo.absFilePath() );
projectFileExists = finfo.exists();
@@ -434,7 +434,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (dropDB && !projectFileExists) {
KMessageBox::sorry(0,
i18n("Could not remove project.\nThe file \"%1\" does not exist.")
- .arg(QDir::convertSeparators(cdata.dbFileName())));
+ .tqarg(TQDir::convertSeparators(cdata.dbFileName())));
return 0;
}
}
@@ -457,7 +457,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (dropDB)
detectOptions |= DontConvert;
- QString detectedDriverName;
+ TQString detectedDriverName;
const tristate res = detectActionForFile( m_importActionData, detectedDriverName,
cdata.driverName, cdata.fileName(), 0, detectOptions );
if (true != res)
@@ -476,7 +476,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
m_projectData = new KexiProjectData();
if (!d->shortcutFile->loadProjectData(*m_projectData, &d->shortcutFileGroupKey)) {
KMessageBox::sorry(0, i18n("Could not open shortcut file\n\"%1\".")
- .arg(QDir::convertSeparators(cdata.fileName())));
+ .tqarg(TQDir::convertSeparators(cdata.fileName())));
delete m_projectData;
m_projectData = 0;
delete d->shortcutFile;
@@ -485,10 +485,10 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
}
d->connDialog = new KexiDBConnectionDialog(
*m_projectData, d->shortcutFile->fileName());
- connect(d->connDialog, SIGNAL(saveChanges()),
- this, SLOT(slotSaveShortcutFileChanges()));
+ connect(d->connDialog, TQT_SIGNAL(saveChanges()),
+ this, TQT_SLOT(slotSaveShortcutFileChanges()));
int res = d->connDialog->exec();
- if (res == QDialog::Accepted) {
+ if (res == TQDialog::Accepted) {
//get (possibly changed) prj data
*m_projectData = d->connDialog->currentProjectData();
}
@@ -498,7 +498,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
delete d->shortcutFile;
d->shortcutFile = 0;
- if (res == QDialog::Rejected) {
+ if (res == TQDialog::Rejected) {
delete m_projectData;
m_projectData = 0;
return cancelled;
@@ -509,7 +509,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
d->connShortcutFile = new KexiDBConnShortcutFile(cdata.fileName());
if (!d->connShortcutFile->loadConnectionData(cdata, &d->shortcutFileGroupKey)) {
KMessageBox::sorry(0, i18n("Could not open connection data file\n\"%1\".")
- .arg(QDir::convertSeparators(cdata.fileName())));
+ .tqarg(TQDir::convertSeparators(cdata.fileName())));
delete d->connShortcutFile;
d->connShortcutFile = 0;
return false;
@@ -522,11 +522,11 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (!d->connDialog) {
d->connDialog = new KexiDBConnectionDialog(
cdata, d->connShortcutFile->fileName());
- connect(d->connDialog, SIGNAL(saveChanges()),
- this, SLOT(slotSaveShortcutFileChanges()));
+ connect(d->connDialog, TQT_SIGNAL(saveChanges()),
+ this, TQT_SLOT(slotSaveShortcutFileChanges()));
}
const int res = d->connDialog->exec();
- if (res == QDialog::Accepted) {
+ if (res == TQDialog::Accepted) {
//get (possibly changed) prj data
cdata = *d->connDialog->currentProjectData().constConnectionData();
}
@@ -565,11 +565,11 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
//let's show connection details, user asked for that in the "password dialog"
if (d->passwordDialog && d->passwordDialog->showConnectionDetailsRequested()) {
d->connDialog = new KexiDBConnectionDialog(*m_projectData);
-// connect(d->connDialog->tabWidget->mainWidget, SIGNAL(saveChanges()),
-// this, SLOT(slotSaveShortcutFileChanges()));
+// connect(d->connDialog->tabWidget->mainWidget, TQT_SIGNAL(saveChanges()),
+// this, TQT_SLOT(slotSaveShortcutFileChanges()));
int res = d->connDialog->exec();
- if (res == QDialog::Accepted) {
+ if (res == TQDialog::Accepted) {
//get (possibly changed) prj data
*m_projectData = d->connDialog->currentProjectData();
}
@@ -577,7 +577,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
delete d->connDialog;
d->connDialog = 0;
- if (res == QDialog::Rejected) {
+ if (res == TQDialog::Rejected) {
delete m_projectData;
m_projectData = 0;
return cancelled;
@@ -612,7 +612,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (!alsoOpenDB) {
if (ok) {
KMessageBox::information( 0, i18n("Project \"%1\" created successfully.")
- .arg( QDir::convertSeparators(projectData()->databaseName()) ));
+ .tqarg( TQDir::convertSeparators(projectData()->databaseName()) ));
}
return ok;
}
@@ -622,7 +622,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
tristate res = KexiProject::dropProject(projectData(), &gui, false/*ask*/);
if (res==true)
KMessageBox::information( 0, i18n("Project \"%1\" dropped successfully.")
- .arg( QDir::convertSeparators(projectData()->databaseName()) ));
+ .tqarg( TQDir::convertSeparators(projectData()->databaseName()) ));
return res!=false;
}
@@ -646,7 +646,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
KexiStartupDialog::Everything, KexiStartupDialog::CheckBoxDoNotShowAgain,
Kexi::connset(), Kexi::recentProjects(), 0, "KexiStartupDialog");
}
- if (d->startupDialog->exec()!=QDialog::Accepted)
+ if (d->startupDialog->exec()!=TQDialog::Accepted)
return true;
const int r = d->startupDialog->result();
@@ -659,9 +659,9 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
return true;
}
else if (r == KexiStartupDialog::CreateFromTemplateResult) {
- const QString selFile( d->startupDialog->selectedFileName() );
+ const TQString selFile( d->startupDialog->selectedFileName() );
cdata.setFileName( selFile );
- QString detectedDriverName;
+ TQString detectedDriverName;
const tristate res = detectActionForFile( m_importActionData, detectedDriverName,
cdata.driverName, selFile );
if (true != res)
@@ -676,12 +676,12 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
}
else if (r == KexiStartupDialog::OpenExistingResult) {
// kdDebug() << "Existing project --------" << endl;
- const QString selFile( d->startupDialog->selectedFileName() );
+ const TQString selFile( d->startupDialog->selectedFileName() );
if (!selFile.isEmpty()) {
//file-based project
// kdDebug() << "Project File: " << selFile << endl;
cdata.setFileName( selFile );
- QString detectedDriverName;
+ TQString detectedDriverName;
const tristate res = detectActionForFile( m_importActionData, detectedDriverName,
cdata.driverName, selFile );
if (true != res)
@@ -738,25 +738,25 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
}
tristate KexiStartupHandler::detectActionForFile(
- KexiStartupData::Import& detectedImportAction, QString& detectedDriverName,
- const QString& _suggestedDriverName, const QString &dbFileName, QWidget *parent, int options )
+ KexiStartupData::Import& detectedImportAction, TQString& detectedDriverName,
+ const TQString& _suggestedDriverName, const TQString &dbFileName, TQWidget *tqparent, int options )
{
detectedImportAction = KexiStartupData::Import(); //clear
- QString suggestedDriverName(_suggestedDriverName); //safe
- detectedDriverName = QString::null;
- QFileInfo finfo(dbFileName);
+ TQString suggestedDriverName(_suggestedDriverName); //safe
+ detectedDriverName = TQString();
+ TQFileInfo finfo(dbFileName);
if (dbFileName.isEmpty() || !finfo.isReadable()) {
if (!(options & SkipMessages))
- KMessageBox::sorry(parent, i18n("<p>Could not open project.</p>")
+ KMessageBox::sorry(tqparent, i18n("<p>Could not open project.</p>")
+i18n("<p>The file <nobr>\"%1\"</nobr> does not exist or is not readable.</p>")
- .arg(QDir::convertSeparators(dbFileName))
+ .tqarg(TQDir::convertSeparators(dbFileName))
+i18n("Check the file's permissions and whether it is already opened "
"and locked by another application."));
return false;
}
KMimeType::Ptr ptr;
- QString mimename;
+ TQString mimename;
const bool thisIsShortcut = (options & ThisIsAShortcutToAProjectFile)
|| (options & ThisIsAShortcutToAConnectionData);
@@ -775,13 +775,13 @@ tristate KexiStartupHandler::detectActionForFile(
}
if (mimename.isEmpty() || mimename=="application/octet-stream") {
// perhaps the file is locked
- QFile f(dbFileName);
+ TQFile f(dbFileName);
if (!f.open(IO_ReadOnly)) {
// BTW: similar error msg is provided in SQLiteConnection::drv_useDatabase()
if (!(options & SkipMessages))
- KMessageBox::sorry(parent, i18n("<p>Could not open project.</p>")
+ KMessageBox::sorry(tqparent, i18n("<p>Could not open project.</p>")
+i18n("<p>The file <nobr>\"%1\"</nobr> is not readable.</p>")
- .arg(QDir::convertSeparators(dbFileName))
+ .tqarg(TQDir::convertSeparators(dbFileName))
+i18n("Check the file's permissions and whether it is already opened "
"and locked by another application."));
return false;
@@ -802,9 +802,9 @@ tristate KexiStartupHandler::detectActionForFile(
if (ptr.data()) {
if (mimename=="application/x-msaccess") {
if ((options & SkipMessages) || KMessageBox::Yes != KMessageBox::questionYesNo(
- parent, i18n("\"%1\" is an external file of type:\n\"%2\".\n"
+ tqparent, i18n("\"%1\" is an external file of type:\n\"%2\".\n"
"Do you want to import the file as a Kexi project?")
- .arg(QDir::convertSeparators(dbFileName)).arg(ptr.data()->comment()),
+ .tqarg(TQDir::convertSeparators(dbFileName)).tqarg(ptr.data()->comment()),
i18n("Open External File"), KGuiItem(i18n("Import...")), KStdGuiItem::cancel() ) )
{
return cancelled;
@@ -820,18 +820,18 @@ tristate KexiStartupHandler::detectActionForFile(
}
// "application/x-kexiproject-sqlite", etc.:
- QString tmpDriverName = Kexi::driverManager().lookupByMime(mimename).latin1();
+ TQString tmpDriverName = Kexi::driverManager().lookupByMime(mimename).latin1();
//@todo What about trying to reuse KOFFICE FILTER CHAINS here?
bool useDetectedDriver = suggestedDriverName.isEmpty() || suggestedDriverName.lower()==detectedDriverName.lower();
if (!useDetectedDriver) {
int res = KMessageBox::Yes;
if (!(options & SkipMessages))
- res = KMessageBox::warningYesNoCancel(parent, i18n(
+ res = KMessageBox::warningYesNoCancel(tqparent, i18n(
"The project file \"%1\" is recognized as compatible with \"%2\" database driver, "
"while you have asked for \"%3\" database driver to be used.\n"
"Do you want to use \"%4\" database driver?")
- .arg(QDir::convertSeparators(dbFileName))
- .arg(tmpDriverName).arg(suggestedDriverName).arg(tmpDriverName));
+ .tqarg(TQDir::convertSeparators(dbFileName))
+ .tqarg(tmpDriverName).tqarg(suggestedDriverName).tqarg(tmpDriverName));
if (KMessageBox::Yes == res)
useDetectedDriver = true;
else if (KMessageBox::Cancel == res)
@@ -845,13 +845,13 @@ tristate KexiStartupHandler::detectActionForFile(
}
// kdDebug() << "KexiStartupHandler::detectActionForFile(): driver name: " << detectedDriverName << endl;
//hardcoded for convenience:
- const QString newFileFormat = "SQLite3";
+ const TQString newFileFormat = "SQLite3";
if (!(options & DontConvert || options & SkipMessages)
&& detectedDriverName.lower()=="sqlite2" && detectedDriverName.lower()!=suggestedDriverName.lower()
- && KMessageBox::Yes == KMessageBox::questionYesNo(parent, i18n(
+ && KMessageBox::Yes == KMessageBox::questionYesNo(tqparent, i18n(
"Previous version of database file format (\"%1\") is detected in the \"%2\" "
"project file.\nDo you want to convert the project to a new \"%3\" format (recommended)?")
- .arg(detectedDriverName).arg(QDir::convertSeparators(dbFileName)).arg(newFileFormat)) )
+ .tqarg(detectedDriverName).tqarg(TQDir::convertSeparators(dbFileName)).tqarg(newFileFormat)) )
{
// SQLite2ToSQLite3Migration *migr = new
SQLite2ToSQLite3Migration migr( finfo.absFilePath() );
@@ -859,10 +859,10 @@ tristate KexiStartupHandler::detectActionForFile(
// kdDebug() << "--- migr.run() END ---" <<endl;
if (!res) {
//TODO msg
- KMessageBox::sorry(parent, i18n(
+ KMessageBox::sorry(tqparent, i18n(
"Failed to convert project file \"%1\" to a new \"%2\" format.\n"
"The file format remains unchanged.")
- .arg(QDir::convertSeparators(dbFileName)).arg(newFileFormat) );
+ .tqarg(TQDir::convertSeparators(dbFileName)).tqarg(newFileFormat) );
//continue...
}
if (res==true)
@@ -870,21 +870,21 @@ tristate KexiStartupHandler::detectActionForFile(
}
// action.driverName = detectedDriverName;
if (detectedDriverName.isEmpty()) {
- QString possibleProblemsInfoMsg( Kexi::driverManager().possibleProblemsInfoMsg() );
+ TQString possibleProblemsInfoMsg( Kexi::driverManager().possibleProblemsInfoMsg() );
if (!possibleProblemsInfoMsg.isEmpty()) {
- possibleProblemsInfoMsg.prepend(QString::fromLatin1("<p>")+i18n("Possible problems:"));
- possibleProblemsInfoMsg += QString::fromLatin1("</p>");
+ possibleProblemsInfoMsg.prepend(TQString::tqfromLatin1("<p>")+i18n("Possible problems:"));
+ possibleProblemsInfoMsg += TQString::tqfromLatin1("</p>");
}
if (!(options & SkipMessages))
- KMessageBox::detailedSorry(parent,
+ KMessageBox::detailedSorry(tqparent,
i18n( "The file \"%1\" is not recognized as being supported by Kexi.")
- .arg(QDir::convertSeparators(dbFileName)),
- QString::fromLatin1("<p>")
+ .tqarg(TQDir::convertSeparators(dbFileName)),
+ TQString::tqfromLatin1("<p>")
+i18n("Database driver for this file type not found.\nDetected MIME type: %1")
- .arg(mimename)
+ .tqarg(mimename)
+(ptr.data()->comment().isEmpty()
- ? QString::fromLatin1(".") : QString::fromLatin1(" (%1).").arg(ptr.data()->comment()))
- +QString::fromLatin1("</p>")
+ ? TQString::tqfromLatin1(".") : TQString::tqfromLatin1(" (%1).").tqarg(ptr.data()->comment()))
+ +TQString::tqfromLatin1("</p>")
+possibleProblemsInfoMsg);
return false;
}
@@ -892,9 +892,9 @@ tristate KexiStartupHandler::detectActionForFile(
}
KexiProjectData*
-KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled, QWidget *parent)
+KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled, TQWidget *tqparent)
{
- clearStatus();
+ cleartqStatus();
cancelled = false;
if (!cdata)
return 0;
@@ -902,7 +902,7 @@ KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled
if (!d->passwordDialog)
d->passwordDialog = new KexiDBPasswordDialog(0, *cdata, false);
const int ret = d->passwordDialog->exec();
- if (d->passwordDialog->showConnectionDetailsRequested() || ret == QDialog::Accepted) {
+ if (d->passwordDialog->showConnectionDetailsRequested() || ret == TQDialog::Accepted) {
} else {
cancelled = true;
@@ -911,22 +911,22 @@ KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled
}
KexiProjectData* projectData = 0;
//dialog for selecting a project
- KexiProjectSelectorDialog prjdlg( parent, "prjdlg", cdata, true, false );
+ KexiProjectSelectorDialog prjdlg( tqparent, "prjdlg", cdata, true, false );
if (!prjdlg.projectSet() || prjdlg.projectSet()->error()) {
KexiGUIMessageHandler msgh;
if (prjdlg.projectSet())
msgh.showErrorMessage(prjdlg.projectSet(),
i18n("Could not load list of available projects for <b>%1</b> database server.")
- .arg(cdata->serverInfoString(true)));
+ .tqarg(cdata->serverInfoString(true)));
else
msgh.showErrorMessage(
i18n("Could not load list of available projects for <b>%1</b> database server.")
- .arg(cdata->serverInfoString(true)));
-// setStatus(i18n("Could not load list of available projects for database server \"%1\"")
-// .arg(cdata->serverInfoString(true)), prjdlg.projectSet()->errorMsg());
+ .tqarg(cdata->serverInfoString(true)));
+// settqStatus(i18n("Could not load list of available projects for database server \"%1\"")
+// .tqarg(cdata->serverInfoString(true)), prjdlg.projectSet()->errorMsg());
return 0;
}
- if (prjdlg.exec()!=QDialog::Accepted) {
+ if (prjdlg.exec()!=TQDialog::Accepted) {
cancelled = true;
return 0;
}
@@ -952,7 +952,7 @@ void KexiStartupHandler::slotSaveShortcutFileChanges()
if (!ok) {
KMessageBox::sorry(0, i18n("Failed saving connection data to\n\"%1\" file.")
- .arg(QDir::convertSeparators(d->shortcutFile->fileName())));
+ .tqarg(TQDir::convertSeparators(d->shortcutFile->fileName())));
}
}
diff --git a/kexi/main/startup/KexiStartup.h b/kexi/main/startup/KexiStartup.h
index 294ad7dd..22c55440 100644
--- a/kexi/main/startup/KexiStartup.h
+++ b/kexi/main/startup/KexiStartup.h
@@ -20,8 +20,8 @@
#ifndef KEXI_STARTUPHANDLER_H
#define KEXI_STARTUPHANDLER_H
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kpassdlg.h>
#include <core/kexistartupdata.h>
@@ -40,8 +40,9 @@ namespace KexiDB {
class KEXIMAIN_EXPORT KexiDBPasswordDialog : public KPasswordDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDBPasswordDialog(QWidget *parent, KexiDB::ConnectionData& cdata, bool showDetailsButton = false);
+ KexiDBPasswordDialog(TQWidget *tqparent, KexiDB::ConnectionData& cdata, bool showDetailsButton = false);
virtual ~KexiDBPasswordDialog();
bool showConnectionDetailsRequested() const { return m_showConnectionDetailsRequested; }
@@ -58,9 +59,10 @@ class KEXIMAIN_EXPORT KexiDBPasswordDialog : public KPasswordDialog
/*! Handles startup actions for Kexi application.
*/
class KEXIMAIN_EXPORT KexiStartupHandler
- : public QObject, public KexiStartupData, public Kexi::ObjectStatus
+ : public TQObject, public KexiStartupData, public Kexi::ObjecttqStatus
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiStartupHandler();
@@ -71,12 +73,12 @@ class KEXIMAIN_EXPORT KexiStartupHandler
#if 0
/*! Used for opening existing projects.
Detects project file type by mime type and returns project data, if it can be detected,
- otherwise - NULL. \a parent is passed as parent for potential error message boxes.
+ otherwise - NULL. \a tqparent is passed as tqparent for potential error message boxes.
Also uses \a cdata connection data for server-based projects.
cdata.driverName is adjusted, if a file-based project has been detected.
*/
static KexiProjectData* detectProjectData(
- KexiDB::ConnectionData& cdata, const QString &dbname, QWidget *parent);
+ KexiDB::ConnectionData& cdata, const TQString &dbname, TQWidget *tqparent);
#endif
/*! Options for detectDriverForFile() */
@@ -101,27 +103,27 @@ class KEXIMAIN_EXPORT KexiStartupHandler
- "shortcut" if the file looks like a shortcut to a project/connection file
- "connection" if the file looks like a connection data file.
- \a parent is passed as a parent for potential error message boxes.
+ \a tqparent is passed as a tqparent for potential error message boxes.
\a driverName is a preferred driver name.
\a options should be a combination of DetectDriverForFileOptions enum values. */
static tristate detectActionForFile(
- KexiStartupData::Import& detectedImportAction, QString& detectedDriverName,
- const QString& _suggestedDriverName,
- const QString &dbFileName, QWidget *parent = 0, int options = 0 );
+ KexiStartupData::Import& detectedImportAction, TQString& detectedDriverName,
+ const TQString& _suggestedDriverName,
+ const TQString &dbFileName, TQWidget *tqparent = 0, int options = 0 );
/*! Allows user to select a project with KexiProjectSelectorDialog.
\return selected project's data
Returns NULL and sets cancelled to true if the dialog was cancelled.
Returns NULL and sets cancelled to false if there was an error.
*/
- KexiProjectData* selectProject(KexiDB::ConnectionData *cdata, bool& cancelled, QWidget *parent = 0);
+ KexiProjectData* selectProject(KexiDB::ConnectionData *cdata, bool& cancelled, TQWidget *tqparent = 0);
protected slots:
void slotSaveShortcutFileChanges();
// void slotShowConnectionDetails();
protected:
- bool getAutoopenObjects(KCmdLineArgs *args, const QCString &action_name);
+ bool getAutoopenObjects(KCmdLineArgs *args, const TQCString &action_name);
KexiStartupHandlerPrivate *d;
};
diff --git a/kexi/main/startup/KexiStartupDialog.cpp b/kexi/main/startup/KexiStartupDialog.cpp
index 3b524492..40ced9b1 100644
--- a/kexi/main/startup/KexiStartupDialog.cpp
+++ b/kexi/main/startup/KexiStartupDialog.cpp
@@ -25,16 +25,16 @@
#include "KexiConnSelector.h"
#include "KexiConnSelectorBase.h"
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qpoint.h>
-#include <qobjectlist.h>
-#include <qvgroupbox.h>
-#include <qapplication.h>
-#include <qtooltip.h>
-#include <qwidgetstack.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqpoint.h>
+#include <tqobjectlist.h>
+#include <tqvgroupbox.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
+#include <tqwidgetstack.h>
#include <klocale.h>
#include <kdeversion.h>
@@ -67,7 +67,7 @@ public:
, pageOpenRecentID(-1)
{
result = 0;
- QString none, iconname;
+ TQString none, iconname;
iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
kexi_sqlite_icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
iconname = KMimeType::mimeType("application/x-kexiproject-shortcut")->icon(none,0);
@@ -83,35 +83,35 @@ public:
int dialogType, dialogOptions;
- QFrame *pageTemplates, *pageOpenExisting, *pageOpenRecent;
+ TQFrame *pageTemplates, *pageOpenExisting, *pageOpenRecent;
int pageTemplatesID;
int pageOpenExistingID, pageOpenRecentID;
int templatesSectionID_blank, templatesSectionID_import;
#ifdef DB_TEMPLATES
int templatesSectionID_templates; //, templatesSectionID_custom2;
#endif
- QCheckBox *chkDoNotShow;
+ TQCheckBox *chkDoNotShow;
//widgets for template tab:
KJanusWidget* templatesWidget;
- QObject *templatesWidget_IconListBox;//helper
+ TQObject *templatesWidget_IconListBox;//helper
- QWidgetStack *viewBlankTempl;
+ TQWidgetStack *viewBlankTempl;
KexiStartupDialogTemplatesPage *viewTemplates;
//TemplatesPage *viewBusinessTempl;
int result;
- QPixmap kexi_sqlite_icon, kexi_shortcut_icon;
+ TQPixmap kexi_sqlite_icon, kexi_shortcut_icon;
// //! Key string of selected database template. \sa selectedTemplateKey()
-// QString selectedTemplateKey;
+// TQString selectedTemplateKey;
//! used for "open existing"
KexiDBConnectionSet *connSet;
KexiStartupFileDialog *openExistingFileDlg; //! embedded file dialog
KexiConnSelectorWidget *openExistingConnWidget;
- QString existingFileToOpen; //! helper for returning a file name to open
+ TQString existingFileToOpen; //! helper for returning a file name to open
KexiDB::ConnectionData* selectedExistingConnection; //! helper for returning selected connection
//! used for "open recent"
@@ -129,7 +129,7 @@ bool dlgSinglePage(int type)
|| (type==KexiStartupDialog::OpenRecent);
}
-QString captionForDialogType(int type)
+TQString captionForDialogType(int type)
{
if (type==KexiStartupDialog::Templates)
return i18n("Create Project");
@@ -142,21 +142,21 @@ QString captionForDialogType(int type)
}
/*================================================================*/
-/*KexiStartupDialog::KexiStartupDialog(QWidget *parent, const char *name, KInstance* global,
- const QCString &format, const QString &nativePattern,
- const QString &nativeName, const DialogType &dialogType,
- const QCString& templateType) :
- KDialogBase(parent, name, true, i18n("Open Document"), KDialogBase::Ok | KDialogBase::Cancel,
+/*KexiStartupDialog::KexiStartupDialog(TQWidget *tqparent, const char *name, KInstance* global,
+ const TQCString &format, const TQString &nativePattern,
+ const TQString &nativeName, const DialogType &dialogType,
+ const TQCString& templateType) :
+ KDialogBase(tqparent, name, true, i18n("Open Document"), KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok) {
*/
KexiStartupDialog::KexiStartupDialog(
int dialogType, int dialogOptions,
KexiDBConnectionSet& connSet, KexiProjectSet& recentProjects,
- QWidget *parent, const char *name )
+ TQWidget *tqparent, const char *name )
: KDialogBase(
dlgSinglePage(dialogType) ? Plain : Tabbed
,captionForDialogType(dialogType)
- ,Help | Ok | Cancel, Ok, parent, name )
+ ,Help | Ok | Cancel, Ok, tqparent, name )
, d(new KexiStartupDialogPrivate())
{
d->recentProjects = &recentProjects;
@@ -194,7 +194,7 @@ KexiStartupDialog::KexiStartupDialog(
#endif
if (!d->singlePage) {
- connect(this, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotPageShown(QWidget*)));
+ connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT(slotPageShown(TQWidget*)));
d->templatesWidget->setFocus();
}
showPage(0);
@@ -215,8 +215,8 @@ bool KexiStartupDialog::shouldBeShown()
void KexiStartupDialog::show()
{
//just some cleanup
-// d->selectedTemplateKey=QString::null;
- d->existingFileToOpen=QString::null;
+// d->selectedTemplateKey=TQString();
+ d->existingFileToOpen=TQString();
d->result=-1;
KDialog::centerOnScreen(this);
@@ -236,7 +236,7 @@ void KexiStartupDialog::done(int r)
// kdDebug() << "KexiStartupDialog::done(" << r << ")" << endl;
// updateSelectedTemplateKeyInfo();
- if (r==QDialog::Rejected) {
+ if (r==TQDialog::Rejected) {
d->result = CancelResult;
} else {
const int idx = activePageIndex();
@@ -260,7 +260,7 @@ void KexiStartupDialog::done(int r)
// d->existingFileToOpen = d->openExistingFileDlg->currentURL().path();
d->selectedExistingConnection = 0;
} else {
- d->existingFileToOpen = QString::null;
+ d->existingFileToOpen = TQString();
d->selectedExistingConnection
= d->openExistingConnWidget->selectedConnectionData();
}
@@ -294,7 +294,7 @@ void KexiStartupDialog::reject()
void KexiStartupDialog::setupPageTemplates()
{
d->pageTemplates = addPage( i18n("&Create Project") );
- QVBoxLayout *lyr = new QVBoxLayout( d->pageTemplates, 0, KDialogBase::spacingHint() );
+ TQVBoxLayout *lyr = new TQVBoxLayout( d->pageTemplates, 0, KDialogBase::spacingHint() );
d->templatesWidget = new KJanusWidget(
d->pageTemplates, "templatesWidget", KJanusWidget::IconList);
@@ -304,27 +304,27 @@ void KexiStartupDialog::setupPageTemplates()
d->templatesWidget_IconListBox->installEventFilter(this);
}
lyr->addWidget(d->templatesWidget);
- connect(d->templatesWidget, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotPageShown(QWidget*)));
+ connect(d->templatesWidget, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT(slotPageShown(TQWidget*)));
if (d->dialogOptions & CheckBoxDoNotShowAgain) {
- d->chkDoNotShow = new QCheckBox(i18n("Don't show me this dialog again"), d->pageTemplates, "chkDoNotShow");
+ d->chkDoNotShow = new TQCheckBox(i18n("Don't show me this dialog again"), d->pageTemplates, "chkDoNotShow");
lyr->addWidget(d->chkDoNotShow);
}
//template groups:
- QFrame *templPageFrame;
- QVBoxLayout *tmplyr;
+ TQFrame *templPageFrame;
+ TQVBoxLayout *tmplyr;
int itemID = 0; //used just to set up templatesSectionID_*
//- page "blank db"
d->templatesSectionID_blank = itemID++;
- QString clickMsg( "\n\n" + i18n("Click \"OK\" button to proceed.") );
+ TQString clickMsg( "\n\n" + i18n("Click \"OK\" button to proceed.") );
templPageFrame = d->templatesWidget->addPage(
i18n("Blank Database"), i18n("New Blank Database Project"), DesktopIcon("empty") );
- tmplyr = new QVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
- QLabel *lbl_blank = new QLabel(
+ tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
+ TQLabel *lbl_blank = new TQLabel(
i18n("Kexi will create a new blank database project.")+clickMsg, templPageFrame );
- lbl_blank->setAlignment(Qt::AlignAuto|Qt::AlignTop|Qt::WordBreak);
+ lbl_blank->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak);
lbl_blank->setMargin(0);
tmplyr->addWidget( lbl_blank );
tmplyr->addStretch(1);
@@ -332,37 +332,37 @@ void KexiStartupDialog::setupPageTemplates()
#ifdef DB_TEMPLATES
//- page "templates"
d->templatesSectionID_templates = itemID++;
- QString none;
- QString kexi_sqlite_icon_name
+ TQString none;
+ TQString kexi_sqlite_icon_name
= KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
templPageFrame = d->templatesWidget->addPage (
i18n("Keep this text narrow: split to multiple rows if needed", "Create From\nTemplate"),
i18n("New Database Project From Template"), DesktopIcon(kexi_sqlite_icon_name) );
- tmplyr = new QVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
- QLabel *lbl_templ = new QLabel(
+ tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
+ TQLabel *lbl_templ = new TQLabel(
i18n("Kexi will create a new database project using selected template.\n"
"Select template and click \"OK\" button to proceed."), templPageFrame );
- lbl_templ->setAlignment(Qt::AlignAuto|Qt::AlignTop|Qt::WordBreak);
+ lbl_templ->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak);
lbl_templ->setMargin(0);
tmplyr->addWidget( lbl_templ );
d->viewTemplates = new KexiStartupDialogTemplatesPage( templPageFrame );
tmplyr->addWidget( d->viewTemplates );
- connect(d->viewTemplates,SIGNAL(selected(const QString&)),
- this,SLOT(templateSelected(const QString&)));
-/* connect(d->viewTemplates->templates,SIGNAL(returnPressed(QIconViewItem*)),
- this,SLOT(templateItemExecuted(QIconViewItem*)));
- connect(d->viewTemplates->templates,SIGNAL(currentChanged(QIconViewItem*)),
- this,SLOT(templateItemSelected(QIconViewItem*)));*/
+ connect(d->viewTemplates,TQT_SIGNAL(selected(const TQString&)),
+ this,TQT_SLOT(templateSelected(const TQString&)));
+/* connect(d->viewTemplates->templates,TQT_SIGNAL(returnPressed(TQIconViewItem*)),
+ this,TQT_SLOT(templateItemExecuted(TQIconViewItem*)));
+ connect(d->viewTemplates->templates,TQT_SIGNAL(currentChanged(TQIconViewItem*)),
+ this,TQT_SLOT(templateItemSelected(TQIconViewItem*)));*/
/*later
templPageFrame = d->templatesWidget->addPage (
i18n("Personal Databases"), i18n("New Personal Database Project Templates"), DesktopIcon("folder_home") );
- tmplyr = new QVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
- d->viewPersonalTempl = new TemplatesPage( Vertical, templPageFrame, "personal_page" );
+ tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
+ d->viewPersonalTempl = new TemplatesPage(Qt::Vertical, templPageFrame, "personal_page" );
tmplyr->addWidget( d->viewPersonalTempl );
- connect(d->viewPersonalTempl->templates,SIGNAL(doubleClicked(QIconViewItem*)),this,SLOT(templateItemExecuted(QIconViewItem*)));
- connect(d->viewPersonalTempl->templates,SIGNAL(returnPressed(QIconViewItem*)),this,SLOT(templateItemExecuted(QIconViewItem*)));
- connect(d->viewPersonalTempl->templates,SIGNAL(currentChanged(QIconViewItem*)),this,SLOT(templateItemSelected(QIconViewItem*)));
+ connect(d->viewPersonalTempl->templates,TQT_SIGNAL(doubleClicked(TQIconViewItem*)),this,TQT_SLOT(templateItemExecuted(TQIconViewItem*)));
+ connect(d->viewPersonalTempl->templates,TQT_SIGNAL(returnPressed(TQIconViewItem*)),this,TQT_SLOT(templateItemExecuted(TQIconViewItem*)));
+ connect(d->viewPersonalTempl->templates,TQT_SIGNAL(currentChanged(TQIconViewItem*)),this,TQT_SLOT(templateItemSelected(TQIconViewItem*)));
*/
//- page "business db"
@@ -371,12 +371,12 @@ void KexiStartupDialog::setupPageTemplates()
templPageFrame = d->templatesWidget->addPage (
i18n("Business Databases"), i18n("New Business Database Project Templates"),
DesktopIcon( "business_user" ));
- tmplyr = new QVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
- d->viewBusinessTempl = new TemplatesPage( Vertical, templPageFrame, "business_page" );
+ tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
+ d->viewBusinessTempl = new TemplatesPage(Qt::Vertical, templPageFrame, "business_page" );
tmplyr->addWidget( d->viewBusinessTempl );
- connect(d->viewBusinessTempl->templates,SIGNAL(doubleClicked(QIconViewItem*)),this,SLOT(templateItemExecuted(QIconViewItem*)));
- connect(d->viewBusinessTempl->templates,SIGNAL(returnPressed(QIconViewItem*)),this,SLOT(templateItemExecuted(QIconViewItem*)));
- connect(d->viewBusinessTempl->templates,SIGNAL(currentChanged(QIconViewItem*)),this,SLOT(templateItemSelected(QIconViewItem*)));
+ connect(d->viewBusinessTempl->templates,TQT_SIGNAL(doubleClicked(TQIconViewItem*)),this,TQT_SLOT(templateItemExecuted(TQIconViewItem*)));
+ connect(d->viewBusinessTempl->templates,TQT_SIGNAL(returnPressed(TQIconViewItem*)),this,TQT_SLOT(templateItemExecuted(TQIconViewItem*)));
+ connect(d->viewBusinessTempl->templates,TQT_SIGNAL(currentChanged(TQIconViewItem*)),this,TQT_SLOT(templateItemSelected(TQIconViewItem*)));
*/
#endif //DB_TEMPLATES
@@ -385,17 +385,17 @@ void KexiStartupDialog::setupPageTemplates()
templPageFrame = d->templatesWidget->addPage(
i18n("Import Existing\nDatabase"), i18n("Import Existing Database as New Database Project"),
DesktopIcon("database_import") );
- tmplyr = new QVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
- QLabel *lbl_import = new QLabel(
+ tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
+ TQLabel *lbl_import = new TQLabel(
i18n("Kexi will import the structure and data of an existing database as a new database project.")
+clickMsg, templPageFrame );
- lbl_import->setAlignment(Qt::AlignAuto|Qt::AlignTop|Qt::WordBreak);
+ lbl_import->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak);
lbl_import->setMargin(0);
tmplyr->addWidget( lbl_import );
tmplyr->addStretch(1);
}
-void KexiStartupDialog::slotPageShown(QWidget *page)
+void KexiStartupDialog::slotPageShown(TQWidget *page)
{
int idx = d->templatesWidget->pageIndex(page);
// KIconView *templ = 0;
@@ -436,12 +436,12 @@ void KexiStartupDialog::slotPageShown(QWidget *page)
}
#if 0
-void KexiStartupDialog::templateItemSelected(QIconViewItem *)
+void KexiStartupDialog::templateItemSelected(TQIconViewItem *)
{
updateDialogOKButton(d->pageTemplates);
}
-void KexiStartupDialog::templateItemExecuted(QIconViewItem *item)
+void KexiStartupDialog::templateItemExecuted(TQIconViewItem *item)
{
if (!item)
return;
@@ -454,10 +454,10 @@ void KexiStartupDialog::templateItemExecuted(QIconViewItem *item)
void KexiStartupDialog::updateSelectedTemplateKeyInfo()
{
if (activePageIndex()!=d->pageTemplatesID) {//not a 'new db' tab is selected
- d->selectedTemplateKey=QString::null;
+ d->selectedTemplateKey=TQString();
return;
}
- QIconViewItem *item;
+ TQIconViewItem *item;
if (d->templatesWidget->activePageIndex()==d->templatesSectionID_blank) {
d->selectedTemplateKey = "blank";
}
@@ -468,25 +468,25 @@ void KexiStartupDialog::updateSelectedTemplateKeyInfo()
else if (d->templatesWidget->activePageIndex()==d->templatesSectionID_templates) {
item = d->viewTemplates->templates->currentItem();
if (!item) {
- d->selectedTemplateKey=QString::null;
+ d->selectedTemplateKey=TQString();
return;
}
- d->selectedTemplateKey=QString("personal/")+static_cast<TemplateItem*>(item)->key;
+ d->selectedTemplateKey=TQString("personal/")+static_cast<TemplateItem*>(item)->key;
}
/*later?
else if (d->templatesWidget->activePageIndex()==d->templatesSectionID_custom2) {
item = d->viewBusinessTempl->templates->currentItem();
if (!item) {
- d->selectedTemplateKey=QString::null;
+ d->selectedTemplateKey=TQString();
return;
}
- d->selectedTemplateKey=QString("business/")+static_cast<TemplateItem*>(item)->key;
+ d->selectedTemplateKey=TQString("business/")+static_cast<TemplateItem*>(item)->key;
}*/
#endif
}
#endif // 0
-void KexiStartupDialog::tabShown(QWidget *w)
+void KexiStartupDialog::tabShown(TQWidget *w)
{
// kdDebug() << "KexiStartupDialog::tabShown " << (long)w << " "<< long(d->pageTemplates)<<endl;
@@ -497,7 +497,7 @@ void KexiStartupDialog::tabShown(QWidget *w)
}
}
-void KexiStartupDialog::updateDialogOKButton(QWidget *w)
+void KexiStartupDialog::updateDialogOKButton(TQWidget *w)
{
if (!w) {
int idx = activePageIndex();
@@ -534,7 +534,7 @@ void KexiStartupDialog::updateDialogOKButton(QWidget *w)
enableButton(Ok,enable);
}
-/*QString KexiStartupDialog::selectedTemplateKey() const
+/*TQString KexiStartupDialog::selectedTemplateKey() const
{
return d->selectedTemplateKey;
}*/
@@ -545,7 +545,7 @@ void KexiStartupDialog::setupPageOpenExisting()
d->pageOpenExisting = plainPage();
else
d->pageOpenExisting = addPage( i18n("Open &Existing Project") );
- QVBoxLayout *lyr = new QVBoxLayout( d->pageOpenExisting, 0, KDialogBase::spacingHint() );
+ TQVBoxLayout *lyr = new TQVBoxLayout( d->pageOpenExisting, 0, KDialogBase::spacingHint() );
d->openExistingConnWidget = new KexiConnSelectorWidget(*d->connSet,
":OpenExistingOrCreateNewProject",
@@ -559,11 +559,11 @@ void KexiStartupDialog::setupPageOpenExisting()
d->openExistingConnWidget->showAdvancedConn();
}
d->openExistingFileDlg = d->openExistingConnWidget->m_fileDlg;
- connect(d->openExistingFileDlg,SIGNAL(accepted()),this,SLOT(accept()));
- connect(d->openExistingConnWidget,SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
- this,SLOT(connectionItemForOpenExistingExecuted(ConnectionDataLVItem*)));
- connect(d->openExistingConnWidget,SIGNAL(connectionItemHighlighted(ConnectionDataLVItem*)),
- this,SLOT(connectionItemForOpenExistingHighlighted(ConnectionDataLVItem*)));
+ connect(d->openExistingFileDlg,TQT_SIGNAL(accepted()),this,TQT_SLOT(accept()));
+ connect(d->openExistingConnWidget,TQT_SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
+ this,TQT_SLOT(connectionItemForOpenExistingExecuted(ConnectionDataLVItem*)));
+ connect(d->openExistingConnWidget,TQT_SIGNAL(connectionItemHighlighted(ConnectionDataLVItem*)),
+ this,TQT_SLOT(connectionItemForOpenExistingHighlighted(ConnectionDataLVItem*)));
}
void KexiStartupDialog::connectionItemForOpenExistingExecuted(ConnectionDataLVItem *item)
@@ -602,14 +602,14 @@ void KexiStartupDialog::showAdvancedConnForOpenExisting()
d->openExistingConnWidget->showAdvancedConn();
}
-QString KexiStartupDialog::selectedFileName() const
+TQString KexiStartupDialog::selectedFileName() const
{
if (d->result == OpenExistingResult)
return d->existingFileToOpen;
else if (d->result == CreateFromTemplateResult && d->viewTemplates)
return d->viewTemplates->selectedFileName();
else
- return QString::null;
+ return TQString();
}
KexiDB::ConnectionData* KexiStartupDialog::selectedExistingConnection() const
@@ -617,7 +617,7 @@ KexiDB::ConnectionData* KexiStartupDialog::selectedExistingConnection() const
return d->selectedExistingConnection;
}
-void KexiStartupDialog::existingFileSelected(const QString &f)
+void KexiStartupDialog::existingFileSelected(const TQString &f)
{
if (f.isEmpty())
return;
@@ -629,11 +629,11 @@ void KexiStartupDialog::setupPageOpenRecent()
{
#ifdef KEXI_STARTUP_SHOW_RECENT
d->pageOpenRecent = addPage( i18n("Open &Recent Project") );
- QVBoxLayout *lyr = new QVBoxLayout( d->pageOpenRecent, 0, KDialogBase::spacingHint() );
+ TQVBoxLayout *lyr = new TQVBoxLayout( d->pageOpenRecent, 0, KDialogBase::spacingHint() );
lyr->addWidget( d->prj_selector = new KexiProjectSelectorWidget(
d->pageOpenRecent, "prj_selector", d->recentProjects ) );
- connect(d->prj_selector,SIGNAL(projectExecuted(KexiProjectData*)),
- this,SLOT(recentProjectItemExecuted(KexiProjectData*)));
+ connect(d->prj_selector,TQT_SIGNAL(projectExecuted(KexiProjectData*)),
+ this,TQT_SLOT(recentProjectItemExecuted(KexiProjectData*)));
#endif
}
@@ -654,12 +654,12 @@ void KexiStartupDialog::recentProjectItemExecuted(KexiProjectData *data)
}
//! used for accepting templates dialog with just return key press
-bool KexiStartupDialog::eventFilter( QObject *o, QEvent *e )
+bool KexiStartupDialog::eventFilter( TQObject *o, TQEvent *e )
{
if (o==d->templatesWidget_IconListBox && d->templatesWidget_IconListBox) {
- if (e->type()==QEvent::KeyPress
- && (static_cast<QKeyEvent*>(e)->key()==Key_Enter || static_cast<QKeyEvent*>(e)->key()==Key_Return)
- || e->type()==QEvent::MouseButtonDblClick)
+ if (e->type()==TQEvent::KeyPress
+ && (TQT_TQKEYEVENT(e)->key()==Key_Enter || TQT_TQKEYEVENT(e)->key()==Key_Return)
+ || e->type()==TQEvent::MouseButtonDblClick)
{
const int t_id = d->templatesWidget->activePageIndex();
if (t_id==d->templatesSectionID_blank || t_id==d->templatesSectionID_import) {
@@ -682,16 +682,16 @@ int KexiStartupDialog::activePageIndex() const
return 0; //there is always "plain page" #0 selected
}
-void KexiStartupDialog::templateSelected(const QString& fileName)
+void KexiStartupDialog::templateSelected(const TQString& fileName)
{
if (!fileName.isEmpty())
accept();
}
-QValueList<KexiProjectData::ObjectInfo> KexiStartupDialog::autoopenObjects() const
+TQValueList<KexiProjectData::ObjectInfo> KexiStartupDialog::autoopenObjects() const
{
if (d->result != CreateFromTemplateResult || !d->viewTemplates)
- QValueList<KexiProjectData::ObjectInfo>();
+ TQValueList<KexiProjectData::ObjectInfo>();
return d->viewTemplates->autoopenObjectsForSelectedTemplate();
}
diff --git a/kexi/main/startup/KexiStartupDialog.h b/kexi/main/startup/KexiStartupDialog.h
index 41f6064b..0f994ff3 100644
--- a/kexi/main/startup/KexiStartupDialog.h
+++ b/kexi/main/startup/KexiStartupDialog.h
@@ -26,8 +26,8 @@
#include <kfileiconview.h>
#include <kfiledialog.h>
-#include <qlabel.h>
-#include <qsplitter.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
#include <kexidb/connectiondata.h>
#include <core/kexiprojectdata.h>
@@ -46,6 +46,7 @@ class ConnectionDataLVItem;
class KEXIMAIN_EXPORT KexiStartupDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! The Dialog returns one of these values depending
@@ -88,7 +89,7 @@ public:
@param recentProjects a set of recent projects' info, used for "Open recent" tab
@param connSet conenction set used to present available conenctions
in "Open Existing" tab. Pass an empty object is this tab is not used.
- @param parent parent widget, if any.
+ @param tqparent tqparent widget, if any.
@param name name of this object.
*/
KexiStartupDialog(
@@ -96,7 +97,7 @@ public:
int dialogOptions,
KexiDBConnectionSet& connSet,
KexiProjectSet& recentProjects,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *tqparent = 0, const char *name = 0 );
~KexiStartupDialog();
/*! \return true if startup dialog should be shown (info is taken from kexi config)
@@ -118,11 +119,11 @@ public:
(if result() == CreateFromTemplateResult).
Returns empty string if no such selection has been made or other tab was selected.
*/
- QString selectedFileName() const;
+ TQString selectedFileName() const;
/*! \return "autoopen" objects defined for selected template.
Only makes sense if template was used. */
- QValueList<KexiProjectData::ObjectInfo> autoopenObjects() const;
+ TQValueList<KexiProjectData::ObjectInfo> autoopenObjects() const;
/*! \return a pointer to selected Kexi connection data.
(if "Open Existing" tab was selected and this connection data was clicked).
@@ -141,32 +142,32 @@ protected slots:
virtual void slotOk();
//! slot activated when one of page in templates window is shown
- void slotPageShown(QWidget *page);
+ void slotPageShown(TQWidget *page);
/*
//! Any icon view item has been executed (dblclicked)
- void templateItemExecuted(QIconViewItem *item);
+ void templateItemExecuted(TQIconViewItem *item);
//! Any icon view item has been selected
- void templateItemSelected(QIconViewItem *item);*/
+ void templateItemSelected(TQIconViewItem *item);*/
//! Any tab has been selected
- void tabShown(QWidget *w);
+ void tabShown(TQWidget *w);
- void templateSelected(const QString& fileName);
+ void templateSelected(const TQString& fileName);
//! helper
void recentProjectItemExecuted(KexiProjectData *data);
- void existingFileSelected(const QString &f);
+ void existingFileSelected(const TQString &f);
void showSimpleConnForOpenExisting();
void showAdvancedConnForOpenExisting();
void connectionItemForOpenExistingExecuted(ConnectionDataLVItem *item);
void connectionItemForOpenExistingHighlighted(ConnectionDataLVItem *item);
protected:
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
//! helper: updates a state of dialog's OK button
- void updateDialogOKButton(QWidget *w);
+ void updateDialogOKButton(TQWidget *w);
//! internal reimplementation
int activePageIndex() const;
diff --git a/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp b/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp
index 3a64fbac..52fe0870 100644
--- a/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp
+++ b/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp
@@ -26,7 +26,7 @@
#include "KexiConnSelector.h"
#include "KexiConnSelectorBase.h"
-#include <qheader.h>
+#include <tqheader.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -36,14 +36,14 @@
#define KEXI_STARTUP_SHOW_RECENT
#endif
-/*QPixmap createIcon()
+/*TQPixmap createIcon()
{
}*/
-/*QString createText(const QString& name, const QString& description)
+/*TQString createText(const TQString& name, const TQString& description)
{
- QString txt = "<H2>" + name + "</H2>";
+ TQString txt = "<H2>" + name + "</H2>";
if (description.isEmpty())
return name + description
}*/
@@ -52,10 +52,10 @@
class TemplateItem : public KListViewItem
{
public:
- TemplateItem(QListView* parent, const QString& aFilename,
- const QString& name, const QString& description, const QPixmap& icon,
- const QValueList<KexiProjectData::ObjectInfo>& aAutoopenObjects)
- : KListViewItem(parent, name + "\n" + description)
+ TemplateItem(TQListView* tqparent, const TQString& aFilename,
+ const TQString& name, const TQString& description, const TQPixmap& icon,
+ const TQValueList<KexiProjectData::ObjectInfo>& aAutoopenObjects)
+ : KListViewItem(tqparent, name + "\n" + description)
, autoopenObjects(aAutoopenObjects)
, filename(aFilename)
{
@@ -63,22 +63,22 @@ class TemplateItem : public KListViewItem
}
~TemplateItem() {}
- QValueList<KexiProjectData::ObjectInfo> autoopenObjects;
- QString filename;
+ TQValueList<KexiProjectData::ObjectInfo> autoopenObjects;
+ TQString filename;
};
//-----------------------
-KexiStartupDialogTemplatesPage::KexiStartupDialogTemplatesPage( QWidget * parent )
- : KListView(parent, "KexiStartupDialogTemplatesPage")
+KexiStartupDialogTemplatesPage::KexiStartupDialogTemplatesPage( TQWidget * tqparent )
+ : KListView(tqparent, "KexiStartupDialogTemplatesPage")
, m_popuplated(false)
{
- addColumn(QString::null);
+ addColumn(TQString());
header()->hide();
setColumnWidthMode(0, Maximum);
setResizeMode(LastColumn);
setItemMargin(6);
- connect(this,SIGNAL(executed(QListViewItem*)), this, SLOT(slotExecuted(QListViewItem*)));
+ connect(this,TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotExecuted(TQListViewItem*)));
}
KexiStartupDialogTemplatesPage::~KexiStartupDialogTemplatesPage()
@@ -91,7 +91,7 @@ void KexiStartupDialogTemplatesPage::populate()
return;
m_popuplated = true;
KexiTemplateInfo::List list = KexiTemplateLoader::loadListInfo();
- foreach( QValueList<KexiTemplateInfo>::ConstIterator, it, list ) {
+ foreach( TQValueList<KexiTemplateInfo>::ConstIterator, it, list ) {
new TemplateItem(this, (*it).filename, (*it).name,
(*it).description, (*it).icon, (*it).autoopenObjects);
}
@@ -104,12 +104,12 @@ void KexiStartupDialogTemplatesPage::populate()
// info = new KTextBrowser(this,"info");
// setResizeMode(templates,KeepSize);
// setResizeMode(info,KeepSize);
-// connect(templates,SIGNAL(selectionChanged(QIconViewItem*)),this,SLOT(itemClicked(QIconViewItem*)));
+// connect(templates,TQT_SIGNAL(selectionChanged(TQIconViewItem*)),this,TQT_SLOT(itemClicked(TQIconViewItem*)));
}
/*
-void TemplatesPage::addItem(const QString& key, const QString& name,
- const QString& description, const QPixmap& icon)
+void TemplatesPage::addItem(const TQString& key, const TQString& name,
+ const TQString& description, const TQPixmap& icon)
{
TemplateItem *item = new TemplateItem(templates, name, icon);
item->key=key;
@@ -117,35 +117,35 @@ void TemplatesPage::addItem(const QString& key, const QString& name,
item->description=description;
}
-void TemplatesPage::itemClicked(QIconViewItem *item) {
+void TemplatesPage::itemClicked(TQIconViewItem *item) {
if (!item) {
info->setText("");
return;
}
- QString t = QString("<h2>%1</h2><p>%2</p>")
- .arg(static_cast<TemplateItem*>(item)->name)
- .arg(static_cast<TemplateItem*>(item)->description);
+ TQString t = TQString("<h2>%1</h2><p>%2</p>")
+ .tqarg(static_cast<TemplateItem*>(item)->name)
+ .tqarg(static_cast<TemplateItem*>(item)->description);
#ifndef DB_TEMPLATES
- t += QString("<p>") + i18n("We are sorry, templates are not yet available.") +"</p>";
+ t += TQString("<p>") + i18n("We are sorry, templates are not yet available.") +"</p>";
#endif
info->setText( t );
}*/
-QString KexiStartupDialogTemplatesPage::selectedFileName() const
+TQString KexiStartupDialogTemplatesPage::selectedFileName() const
{
TemplateItem* templateItem = static_cast<TemplateItem*>(selectedItem());
- return templateItem ? templateItem->filename : QString::null;
+ return templateItem ? templateItem->filename : TQString();
}
-QValueList<KexiProjectData::ObjectInfo>
+TQValueList<KexiProjectData::ObjectInfo>
KexiStartupDialogTemplatesPage::autoopenObjectsForSelectedTemplate() const
{
TemplateItem* templateItem = static_cast<TemplateItem*>(selectedItem());
- return templateItem ? templateItem->autoopenObjects : QValueList<KexiProjectData::ObjectInfo>();
+ return templateItem ? templateItem->autoopenObjects : TQValueList<KexiProjectData::ObjectInfo>();
}
-void KexiStartupDialogTemplatesPage::slotExecuted(QListViewItem* item)
+void KexiStartupDialogTemplatesPage::slotExecuted(TQListViewItem* item)
{
TemplateItem* templateItem = static_cast<TemplateItem*>(item);
if (!templateItem)
diff --git a/kexi/main/startup/KexiStartupDialogTemplatesPage.h b/kexi/main/startup/KexiStartupDialogTemplatesPage.h
index 8613065f..2cf50b7b 100644
--- a/kexi/main/startup/KexiStartupDialogTemplatesPage.h
+++ b/kexi/main/startup/KexiStartupDialogTemplatesPage.h
@@ -27,26 +27,27 @@
class KEXIMAIN_EXPORT KexiStartupDialogTemplatesPage : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiStartupDialogTemplatesPage( QWidget * parent = 0 );
+ KexiStartupDialogTemplatesPage( TQWidget * tqparent = 0 );
~KexiStartupDialogTemplatesPage();
-// void addItem(const QString& key, const QString& name,
-// const QString& description, const QPixmap& icon);
+// void addItem(const TQString& key, const TQString& name,
+// const TQString& description, const TQPixmap& icon);
- QString selectedFileName() const;
+ TQString selectedFileName() const;
- QValueList<KexiProjectData::ObjectInfo> autoopenObjectsForSelectedTemplate() const;
+ TQValueList<KexiProjectData::ObjectInfo> autoopenObjectsForSelectedTemplate() const;
void populate();
signals:
- void selected(const QString& filename);
+ void selected(const TQString& filename);
protected slots:
- void slotExecuted(QListViewItem* item);
+ void slotExecuted(TQListViewItem* item);
-// void itemClicked(QIconViewItem *item);
+// void itemClicked(TQIconViewItem *item);
private:
bool m_popuplated : 1;
diff --git a/kexi/main/startup/KexiStartupFileDialog.cpp b/kexi/main/startup/KexiStartupFileDialog.cpp
index d2869925..c19a96c0 100644
--- a/kexi/main/startup/KexiStartupFileDialog.cpp
+++ b/kexi/main/startup/KexiStartupFileDialog.cpp
@@ -23,10 +23,10 @@
#include <core/kexi.h>
#include <kexiutils/utils.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpushbutton.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpushbutton.h>
+#include <tqapplication.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -36,46 +36,46 @@
#include <kurlcombobox.h>
KexiStartupFileDialog::KexiStartupFileDialog(
- const QString& startDirOrVariable, int mode,
- QWidget *parent, const char *name)
- : KexiStartupFileDialogBase(startDirOrVariable, "", parent, name, 0)
+ const TQString& startDirOrVariable, int mode,
+ TQWidget *tqparent, const char *name)
+ : KexiStartupFileDialogBase(startDirOrVariable, "", tqparent, name, 0)
, m_confirmOverwrites(true)
, m_filtersUpdated(false)
{
- setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
+ tqsetSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Minimum);
setMode( mode );
- QPoint point( 0, 0 );
- reparent( parentWidget(), point );
+ TQPoint point( 0, 0 );
+ reparent( tqparentWidget(), point );
- if (layout())
- layout()->setMargin(0);
+ if (tqlayout())
+ tqlayout()->setMargin(0);
setMinimumHeight(100);
setSizeGripEnabled ( false );
//dirty hack to customize filedialog view:
{
- QObjectList *l = queryList( "QPushButton" );
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = queryList( TQPUSHBUTTON_OBJECT_NAME_STRING );
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
- static_cast<QPushButton*>(obj)->hide();
+ static_cast<TQPushButton*>(TQT_TQWIDGET(obj))->hide();
}
delete l;
}
{
- QObjectList *l = queryList("QWidget");
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
- static_cast<QWidget*>(obj)->installEventFilter(this);
+ TQT_TQWIDGET(obj)->installEventFilter(this);
}
delete l;
}
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
if (startDirOrVariable.startsWith(":"))
m_lastVisitedPathsVariable = startDirOrVariable; //store for later use
#else
@@ -86,7 +86,7 @@ KexiStartupFileDialog::KexiStartupFileDialog(
KexiStartupFileDialog::~KexiStartupFileDialog()
{
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
saveLastVisitedPath(currentFileName());
#endif
}
@@ -98,24 +98,24 @@ void KexiStartupFileDialog::setMode(int mode)
m_filtersUpdated = false;
}
-QStringList KexiStartupFileDialog::additionalFilters() const
+TQStringList KexiStartupFileDialog::additionalFilters() const
{
return m_additionalMimeTypes;
}
-void KexiStartupFileDialog::setAdditionalFilters(const QStringList &mimeTypes)
+void KexiStartupFileDialog::setAdditionalFilters(const TQStringList &mimeTypes)
{
//delayed
m_additionalMimeTypes = mimeTypes;
m_filtersUpdated = false;
}
-QStringList KexiStartupFileDialog::excludedFilters() const
+TQStringList KexiStartupFileDialog::excludedFilters() const
{
return m_excludedMimeTypes;
}
-void KexiStartupFileDialog::setExcludedFilters(const QStringList &mimeTypes)
+void KexiStartupFileDialog::setExcludedFilters(const TQStringList &mimeTypes)
{
//delayed
m_excludedMimeTypes = mimeTypes;
@@ -128,35 +128,35 @@ void KexiStartupFileDialog::updateFilters()
return;
m_filtersUpdated = true;
- m_lastFileName = QString::null;
+ m_lastFileName = TQString();
// m_lastUrl = KURL();
clearFilter();
- QString filter;
+ TQString filter;
KMimeType::Ptr mime;
- QStringList allfilters;
+ TQStringList allfilters;
const bool normalOpeningMode = m_mode & Opening && !(m_mode & Custom);
const bool normalSavingMode = m_mode & SavingFileBasedDB && !(m_mode & Custom);
if (normalOpeningMode || normalSavingMode) {
mime = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() );
- if (mime && m_excludedMimeTypes.find(mime->name())==m_excludedMimeTypes.end()) {
+ if (mime && m_excludedMimeTypes.tqfind(mime->name())==m_excludedMimeTypes.end()) {
filter += KexiUtils::fileDialogFilterString(mime);
allfilters += mime->patterns();
}
}
if (normalOpeningMode || m_mode & SavingServerBasedDB) {
mime = KMimeType::mimeType("application/x-kexiproject-shortcut");
- if (mime && m_excludedMimeTypes.find(mime->name())==m_excludedMimeTypes.end()) {
+ if (mime && m_excludedMimeTypes.tqfind(mime->name())==m_excludedMimeTypes.end()) {
filter += KexiUtils::fileDialogFilterString(mime);
allfilters += mime->patterns();
}
}
if (normalOpeningMode || m_mode & SavingServerBasedDB) {
mime = KMimeType::mimeType("application/x-kexi-connectiondata");
- if (mime && m_excludedMimeTypes.find(mime->name())==m_excludedMimeTypes.end()) {
+ if (mime && m_excludedMimeTypes.tqfind(mime->name())==m_excludedMimeTypes.end()) {
filter += KexiUtils::fileDialogFilterString(mime);
allfilters += mime->patterns();
}
@@ -165,37 +165,37 @@ void KexiStartupFileDialog::updateFilters()
//! @todo hardcoded for MSA:
if (normalOpeningMode) {
mime = KMimeType::mimeType("application/x-msaccess");
- if (mime && m_excludedMimeTypes.find(mime->name())==m_excludedMimeTypes.end()) {
+ if (mime && m_excludedMimeTypes.tqfind(mime->name())==m_excludedMimeTypes.end()) {
filter += KexiUtils::fileDialogFilterString(mime);
allfilters += mime->patterns();
}
}
- foreach (QStringList::ConstIterator, it, m_additionalMimeTypes) {
+ foreach (TQStringList::ConstIterator, it, m_additionalMimeTypes) {
if (*it == "all/allfiles")
continue;
- if (m_excludedMimeTypes.find(*it)!=m_excludedMimeTypes.end())
+ if (m_excludedMimeTypes.tqfind(*it)!=m_excludedMimeTypes.end())
continue;
filter += KexiUtils::fileDialogFilterString(*it);
mime = KMimeType::mimeType(*it);
allfilters += mime->patterns();
}
- if (m_excludedMimeTypes.find("all/allfiles")==m_excludedMimeTypes.end())
+ if (m_excludedMimeTypes.tqfind("all/allfiles")==m_excludedMimeTypes.end())
filter += KexiUtils::fileDialogFilterString("all/allfiles");
// mime = KMimeType::mimeType("all/allfiles");
// if (mime) {
-// filter += QString(mime->patterns().isEmpty() ? "*" : mime->patterns().join(" "))
+// filter += TQString(mime->patterns().isEmpty() ? "*" : mime->patterns().join(" "))
// + "|" + mime->comment()+ " (*)\n";
// }
//remove duplicates made because upper- and lower-case extenstions are used:
- QStringList allfiltersUnique;
- QDict<char> uniqueDict(499, false);
- foreach (QStringList::ConstIterator, it, allfilters) {
+ TQStringList allfiltersUnique;
+ TQDict<char> uniqueDict(499, false);
+ foreach (TQStringList::ConstIterator, it, allfilters) {
// kdDebug() << *it << endl;
uniqueDict.insert(*it, (char*)1);
}
- foreach_dict (QDictIterator<char>, it, uniqueDict) {
+ foreach_dict (TQDictIterator<char>, it, uniqueDict) {
allfiltersUnique += it.currentKey();
}
allfiltersUnique.sort();
@@ -226,22 +226,22 @@ void KexiStartupFileDialog::show()
}
//KURL KexiStartupFileDialog::currentURL()
-QString KexiStartupFileDialog::currentFileName()
+TQString KexiStartupFileDialog::currentFileName()
{
- setResult( QDialog::Accepted ); // selectedURL tests for it
+ setResult( TQDialog::Accepted ); // selectedURL tests for it
-#ifdef Q_WS_WIN
-// QString path = selectedFile();
+#ifdef TQ_WS_WIN
+// TQString path = selectedFile();
//js @todo
// kdDebug() << "selectedFile() == " << path << " '" << url().fileName() << "' " << m_lineEdit->text() << endl;
- QString path = dir()->absPath();
+ TQString path = dir()->absPath();
if (!path.endsWith("/") && !path.endsWith("\\"))
path.append("/");
path += m_lineEdit->text();
-// QString path = QFileInfo(selectedFile()).dirPath(true) + "/" + m_lineEdit->text();
+// TQString path = TQFileInfo(selectedFile()).dirPath(true) + "/" + m_lineEdit->text();
#else
-// QString path = locationEdit->currentText().stripWhiteSpace(); //url.path().stripWhiteSpace(); that does not work, if the full path is not in the location edit !!!!!
- QString path=KexiStartupFileDialogBase::selectedURL().path();
+// TQString path = locationEdit->currentText().stripWhiteSpace(); //url.path().stripWhiteSpace(); that does not work, if the full path is not in the location edit !!!!!
+ TQString path=KexiStartupFileDialogBase::selectedURL().path();
kdDebug() << "prev selectedURL() == " << path <<endl;
kdDebug() << "locationEdit == " << locationEdit->currentText().stripWhiteSpace() <<endl;
//make sure user-entered path is acceped:
@@ -254,22 +254,22 @@ QString KexiStartupFileDialog::currentFileName()
if (!currentFilter().isEmpty()) {
if (m_mode & SavingFileBasedDB) {
- QStringList filters = QStringList::split(" ", currentFilter()); //.first().stripWhiteSpace();
+ TQStringList filters = TQStringList::split(" ", currentFilter()); //.first().stripWhiteSpace();
kdDebug()<< " filter == " << filters << endl;
- QString ext = QFileInfo(path).extension(false);
+ TQString ext = TQFileInfo(path).extension(false);
bool hasExtension = false;
- for (QStringList::ConstIterator filterIt = filters.constBegin();
+ for (TQStringList::ConstIterator filterIt = filters.constBegin();
filterIt != filters.constEnd() && !hasExtension; ++filterIt)
{
- QString f( (*filterIt).stripWhiteSpace() );
+ TQString f( (*filterIt).stripWhiteSpace() );
hasExtension = !f.mid(2).isEmpty() && ext==f.mid(2);
}
if (!hasExtension) {
//no extension: add one
- QString defaultExtension( m_defaultExtension );
+ TQString defaultExtension( m_defaultExtension );
if (defaultExtension.isEmpty())
defaultExtension = filters.first().stripWhiteSpace().mid(2); //first one
- path+=(QString(".")+defaultExtension);
+ path+=(TQString(".")+defaultExtension);
kdDebug() << "KexiStartupFileDialog::checkURL(): append extension, " << path << endl;
setSelection( path );
}
@@ -284,8 +284,8 @@ QString KexiStartupFileDialog::currentFileName()
bool KexiStartupFileDialog::checkFileName()
{
// KURL url = currentURL();
-// QString path = url.path().stripWhiteSpace();
- QString path = currentFileName().stripWhiteSpace();
+// TQString path = url.path().stripWhiteSpace();
+ TQString path = currentFileName().stripWhiteSpace();
// if (url.fileName().stripWhiteSpace().isEmpty()) {
if (path.isEmpty()) {
@@ -296,11 +296,11 @@ bool KexiStartupFileDialog::checkFileName()
kdDebug() << "KexiStartupFileDialog::checkURL() path: " << path << endl;
// kdDebug() << "KexiStartupFileDialog::checkURL() fname: " << url.fileName() << endl;
//todo if ( url.isLocalFile() ) {
- QFileInfo fi(path);
+ TQFileInfo fi(path);
if (mode() & KFile::ExistingOnly) {
if ( !fi.exists() ) {
KMessageBox::error( this, "<qt>"+i18n( "The file \"%1\" does not exist." )
- .arg( QDir::convertSeparators(path) ) );
+ .tqarg( TQDir::convertSeparators(path) ) );
return false;
}
else if (mode() & KFile::File) {
@@ -310,7 +310,7 @@ bool KexiStartupFileDialog::checkFileName()
}
else if (!fi.isReadable()) {
KMessageBox::error( this, "<qt>"+i18n( "The file \"%1\" is not readable." )
- .arg( QDir::convertSeparators(path) ) );
+ .tqarg( TQDir::convertSeparators(path) ) );
return false;
}
}
@@ -323,13 +323,13 @@ bool KexiStartupFileDialog::checkFileName()
}
//static
-bool KexiStartupFileDialog::askForOverwriting(const QString& filePath, QWidget *parent)
+bool KexiStartupFileDialog::askForOverwriting(const TQString& filePath, TQWidget *tqparent)
{
- QFileInfo fi(filePath);
+ TQFileInfo fi(filePath);
if (!fi.exists())
return true;
- const int res = KMessageBox::warningYesNo( parent, i18n( "The file \"%1\" already exists.\n"
- "Do you want to overwrite it?").arg( QDir::convertSeparators(filePath) ), QString::null,
+ const int res = KMessageBox::warningYesNo( tqparent, i18n( "The file \"%1\" already exists.\n"
+ "Do you want to overwrite it?").tqarg( TQDir::convertSeparators(filePath) ), TQString(),
i18n("Overwrite"), KStdGuiItem::no() );
if (res == KMessageBox::Yes)
return true;
@@ -339,17 +339,17 @@ bool KexiStartupFileDialog::askForOverwriting(const QString& filePath, QWidget *
void KexiStartupFileDialog::accept()
{
// locationEdit->setFocus();
-// QKeyEvent ev(QEvent::KeyPress, Qt::Key_Enter, '\n', 0);
-// QApplication::sendEvent(locationEdit, &ev);
-// QApplication::postEvent(locationEdit, &ev);
+// TQKeyEvent ev(TQEvent::KeyPress, TQt::Key_Enter, '\n', 0);
+// TQApplication::sendEvent(locationEdit, &ev);
+// TQApplication::postEvent(locationEdit, &ev);
// kdDebug() << "KexiStartupFileDialog::accept() m_lastUrl == " << m_lastUrl.path() << endl;
// if (m_lastUrl.path()==currentURL().path()) {//(js) to prevent more multiple kjob signals (I do not know why this is)
if (m_lastFileName==currentFileName()) {//(js) to prevent more multiple kjob signals (I do not know why this is)
// m_lastUrl=KURL();
- m_lastFileName=QString::null;
+ m_lastFileName=TQString();
kdDebug() << "m_lastFileName==currentFileName()" << endl;
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
return;
#endif
}
@@ -365,7 +365,7 @@ void KexiStartupFileDialog::accept()
// m_lastUrl = currentURL();
m_lastFileName = currentFileName();
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
saveLastVisitedPath(m_lastFileName);
#endif
}
@@ -376,7 +376,7 @@ void KexiStartupFileDialog::reject()
emit rejected();
}
-/*#ifndef Q_WS_WIN
+/*#ifndef TQ_WS_WIN
KURLComboBox *KexiStartupFileDialog::locationWidget() const
{
return locationEdit;
@@ -384,9 +384,9 @@ KURLComboBox *KexiStartupFileDialog::locationWidget() const
#endif
*/
-void KexiStartupFileDialog::setLocationText(const QString& fn)
+void KexiStartupFileDialog::setLocationText(const TQString& fn)
{
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
//js @todo
setSelection(fn);
#else
@@ -399,19 +399,19 @@ void KexiStartupFileDialog::setLocationText(const QString& fn)
void KexiStartupFileDialog::setFocus()
{
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
m_lineEdit->setFocus();
#else
locationEdit->setFocus();
#endif
}
-bool KexiStartupFileDialog::eventFilter ( QObject * watched, QEvent * e )
+bool KexiStartupFileDialog::eventFilter ( TQObject * watched, TQEvent * e )
{
//filter-out ESC key
- if (e->type()==QEvent::KeyPress && static_cast<QKeyEvent*>(e)->key()==Qt::Key_Escape
- && static_cast<QKeyEvent*>(e)->state()==Qt::NoButton) {
- static_cast<QKeyEvent*>(e)->accept();
+ if (e->type()==TQEvent::KeyPress && TQT_TQKEYEVENT(e)->key()==TQt::Key_Escape
+ && TQT_TQKEYEVENT(e)->state()==Qt::NoButton) {
+ TQT_TQKEYEVENT(e)->accept();
emit rejected();
return true;
}
diff --git a/kexi/main/startup/KexiStartupFileDialog.h b/kexi/main/startup/KexiStartupFileDialog.h
index 87ebf7f4..12fc3ef4 100644
--- a/kexi/main/startup/KexiStartupFileDialog.h
+++ b/kexi/main/startup/KexiStartupFileDialog.h
@@ -22,7 +22,7 @@
#include <kfiledialog.h>
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
# include "KexiStartupFileDialogBase_win.h"
#else
typedef KFileDialog KexiStartupFileDialogBase;
@@ -33,6 +33,7 @@
class KEXIMAIN_EXPORT KexiStartupFileDialog : public KexiStartupFileDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Dialog mode:
@@ -49,43 +50,43 @@ public:
};
KexiStartupFileDialog(
- const QString& startDirOrVariable, int mode, QWidget *parent=0, const char *name=0);
+ const TQString& startDirOrVariable, int mode, TQWidget *tqparent=0, const char *name=0);
virtual ~KexiStartupFileDialog();
/*! Helper. Displays "The file %1 already exists. Do you want to overwrite it?" yes/no message box.
- \a parent is used as a parent of the KMessageBox.
+ \a tqparent is used as a tqparent of the KMessageBox.
\return true if \a filePath file does not exists or user has agreed on overwriting,
false in user do not want to overwrite. */
- static bool askForOverwriting(const QString& filePath, QWidget *parent = 0);
+ static bool askForOverwriting(const TQString& filePath, TQWidget *tqparent = 0);
void setMode(int mode);
- QStringList additionalFilters() const;
+ TQStringList additionalFilters() const;
//! Sets additional filters list, e.g. "text/x-csv"
- void setAdditionalFilters(const QStringList &mimeTypes);
+ void setAdditionalFilters(const TQStringList &mimeTypes);
- QStringList excludedFilters() const;
+ TQStringList excludedFilters() const;
//! Excludes filters list
- void setExcludedFilters(const QStringList &mimeTypes);
+ void setExcludedFilters(const TQStringList &mimeTypes);
// KURL currentURL();
- QString currentFileName();
+ TQString currentFileName();
-//#ifndef Q_WS_WIN
+//#ifndef TQ_WS_WIN
// KURLComboBox *locationWidget() const;
//#endif
//! just sets locationWidget()->setCurrentText(fn)
//! (and something similar on win32)
- void setLocationText(const QString& fn);
+ void setLocationText(const TQString& fn);
//! Sets default extension which will be added after accepting
//! if user didn't provided one. This method is usable when there is
//! more than one filter so there is no rule what extension should be selected
//! (by default first one is selected).
- void setDefaultExtension(const QString& ext) { m_defaultExtension = ext; }
+ void setDefaultExtension(const TQString& ext) { m_defaultExtension = ext; }
/*! \return true if the current URL meets requies constraints
(i.e. exists or doesn't exist);
@@ -97,7 +98,7 @@ public:
This is true by default. */
void setConfirmOverwrites(bool set) { m_confirmOverwrites = set; }
- virtual bool eventFilter ( QObject * watched, QEvent * e );
+ virtual bool eventFilter ( TQObject * watched, TQEvent * e );
public slots:
virtual void show();
@@ -120,10 +121,10 @@ private:
void updateFilters();
// KURL m_lastUrl;
- QString m_lastFileName;
+ TQString m_lastFileName;
int m_mode;
- QStringList m_additionalMimeTypes, m_excludedMimeTypes;
- QString m_defaultExtension;
+ TQStringList m_additionalMimeTypes, m_excludedMimeTypes;
+ TQString m_defaultExtension;
bool m_confirmOverwrites : 1;
bool m_filtersUpdated : 1;
};
diff --git a/kexi/main/startup/KexiStartupFileDialogBase_win.h b/kexi/main/startup/KexiStartupFileDialogBase_win.h
index 7d7f56e0..00742c69 100644
--- a/kexi/main/startup/KexiStartupFileDialogBase_win.h
+++ b/kexi/main/startup/KexiStartupFileDialogBase_win.h
@@ -20,47 +20,47 @@
#ifndef _KexiStartupFileDialogBase_win_h_
#define _KexiStartupFileDialogBase_win_h_
-#include <qfiledialog.h>
-#include <qpushbutton.h>
+#include <tqfiledialog.h>
+#include <tqpushbutton.h>
class KexiStartupFileDialogBasePrivate;
-/*! Wrapper for win32-like file dialog. QFileDialog is used for this.
- Temporary moved from QKW KFileDialog implementation.
+/*! Wrapper for win32-like file dialog. TQFileDialog is used for this.
+ Temporary moved from TQKW KFileDialog implementation.
TODO: move to KDElibs/win32 KFileDialog wrapper
*/
-class KexiStartupFileDialogBase : public QFileDialog
+class KexiStartupFileDialogBase : public TQFileDialog
{
public:
- KexiStartupFileDialogBase(const QString & dirName, const QString & filter = QString::null,
- QWidget * parent = 0, const char * name = 0, bool modal = false );
+ KexiStartupFileDialogBase(const TQString & dirName, const TQString & filter = TQString(),
+ TQWidget * tqparent = 0, const char * name = 0, bool modal = false );
~KexiStartupFileDialogBase();
- QPushButton * okButton() const { return m_okBtn; }
+ TQPushButton * okButton() const { return m_okBtn; }
void clearFilter();
- void setFilter(const QString& filter);
+ void setFilter(const TQString& filter);
void setOperationMode( KFileDialog::OperationMode mode );
void setMode( KFile::Mode m );
void setMode( unsigned int m );
- QString currentFilter() const;
- void setMimeFilter( const QStringList& mimeTypes, const QString& defaultType = QString::null );
+ TQString currentFilter() const;
+ void setMimeFilter( const TQStringList& mimeTypes, const TQString& defaultType = TQString() );
KFile::Mode mode() const;
protected:
- void init(const QString& startDir, const QString& filter, QWidget* widget);
+ void init(const TQString& startDir, const TQString& filter, TQWidget* widget);
void updateAutoSelectExtension() {};
- //! Helper added because QFileDialog on win32 doesn't support ":" prefixes
+ //! Helper added because TQFileDialog on win32 doesn't support ":" prefixes
//! for recent dir's storage.
- QString realStartDir(const QString& startDir);
+ TQString realStartDir(const TQString& startDir);
- void saveLastVisitedPath(const QString& path);
+ void saveLastVisitedPath(const TQString& path);
- QPushButton* m_okBtn;
- QLineEdit* m_lineEdit;
- QString m_lastVisitedPathsVariable; //!< Used by win32; @see realStartDir()
+ TQPushButton* m_okBtn;
+ TQLineEdit* m_lineEdit;
+ TQString m_lastVisitedPathsVariable; //!< Used by win32; @see realStartDir()
KexiStartupFileDialogBasePrivate* d;
};
diff --git a/kexi/main/startup/KexiStartupFileDialog_win.cpp b/kexi/main/startup/KexiStartupFileDialog_win.cpp
index aa06fb9a..a51cd0c4 100644
--- a/kexi/main/startup/KexiStartupFileDialog_win.cpp
+++ b/kexi/main/startup/KexiStartupFileDialog_win.cpp
@@ -18,7 +18,7 @@
*/
/*!
- Temporary moved from QKW KFileDialog implementation.
+ Temporary moved from TQKW KFileDialog implementation.
TODO: move to KDElibs/win32 KFileDialog wrapper
*/
@@ -29,8 +29,8 @@
#include <kdebug.h>
#include <krecentdirs.h>
-#include <qobjectlist.h>
-#include <qlineedit.h>
+#include <tqobjectlist.h>
+#include <tqlineedit.h>
#include <win/win32_utils.h>
@@ -41,31 +41,31 @@ class KexiStartupFileDialogBasePrivate
KexiStartupFileDialogBasePrivate()
{}
KFile::Mode mode;
- QString kde_filters;
- QStringList mimetypes;
+ TQString kde_filters;
+ TQStringList mimetypes;
};
KexiStartupFileDialogBase::KexiStartupFileDialogBase(
- const QString & dirName, const QString & filter,
- QWidget * parent, const char * name, bool modal )
- : QFileDialog( realStartDir(dirName), filter, parent, name, modal )
+ const TQString & dirName, const TQString & filter,
+ TQWidget * tqparent, const char * name, bool modal )
+ : TQFileDialog( realStartDir(dirName), filter, tqparent, name, modal )
, d(new KexiStartupFileDialogBasePrivate())
{
-// QString _dirName = dirName;
- QString _dirName = dirPath();
+// TQString _dirName = dirName;
+ TQString _dirName = dirPath();
//make default 'My Documents' folder
//TODO: store changes in the app's config file?
if (_dirName.isEmpty())
_dirName = KGlobalSettings::documentPath();
- init(_dirName, filter, parent);
+ init(_dirName, filter, tqparent);
- //find "OK" button
- QObjectList *l = queryList( "QPushButton", "OK", false );
- m_okBtn = dynamic_cast<QPushButton*>(l->first());
+ //tqfind "OK" button
+ TQObjectList *l = queryList( TQPUSHBUTTON_OBJECT_NAME_STRING, "OK", false );
+ m_okBtn = dynamic_cast<TQPushButton*>(l->first());
delete l;
- l = queryList( "QLineEdit", "name/filter editor", false );
- m_lineEdit = dynamic_cast<QLineEdit*>(l->first());
+ l = queryList( TQLINEEDIT_OBJECT_NAME_STRING, "name/filter editor", false );
+ m_lineEdit = dynamic_cast<TQLineEdit*>(l->first());
delete l;
adjustSize();
@@ -75,7 +75,7 @@ KexiStartupFileDialogBase::~KexiStartupFileDialogBase()
{
}
-void KexiStartupFileDialogBase::init(const QString& startDir, const QString& filter, QWidget* widget)
+void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& filter, TQWidget* widget)
{
//TODO initStatic();
//TODO d = new KFileDialogPrivate();
@@ -85,16 +85,16 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
//TODO d->operationMode = Opening;
setMode(KFile::File | KFile::ExistingOnly); //(js) default: open action
setIcon( KGlobal::iconLoader()->loadIcon("fileopen", KIcon::Desktop) );
- setDir(QDir(startDir));
+ setDir(TQDir(startDir));
//TODO d->hasDefaultFilter = false;
//TODO d->hasView = false;
-//(js) d->mainWidget = new QWidget( this, "KFileDialog::mainWidget");
+//(js) d->mainWidget = new TQWidget( this, "KFileDialog::mainWidget");
//(js) setMainWidget( d->mainWidget );
//(js) d->okButton = new KPushButton( KStdGuiItem::ok(), d->mainWidget );
//(js) d->okButton->setDefault( true );
//(js) d->cancelButton = new KPushButton(KStdGuiItem::cancel(), d->mainWidget);
-//(js) connect( d->okButton, SIGNAL( clicked() ), SLOT( slotOk() ));
-//(js) connect( d->cancelButton, SIGNAL( clicked() ), SLOT( slotCancel() ));
+//(js) connect( d->okButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOk() ));
+//(js) connect( d->cancelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCancel() ));
//(js) d->customWidget = widget;
//(js) d->autoSelectExtCheckBox = 0; // delayed loading
//TODO d->autoSelectExtChecked = false;
@@ -105,42 +105,42 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
//TODO true );
//TODO d->completionLock = false;
-//TODO QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
+//TODO TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceTQToolBar );
//TODO toolbar = 0; //(js)
//(js) toolbar = new KToolBar( d->mainWidget, "KFileDialog::toolbar", true);
//(js) toolbar->setFlat(true);
-//TODO qInstallMsgHandler( oldHandler );
+//TODO tqInstallMsgHandler( oldHandler );
//(js) d->pathCombo = new KURLComboBox( KURLComboBox::Directories, true,
//(js) toolbar, "path combo" );
-//(js) QToolTip::add( d->pathCombo, i18n("Often used directories") );
-//(js) QWhatsThis::add( d->pathCombo, "<qt>" + i18n("Commonly used locations are listed here. "
+//(js) TQToolTip::add( d->pathCombo, i18n("Often used directories") );
+//(js) TQWhatsThis::add( d->pathCombo, "<qt>" + i18n("Commonly used locations are listed here. "
//(js) "This includes standard locations, such as your home directory, as well as "
//(js) "locations that have been visited recently.") + autocompletionWhatsThisText);
/*
KURL u;
- u.setPath( QDir::rootDirPath() );
- QString text = i18n("Root Directory: %1").arg( u.path() );
+ u.setPath( TQDir::rootDirPath() );
+ TQString text = i18n("Root Directory: %1").tqarg( u.path() );
d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
- u.setPath( QDir::homeDirPath() );
- text = i18n("Home Directory: %1").arg( u.path( +1 ) );
+ u.setPath( TQDir::homeDirPath() );
+ text = i18n("Home Directory: %1").tqarg( u.path( +1 ) );
d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
KURL docPath;
docPath.setPath( KGlobalSettings::documentPath() );
if ( u.path(+1) != docPath.path(+1) ) {
- text = i18n("Documents: %1").arg( docPath.path( +1 ) );
+ text = i18n("Documents: %1").tqarg( docPath.path( +1 ) );
d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
}
u.setPath( KGlobalSettings::desktopPath() );
- text = i18n("Desktop: %1").arg( u.path( +1 ) );
+ text = i18n("Desktop: %1").tqarg( u.path( +1 ) );
d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
@@ -153,10 +153,10 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
// If local, check it exists. If not, go up until it exists.
if ( d->url.isLocalFile() )
{
- if ( !QFile::exists( d->url.path() ) )
+ if ( !TQFile::exists( d->url.path() ) )
{
d->url = d->url.upURL();
- QDir dir( d->url.path() );
+ TQDir dir( d->url.path() );
while ( !dir.exists() )
{
d->url = d->url.upURL();
@@ -167,14 +167,14 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
ops = new KDirOperator(d->url, d->mainWidget, "KFileDialog::ops");
ops->setOnlyDoubleClickSelectsFiles( true );
- connect(ops, SIGNAL(urlEntered(const KURL&)),
- SLOT(urlEntered(const KURL&)));
- connect(ops, SIGNAL(fileHighlighted(const KFileItem *)),
- SLOT(fileHighlighted(const KFileItem *)));
- connect(ops, SIGNAL(fileSelected(const KFileItem *)),
- SLOT(fileSelected(const KFileItem *)));
- connect(ops, SIGNAL(finishedLoading()),
- SLOT(slotLoadingFinished()));
+ connect(ops, TQT_SIGNAL(urlEntered(const KURL&)),
+ TQT_SLOT(urlEntered(const KURL&)));
+ connect(ops, TQT_SIGNAL(fileHighlighted(const KFileItem *)),
+ TQT_SLOT(fileHighlighted(const KFileItem *)));
+ connect(ops, TQT_SIGNAL(fileSelected(const KFileItem *)),
+ TQT_SLOT(fileSelected(const KFileItem *)));
+ connect(ops, TQT_SIGNAL(finishedLoading()),
+ TQT_SLOT(slotLoadingFinished()));
ops->setupMenu(KDirOperator::SortActions |
KDirOperator::FileActions |
@@ -183,9 +183,9 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
// plug nav items into the toolbar
coll->action( "up" )->plug( toolbar );
- coll->action( "up" )->setWhatsThis(i18n("<qt>Click this button to enter the parent directory.<p>"
+ coll->action( "up" )->setWhatsThis(i18n("<qt>Click this button to enter the tqparent directory.<p>"
"For instance, if the current location is file:/home/%1 clicking this "
- "button will take you to file:/home.</qt>").arg(getlogin()));
+ "button will take you to file:/home.</qt>").tqarg(getlogin()));
coll->action( "back" )->plug( toolbar );
coll->action( "back" )->setWhatsThis(i18n("Click this button to move backwards one step in the browsing history."));
coll->action( "forward" )->plug( toolbar );
@@ -197,24 +197,24 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
coll->action( "mkdir" )->setWhatsThis(i18n("Click this button to create a new directory."));
d->bookmarkHandler = new KFileBookmarkHandler( this );
- toolbar->insertButton(QString::fromLatin1("bookmark"),
+ toolbar->insertButton(TQString::tqfromLatin1("bookmark"),
(int)HOTLIST_BUTTON, true,
i18n("Bookmarks"));
toolbar->getButton(HOTLIST_BUTTON)->setPopup( d->bookmarkHandler->menu(),
true);
- QWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON),
+ TQWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON),
i18n("<qt>This button allows you to bookmark specific locations. "
"Click on this button to open the bookmark menu where you may add, "
"edit or select a bookmark.<p>"
"These bookmarks are specific to the file dialog, but otherwise operate "
"like bookmarks elsewhere in KDE.</qt>"));
- connect( d->bookmarkHandler, SIGNAL( openURL( const QString& )),
- SLOT( enterURL( const QString& )));
+ connect( d->bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )),
+ TQT_SLOT( enterURL( const TQString& )));
KToggleAction *showSidebarAction =
new KToggleAction(i18n("Show Quick Access Navigation Panel"), Key_F9, coll,"toggleSpeedbar");
- connect( showSidebarAction, SIGNAL( toggled( bool ) ),
- SLOT( toggleSpeedbar( bool )) );
+ connect( showSidebarAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( toggleSpeedbar( bool )) );
KActionMenu *menu = new KActionMenu( i18n("Configure"), "configure", this, "extra menu" );
menu->setWhatsThis(i18n("<qt>This is the configuration menu for the file dialog. "
@@ -241,15 +241,15 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
menu->insert( coll->action( "separate dirs" ));
menu->setDelayed( false );
- connect( menu->popupMenu(), SIGNAL( aboutToShow() ),
- ops, SLOT( updateSelectionDependentActions() ));
+ connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ ops, TQT_SLOT( updateSelectionDependentActions() ));
menu->plug( toolbar );
*/
/*
* ugly little hack to have a 5 pixel space between the buttons
* and the combo box
*/
-/* QWidget *spacerWidget = new QWidget(toolbar);
+/* TQWidget *spacerWidget = new TQWidget(toolbar);
//(js) spacerWidget->setMinimumWidth(spacingHint());
//(js) spacerWidget->setMaximumWidth(spacingHint());
d->m_pathComboIndex = toolbar->insertWidget(-1, -1, spacerWidget);
@@ -264,21 +264,21 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
d->pathCombo->setCompletionObject( ops->dirCompletionObject(), false );
- connect( d->pathCombo, SIGNAL( urlActivated( const KURL& )),
- this, SLOT( enterURL( const KURL& ) ));
- connect( d->pathCombo, SIGNAL( returnPressed( const QString& )),
- this, SLOT( enterURL( const QString& ) ));
- connect( d->pathCombo, SIGNAL(textChanged( const QString& )),
- SLOT( pathComboChanged( const QString& ) ));
- connect( d->pathCombo, SIGNAL( completion( const QString& )),
- SLOT( dirCompletion( const QString& )));
- connect( d->pathCombo, SIGNAL( textRotation(KCompletionBase::KeyBindingType) ),
- d->pathCombo, SLOT( rotateText(KCompletionBase::KeyBindingType) ));
+ connect( d->pathCombo, TQT_SIGNAL( urlActivated( const KURL& )),
+ this, TQT_SLOT( enterURL( const KURL& ) ));
+ connect( d->pathCombo, TQT_SIGNAL( returnPressed( const TQString& )),
+ this, TQT_SLOT( enterURL( const TQString& ) ));
+ connect( d->pathCombo, TQT_SIGNAL(textChanged( const TQString& )),
+ TQT_SLOT( pathComboChanged( const TQString& ) ));
+ connect( d->pathCombo, TQT_SIGNAL( completion( const TQString& )),
+ TQT_SLOT( dirCompletion( const TQString& )));
+ connect( d->pathCombo, TQT_SIGNAL( textRotation(KCompletionBase::KeyBindingType) ),
+ d->pathCombo, TQT_SLOT( rotateText(KCompletionBase::KeyBindingType) ));
- QString whatsThisText;
+ TQString whatsThisText;
// the Location label/edit
- d->locationLabel = new QLabel(i18n("&Location:"), d->mainWidget);
+ d->locationLabel = new TQLabel(i18n("&Location:"), d->mainWidget);
locationEdit = new KURLComboBox(KURLComboBox::Files, true,
d->mainWidget, "LocationEdit");
updateLocationWhatsThis ();
@@ -293,14 +293,14 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
// locationEdit->setAutoDeleteCompletionObject( true );
locationEdit->setCompletionObject( ops->completionObject(), false );
- connect( locationEdit, SIGNAL( returnPressed() ),
- this, SLOT( slotOk()));
- connect(locationEdit, SIGNAL( activated( const QString& )),
- this, SLOT( locationActivated( const QString& ) ));
- connect( locationEdit, SIGNAL( completion( const QString& )),
- SLOT( fileCompletion( const QString& )));
- connect( locationEdit, SIGNAL( textRotation(KCompletionBase::KeyBindingType) ),
- locationEdit, SLOT( rotateText(KCompletionBase::KeyBindingType) ));
+ connect( locationEdit, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( slotOk()));
+ connect(locationEdit, TQT_SIGNAL( activated( const TQString& )),
+ this, TQT_SLOT( locationActivated( const TQString& ) ));
+ connect( locationEdit, TQT_SIGNAL( completion( const TQString& )),
+ TQT_SLOT( fileCompletion( const TQString& )));
+ connect( locationEdit, TQT_SIGNAL( textRotation(KCompletionBase::KeyBindingType) ),
+ locationEdit, TQT_SLOT( rotateText(KCompletionBase::KeyBindingType) ));
// the Filter label/edit
whatsThisText = i18n("<qt>This is the filter to apply to the file list. "
@@ -309,19 +309,19 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
"drop down menu, or you may enter a custom filter "
"directly into the text area.<p>"
"Wildcards such as * and ? are allowed.</qt>");
- d->filterLabel = new QLabel(i18n("&Filter:"), d->mainWidget);
- QWhatsThis::add(d->filterLabel, whatsThisText);
+ d->filterLabel = new TQLabel(i18n("&Filter:"), d->mainWidget);
+ TQWhatsThis::add(d->filterLabel, whatsThisText);
filterWidget = new KFileFilterCombo(d->mainWidget,
"KFileDialog::filterwidget");
- QWhatsThis::add(filterWidget, whatsThisText);
+ TQWhatsThis::add(filterWidget, whatsThisText);
setFilter(filter);
d->filterLabel->setBuddy(filterWidget);
- connect(filterWidget, SIGNAL(filterChanged()), SLOT(slotFilterChanged()));
+ connect(filterWidget, TQT_SIGNAL(filterChanged()), TQT_SLOT(slotFilterChanged()));
// the Automatically Select Extension checkbox
// (the text, visibility etc. is set in updateAutoSelectExtension(), which is called by readConfig())
- d->autoSelectExtCheckBox = new QCheckBox (d->mainWidget);
- connect(d->autoSelectExtCheckBox, SIGNAL(clicked()), SLOT(slotAutoSelectExtClicked()));
+ d->autoSelectExtCheckBox = new TQCheckBox (d->mainWidget);
+ connect(d->autoSelectExtCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotAutoSelectExtClicked()));
initGUI(); // activate GM
@@ -342,7 +342,7 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
void KexiStartupFileDialogBase::clearFilter()
{
d->kde_filters = "";//(js)
- QFileDialog::setFilter(""); //(js);
+ TQFileDialog::setFilter(""); //(js);
//todo d->mimetypes.clear();
//todo d->hasDefaultFilter = false;
@@ -356,15 +356,15 @@ KFile::Mode KexiStartupFileDialogBase::mode() const
void KexiStartupFileDialogBase::setMode( KFile::Mode m )
{
- //(js) translate mode for QFileDialog
+ //(js) translate mode for TQFileDialog
d->mode = m;
- QFileDialog::Mode qm = (QFileDialog::Mode)0;
- if (m & KFile::File) qm = Mode(qm | QFileDialog::AnyFile);
- else if (m & KFile::Directory) qm = Mode(qm | QFileDialog::DirectoryOnly);
- if (m & KFile::Files) qm = Mode(qm | QFileDialog::ExistingFiles);
- if (m & KFile::ExistingOnly) qm = Mode(qm | QFileDialog::ExistingFile);
+ TQFileDialog::Mode qm = (TQFileDialog::Mode)0;
+ if (m & KFile::File) qm = Mode(qm | TQFileDialog::AnyFile);
+ else if (m & KFile::Directory) qm = Mode(qm | TQFileDialog::DirectoryOnly);
+ if (m & KFile::Files) qm = Mode(qm | TQFileDialog::ExistingFiles);
+ if (m & KFile::ExistingOnly) qm = Mode(qm | TQFileDialog::ExistingFile);
- QFileDialog::setMode( qm );
+ TQFileDialog::setMode( qm );
/*(js) ops->setMode(m);
if ( ops->dirOnlyMode() ) {
//(js) filterWidget->setDefaultFilter( i18n("*|All Directories") );
@@ -395,35 +395,35 @@ void KexiStartupFileDialogBase::setOperationMode( KFileDialog::OperationMode mod
updateAutoSelectExtension ();
}
-QString KexiStartupFileDialogBase::currentFilter() const
+TQString KexiStartupFileDialogBase::currentFilter() const
{
//(js)filterWidget->currentFilter();
- //we need to convert Qt filter format to KDE format
- //Qt format: "some text (*.first *.second)" or "All (*)"
+ //we need to convert TQt filter format to KDE format
+ //TQt format: "some text (*.first *.second)" or "All (*)"
//KDE format: "*.first *.second" or "*"
- QString f = selectedFilter();
- if (f.find('(')!=-1)
- f = f.mid(f.find('(')+1);
- if (f.mid(f.find(')')!=-1))
- f = f.left(f.find(')'));
+ TQString f = selectedFilter();
+ if (f.tqfind('(')!=-1)
+ f = f.mid(f.tqfind('(')+1);
+ if (f.mid(f.tqfind(')')!=-1))
+ f = f.left(f.tqfind(')'));
return f;
}
-void KexiStartupFileDialogBase::setFilter(const QString& filter)
+void KexiStartupFileDialogBase::setFilter(const TQString& filter)
{
d->kde_filters = filter;
- int pos = d->kde_filters.find('/');
+ int pos = d->kde_filters.tqfind('/');
// Check for an un-escaped '/', if found
// interpret as a MIME filter.
if (pos > 0 && filter[pos - 1] != '\\') {
- QStringList filters = QStringList::split( " ", d->kde_filters );
+ TQStringList filters = TQStringList::split( " ", d->kde_filters );
setMimeFilter( filters );
return;
}
- QFileDialog::setFilters( convertKFileDialogFilterToQFileDialogFilter(filter) );
+ TQFileDialog::setFilters( convertKFileDialogFilterToTQFileDialogFilter(filter) );
//</js>
//(js) ops->clearFilter();
//(js) filterWidget->setFilter(copy);
@@ -434,14 +434,14 @@ void KexiStartupFileDialogBase::setFilter(const QString& filter)
updateAutoSelectExtension ();
}
-void KexiStartupFileDialogBase::setMimeFilter( const QStringList& mimeTypes,
- const QString& defaultType )
+void KexiStartupFileDialogBase::setMimeFilter( const TQStringList& mimeTypes,
+ const TQString& defaultType )
{
d->mimetypes = mimeTypes;
//(js) filterWidget->setMimeFilter( mimeTypes, defaultType );
-//(js) QStringList types = QStringList::split(" ", filterWidget->currentFilter());
-//(js) types.append( QString::fromLatin1( "inode/directory" ));
+//(js) TQStringList types = TQStringList::split(" ", filterWidget->currentFilter());
+//(js) types.append( TQString::tqfromLatin1( "inode/directory" ));
//(js) ops->clearFilter();
//(js) ops->setMimeFilter( types );
//(js) d->hasDefaultFilter = !defaultType.isEmpty();
@@ -451,25 +451,25 @@ void KexiStartupFileDialogBase::setMimeFilter( const QStringList& mimeTypes,
//TODO updateAutoSelectExtension ();
}
-QString KexiStartupFileDialogBase::realStartDir(const QString& startDir)
+TQString KexiStartupFileDialogBase::realStartDir(const TQString& startDir)
{
if (!startDir.startsWith(":"))
return startDir;
- QString recentDir; //dummy
- QString path( KFileDialog::getStartURL(startDir, recentDir).path() );
+ TQString recentDir; //dummy
+ TQString path( KFileDialog::getStartURL(startDir, recentDir).path() );
if (path.isEmpty())
- return QString::null;
- QFileInfo fi(path);
+ return TQString();
+ TQFileInfo fi(path);
return fi.isDir() ? fi.absFilePath() : fi.dir(true).absPath();
}
-void KexiStartupFileDialogBase::saveLastVisitedPath(const QString& path)
+void KexiStartupFileDialogBase::saveLastVisitedPath(const TQString& path)
{
if (!m_lastVisitedPathsVariable.isEmpty()) {
//save last visited dir path
-// QString dir = QDir(path).absPath();
- QFileInfo fi(path);
- QString dir( fi.isDir() ? fi.absFilePath() : fi.dir(true).absPath() );
+// TQString dir = TQDir(path).absPath();
+ TQFileInfo fi(path);
+ TQString dir( fi.isDir() ? fi.absFilePath() : fi.dir(true).absPath() );
if (!dir.isEmpty())
KRecentDirs::add(m_lastVisitedPathsVariable, dir);
}
diff --git a/kexi/main/startup/KexiStartup_p.cpp b/kexi/main/startup/KexiStartup_p.cpp
index df7cddc6..e8139e18 100644
--- a/kexi/main/startup/KexiStartup_p.cpp
+++ b/kexi/main/startup/KexiStartup_p.cpp
@@ -25,11 +25,11 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qapplication.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqapplication.h>
-SQLite2ToSQLite3Migration::SQLite2ToSQLite3Migration(const QString& filePath)
+SQLite2ToSQLite3Migration::SQLite2ToSQLite3Migration(const TQString& filePath)
: m_filePath(filePath)
{
m_process = 0;
@@ -50,33 +50,33 @@ tristate SQLite2ToSQLite3Migration::run()
if (m_run)
return false;
m_run = true;
- const QString ksqlite2to3_app = KStandardDirs::findExe( "ksqlite2to3" );
+ const TQString ksqlite2to3_app = KStandardDirs::findExe( "ksqlite2to3" );
if (ksqlite2to3_app.isEmpty())
return false;
- QFileInfo fi(m_filePath);
+ TQFileInfo fi(m_filePath);
if (fi.isSymLink()) {
m_filePath = fi.readLink();
- fi = QFileInfo(m_filePath);
+ fi = TQFileInfo(m_filePath);
}
//remember permissions of m_filePath
- m_restoreStat = (0==stat(QFile::encodeName(m_filePath), &m_st));
+ m_restoreStat = (0==stat(TQFile::encodeName(m_filePath), &m_st));
m_process = new KProcess(this, "process");
*m_process << ksqlite2to3_app << m_filePath;
m_process->setWorkingDirectory( fi.dir(true).absPath() );
- connect( m_process, SIGNAL(receivedStderr(KProcess*,char*,int)),
- this, SLOT(receivedStderr(KProcess*,char*,int)));
- connect( m_process, SIGNAL(processExited(KProcess*)), this, SLOT(processExited(KProcess*)) );
+ connect( m_process, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ this, TQT_SLOT(receivedStderr(KProcess*,char*,int)));
+ connect( m_process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(processExited(KProcess*)) );
if (!m_process->start(KProcess::NotifyOnExit, KProcess::Stderr))
return false;
- m_dlg = new KProgressDialog(0, 0, QString::null,
+ m_dlg = new KProgressDialog(0, 0, TQString(),
i18n("Saving \"%1\" project file to a new \"%2\" database format...")
- .arg(QDir::convertSeparators(QFileInfo(m_filePath).fileName())).arg("SQLite3")
+ .tqarg(TQDir::convertSeparators(TQFileInfo(m_filePath).fileName())).tqarg("SQLite3")
);
m_dlg->setModal(true);
- connect(m_dlg, SIGNAL(cancelClicked()), this, SLOT(cancelClicked()));
+ connect(m_dlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(cancelClicked()));
m_dlg->setMinimumDuration(1000);
m_dlg->setAutoClose(true);
m_dlg->progressBar()->setTotalSteps(100);
@@ -107,8 +107,8 @@ void SQLite2ToSQLite3Migration::processExited(KProcess* process)
if (result == true) {
if (m_restoreStat) {
//restore permissions for m_filePath
- chmod(QFile::encodeName(m_filePath), m_st.st_mode);
- chown(QFile::encodeName(m_filePath), m_st.st_uid, m_st.st_gid);
+ chmod(TQFile::encodeName(m_filePath), m_st.st_mode);
+ chown(TQFile::encodeName(m_filePath), m_st.st_uid, m_st.st_gid);
}
}
}
diff --git a/kexi/main/startup/KexiStartup_p.h b/kexi/main/startup/KexiStartup_p.h
index 1e60d702..1e9e5d27 100644
--- a/kexi/main/startup/KexiStartup_p.h
+++ b/kexi/main/startup/KexiStartup_p.h
@@ -20,8 +20,8 @@
#ifndef KEXI_STARTUPHANDLER_P_H
#define KEXI_STARTUPHANDLER_P_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <sys/stat.h>
@@ -30,11 +30,12 @@
class KProcess;
class KProgressDialog;
-class SQLite2ToSQLite3Migration : public QObject
+class SQLite2ToSQLite3Migration : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- SQLite2ToSQLite3Migration(const QString& filePath);
+ SQLite2ToSQLite3Migration(const TQString& filePath);
~SQLite2ToSQLite3Migration();
tristate run();
@@ -45,7 +46,7 @@ class SQLite2ToSQLite3Migration : public QObject
void cancelClicked();
protected:
- QString m_filePath;
+ TQString m_filePath;
KProcess *m_process;
KProgressDialog* m_dlg;