#include "frmmain.h" #include "ui_frmmain.h" #include "head.h" #ifdef echarts #include "frmecharts.h" #endif #ifdef mapbaidu #include "frmmapsimple.h" #include "frmmapbaidu.h" #endif #ifdef mapdownload #include "frmmapdownload.h" #endif #ifdef mapboundary #include "frmmapboundary.h" #endif #ifdef mapmarker #include "frmmapmarker.h" #endif #ifdef mapmarkers #include "frmmapmarkers.h" #endif #ifdef mapgps #include "frmmapgps.h" #include "frmmapgps2.h" #endif frmMain::frmMain(QWidget *parent) : QWidget(parent), ui(new Ui::frmMain) { ui->setupUi(this); this->initForm(); } frmMain::~frmMain() { delete ui; } void frmMain::initForm() { #ifdef echarts ui->tabWidget->addTab(new frmEcharts, "1-省市区域"); #endif #ifdef mapbaidu ui->tabWidget->addTab(new frmMapSimple, "2-最简示例"); ui->tabWidget->addTab(new frmMapBaiDu, "2-地图示例"); #endif #ifdef mapdownload ui->tabWidget->addTab(new frmMapDownload, "3-离线下载"); #endif #ifdef mapboundary ui->tabWidget->addTab(new frmMapBoundary, "4-省市轮廓"); #endif #ifdef mapmarker ui->tabWidget->addTab(new frmMapMarker, "5-动态点位"); #endif #ifdef mapmarkers ui->tabWidget->addTab(new frmMapMarkers, "6-海量点位"); #endif #ifdef mapgps ui->tabWidget->addTab(new frmMapGps, "7-动态轨迹"); ui->tabWidget->addTab(new frmMapGps2, "7-轨迹回放"); #endif ui->tabWidget->setCurrentIndex(2); }