diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /kdevdesigner/designer/startdialogimpl.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/startdialogimpl.cpp')
-rw-r--r-- | kdevdesigner/designer/startdialogimpl.cpp | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/kdevdesigner/designer/startdialogimpl.cpp b/kdevdesigner/designer/startdialogimpl.cpp index e408e8a5..cb4bec53 100644 --- a/kdevdesigner/designer/startdialogimpl.cpp +++ b/kdevdesigner/designer/startdialogimpl.cpp @@ -1,22 +1,22 @@ #include <kiconloader.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qptrlist.h> -#include <qiconview.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qfiledialog.h> -#include <qtabwidget.h> -#include <qpoint.h> -#include <qobjectlist.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qfileinfo.h> -#include <qmap.h> -#include <qdatetime.h> -#include <qapplication.h> -#include <qcheckbox.h> -#include <qurl.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqptrlist.h> +#include <tqiconview.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqfiledialog.h> +#include <tqtabwidget.h> +#include <tqpoint.h> +#include <tqobjectlist.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqfileinfo.h> +#include <tqmap.h> +#include <tqdatetime.h> +#include <tqapplication.h> +#include <tqcheckbox.h> +#include <tqurl.h> #include "kdevdesigner_part.h" @@ -26,8 +26,8 @@ #include <klocale.h> -FileDialog::FileDialog( const QString &dir, QWidget *parent ) - : QFileDialog( dir, QString::null, parent ) +FileDialog::FileDialog( const TQString &dir, TQWidget *parent ) + : TQFileDialog( dir, TQString::null, parent ) { } @@ -37,7 +37,7 @@ void FileDialog::accept() } -StartDialog::StartDialog( QWidget *parent, const QString &templatePath ) +StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath ) : StartDialogBase( parent, 0 ) { newForm = new NewForm( templateView, templatePath ); @@ -45,13 +45,13 @@ StartDialog::StartDialog( QWidget *parent, const QString &templatePath ) initFileOpen(); showInFuture = TRUE; - connect( buttonHelp, SIGNAL( clicked() ), - MainWindow::self, SLOT( showDialogHelp() ) ); - connect( recentView, SIGNAL( doubleClicked(QIconViewItem*) ), - this, SLOT( accept() ) ); - connect( recentView, SIGNAL( returnPressed(QIconViewItem*) ), - this, SLOT( accept() ) ); - connect( fd, SIGNAL( fileSelected() ), this, SLOT( accept() ) ); + connect( buttonHelp, TQT_SIGNAL( clicked() ), + MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( recentView, TQT_SIGNAL( doubleClicked(TQIconViewItem*) ), + this, TQT_SLOT( accept() ) ); + connect( recentView, TQT_SIGNAL( returnPressed(TQIconViewItem*) ), + this, TQT_SLOT( accept() ) ); + connect( fd, TQT_SIGNAL( fileSelected() ), this, TQT_SLOT( accept() ) ); } void StartDialog::accept() @@ -60,7 +60,7 @@ void StartDialog::accept() showInFuture = !checkShowInFuture->isChecked(); // means don't show it anymore int tabindex = tabWidget->currentPageIndex(); - QString filename; + TQString filename; if( !tabindex ) { if ( !templateView->currentItem() ) return; @@ -76,7 +76,7 @@ void StartDialog::accept() } if ( tabindex ) { if ( !filename.isEmpty() ) { - QFileInfo fi( filename ); + TQFileInfo fi( filename ); if ( fi.extension() == "pro" ) MainWindow::self->openProject( filename ); else @@ -92,12 +92,12 @@ void StartDialog::reject() done( Rejected ); } -void StartDialog::recentItemChanged( QIconViewItem *item ) +void StartDialog::recentItemChanged( TQIconViewItem *item ) { - QString msg( recentFiles[item->index()] ); - QFileInfo f( recentFiles[item->index()] ); + TQString msg( recentFiles[item->index()] ); + TQFileInfo f( recentFiles[item->index()] ); uint s = f.size(); - QString unit( "B" ); + TQString unit( "B" ); if( s > 1024 ) { s /= 1024; unit = "KB"; @@ -106,9 +106,9 @@ void StartDialog::recentItemChanged( QIconViewItem *item ) s /= 1024; unit = "MB"; } - QDateTime dt( f.lastModified() ); - QString date( dt.toString( "MMMM dd hh:mm" )); - msg = QString( "%1 (%2 %3) %4" ).arg(msg).arg(s).arg(unit).arg(date); + TQDateTime dt( f.lastModified() ); + TQString date( dt.toString( "MMMM dd hh:mm" )); + msg = TQString( "%1 (%2 %3) %4" ).arg(msg).arg(s).arg(unit).arg(date); fileInfoLabel->setText( msg ); } @@ -117,26 +117,26 @@ void StartDialog::clearFileInfo() fileInfoLabel->clear(); } -void StartDialog::setRecentlyFiles( QStringList &files ) +void StartDialog::setRecentlyFiles( TQStringList &files ) { insertRecentItems( files, FALSE ); } -void StartDialog::setRecentlyProjects( QStringList &projects ) +void StartDialog::setRecentlyProjects( TQStringList &projects ) { insertRecentItems( projects, TRUE ); } -void StartDialog::insertRecentItems( QStringList &files, bool isProject ) +void StartDialog::insertRecentItems( TQStringList &files, bool isProject ) { - QString iconName = "designer_newform.png"; + TQString iconName = "designer_newform.png"; if ( isProject ) iconName = "designer_project.png"; - QIconViewItem *item; - QStringList::iterator it = files.begin(); + TQIconViewItem *item; + TQStringList::iterator it = files.begin(); for( ; it != files.end(); ++it ) { - QFileInfo fi( *it ); - item = new QIconViewItem( recentView, fi.fileName() ); + TQFileInfo fi( *it ); + item = new TQIconViewItem( recentView, fi.fileName() ); recentFiles[recentView->index( item )] = *it; item->setPixmap( BarIcon( iconName, KDevDesignerPartFactory::instance() ) ); item->setDragEnabled( FALSE ); @@ -145,37 +145,37 @@ void StartDialog::insertRecentItems( QStringList &files, bool isProject ) void StartDialog::initFileOpen() { - QString encode = QDir::currentDirPath(); - QUrl::encode( encode ); + TQString encode = TQDir::currentDirPath(); + TQUrl::encode( encode ); fd = new FileDialog( encode, this ); - QPoint point( 0, 0 ); + TQPoint point( 0, 0 ); fd->reparent( tab, point ); - QObjectList *l = fd->queryList( "QPushButton" ); - QObjectListIt it( *l ); - QObject *obj; + TQObjectList *l = fd->queryList( "TQPushButton" ); + TQObjectListIt it( *l ); + TQObject *obj; while ( (obj = it.current()) != 0 ) { ++it; - ((QPushButton*)obj)->hide(); + ((TQPushButton*)obj)->hide(); } delete l; fd->setSizeGripEnabled ( FALSE ); tabLayout->addWidget( fd ); - QPluginManager<ImportFilterInterface> manager( IID_ImportFilter, QApplication::libraryPaths(), + QPluginManager<ImportFilterInterface> manager( IID_ImportFilter, TQApplication::libraryPaths(), MainWindow::self->pluginDirectory() ); - QStringList filterlist; + TQStringList filterlist; filterlist << i18n( "Designer Files (*.ui *.pro)" ); filterlist << i18n( "Qt User-Interface Files (*.ui)" ); filterlist << i18n( "QMAKE Project Files (*.pro)" ); - QStringList list = manager.featureList(); - for ( QStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 ) + TQStringList list = manager.featureList(); + for ( TQStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 ) filterlist << *it2; filterlist << i18n( "All Files (*)" ); - QString filters = filterlist.join( ";;" ); + TQString filters = filterlist.join( ";;" ); fd->setFilters( filters ); fd->show(); |