65 lines
1.9 KiB
C++
65 lines
1.9 KiB
C++
#ifndef TJD_UI_APP_STARTUP_PRESENTER_H
|
|
#define TJD_UI_APP_STARTUP_PRESENTER_H
|
|
|
|
#include "Presenter.h"
|
|
#include "TjdUiScreenDrag.h"
|
|
#include "TjdUiTaskListener.h"
|
|
#include "components/root_view.h"
|
|
#include "graphic_timer.h"
|
|
#include "sys_typedef.h"
|
|
#include "ui_swipe_view.h"
|
|
|
|
namespace TJD {
|
|
|
|
enum StartUpView
|
|
{
|
|
SELECT_VIEW = 0,
|
|
DETAIL_VIEW,
|
|
LINKOK_VIEW,
|
|
STARTUPVIEW_MAX
|
|
};
|
|
|
|
class TjdStartUpView;
|
|
class TjdStartUpPresenter : public OHOS::Presenter<TjdStartUpView>,
|
|
public OHOS::UIView::OnClickListener,
|
|
public TjdUiScreenDragListener,
|
|
public OHOS::UISwipeView::OnSwipeListener,
|
|
public OHOS::RootView::OnKeyActListener,
|
|
public TjdUiTaskListener
|
|
{
|
|
public:
|
|
TjdStartUpPresenter();
|
|
~TjdStartUpPresenter();
|
|
static TjdStartUpPresenter *GetInstance(void);
|
|
|
|
void OnStart() override;
|
|
void OnStop() override;
|
|
|
|
bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event) override;
|
|
void ViewExitEvent();
|
|
void ScreenDragEventCallback(OHOS::UIView &view, const OHOS::DragEvent &event) override { ViewExitEvent(); }
|
|
bool OnKeyAct(OHOS::UIView &view, const OHOS::KeyEvent &event) override;
|
|
void Notify(void) override;
|
|
void OnSwipe(OHOS::UISwipeView &view) override;
|
|
|
|
void SetLanguageSelect(language_enum language) { language_ = language; }
|
|
const language_enum &GetLanguageSelect() { return language_; }
|
|
const std::string &GetMacAddr(void);
|
|
|
|
void StartJumpTimer(StartUpView jumpView);
|
|
void DeleteJumpTimer();
|
|
|
|
void ShowQrcodeViewEvent();
|
|
void HideQrcodeViewEvent();
|
|
private:
|
|
void ChangeToFactory(void);
|
|
void ChangeToMainview(void);
|
|
language_enum language_;
|
|
uint8_t skipMainWaitCount = 1;
|
|
uint16_t click_count{0};
|
|
osTimerId_t jumpTimerId_{nullptr};
|
|
};
|
|
|
|
} // namespace TJD
|
|
|
|
#endif // TJDSTARTUP_PRESENTER_H
|