1/* This file is part of the KDE project
2 Copyright (C) 2006, 2007 Dag Andersen <danders@get2net.dk>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version..
8
9 This library 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 GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17* Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KPTGLOBAL_H
21#define KPTGLOBAL_H
22
23#include "kplatokernel_export.h"
24
25
26#include <klocale.h>
27
28// The Plan file syntax is used in parts of the KPlatoWork file, so:
29// * If you change PLAN_FILE_SYNTAX_VERSION, change PLANWORK_FILE_SYNTAX_VERSION too!
30// * You don't need to change PLAN_FILE_SYNTAX_VERSION when you change KPLATOWORK_FILE_SYNTAX_VERSION
31#define PLAN_FILE_SYNTAX_VERSION "0.6.6"
32#define PLANWORK_FILE_SYNTAX_VERSION "0.6.6"
33
34#define CURRENTSCHEDULE -1
35#define NOTSCHEDULED -2
36#define BASELINESCHEDULE -3
37#define ANYSCHEDULED -4
38
39namespace KPlato
40{
41
42/// EffortCostCalculationType controls how effort and cost is calculated
43enum EffortCostCalculationType {
44 ECCT_All, /// Include both work and material in both effort and cost calculations
45 ECCT_EffortWork, /// Include only Work in effort calculations, both work and material in cost calculations
46 ECCT_Work /// Inlcude only Work in both effort and cost calculations
47};
48
49enum ObjectType {
50 OT_None = 0,
51 OT_Project,
52 OT_Task,
53 OT_Summarytask,
54 OT_ResourceGroup,
55 OT_Resource,
56 OT_Appointment,
57 OT_External,
58 OT_Interval,
59 OT_ScheduleManager,
60 OT_Schedule,
61 OT_Calendar,
62 OT_CalendarWeek,
63 OT_CalendarDay
64};
65
66namespace Role
67{
68 enum Roles {
69 EnumList = Qt::UserRole + 1,
70 EnumListValue,
71 List,
72 ListValues,
73 DurationUnit,
74 DurationScales,
75 Maximum,
76 Minimum,
77 EditorType,
78 ReadWrite,
79 ObjectType,
80 InternalAppointments,
81 ExternalAppointments,
82 ColumnTag,
83 Planned,
84 Actual,
85 Foreground,
86 Object
87 };
88} //namespace Role
89
90
91struct KPLATOKERNEL_EXPORT SchedulingState
92{
93 static QString deleted( bool trans = true );
94 static QString notScheduled( bool trans = true );
95 static QString scheduled( bool trans = true );
96 static QString resourceOverbooked( bool trans = true );
97 static QString resourceNotAvailable( bool trans = true );
98 static QString resourceNotAllocated( bool trans = true );
99 static QString constraintsNotMet( bool trans = true );
100 static QString effortNotMet( bool trans = true );
101 static QString schedulingError( bool trans = true );
102
103}; //namespace WhatsThis
104
105
106} //namespace KPlato
107
108#endif
109