digiKam
collectionlocation.h
Go to the documentation of this file.
1
/* ============================================================
2
*
3
* This file is a part of digiKam project
4
* https://www.digikam.org
5
*
6
* Date : 2007-04-09
7
* Description : Collection location abstraction
8
*
9
* Copyright (C) 2007-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10
*
11
* This program is free software; you can redistribute it
12
* and/or modify it under the terms of the GNU General
13
* Public License as published by the Free Software Foundation;
14
* either version 2, or (at your option)
15
* any later version.
16
*
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
21
*
22
* ============================================================ */
23
24
#ifndef DIGIKAM_COLLECTION_LOCATION_H
25
#define DIGIKAM_COLLECTION_LOCATION_H
26
27
// Qt includes
28
29
#include <QString>
30
#include <QHash>
31
32
// Local includes
33
34
#include "
digikam_export.h
"
35
#include "
coredbalbuminfo.h
"
36
37
namespace
Digikam
38
{
39
40
class
DIGIKAM_DATABASE_EXPORT
CollectionLocation
41
{
42
43
public
:
44
45
enum
Status
46
{
51
LocationNull
,
52
56
LocationAvailable
,
57
62
LocationHidden
,
63
68
LocationUnavailable
,
69
74
LocationDeleted
75
};
76
77
public
:
78
79
enum
Type
80
{
85
TypeVolumeHardWired =
AlbumRoot::VolumeHardWired
,
86
92
TypeVolumeRemovable =
AlbumRoot::VolumeRemovable
,
93
98
TypeNetwork =
AlbumRoot::Network
99
};
100
101
public
:
102
103
CollectionLocation
();
104
108
int
id()
const
;
109
113
Status
status()
const
;
114
118
Type
type()
const
;
119
124
QString albumRootPath()
const
;
125
129
QString label()
const
;
130
131
bool
isAvailable
()
const
132
{
133
return
(m_status == LocationAvailable);
134
}
135
136
bool
isNull
()
const
137
{
138
return
(m_status == LocationNull);
139
}
140
141
uint
hash
()
const
142
{
143
return ::qHash
(m_id);
144
}
145
146
protected
:
147
148
int
m_id
;
149
QString
m_path
;
150
Status
m_status
;
151
Type
m_type
;
152
QString
m_label
;
153
};
154
155
inline
uint
qHash
(
const
CollectionLocation
& loc)
156
{
157
return
loc.
hash
();
158
}
159
160
}
// namespace Digikam
161
162
#endif
// DIGIKAM_COLLECTION_LOCATION_H
qHash
uint qHash(const QList< Digikam::Album * > &key)
Definition:
albumhistory.cpp:44
Digikam::CollectionLocation
Definition:
collectionlocation.h:41
Digikam::CollectionLocation::m_status
Status m_status
Definition:
collectionlocation.h:150
Digikam::CollectionLocation::m_label
QString m_label
Definition:
collectionlocation.h:152
Digikam::CollectionLocation::hash
uint hash() const
Definition:
collectionlocation.h:141
Digikam::CollectionLocation::m_path
QString m_path
Definition:
collectionlocation.h:149
Digikam::CollectionLocation::isAvailable
bool isAvailable() const
Definition:
collectionlocation.h:131
Digikam::CollectionLocation::m_id
int m_id
Definition:
collectionlocation.h:148
Digikam::CollectionLocation::Type
Type
Definition:
collectionlocation.h:80
Digikam::CollectionLocation::Status
Status
Definition:
collectionlocation.h:46
Digikam::CollectionLocation::LocationNull
@ LocationNull
Definition:
collectionlocation.h:51
Digikam::CollectionLocation::LocationHidden
@ LocationHidden
Definition:
collectionlocation.h:62
Digikam::CollectionLocation::LocationUnavailable
@ LocationUnavailable
Definition:
collectionlocation.h:68
Digikam::CollectionLocation::LocationAvailable
@ LocationAvailable
Definition:
collectionlocation.h:56
Digikam::CollectionLocation::isNull
bool isNull() const
Definition:
collectionlocation.h:136
Digikam::CollectionLocation::m_type
Type m_type
Definition:
collectionlocation.h:151
coredbalbuminfo.h
digikam_export.h
Digikam::AlbumRoot::VolumeRemovable
@ VolumeRemovable
Definition:
coredbconstants.h:48
Digikam::AlbumRoot::VolumeHardWired
@ VolumeHardWired
Definition:
coredbconstants.h:47
Digikam::AlbumRoot::Network
@ Network
Definition:
coredbconstants.h:49
Digikam::DatabaseItem::Status
Status
Definition:
coredbconstants.h:85
Digikam
Definition:
datefolderview.cpp:43
Digikam::qHash
uint qHash(const PAlbumPath &id)
Definition:
albummanager_p.h:141
Digikam::Type
Type
Definition:
gpsitemcontainer.h:45
core
libs
database
collection
collectionlocation.h
Generated by
1.9.1