summaryrefslogtreecommitdiffstats
path: root/konq-plugins/kuick/kdirmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/kuick/kdirmenu.cpp')
-rw-r--r--konq-plugins/kuick/kdirmenu.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/konq-plugins/kuick/kdirmenu.cpp b/konq-plugins/kuick/kdirmenu.cpp
index 2cbf6de..4dbd212 100644
--- a/konq-plugins/kuick/kdirmenu.cpp
+++ b/konq-plugins/kuick/kdirmenu.cpp
@@ -17,9 +17,9 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qiconset.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqiconset.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <kaction.h>
#include <kapplication.h>
@@ -32,11 +32,11 @@
#define CICON(a) (*_icons)[a]
-QMap<QString, QPixmap> *KDirMenu::_icons = 0;
+TQMap<TQString, TQPixmap> *KDirMenu::_icons = 0;
-KDirMenu::KDirMenu ( QWidget *parent, const KURL &_src,
- const QString &_path, const QString &_name, bool /*showfile*/ )
- : QPopupMenu(parent),
+KDirMenu::KDirMenu ( TQWidget *parent, const KURL &_src,
+ const TQString &_path, const TQString &_name, bool /*showfile*/ )
+ : TQPopupMenu(parent),
path(_path),
name(_name),
src( _src ),
@@ -44,33 +44,33 @@ KDirMenu::KDirMenu ( QWidget *parent, const KURL &_src,
{
children.setAutoDelete( true );
initIconMap( );
- connect( this, SIGNAL( aboutToShow( ) ), this, SLOT( slotAboutToShow( ) ) );
- connect( this, SIGNAL( aboutToHide( ) ), this, SLOT( slotAboutToHide( ) ) );
+ connect( this, TQT_SIGNAL( aboutToShow( ) ), this, TQT_SLOT( slotAboutToShow( ) ) );
+ connect( this, TQT_SIGNAL( aboutToHide( ) ), this, TQT_SLOT( slotAboutToHide( ) ) );
children.clear(); // just in case
- QFileInfo fileInfo(path);
+ TQFileInfo fileInfo(path);
if (( src.path() != path || !src.isLocalFile()) && fileInfo.isWritable())
- action = new KAction(name, 0, this, SLOT(new_slot( ) ), this);
+ action = new KAction(name, 0, this, TQT_SLOT(new_slot( ) ), this);
}
KDirMenu::~KDirMenu( ) {
delete action;
clear( );
children.clear( );
}
-void KDirMenu::insert( KDirMenu *submenu, const QString &_path ) {
- static const QIconSet folder = SmallIconSet("folder");
- QString escapedPath = _path;
- QString completPath=path+'/'+_path;
+void KDirMenu::insert( KDirMenu *submenu, const TQString &_path ) {
+ static const TQIconSet folder = SmallIconSet("folder");
+ TQString escapedPath = _path;
+ TQString completPath=path+'/'+_path;
// parse .directory if it does exist
- if (QFile::exists(completPath + "/.directory")) {
+ if (TQFile::exists(completPath + "/.directory")) {
KSimpleConfig c(completPath + "/.directory", true);
c.setDesktopGroup();
- QString iconPath = c.readEntry("Icon");
+ TQString iconPath = c.readEntry("Icon");
if ( iconPath.startsWith("./") )
iconPath = _path + '/' + iconPath.mid(2);
- QPixmap icon;
+ TQPixmap icon;
icon = KGlobal::iconLoader()->loadIcon(iconPath,
KIcon::Small, KIcon::SizeSmall,
KIcon::DefaultState, 0, true);
@@ -81,8 +81,8 @@ void KDirMenu::insert( KDirMenu *submenu, const QString &_path ) {
else
insertItem( folder, escapedPath.replace( "&", "&&" ), submenu );
children.append( submenu );
- connect(submenu, SIGNAL(fileChosen(const QString &)),
- this, SLOT(slotFileSelected(const QString &)));
+ connect(submenu, TQT_SIGNAL(fileChosen(const TQString &)),
+ this, TQT_SLOT(slotFileSelected(const TQString &)));
}
void KDirMenu::slotAboutToShow( ) {
@@ -92,7 +92,7 @@ void KDirMenu::slotAboutToShow( ) {
//Precaution: if not a directory, exit, in case some path in KMetaMenu
//isn't checked right
- if ( !QFileInfo(path).isDir() )
+ if ( !TQFileInfo(path).isDir() )
return;
if ( action )
@@ -101,9 +101,9 @@ void KDirMenu::slotAboutToShow( ) {
setItemEnabled( insertItem( name ), false );
// all dirs writeable and readable
- QDir dir(path, QString::null,
- QDir::Name | QDir::DirsFirst | QDir::IgnoreCase,
- QDir::Dirs | QDir::Readable | QDir::Executable);
+ TQDir dir(path, TQString::null,
+ TQDir::Name | TQDir::DirsFirst | TQDir::IgnoreCase,
+ TQDir::Dirs | TQDir::Readable | TQDir::Executable);
const QFileInfoList* dirList = dir.entryInfoList();
if ( !dirList || dirList->isEmpty() ) {
@@ -120,11 +120,11 @@ void KDirMenu::slotAboutToShow( ) {
return;
}
- static const QString& dot = KGlobal::staticQString( "." );
- static const QString& dotdot = KGlobal::staticQString( ".." );
+ static const TQString& dot = KGlobal::staticQString( "." );
+ static const TQString& dotdot = KGlobal::staticQString( ".." );
for ( QFileInfoListIterator it( *dirList ); *it; ++it ) {
- QString fileName = (*it)->fileName();
+ TQString fileName = (*it)->fileName();
if ( fileName == dot || fileName == dotdot )
continue;
@@ -146,7 +146,7 @@ void KDirMenu::initIconMap()
// kdDebug(90160) << "PanelBrowserMenu::initIconMap" << endl;
- _icons = new QMap<QString, QPixmap>;
+ _icons = new TQMap<TQString, TQPixmap>;
_icons->insert("folder", SmallIcon("folder"));
_icons->insert("unknown", SmallIcon("mime_empty"));
@@ -158,7 +158,7 @@ void KDirMenu::initIconMap()
_icons->insert("exec", SmallIcon("exec"));
_icons->insert("chardevice", SmallIcon("chardevice"));
}
-void KDirMenu::slotFileSelected(const QString &_path ){
+void KDirMenu::slotFileSelected(const TQString &_path ){
emit fileChosen( _path );
}