summaryrefslogtreecommitdiffstats
path: root/kimagemapeditor/qextfileinfo.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /kimagemapeditor/qextfileinfo.h
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kimagemapeditor/qextfileinfo.h')
-rw-r--r--kimagemapeditor/qextfileinfo.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/kimagemapeditor/qextfileinfo.h b/kimagemapeditor/qextfileinfo.h
new file mode 100644
index 00000000..20294bde
--- /dev/null
+++ b/kimagemapeditor/qextfileinfo.h
@@ -0,0 +1,75 @@
+/*
+ From WebMaker - KDE HTML Editor
+ Copyright (C) 1998, 1999 Alexei Dets <dets@services.ru>
+ Rewritten for Quanta Plus: (C) 2002 Andras Mantia <amantia@freemail.hu>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+*/
+
+#ifndef _QEXTFILEINFO_H_
+#define _QEXTFILEINFO_H_
+
+#include <kio/global.h>
+#include <kio/job.h>
+#include <kurl.h>
+#include <kfileitem.h>
+
+#include <qobject.h>
+#include <qptrlist.h>
+#include <qregexp.h>
+
+class QExtFileInfo:public QObject
+{
+ Q_OBJECT
+public:
+ QExtFileInfo() {};
+ ~QExtFileInfo() {};
+
+ /** create to ralative short name */
+ static KURL toRelative(const KURL& urlToConvert,const KURL& baseURL);
+ /** convert relative filename to absolute */
+ static KURL toAbsolute(const KURL& urlToConvert,const KURL& baseURL);
+ /** recurse function for all files in dir */
+ static KURL::List allFiles( const KURL& path, const QString &mask);
+ static KURL::List allFilesRelative( const KURL& path, const QString &mask);
+ /** create dir if don't exists */
+ static bool createDir(const KURL & path );
+ static KURL cdUp(const KURL &dir);
+ static QString shortName(const QString &fname );
+ static KURL path(const KURL &);
+ static KURL home();
+ static bool exists(const KURL& url);
+ static bool copy( const KURL& src, const KURL& dest, int permissions=-1,
+ bool overwrite=false, bool resume=false, QWidget* window = 0L );
+
+ void enter_loop();
+
+private:
+ bool internalExists(const KURL& url);
+ bool internalCopy(const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window);
+
+ bool bJobOK;
+ static QString lastErrorMsg;
+ KIO::UDSEntry m_entry;
+ KURL::List dirListItems;
+ QPtrList<QRegExp> lstFilters;
+
+ /** No descriptions */
+ KURL::List allFilesInternal(const KURL& startURL, const QString& mask);
+
+// friend class I_like_this_class;
+
+private slots:
+ void slotResult( KIO::Job * job );
+ void slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList);
+public slots: // Public slots
+ /** Timeout occured while waiting for some network function to return. */
+ void slotTimeout();
+};
+
+
+#endif