You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
764 B

#include "assistant.h"
#include "ui_assistant.h"
#include<QDebug>
#include<QTime>
assistant::assistant(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::assistant)
{
ui->setupUi(this);
QTime time = QTime::currentTime();
ui->label->setText(time.toString("hh:mm"));
QDate date = QDate::currentDate();
ui->label_2->setText(date.toString("yyyy年MM月dd日 dddd"));
}
assistant::~assistant()
{
delete ui;
}
void assistant::on_pushButton_clicked()
{
emit climate_ready(true);
qDebug()<<"天气";
}
//课程表
void assistant::on_pushButton_3_clicked()
{
emit class_ready(true);
qDebug()<<"课程表";
}
//闹钟
void assistant::on_pushButton_2_clicked()
{
emit alarm_ready(true);
qDebug()<<"闹钟";
}