1
/***************************************************************************
2
smb4ksharesviewitemdata - This class is a container for the widget
3
independed data needed by the various parts of the shares view.
6
copyright : (C) 2008 by Alexander Reinholdt
7
email : dustpuppy@users.berlios.de
8
***************************************************************************/
10
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
* This program is distributed in the hope that it will be useful, but *
17
* WITHOUT ANY WARRANTY; without even the implied warranty of *
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19
* General Public License for more details. *
21
* You should have received a copy of the GNU General Public License *
22
* along with this program; if not, write to the *
23
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
25
***************************************************************************/
27
#ifndef SMB4KSHARESVIEWITEMDATA_H
28
#define SMB4KSHARESVIEWITEMDATA_H
37
// application specific includes
38
#include <core/smb4kshare.h>
41
* This class is a container for the widget independed data needed by the
42
* shares view KPart and the tool tip.
44
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
47
class Smb4KSharesViewItemData
53
Smb4KSharesViewItemData();
58
~Smb4KSharesViewItemData();
61
* Set the share object.
63
* @param share The Smb4KShare object
65
void setShare( Smb4KShare *share );
68
* Return the share object.
70
* @returns the Smb4KShare object.
72
Smb4KShare *share() { return &m_share; }
75
* Set if the mount point should be shown.
77
* @param show Set this value to TRUE if the mount point
80
void setShowMountPoint( bool show );
83
* Returns TRUE if the mount point should be shown and FALSE otherwise.
85
* @returns TRUE if the mount point should be shown.
87
bool showMountPoint() const { return m_show_mountpoint; }
90
* Set the item's icon. It is used to return the various pixmaps this
93
* @param icon The item's icon.
95
* @param mode The mode the icon should be in.
99
void setIcon( const QIcon &icon,
100
QIcon::Mode mode = QIcon::Normal,
101
QIcon::State state = QIcon::Off );
104
* Returns the item's pixmap according to @param size.
106
* @returns the icon's pixmap.
108
QPixmap pixmap( int size ) const;
111
* Returns the item's pixmap according to @param size.
113
* @returns the icon's pixmap.
115
QPixmap pixmap( const QSize &size ) const;
125
* Do we show the mount point?
127
bool m_show_mountpoint;
142
QIcon::State m_state;
147
QPixmap m_desktop_icon;