49 lines
1.6 KiB
C++
49 lines
1.6 KiB
C++
/*
|
|
* Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.
|
|
* Description: Reboot View
|
|
* Create: 2022-04-28
|
|
*/
|
|
#ifndef REBOOT_VIEW_H
|
|
#define REBOOT_VIEW_H
|
|
|
|
#include "View.h"
|
|
#include "ShutdownDeviceView.h"
|
|
#include "RebootDeviceView.h"
|
|
#include "components/ui_view_group.h"
|
|
#include "components/ui_label.h"
|
|
#include "components/ui_button.h"
|
|
|
|
namespace OHOS {
|
|
constexpr int16_t NUM_REBOOT_CONTAINER = 3;
|
|
|
|
class RebootPresenter;
|
|
class RebootView : public View<RebootPresenter> {
|
|
public:
|
|
RebootView();
|
|
~RebootView() override;
|
|
static RebootView *GetInstance();
|
|
void OnStart() override;
|
|
UIViewGroup *InitShowUpView(void);
|
|
void ChangeView(int16_t hideView, int16_t showView);
|
|
|
|
private:
|
|
bool ChangeRebootView(int16_t hideView, int16_t thisView);
|
|
bool ChangeRebootDeviceView(int16_t hideView, int16_t thisView);
|
|
bool ChangeShutdownDeviceView(int16_t hideView, int16_t thisView);
|
|
bool CheckViewParam(int16_t hideView, int16_t showView);
|
|
bool ShowUpRebootView(void);
|
|
bool ShowUpShutdownView(void);
|
|
UILabel *rebootLabel{nullptr};
|
|
UIButton *rebootButton{nullptr};
|
|
UILabel *shutdownLabel{nullptr};
|
|
UIButton *shutdownButton{nullptr};
|
|
UIViewGroup *group{nullptr};
|
|
RebootDeviceView *rebootDeviceView{nullptr};
|
|
ShutdownDeviceView *shutdownDeviceView{nullptr};
|
|
UIViewGroup *container[NUM_REBOOT_CONTAINER]{nullptr};
|
|
typedef bool (RebootView::*PreprosssChangeView)(int16_t hideView, int16_t thisView);
|
|
PreprosssChangeView preProcessView[NUM_REBOOT_CONTAINER];
|
|
};
|
|
} // namespace OHOS
|
|
#endif // REBOOT_VIEW_H
|