85
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: cadefs.h
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CADEFS_H
|
|
19 |
#define CADEFS_H
|
|
20 |
|
|
21 |
#include <QFlags>
|
|
22 |
#include <QMetaType>
|
|
23 |
|
|
24 |
enum ChangeType
|
|
25 |
{
|
|
26 |
AddChangeType,
|
|
27 |
RemoveChangeType,
|
|
28 |
UpdateChangeType
|
|
29 |
};
|
|
30 |
|
|
31 |
enum EntryRole
|
|
32 |
{
|
|
33 |
ItemEntryRole = 1,
|
|
34 |
GroupEntryRole = 2
|
|
35 |
};
|
|
36 |
Q_DECLARE_FLAGS(EntryRoles, EntryRole)
|
|
37 |
Q_DECLARE_OPERATORS_FOR_FLAGS(EntryRoles)
|
|
38 |
|
|
39 |
enum SortAttribute
|
|
40 |
{
|
|
41 |
NameSortAttribute,
|
|
42 |
CreatedTimestampSortAttribute,
|
|
43 |
MostUsedSortAttribute,
|
|
44 |
LastUsedSortAttribute,
|
|
45 |
DefaultSortAttribute
|
|
46 |
// default - return items in custom order
|
|
47 |
};
|
|
48 |
|
|
49 |
enum EntryFlag
|
|
50 |
{
|
|
51 |
UsedEntryFlag = 1,
|
|
52 |
SystemEntryFlag = 2,
|
|
53 |
RemovableEntryFlag = 4,
|
|
54 |
VisibleEntryFlag = 8,
|
|
55 |
RunningEntryFlag = 16,
|
|
56 |
NativeEntryFlag = 32,
|
|
57 |
MissingEntryFlag = 64
|
|
58 |
};
|
|
59 |
Q_DECLARE_FLAGS(EntryFlags, EntryFlag)
|
|
60 |
Q_DECLARE_OPERATORS_FOR_FLAGS(EntryFlags)
|
|
61 |
Q_DECLARE_METATYPE(EntryFlags)
|
|
62 |
|
|
63 |
enum ErrorCode
|
|
64 |
{
|
|
65 |
NoErrorCode = 0,
|
|
66 |
NotFoundErrorCode,
|
|
67 |
OutOfMemoryErrorCode,
|
|
68 |
BadArgumentErrorCode,
|
|
69 |
UnknownErrorCode
|
|
70 |
};
|
|
71 |
|
87
|
72 |
const QString caCmdOpen("open");
|
|
73 |
|
85
|
74 |
#ifndef QT_NO_DEBUG_OUTPUT
|
|
75 |
# define USE_QDEBUG_IF(predicate) if (!predicate) {} else qDebug()
|
|
76 |
#else
|
|
77 |
# define USE_QDEBUG_IF(predicate) if (1) {} else qDebug()
|
|
78 |
#endif
|
|
79 |
|
|
80 |
#ifndef QT_NO_WARNING_OUTPUT
|
|
81 |
# define USE_QWARNING_IF(predicate) if (!predicate) {} else qWarning()
|
|
82 |
#else
|
|
83 |
# define USE_QWARNING_IF(predicate) if (1) {} else qWarning()
|
|
84 |
#endif
|
|
85 |
|
|
86 |
#endif // CADEFS_H
|