summaryrefslogtreecommitdiffstats
path: root/src/part/part.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-03 01:26:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-03 01:26:04 +0000
commit3c7b870f367df150ea60eb9d6bb2fd41646545d7 (patch)
treeac8705b4703cebb5031f9443eafd3e429a17ac1a /src/part/part.h
downloadfilelight-3c7b870f367df150ea60eb9d6bb2fd41646545d7.tar.gz
filelight-3c7b870f367df150ea60eb9d6bb2fd41646545d7.zip
Added abandoned Filelight application
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/filelight@1084392 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/part/part.h')
-rw-r--r--src/part/part.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/part/part.h b/src/part/part.h
new file mode 100644
index 0000000..348b22b
--- /dev/null
+++ b/src/part/part.h
@@ -0,0 +1,71 @@
+// Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
+// Copyright: See COPYING file that comes with this distribution
+
+#ifndef FILELIGHTPART_H
+#define FILELIGHTPART_H
+
+#include <kparts/browserextension.h>
+#include <kparts/statusbarextension.h>
+#include <kparts/part.h>
+#include <kurl.h>
+
+class KAboutData;
+using KParts::StatusBarExtension;
+namespace RadialMap { class Widget; }
+class Directory;
+
+
+namespace Filelight
+{
+ class Part;
+
+ class BrowserExtension : public KParts::BrowserExtension
+ {
+ public:
+ BrowserExtension( Part*, const char * = 0 );
+ };
+
+
+ class Part : public KParts::ReadOnlyPart
+ {
+ Q_OBJECT
+
+ public:
+ Part( QWidget *, const char *, QObject *, const char *, const QStringList& );
+
+ virtual bool openFile() { return false; } //pure virtual in base class
+ virtual bool closeURL();
+
+ QString prettyURL() const { return m_url.protocol() == "file" ? m_url.path() : m_url.prettyURL(); }
+
+ static KAboutData *createAboutData();
+
+ public slots:
+ virtual bool openURL( const KURL& );
+ void configFilelight();
+ void rescan();
+
+ private slots:
+ void postInit();
+ void scanCompleted( Directory* );
+ void mapChanged( const Directory* );
+
+ private:
+ KStatusBar *statusBar() { return m_statusbar->statusBar(); }
+
+ BrowserExtension *m_ext;
+ StatusBarExtension *m_statusbar;
+ RadialMap::Widget *m_map;
+ class ScanManager *m_manager;
+
+ bool m_started;
+
+ private:
+ bool start( const KURL& );
+
+ private slots:
+ void updateURL( const KURL & );
+ };
+}
+
+#endif