Files
MuditaOS/module-apps/application-desktop/windows/DesktopMainWindow.hpp
Lefucjusz d403db4101 [MOS-1027] Fix lack of tethering icon on 'Tethering is on' popup
Fix of the issue that pressing menu button while
in tethering resulted in LTE and no signal icons
appear on status bar instead of tethering icon.
2023-08-30 11:13:54 +02:00

58 lines
1.8 KiB
C++

// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <notifications/NotificationsModel.hpp>
#include <application-desktop/models/ActiveNotificationsListPresenter.hpp>
#include <AppWindow.hpp>
#include <ListView.hpp>
#include <widgets/ClockDateWidget.hpp>
namespace app
{
class ApplicationDesktop;
}
namespace gui
{
class NotificationsModel;
class DesktopMainWindow : public AppWindow
{
protected:
gui::ClockDateWidget *clockDate = nullptr;
gui::ListView *notificationsList = nullptr;
std::shared_ptr<gui::ActiveNotificationsListPresenter> notificationsListPresenter;
std::shared_ptr<gui::NotificationsModel> notificationsModel;
// method hides or show widgets and sets bars according to provided state
void setVisibleState();
void setActiveState();
bool processLongReleaseEvent(const InputEvent &inputEvent);
bool processShortReleaseEvent(const InputEvent &inputEvent);
app::ApplicationDesktop *getAppDesktop() const;
public:
explicit DesktopMainWindow(app::ApplicationCommon *app);
// virtual methods gui::Window
bool onInput(const InputEvent &inputEvent) override;
void onBeforeShow(ShowMode mode, SwitchData *data) override;
// virtual methods gui::AppWindow
void rebuild() override;
void buildInterface() override;
void destroyInterface() override;
status_bar::Configuration configureStatusBar(status_bar::Configuration appConfiguration) override;
RefreshModes updateTime() override;
private:
bool resolveDialAction(const std::string &number);
gui::KeyInputMappedTranslation translator;
};
} /* namespace gui */