36 lines
1013 B
C++
36 lines
1013 B
C++
/*----------------------------------------------------------------------------
|
|
* Copyright (c) TJD Technologies Co., Ltd. 2025. All rights reserved.
|
|
*
|
|
* Description: TjdDialModelTime.h
|
|
*
|
|
* Author: luziquan@ss-tjd.com
|
|
*
|
|
* Create: 2025-03-19
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#ifndef TJD_DIAL_MODEL_TIME_H
|
|
#define TJD_DIAL_MODEL_TIME_H
|
|
|
|
#include <string>
|
|
#include "DialBaseModel.h"
|
|
|
|
namespace TJD {
|
|
class TjdDialModelTime : public OHOS::DialBaseModel
|
|
{
|
|
public:
|
|
TjdDialModelTime();
|
|
~TjdDialModelTime() override {}
|
|
static TjdDialModelTime *GetInstance();
|
|
void Unload();
|
|
bool GetDialFloatData(OHOS::DialDataType &type, float &out) override;
|
|
bool GetDialTextData(OHOS::DialDataType& type, std::string*& out, int16_t& strNum) override;
|
|
bool GetDialFloatData(OHOS::DialDataType& type, float*& out, int16_t len) override;
|
|
void UpdateTime();
|
|
|
|
private:
|
|
float GetRotateAngle();
|
|
struct tm *tblock_;
|
|
};
|
|
} // namespace OHOS
|
|
|
|
#endif |