1
/***************************************************************************
2
* Copyright (C) 2004 by Massimo Callegari *
3
* massimo.callegari@telsey.it *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
28
#include <konqsidebarplugin.h>
32
#include <qwidgetstack.h>
33
#include <kpopupmenu.h>
35
#include <khtml_part.h>
38
#include <kparts/dockmainwindow.h>
39
#include <kparts/part.h>
40
#include <kparts/factory.h>
43
class smb4kWidget : public QVBox
47
smb4kWidget( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
53
class KonqSidebar_Smb4K : public KonqSidebarPlugin
58
* Construct a @ref KonqSidebarPlugin.
60
* @param inst The sidebar's kinstance class.
61
* @param parent The sidebar internal button info class responsible for this plugin.
62
* @param widgetParent The container which will contain the plugins widget.
63
* @param desktopName The filename of the configuration file.
64
* @param name A Qt object name for your plugin.
66
KonqSidebar_Smb4K(KInstance *inst,QObject *parent,QWidget *widgetParent, QString &desktopName, const char* name=0);
72
virtual QWidget *getWidget(){ return (QWidget*)widget;}
73
virtual void *provides(const QString &) {return 0;}
74
void emitStatusBarText (const QString &) {;}
80
KParts::Part *m_browser_part;
83
* The search dialog part
85
KParts::Part *m_search_part;
89
* The main plugin widget. Contains a klistview and a ktoolbox objects
93
QString currentKonquerorURL;
96
virtual void handleURL(const KURL &url);
99
* This slot initializes a rescan of the network neighborhood.
103
* This slot is connected to the clicked() signal of the topBar search button
104
* It brings up the "Search" dialog.
108
* Opens the configuration dialog.
110
void slotSmb4KOptionsDlg();
112
* This slot is invoked when the config dialog is closed and the settings have
113
* been changed. Emits the reloadSettings() signal and adjusts the system tray
114
* widget to the new settings afterwards.
116
void slotSettingsChanged();
118
* Called from mounter when a share is mounted
120
void slotMountedShare( const QString & );
122
* Called from the mounter just before a share is unmounted. This slot
123
* changes the URL to the user's home so that we can unmount the share
126
* @param mountpoint The mount point of the share that's going to
129
void slotPrepareUnmount( const QString &mounpoint );
131
// see <konqsidebarplugin.h>
132
void openURLRequest(const KURL &url,
133
const KParts::URLArgs &args = KParts::URLArgs());