]> cloud.milkyroute.net Git - dolphin.git/blob - src/fileitemcapabilities.h
There are some extractable strings in subdirs too.
[dolphin.git] / src / fileitemcapabilities.h
1 /***************************************************************************
2 * Copyright (C) 2008 by Peter Penz <peter.penz@gmx.at> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
19
20 #ifndef FILEITEMCAPABILITIES_H
21 #define FILEITEMCAPABILITIES_H
22
23 class KFileItemList;
24
25 /**
26 * @brief Provides information about the access capabilities of file items.
27 *
28 * As soon as one file item does not support a specific capability, it is
29 * marked as unsupported for all items.
30 */
31 class FileItemCapabilities
32 {
33 public:
34 FileItemCapabilities(const KFileItemList& items);
35 virtual ~FileItemCapabilities();
36 bool supportsReading() const;
37 bool supportsDeleting() const;
38 bool supportsWriting() const;
39 bool supportsMoving() const;
40 bool isLocal() const;
41
42 private:
43 bool m_supportsReading : 1;
44 bool m_supportsDeleting : 1;
45 bool m_supportsWriting : 1;
46 bool m_supportsMoving : 1;
47 bool m_isLocal : 1;
48 };
49
50 inline bool FileItemCapabilities::supportsReading() const
51 {
52 return m_supportsReading;
53 }
54
55 inline bool FileItemCapabilities::supportsDeleting() const
56 {
57 return m_supportsDeleting;
58 }
59
60 inline bool FileItemCapabilities::supportsWriting() const
61 {
62 return m_supportsWriting;
63 }
64
65 inline bool FileItemCapabilities::supportsMoving() const
66 {
67 return m_supportsMoving;
68 }
69
70 inline bool FileItemCapabilities::isLocal() const
71 {
72 return m_isLocal;
73 }
74
75 #endif