1 Star 0 Fork 21

欢欢/GAS

forked from clickto/GAS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
frmselect.cpp 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
zhao 提交于 2017-03-04 12:30 . 创建版本库 2017-03-04 12:29
#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif
#include "frmselect.h"
#include "ui_frmselect.h"
#include "api/myhelper.h"
frmSelect::frmSelect(QWidget *parent) :
QDialog(parent),
ui(new Ui::frmSelect)
{
ui->setupUi(this);
this->InitStyle();
myHelper::FormInCenter(this);
}
frmSelect::~frmSelect()
{
delete ui;
}
void frmSelect::InitStyle()
{
this->setWindowTitle(ui->lab_Title->text());
this->setProperty("Form", true);
this->setProperty("CanMove", true);
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint);
IconHelper::Instance()->SetIcoMain(ui->lab_Ico, App::FontSize + 2);
IconHelper::Instance()->SetIcoClose(ui->btnMenu_Close);
connect(ui->btnMenu_Close, SIGNAL(clicked()), this, SLOT(close()));
connect(ui->btnClose, SIGNAL(clicked()), this, SLOT(close()));
int width = 20;
#ifdef __arm__
width = 25;
#endif
QString qss = QString("QComboBox::drop-down,QDateEdit::drop-down,QTimeEdit::drop-down,QDateTimeEdit::drop-down{width:%1px;}").arg(width);
this->setStyleSheet(qss);
ui->dateStart->setDate(QDate::currentDate());
ui->dateEnd->setDate(QDate::currentDate().addDays(1));
ui->dateStart->calendarWidget()->setLocale(QLocale::Chinese);
ui->dateEnd->calendarWidget()->setLocale(QLocale::Chinese);
}
void frmSelect::on_btnOk_clicked()
{
if (ui->dateStart->dateTime() > ui->dateEnd->dateTime()) {
myHelper::ShowMessageBoxErrorX("开始时间不能大于结束时间!");
return;
}
this->selectStartDateTime = ui->dateStart->dateTime().toString("yyyy-MM-dd HH:mm:ss");
this->selectEndDateTime = ui->dateEnd->dateTime().toString("yyyy-MM-dd HH:mm:ss");
done(1);
this->close();
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/luhuanhuan200/GAS.git
git@gitee.com:luhuanhuan200/GAS.git
luhuanhuan200
GAS
GAS
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385