mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:47:44 +00:00
Calendar: Add ability to view events
This commit is contained in:
parent
0d41f6cf89
commit
433fe3dc26
7 changed files with 179 additions and 1 deletions
38
Userland/Applications/Calendar/ViewEventDialog.h
Normal file
38
Userland/Applications/Calendar/ViewEventDialog.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Sanil Gupta <sanilg566@gmail.com>.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "EventManager.h"
|
||||
#include <LibGUI/Calendar.h>
|
||||
#include <LibGUI/Dialog.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
namespace Calendar {
|
||||
|
||||
class ViewEventDialog final : public GUI::Dialog {
|
||||
C_OBJECT(ViewEventDialog)
|
||||
public:
|
||||
virtual ~ViewEventDialog() override = default;
|
||||
|
||||
static void show(Core::DateTime date, EventManager& event_manager, Window* parent_window = nullptr)
|
||||
{
|
||||
auto dialog = ViewEventDialog::construct(date, event_manager, parent_window);
|
||||
dialog->exec();
|
||||
}
|
||||
void close_and_open_add_event_dialog();
|
||||
|
||||
private:
|
||||
ViewEventDialog(Core::DateTime, EventManager&, Window*);
|
||||
void update_events();
|
||||
|
||||
EventManager& m_event_manager;
|
||||
Core::DateTime m_date_time;
|
||||
|
||||
Vector<Event> m_events;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue