mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:37:45 +00:00
Calendar: Implement basic GUI calendar application
This commit is contained in:
parent
08a30a4961
commit
39c21f368a
9 changed files with 426 additions and 0 deletions
23
Applications/Calendar/Calendar.h
Normal file
23
Applications/Calendar/Calendar.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
|
||||
const String name_of_month(int month);
|
||||
|
||||
class Calendar final {
|
||||
public:
|
||||
Calendar(Core::DateTime date_time);
|
||||
~Calendar();
|
||||
|
||||
const String selected_date_text();
|
||||
void set_selected_date(int year, int month);
|
||||
int selected_year() const { return m_selected_year; }
|
||||
int selected_month() const { return m_selected_month; }
|
||||
bool is_today(Core::DateTime date_time) const;
|
||||
|
||||
private:
|
||||
Core::DateTime m_date_time;
|
||||
int m_selected_year { 0 };
|
||||
int m_selected_month { 0 };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue