From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- kexi/main/startup/KexiProjectSelector.cpp | 58 +++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'kexi/main/startup/KexiProjectSelector.cpp') 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 #include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -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 %1 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 -- cgit v1.2.1