1
/***************************************************************************
2
smb4kbasicnetworkitem - This class provides the basic network item
3
for the core library of Smb4K.
6
copyright : (C) 2009-2011 by Alexander Reinholdt
7
email : alexander.reinholdt@kdemail.net
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, 51 Franklin Street, Suite 500, Boston, *
24
* MA 02110-1335, USA *
25
***************************************************************************/
27
#ifndef SMB4KBASICNETWORKITEM_H
28
#define SMB4KBASICNETWORKITEM_H
39
#include <kdemacros.h>
41
class KDE_EXPORT Smb4KBasicNetworkItem
45
* Enumeration to determine the type of the network
48
* @enum Workgroup The network item is a workgroup or domain.
49
* @enum Host The network item is a host.
50
* @enum Share The network item is a share.
51
* @enum Unknown The network item type is unknown.
62
Smb4KBasicNetworkItem( Smb4KBasicNetworkItem::Type type = Unknown );
65
* The copy constructor
67
Smb4KBasicNetworkItem( const Smb4KBasicNetworkItem &item );
72
~Smb4KBasicNetworkItem();
75
* This function returns the type of the basic network
80
Type type() const { return m_type; }
83
* With this function you can set a key, that can be used to identify
84
* a certain network item.
88
void setKey( const QString &key );
91
* This function returns the key for this network item. By default,
92
* this is a random number that was generated by the constructor.
94
* @returns the identifying string for this item.
96
const QString &key() const { return m_key; }
99
* This function sets the icon of the network item.
101
* @param icon The icon
103
void setIcon( const QIcon &icon );
106
* This function returns the icon of the network item. By default, it
107
* is the null icon. You must set the appropriate icon either in
108
* a class that inherits this one or from somewhere else.
110
* @returns the network item's icon.
112
const QIcon &icon() const { return m_icon; }