代码拉取完成,页面将自动刷新
#ifndef DATECLOCKSETTING_H
#define DATECLOCKSETTING_H
#include <QWidget>
#include <QTimer>
#include <QRadioButton>
#include <QDebug>
#include "clock.h"
#include "datadictionary.h"
namespace Ui {
class DateClockSetting;
}
#include <QString>
#include <QVector>
#include <QObject>
#include <QDateTime>
#include <QtNetwork/QUdpSocket>
class webTimeGetter : public QObject
{
Q_OBJECT
public:
webTimeGetter();
virtual ~webTimeGetter();
public slots:
void readingData();
void connectSucess();
void tryGet();
private:
QVector<QString> hostList;
QUdpSocket* udpsocket;
QDateTime time;
};
class DateClockSetting : public QWidget
{
Q_OBJECT
public:
explicit DateClockSetting(QWidget *parent = nullptr);
~DateClockSetting();
typedef enum {
CAR_BUTTON_RED = 0,
CAR_BUTTON_WHITE,
CAR_BUTTON_GREEN,
}Color_t;
protected:
void showEvent(QShowEvent *event);
void hideEvent(QHideEvent *event);
private slots:
void ShowTime();
void on_Ok_clicked();
void on_Cancel_clicked();
void on_ModifyDate_clicked();
void on_NetWorkGetTime_clicked();
void on_BBGetTime_clicked();
void on_MenuSetTime_clicked();
void DevParamDataChange(DevParamDataIndex_t Index);
private:
void ShowCurrentDateTime();
void ShowCurrentClock();
void SetQRadioButtonStyleSheet(QRadioButton *button,Color_t C);
void SetQRadioButtonStyleSheet();
void ModifyDateTime();
void NoModifyDateTime();
void SelectButtonEnable(bool s);
void SelectButtonClicked(QRadioButton *b);
void SetClockTypeButton(uint32_t s);
private:
Ui::DateClockSetting *ui;
QTimer *m_Timer;
QTimer *m_WebTimer;
Clock *m_Clock;
bool m_ModifySta;
webTimeGetter *m_webTimeGetter;
};
#endif // DATECLOCKSETTING_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。