diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /konq-plugins/kuick/kmetamenu.cpp | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/kuick/kmetamenu.cpp')
-rw-r--r-- | konq-plugins/kuick/kmetamenu.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/konq-plugins/kuick/kmetamenu.cpp b/konq-plugins/kuick/kmetamenu.cpp index 065a825..2b5d78a 100644 --- a/konq-plugins/kuick/kmetamenu.cpp +++ b/konq-plugins/kuick/kmetamenu.cpp @@ -26,53 +26,53 @@ #include <kurl.h> #include <konq_popupmenu.h> -#include <qpixmap.h> -#include <qdir.h> -#include <qiconset.h> -#include <qstringlist.h> +#include <tqpixmap.h> +#include <tqdir.h> +#include <tqiconset.h> +#include <tqstringlist.h> #include "kmetamenu.h" #include "kdirmenu.h" #include "kimcontactmenu.h" #include "kmetamenu.moc" -KMetaMenu::KMetaMenu( QWidget *parent, const KURL &url, - const QString &text, const QString &key, KIMProxy *imProxy ) -: QPopupMenu( parent), +KMetaMenu::KMetaMenu( TQWidget *parent, const KURL &url, + const TQString &text, const TQString &key, KIMProxy *imProxy ) +: TQPopupMenu( parent), m_root( 0 ), m_home( 0 ), m_etc( 0 ), m_current( 0 ), m_browse( 0 ) { int recent_no; group = key; actions.setAutoDelete( TRUE ); - QStringList dirList; + TQStringList dirList; KURL u; - u.setPath(QDir::homeDirPath()); + u.setPath(TQDir::homeDirPath()); if ( kapp->authorizeURLAction("list", u, u) ) { m_home = new KDirMenu( parent, url, u.path() , text ); insertItem( SmallIcon( "kfm_home" ), i18n("&Home Folder"), m_home); dirList << u.path(); - connect(m_home, SIGNAL(fileChosen(const QString &)), - SLOT(slotFileChosen(const QString &) ) ); + connect(m_home, TQT_SIGNAL(fileChosen(const TQString &)), + TQT_SLOT(slotFileChosen(const TQString &) ) ); } - u.setPath(QDir::rootDirPath()); + u.setPath(TQDir::rootDirPath()); if ( kapp->authorizeURLAction("list", u, u) ) { m_root = new KDirMenu( parent, url, u.path() , text ); insertItem( SmallIcon( "folder_red" ), i18n("&Root Folder"), m_root); dirList << u.path(); - connect(m_root, SIGNAL(fileChosen(const QString &)), - SLOT(slotFileChosen(const QString &) ) ); + connect(m_root, TQT_SIGNAL(fileChosen(const TQString &)), + TQT_SLOT(slotFileChosen(const TQString &) ) ); } - QString confDir = QDir::rootDirPath()+ "etc"; + TQString confDir = TQDir::rootDirPath()+ "etc"; u.setPath(confDir); - if ( QFileInfo( confDir ).isWritable() && + if ( TQFileInfo( confDir ).isWritable() && kapp->authorizeURLAction("list", u, u) ) { m_etc = new KDirMenu( parent, url, confDir, text ); @@ -80,14 +80,14 @@ KMetaMenu::KMetaMenu( QWidget *parent, const KURL &url, i18n("&System Configuration"), m_etc); dirList << confDir; - connect(m_etc , SIGNAL(fileChosen(const QString &)), - SLOT(slotFileChosen(const QString &) ) ); + connect(m_etc , TQT_SIGNAL(fileChosen(const TQString &)), + TQT_SLOT(slotFileChosen(const TQString &) ) ); } if ( url.isLocalFile() && dirList.find( url.path() ) == dirList.end() - && QFileInfo( url.path() ).isWritable() - && QFileInfo( url.path() ).isDir() + && TQFileInfo( url.path() ).isWritable() + && TQFileInfo( url.path() ).isDir() && kapp->authorizeURLAction("list", url, url) ) //Need to check whether a directory so we don't crash trying to access it //(#60192) @@ -97,21 +97,21 @@ KMetaMenu::KMetaMenu( QWidget *parent, const KURL &url, insertItem( SmallIcon( "folder" ), i18n( "&Current Folder" ), m_current ); - connect(m_current, SIGNAL(fileChosen(const QString &)), - SLOT(slotFileChosen(const QString &) ) ); + connect(m_current, TQT_SIGNAL(fileChosen(const TQString &)), + TQT_SLOT(slotFileChosen(const TQString &) ) ); } if ( imProxy ) { m_contacts = new KIMContactMenu( parent, imProxy ); int item = insertItem( SmallIconSet( "personal" ), i18n( "C&ontact" ), m_contacts ); - connect ( m_contacts, SIGNAL( contactChosen( const QString &) ), SIGNAL( contactChosen( const QString & ) ) ); + connect ( m_contacts, TQT_SIGNAL( contactChosen( const TQString &) ), TQT_SIGNAL( contactChosen( const TQString & ) ) ); if ( !imProxy->initialize() || imProxy->fileTransferContacts().isEmpty() ) setItemEnabled( item, false ); } - m_browse = new KAction(i18n("&Browse..."), 0, this, SLOT(slotBrowse()), this ); + m_browse = new KAction(i18n("&Browse..."), 0, this, TQT_SLOT(slotBrowse()), this ); m_browse->plug(this); // read the last chosen dirs // first set the group according to our parameter @@ -122,18 +122,18 @@ KMetaMenu::KMetaMenu( QWidget *parent, const KURL &url, if ( list.count() > 0 ) insertSeparator(); int i=1; - QStringList::Iterator it = list.begin(); + TQStringList::Iterator it = list.begin(); while( it != list.end() ) { if( i == (recent_no + 1) ) break; - QDir dir( *it ); + TQDir dir( *it ); u.setPath( *it ); if ( !dir.exists() || !kapp->authorizeURLAction("list", u, u) ) { it = list.remove( it ); continue; } - QString escapedDir = *it; - KAction *action = new KAction(escapedDir.replace("&", "&&"), 0, this, SLOT(slotFastPath()), this); + TQString escapedDir = *it; + KAction *action = new KAction(escapedDir.replace("&", "&&"), 0, this, TQT_SLOT(slotFastPath()), this); action->plug(this ); actions.append( action ); ++it; @@ -152,7 +152,7 @@ KMetaMenu::~KMetaMenu(){ delete m_browse; actions.clear(); } -void KMetaMenu::slotFileChosen(const QString &path ){ +void KMetaMenu::slotFileChosen(const TQString &path ){ writeConfig(path ); emit fileChosen(path ); } @@ -160,10 +160,10 @@ void KMetaMenu::slotFileChosen(const QString &path ){ void KMetaMenu::slotFastPath( ) { KAction *action; action = (KAction*) sender(); - QString text = action->plainText( ); + TQString text = action->plainText( ); slotFileChosen( text ); } -void KMetaMenu::writeConfig( const QString &path){ +void KMetaMenu::writeConfig( const TQString &path){ list.remove(path ); list.prepend(path ); conf->setGroup( group ); |