~ubuntu-branches/ubuntu/vivid/smb4k/vivid

« back to all changes in this revision

Viewing changes to plugin/smb4k_konqplugin.h

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2012-05-19 18:54:34 UTC
  • mfrom: (1.1.20)
  • Revision ID: package-import@ubuntu.com-20120519185434-duffny2n87214n1n
Tags: 1.0.1-1
* New upstream release.
* Update debian/compat: bump to 9.
* Update debian/control:
  - bump debhelper to 9.
  - bump kdelibs5-dev build dependency to 4:4.4.0.
  - bump Standards-Version to 3.9.3 (no changes needed).
  - Replace smbfs dependency by cifs-utils. (Closes: #638162)
* Update debian/copyright:
  - update upstream URL.
  - update upstream e-mail.
* Update debian/smb4k.lintian-overrides file.
* Update debian/watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright (C) 2004 by Massimo Callegari                               *
3
 
 *   massimo.callegari@telsey.it                                           *
4
 
 *                                                                         *
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.                                   *
9
 
 *                                                                         *
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.                          *
14
 
 *                                                                         *
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
 
 ***************************************************************************/
20
 
 
21
 
#ifndef SAMBROWSER_H
22
 
#define SAMBROWSER_H
23
 
 
24
 
#ifdef HAVE_CONFIG_H
25
 
#include <config.h>
26
 
#endif
27
 
 
28
 
#include <konqsidebarplugin.h>
29
 
#include <qstring.h>
30
 
#include <qwidget.h>
31
 
#include <qvbox.h>
32
 
#include <qwidgetstack.h>
33
 
#include <kpopupmenu.h>
34
 
#include <ktoolbar.h>
35
 
#include <khtml_part.h>
36
 
// KDE includes
37
 
#include <kaction.h>
38
 
#include <kparts/dockmainwindow.h>
39
 
#include <kparts/part.h>
40
 
#include <kparts/factory.h>
41
 
 
42
 
 
43
 
class smb4kWidget : public QVBox
44
 
{
45
 
Q_OBJECT
46
 
public:
47
 
    smb4kWidget( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
48
 
 
49
 
private:
50
 
 
51
 
};
52
 
 
53
 
class KonqSidebar_Smb4K : public KonqSidebarPlugin
54
 
{
55
 
    Q_OBJECT
56
 
public:
57
 
    /**
58
 
     * Construct a @ref KonqSidebarPlugin.
59
 
     *
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.
65
 
     **/
66
 
     KonqSidebar_Smb4K(KInstance *inst,QObject *parent,QWidget *widgetParent, QString &desktopName, const char* name=0);
67
 
 
68
 
    /** destructor */
69
 
    ~KonqSidebar_Smb4K();
70
 
 
71
 
    KHTMLPart* m_part;
72
 
    virtual QWidget *getWidget(){ return (QWidget*)widget;}
73
 
    virtual void *provides(const QString &) {return 0;}
74
 
    void emitStatusBarText (const QString &) {;}
75
 
 
76
 
private:
77
 
    /**
78
 
     * The browser part
79
 
     */
80
 
    KParts::Part *m_browser_part;
81
 
 
82
 
    /**
83
 
     * The search dialog part
84
 
     */
85
 
    KParts::Part *m_search_part;
86
 
 
87
 
protected:
88
 
     /**
89
 
      * The main plugin widget. Contains a klistview and a ktoolbox objects
90
 
      */
91
 
     smb4kWidget *widget;
92
 
 
93
 
     QString                currentKonquerorURL;
94
 
 
95
 
 
96
 
    virtual void handleURL(const KURL &url);
97
 
protected slots:
98
 
    /**
99
 
     * This slot initializes a rescan of the network neighborhood.
100
 
     */
101
 
    void slotRescan();
102
 
    /**
103
 
     * This slot is connected to the clicked() signal of the topBar search button
104
 
     * It brings up the "Search" dialog.
105
 
     */
106
 
    void slotSearch();
107
 
    /**
108
 
     * Opens the configuration dialog.
109
 
     */
110
 
    void slotSmb4KOptionsDlg();
111
 
    /**
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.
115
 
     */
116
 
    void slotSettingsChanged();
117
 
    /**
118
 
     * Called from mounter when a share is mounted
119
 
     */
120
 
    void slotMountedShare( const QString & );
121
 
    /**
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
124
 
     * without problems.
125
 
     *
126
 
     * @param mountpoint      The mount point of the share that's going to
127
 
     *                        be unmounted.
128
 
     */
129
 
    void slotPrepareUnmount( const QString &mounpoint );
130
 
  signals:
131
 
    // see <konqsidebarplugin.h>
132
 
    void openURLRequest(const KURL &url,
133
 
                        const KParts::URLArgs &args = KParts::URLArgs());
134
 
};
135
 
 
136
 
#endif