~ubuntu-branches/ubuntu/utopic/smb4k/utopic-proposed

« back to all changes in this revision

Viewing changes to smb4k/browser/smb4knetworkbrowser.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:
2
2
    smb4knetworkbrowser  -  The network browser widget of Smb4K.
3
3
                             -------------------
4
4
    begin                : Mo Jan 8 2007
5
 
    copyright            : (C) 2007 by Alexander Reinholdt
6
 
    email                : dustpuppy@users.berlios.de
 
5
    copyright            : (C) 2007-2011 by Alexander Reinholdt
 
6
    email                : alexander.reinholdt@kdemail.net
7
7
 ***************************************************************************/
8
8
 
9
9
/***************************************************************************
19
19
 *                                                                         *
20
20
 *   You should have received a copy of the GNU General Public License     *
21
21
 *   along with this program; if not, write to the                         *
22
 
 *   Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,   *
23
 
 *   MA  02111-1307 USA                                                    *
 
22
 *   Free Software Foundation, 51 Franklin Street, Suite 500, Boston,      *
 
23
 *   MA 02110-1335, USA                                                    *
24
24
 ***************************************************************************/
25
25
 
26
26
#ifndef SMB4KNETWORKBROWSER_H
32
32
 
33
33
// Qt includes
34
34
#include <QTreeWidget>
35
 
#include <QTimer>
36
35
 
37
36
// forward declarations
38
37
class Smb4KNetworkBrowserItem;
39
 
class Smb4KNetworkBrowserToolTip;
 
38
class Smb4KToolTip;
40
39
 
41
40
class Smb4KNetworkBrowser : public QTreeWidget
42
41
{
70
69
     *
71
70
     * @returns a pointer to the current tool tip.
72
71
     */
73
 
    Smb4KNetworkBrowserToolTip *tooltip() { return m_tooltip; }
 
72
    Smb4KToolTip *tooltip() const { return m_tooltip; }
74
73
 
75
74
    /**
76
75
     * This function returns TRUE if the mouse is inside the network
93
92
 
94
93
  protected:
95
94
    /**
 
95
     * Reimplemented from QWidget.
 
96
     */
 
97
    bool event( QEvent *e );
 
98
 
 
99
    /**
96
100
     * Reimplemented from QWidget. This function keeps track of the
97
101
     * mouse position and handles the tool tips.
98
102
     *
141
145
    void wheelEvent( QWheelEvent *e );
142
146
 
143
147
  protected slots:
144
 
    /**
145
 
     * This slot is called whenever an item is expanded.
146
 
     *
147
 
     * @param item          The tree widget item that has been
148
 
     *                      expanded.
149
 
     */
150
 
    void slotItemExpanded( QTreeWidgetItem *item );
151
 
 
152
 
    /**
153
 
     * This slot is called whenever an item is collapsed.
154
 
     *
155
 
     * @param item          The tree widget item that has been
156
 
     *                      collapsed.
157
 
     */
158
 
    void slotItemCollapsed( QTreeWidgetItem *item );
159
 
 
160
148
   /**
161
149
     * This slot is used to change the cursor over an item if appropriate.
162
150
     *
185
173
                           int column );
186
174
 
187
175
    /**
188
 
     * This slot shows the tool tip.
189
 
     */
190
 
    void slotShowToolTip();
191
 
 
192
 
    /**
193
 
     * This slot hides and clears the tool tip.
194
 
     */
195
 
    void slotHideToolTip();
196
 
 
197
 
    /**
198
176
     * This slot is used to adjust to KDE's settings.
199
177
     *
200
178
     * @param category      The category where the settings changed.
208
186
 
209
187
  private:
210
188
    /**
211
 
     * The global position of the mouse with respect to the widget.
212
 
     */
213
 
    QPoint m_pos;
214
 
 
215
 
    /**
216
189
     * The tool tip for the network browser
217
190
     */
218
 
    Smb4KNetworkBrowserToolTip *m_tooltip;
219
 
 
220
 
    /**
221
 
     * Block tool tips
222
 
     */
223
 
    bool m_block_tooltip;
 
191
    Smb4KToolTip *m_tooltip;
224
192
 
225
193
    /**
226
194
     * Mouse inside the widget?
244
212
    int m_auto_select_delay;
245
213
 
246
214
    /**
247
 
     * The tool tip timer.
248
 
     */
249
 
    QTimer *m_tooltip_timer;
250
 
 
251
 
    /**
252
215
     * The timer for auto selection.
253
216
     */
254
217
    QTimer *m_auto_select_timer;