#include "Frm05.h"

Frm05::Frm05(HmiApp* app, STTWidget *par, const string& id, const string& desc) : STTPage(app->getRuntime(), par, id, desc) {
	hmiApp = app;
}

Frm05::~Frm05() {
}

void Frm05::onInit() {

}

void Frm05::createParts() {
	setMainArg(0, 0, 800, 420);
	setMainStyle(0, 0xffffff, 0xffffff, 0, 255, 0, 0xc0c0c0);

	/*----------------------------- RealTrend : wMRealTrend3             -----------------------------*/
	wMRealTrend3 = new STTRealTrend(p_rt, this, "wMRealTrend3");
	wMRealTrend3->setMainArg(0, 0, 800, 420, 1, 301, 4, 5, 12, "文泉驿微米黑", 0x0, 0);
	wMRealTrend3->setMainStyle(0, 0xff, 0xffff, 2, 0, 0xc0c0c0, 0, 0x0, 20, 20, 30, 100);
	wMRealTrend3->setFractionLen(0, 0, 0);
	wMRealTrend3->setXAxis(0, 0, 7, 1, true, "\n\n\n\n\n\n\n");
	wMRealTrend3->setYAxis(0, 0, 6, 1, true, "100\n80\n60\n40\n20\n0", 0, 100);
	wMRealTrend3->setY2Axis(0, 0, 2, 1, true, "\n", 0, 100);
	wMRealTrend3->setChartBgStyle(0, 0xf0f0f0, 0xffffff, 0, 1, 0xc0c0c0, 2, 2, 1, 0xc0c0c0, 5, 0);
	wMRealTrend3->setTickStyle(1, 0xc0c0c0);
	wMRealTrend3->hideSeries(wMRealTrend3->setAddSeries(0, 0x0, NULL, 0, 100), false);
	wMRealTrend3->hideSeries(wMRealTrend3->setAddSeries(0, 0xff, NULL, 0, 100), false);
	wMRealTrend3->hideSeries(wMRealTrend3->setAddSeries(0, 0xffff, NULL, 0, 100), false);
	wMRealTrend3->hideSeries(wMRealTrend3->setAddSeries(0, 0x808080, NULL, 0, 100), false);
	wMRealTrend3->setDataSource("CO2浓度;样气压力;载气压力;恒温箱温度", "{\"m\":\"0\",\"mv\":\"\",\"xu\":\"31\",\"xs\":\"60\",\"xsu\":\"0\",\"xsv\":\"\",\"y2n\":\"\",\"y2m\":\"\"}");
	wMRealTrend3->startCollect();
	wMRealTrend3->enableCusror(true);

	/*----------------------------- SqliteTable : wMSqliteTable5         -----------------------------*/
	wMSqliteTable5 = new STTTable(p_rt, this, "wMSqliteTable5");
	/*请在表格设计属性中设置并确认*/
	wMSqliteTable5->setMainArg(202, 358, 330, 46, "ID,在表格设计属性中设置,200", 7, false, 6);

	/*called after widget created.*/
	wMRealTrend3->setCursorTable(wMSqliteTable5);
	wMRealTrend3->setCursorStyle(0xff0000, 2, 1, "时间");

	return; //createParts END
}

void Frm05::onLoad() {

}

bool Frm05::onClosing() {
	return true;
}

void Frm05::onDispose() {

}
