diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-07-24 11:53:10 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-07-24 11:53:10 -0500 |
commit | dacae0242e905268e9df9aed83f84e91b13a1749 (patch) | |
tree | 26c8dc7f37d040f54265a3471834309a1e248538 /src/importdialog.cpp | |
parent | 0d218fd2db1810aafd86f7fc8761c75128f3fcb8 (diff) | |
download | kasablanca-dacae0242e905268e9df9aed83f84e91b13a1749.tar.gz kasablanca-dacae0242e905268e9df9aed83f84e91b13a1749.zip |
Convert to TDE R14 API
Diffstat (limited to 'src/importdialog.cpp')
-rw-r--r-- | src/importdialog.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/importdialog.cpp b/src/importdialog.cpp index 53d7f8f..be684c3 100644 --- a/src/importdialog.cpp +++ b/src/importdialog.cpp @@ -12,13 +12,13 @@ // // -#include <qradiobutton.h> -#include <qdir.h> -#include <qfile.h> -#include <qprogressdialog.h> +#include <ntqradiobutton.h> +#include <ntqdir.h> +#include <ntqfile.h> +#include <ntqprogressdialog.h> -#include <klocale.h> -#include <kconfig.h> +#include <tdelocale.h> +#include <tdeconfig.h> #include <kmessagebox.h> #include <kdebug.h> @@ -27,7 +27,7 @@ using namespace std; -ImportDialog::ImportDialog(QWidget *parent, const char *name ) : KDialogBase(parent, name, true, i18n( "Import Bookmarks" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true) +ImportDialog::ImportDialog(TQWidget *parent, const char *name ) : KDialogBase(parent, name, true, i18n( "Import Bookmarks" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true) { mp_dialog = new KasablancaImportDialog(this); setMainWidget(mp_dialog); @@ -41,11 +41,11 @@ ImportDialog::~ImportDialog() void ImportDialog::slotOk() { if (mp_dialog->GftpRadioButton->isChecked()) - importGftpBookmarks ( QDir::homeDirPath() + "/.gftp/bookmarks" ); + importGftpBookmarks ( TQDir::homeDirPath() + "/.gftp/bookmarks" ); accept(); } -void ImportDialog::importGftpBookmarks( QString fileName ) { +void ImportDialog::importGftpBookmarks( TQString fileName ) { // kdDebug() << "import start" << endl; if ( fileName.isEmpty() || fileName.isNull() ) { @@ -55,7 +55,7 @@ void ImportDialog::importGftpBookmarks( QString fileName ) { return ; } - QFile f(fileName); + TQFile f(fileName); if ( !f.exists() ) { KMessageBox::information( 0, i18n( "No gftp bookmarks to import found." ), i18n( "No file" ) ); @@ -65,11 +65,11 @@ void ImportDialog::importGftpBookmarks( QString fileName ) { // First we fetch some global settings - KConfig tmpConfig( fileName, true, false, "HOME" ); - QString email = tmpConfig.readEntry( "email", "anonymous@" ); + TDEConfig tmpConfig( fileName, true, false, "HOME" ); + TQString email = tmpConfig.readEntry( "email", "anonymous@" ); - KConfig config( fileName, true, false, "HOME" ); - QStringList groupList = config.groupList(); + TDEConfig config( fileName, true, false, "HOME" ); + TQStringList groupList = config.groupList(); float size = ( float ) groupList.count(); if ( size == 0 ) { @@ -81,18 +81,18 @@ void ImportDialog::importGftpBookmarks( QString fileName ) { m_lines = groupList.count(); - QProgressDialog progress( 0, "progressdialog", true ); + TQProgressDialog progress( 0, "progressdialog", true ); progress.setLabelText( i18n( "Importing bookmarks..." ) ); progress.setCancelButton( 0 ); progress.setTotalSteps( m_lines ); - for ( QStringList::Iterator it = groupList.begin(); it != groupList.end(); ++it ) { - QString groupName = *it; // found groupname from gFTP, can have subgroups ( group1/group2/group3 ) - QStringList groupNames = QStringList::split( "/", groupName ); //split group name into subgroups if any + for ( TQStringList::Iterator it = groupList.begin(); it != groupList.end(); ++it ) { + TQString groupName = *it; // found groupname from gFTP, can have subgroups ( group1/group2/group3 ) + TQStringList groupNames = TQStringList::split( "/", groupName ); //split group name into subgroups if any config.setGroup( groupName ); - QString tmp = config.readEntry( "hostname" ); // we ignore the site if it hasn't any host + TQString tmp = config.readEntry( "hostname" ); // we ignore the site if it hasn't any host // first check so the site has a host, if not ignore it if ( ! tmp.isNull() ) { // had host @@ -116,11 +116,11 @@ void ImportDialog::importGftpBookmarks( QString fileName ) { // kdDebug() << "port: " << p << endl; - // QString HostPort = tmp; /* host:port */ + // TQString HostPort = tmp; /* host:port */ // HostPort += ":"; - // HostPort += QString().setNum( p ); + // HostPort += TQString().setNum( p ); - newsite.SetInfo(tmp + ":" + QString::number(p)); + newsite.SetInfo(tmp + ":" + TQString::number(p)); //newsite.SetPort( p ); //newsite.SetHostname(tmp); @@ -135,7 +135,7 @@ void ImportDialog::importGftpBookmarks( QString fileName ) { newsite.SetDefaultDirectory( tmp ); // set local directory - //tmp = config.readEntry( "local directory", QDir::homeDirPath() ); + //tmp = config.readEntry( "local directory", TQDir::homeDirPath() ); //kdDebug() << "local directory: " << tmp << endl; // set username @@ -164,7 +164,7 @@ void ImportDialog::importGftpBookmarks( QString fileName ) { counter++; progress.setProgress( counter ); } // for - KMessageBox::information( 0, i18n( "%1 bookmarks from gftp successful imported." ).arg(QString().setNum(counter-1)), i18n( "Successful import" ) ); + KMessageBox::information( 0, i18n( "%1 bookmarks from gftp successful imported." ).arg(TQString().setNum(counter-1)), i18n( "Successful import" ) ); /* int cnt = 0; list<KbSiteInfo>::iterator end_session = bookmarks.end(); |