mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-26 23:15:09 -05:00
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.
58 lines
1.8 KiB
C++
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 */
|