Aspose.Tasks for C++
TimescaleTier.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="TimescaleTier.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/string.h>
9 #include <system/date_time.h>
10 #include <cstdint>
11 
12 #include "aspose.tasks.cpp/Visualization/View/DateTimeConverter.h"
13 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
14 
15 namespace Aspose
16 {
17 namespace Tasks
18 {
19 namespace Visualization
20 {
21 class ApsTimescaleTierBuilder;
22 class ApsTimescaleTiersCommonSettings;
23 class ApsUsagePage;
24 enum class DateLabel;
25 enum class HorizontalStringAlignment;
26 enum class TimescaleUnit;
27 } // namespace Visualization
28 } // namespace Tasks
29 } // namespace Aspose
30 
31 namespace Aspose {
32 
33 namespace Tasks {
34 
35 namespace Visualization {
36 
37 /// <summary>
38 /// Represents a single tier of the timescale on a Gantt Chart.
39 /// </summary>
40 class ASPOSE_TASKS_SHARED_CLASS TimescaleTier final : public System::Object
41 {
42  typedef TimescaleTier ThisType;
43  typedef System::Object BaseType;
44 
45  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
46  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
47 
48  friend class Aspose::Tasks::Visualization::ApsUsagePage;
49  friend class Aspose::Tasks::Visualization::ApsTimescaleTierBuilder;
50  friend class Aspose::Tasks::Visualization::ApsTimescaleTiersCommonSettings;
51 
52 public:
53 
54  /// <summary>
55  /// Gets a callback function for handling rendering date tick in this tier.
56  /// </summary>
57  ASPOSE_TASKS_SHARED_API Aspose::Tasks::Visualization::DateTimeConverter get_DateTimeConverter() const;
58  /// <summary>
59  /// Sets a callback function for handling rendering date tick in this tier.
60  /// </summary>
61  ASPOSE_TASKS_SHARED_API void set_DateTimeConverter(Aspose::Tasks::Visualization::DateTimeConverter value);
62  /// <summary>
63  /// Gets the time unit interval in which to show labels for the tier.
64  /// The default value is 1.
65  /// </summary>
66  ASPOSE_TASKS_SHARED_API int32_t get_Count() const;
67  /// <summary>
68  /// Sets the time unit interval in which to show labels for the tier.
69  /// The default value is 1.
70  /// </summary>
71  ASPOSE_TASKS_SHARED_API void set_Count(int32_t value);
72  /// <summary>
73  /// Gets date label <see cref="DateLabel"></see> for the timescale tier.
74  /// </summary>
75  ASPOSE_TASKS_SHARED_API DateLabel get_Label() const;
76  /// <summary>
77  /// Sets date label <see cref="DateLabel"></see> for the timescale tier.
78  /// </summary>
79  ASPOSE_TASKS_SHARED_API void set_Label(DateLabel value);
80  /// <summary>
81  /// Gets how to align labels within each time period of the tier (<see cref="HorizontalStringAlignment"></see>).
82  /// </summary>
83  ASPOSE_TASKS_SHARED_API HorizontalStringAlignment get_Alignment() const;
84  /// <summary>
85  /// Sets how to align labels within each time period of the tier (<see cref="HorizontalStringAlignment"></see>).
86  /// </summary>
87  ASPOSE_TASKS_SHARED_API void set_Alignment(HorizontalStringAlignment value);
88  /// <summary>
89  /// Gets a value indicating whether to base the tier labels on the fiscal year.
90  /// </summary>
91  ASPOSE_TASKS_SHARED_API bool get_UsesFiscalYear() const;
92  /// <summary>
93  /// Sets a value indicating whether to base the tier labels on the fiscal year.
94  /// </summary>
95  ASPOSE_TASKS_SHARED_API void set_UsesFiscalYear(bool value);
96  /// <summary>
97  /// Gets a value indicating whether whether to show tick marks that separate time periods in the tier.
98  /// </summary>
99  ASPOSE_TASKS_SHARED_API bool get_ShowTicks() const;
100  /// <summary>
101  /// Sets a value indicating whether whether to show tick marks that separate time periods in the tier.
102  /// </summary>
103  ASPOSE_TASKS_SHARED_API void set_ShowTicks(bool value);
104  /// <summary>
105  /// Gets timescale unit <see cref="TimescaleUnit"></see> for the timescale tier.
106  /// The default value is <see cref="TimescaleUnit">Days</see>.
107  /// </summary>
108  ASPOSE_TASKS_SHARED_API TimescaleUnit get_Unit() const;
109  /// <summary>
110  /// Sets timescale unit <see cref="TimescaleUnit"></see> for the timescale tier.
111  /// The default value is <see cref="TimescaleUnit">Days</see>.
112  /// </summary>
113  ASPOSE_TASKS_SHARED_API void set_Unit(TimescaleUnit value);
114 
115  /// <summary>
116  /// Initializes a new instance of the <see cref="TimescaleTier"></see> class.
117  /// </summary>
118  ASPOSE_TASKS_SHARED_API TimescaleTier();
119  /// <summary>
120  /// Initializes a new instance of the <see cref="TimescaleTier"></see> class.
121  /// </summary>
122  /// <param name="unit">
123  /// The timescale unit <see cref="TimescaleUnit"></see>.
124  /// </param>
125  /// <param name="count">
126  /// The count of <see cref="TimescaleUnit"></see> units.
127  /// </param>
128  ASPOSE_TASKS_SHARED_API TimescaleTier(TimescaleUnit unit, int32_t count);
129 
130 protected:
131 
132  /// <summary>
133  /// Gets days count in one tick
134  /// </summary>
135  ASPOSE_TASKS_SHARED_API float get_TotalDaysInTick();
136  /// <summary>
137  /// Gets days count in timescale unit
138  /// </summary>
139  ASPOSE_TASKS_SHARED_API float get_DaysInUnit();
140 
141  #ifdef ASPOSE_GET_SHARED_MEMBERS
142  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
143  #endif
144 
145 
146 private:
147 
148  int32_t count;
149  Aspose::Tasks::Visualization::DateTimeConverter pr_DateTimeConverter;
150  DateLabel pr_Label;
151  HorizontalStringAlignment pr_Alignment;
152  bool pr_UsesFiscalYear;
153  bool pr_ShowTicks;
154  TimescaleUnit pr_Unit;
155 
156  /// <summary>
157  /// Initializes a new instance of the <see cref="TimescaleTier"></see> class.
158  /// </summary>
159  /// <param name="unit">
160  /// The timescale unit <see cref="TimescaleUnit"></see>.
161  /// </param>
162  TimescaleTier(TimescaleUnit unit);
163 
164  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(TimescaleTier, CODEPORTING_ARGS(TimescaleUnit unit));
165 
166 };
167 
168 } // namespace Visualization
169 } // namespace Tasks
170 } // namespace Aspose
171 
172 
Represents a single tier of the timescale on a Gantt Chart.
Definition: TimescaleTier.h:41
int32_t get_Count() const
Gets the time unit interval in which to show labels for the tier. The default value is 1.
bool get_ShowTicks() const
Gets a value indicating whether whether to show tick marks that separate time periods in the tier.
void set_Alignment(HorizontalStringAlignment value)
Sets how to align labels within each time period of the tier (HorizontalStringAlignment).
DateLabel get_Label() const
Gets date label DateLabel for the timescale tier.
HorizontalStringAlignment get_Alignment() const
Gets how to align labels within each time period of the tier (HorizontalStringAlignment).
Aspose::Tasks::Visualization::DateTimeConverter get_DateTimeConverter() const
Gets a callback function for handling rendering date tick in this tier.
void set_UsesFiscalYear(bool value)
Sets a value indicating whether to base the tier labels on the fiscal year.
bool get_UsesFiscalYear() const
Gets a value indicating whether to base the tier labels on the fiscal year.
void set_Label(DateLabel value)
Sets date label DateLabel for the timescale tier.
void set_ShowTicks(bool value)
Sets a value indicating whether whether to show tick marks that separate time periods in the tier.
TimescaleUnit get_Unit() const
Gets timescale unit TimescaleUnit for the timescale tier. The default value is Days.
void set_DateTimeConverter(Aspose::Tasks::Visualization::DateTimeConverter value)
Sets a callback function for handling rendering date tick in this tier.
TimescaleTier()
Initializes a new instance of the TimescaleTier class.
void set_Unit(TimescaleUnit value)
Sets timescale unit TimescaleUnit for the timescale tier. The default value is Days.
void set_Count(int32_t value)
Sets the time unit interval in which to show labels for the tier. The default value is 1.
TimescaleTier(TimescaleUnit unit, int32_t count)
Initializes a new instance of the TimescaleTier class.
Definition: Asn.h:13