summaryrefslogtreecommitdiffstats
path: root/kexi/main/startup/KexiNewProjectWizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/main/startup/KexiNewProjectWizard.cpp')
-rw-r--r--kexi/main/startup/KexiNewProjectWizard.cpp112
1 files changed, 56 insertions, 56 deletions
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;