Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_DateTimeModel.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18  * @file                FUiCtrl_DateTimeModel.h
19  * @brief               This is the header file for the _DateTimeModel class.
20  */
21
22 #ifndef _FUI_CTRL_INTERNAL_DATETIME_MODEL_H_
23 #define _FUI_CTRL_INTERNAL_DATETIME_MODEL_H_
24
25 #include <FBaseObject.h>
26 #include <FBaseDateTime.h>
27 #include <FSysSystemTime.h>
28 #include "FUiCtrl_DateTimeDefine.h"
29
30 namespace Tizen { namespace Ui { namespace Controls
31 {
32
33 class _DateTimeModel
34         : public Tizen::Base::Object
35 {
36 public:
37         _DateTimeModel(void);
38         virtual ~_DateTimeModel(void);
39
40 public:
41         result SetYear(int year);
42         int GetYear(void) const;
43
44         result SetMonth(int month);
45         int GetMonth(void) const;
46
47         result SetDay(int day);
48         int GetDay(void) const;
49
50         result SetHour(int hour);
51         int GetHour(void) const;
52
53         result SetMinute(int minute);
54         int GetMinute(void) const;
55
56         result SetMaxYear(int maxYear);
57         result SetMinYear(int minYear);
58         result GetYearRange(int& minYear, int& maxYear) const;
59
60         void SetCurrentDateTime(void);
61
62         void SetDateTime(const Tizen::Base::DateTime& time);
63         Tizen::Base::DateTime GetDateTime(void) const;
64
65 private:
66         _DateTimeModel(const _DateTimeModel&);
67
68         _DateTimeModel& operator =(const _DateTimeModel&);
69
70         void SetSecond(int second);
71         int GetSecond(void) const;
72
73 private:
74         int __year;
75         int __month;
76         int __day;
77
78         int __maxYear;
79         int __minYear;
80
81         int __hour;
82         int __minute;
83         int __second;
84
85 }; // _DateTimeModel
86
87 }}} // Tizen::Ui::Controls
88
89 #endif  // _FUI_CTRL_INTERNAL_DATETIME_MODEL_H_