summaryrefslogtreecommitdiffstats
path: root/plugin/smb4k_konqplugin.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 18:55:11 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 18:55:11 +0000
commit854bf52eebd2da47ff45f6ae85f4cb89bae89876 (patch)
tree24fa0a7eabb9c300a1655d665f72327fe5ab3464 /plugin/smb4k_konqplugin.h
downloadsmb4k-854bf52eebd2da47ff45f6ae85f4cb89bae89876.tar.gz
smb4k-854bf52eebd2da47ff45f6ae85f4cb89bae89876.zip
Added old KDE3 version of SMB4K
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/smb4k@1097609 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'plugin/smb4k_konqplugin.h')
-rw-r--r--plugin/smb4k_konqplugin.h136
1 files changed, 136 insertions, 0 deletions
diff --git a/plugin/smb4k_konqplugin.h b/plugin/smb4k_konqplugin.h
new file mode 100644
index 0000000..7f57324
--- /dev/null
+++ b/plugin/smb4k_konqplugin.h
@@ -0,0 +1,136 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Massimo Callegari *
+ * massimo.callegari@telsey.it *
+ * *
+ * 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. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef SAMBROWSER_H
+#define SAMBROWSER_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <konqsidebarplugin.h>
+#include <qstring.h>
+#include <qwidget.h>
+#include <qvbox.h>
+#include <qwidgetstack.h>
+#include <kpopupmenu.h>
+#include <ktoolbar.h>
+#include <khtml_part.h>
+// KDE includes
+#include <kaction.h>
+#include <kparts/dockmainwindow.h>
+#include <kparts/part.h>
+#include <kparts/factory.h>
+
+
+class smb4kWidget : public QVBox
+{
+Q_OBJECT
+public:
+ smb4kWidget( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+
+private:
+
+};
+
+class KonqSidebar_Smb4K : public KonqSidebarPlugin
+{
+ Q_OBJECT
+public:
+ /**
+ * Construct a @ref KonqSidebarPlugin.
+ *
+ * @param inst The sidebar's kinstance class.
+ * @param parent The sidebar internal button info class responsible for this plugin.
+ * @param widgetParent The container which will contain the plugins widget.
+ * @param desktopName The filename of the configuration file.
+ * @param name A Qt object name for your plugin.
+ **/
+ KonqSidebar_Smb4K(KInstance *inst,QObject *parent,QWidget *widgetParent, QString &desktopName, const char* name=0);
+
+ /** destructor */
+ ~KonqSidebar_Smb4K();
+
+ KHTMLPart* m_part;
+ virtual QWidget *getWidget(){ return (QWidget*)widget;}
+ virtual void *provides(const QString &) {return 0;}
+ void emitStatusBarText (const QString &) {;}
+
+private:
+ /**
+ * The browser part
+ */
+ KParts::Part *m_browser_part;
+
+ /**
+ * The search dialog part
+ */
+ KParts::Part *m_search_part;
+
+protected:
+ /**
+ * The main plugin widget. Contains a klistview and a ktoolbox objects
+ */
+ smb4kWidget *widget;
+
+ QString currentKonquerorURL;
+
+
+ virtual void handleURL(const KURL &url);
+protected slots:
+ /**
+ * This slot initializes a rescan of the network neighborhood.
+ */
+ void slotRescan();
+ /**
+ * This slot is connected to the clicked() signal of the topBar search button
+ * It brings up the "Search" dialog.
+ */
+ void slotSearch();
+ /**
+ * Opens the configuration dialog.
+ */
+ void slotSmb4KOptionsDlg();
+ /**
+ * This slot is invoked when the config dialog is closed and the settings have
+ * been changed. Emits the reloadSettings() signal and adjusts the system tray
+ * widget to the new settings afterwards.
+ */
+ void slotSettingsChanged();
+ /**
+ * Called from mounter when a share is mounted
+ */
+ void slotMountedShare( const QString & );
+ /**
+ * Called from the mounter just before a share is unmounted. This slot
+ * changes the URL to the user's home so that we can unmount the share
+ * without problems.
+ *
+ * @param mountpoint The mount point of the share that's going to
+ * be unmounted.
+ */
+ void slotPrepareUnmount( const QString &mounpoint );
+ signals:
+ // see <konqsidebarplugin.h>
+ void openURLRequest(const KURL &url,
+ const KParts::URLArgs &args = KParts::URLArgs());
+};
+
+#endif