HMI-43 - [energy saving mode] top title bar and bottom information bar, lighting and start animation
Today, to realize the following energy-saving mode, the information bar at the bottom of the Title, the lighting system, and the start animation, the LCD instrument will come to a temporary end.
Current progress
To today's position, the three models have basically taken shape, and finally have an explanation. Alas, thanks to the support of many netizens, we can stick to it here.
Keywords: HIMI, QPainter, Qt, light, eco
Top information bar
The top information bar is basically not much different from the previous two modes. Direct paste part of the code
void MDE_Title::setTime(QString time) { ui->label_time->setText(time); } void MDE_Title::setDirection(int direction) { m_Direction = direction; switch (direction) { case DIRECTION_N: ui->label_direction_text->setText("N"); break; case DIRECTION_NE: ui->label_direction_text->setText("NE"); break; case DIRECTION_E: ui->label_direction_text->setText("E"); break; case DIRECTION_SE: ui->label_direction_text->setText("SE"); break; case DIRECTION_S: ui->label_direction_text->setText("S"); break; case DIRECTION_SW: ui->label_direction_text->setText("SW"); break; case DIRECTION_W: ui->label_direction_text->setText("W"); break; case DIRECTION_NW: ui->label_direction_text->setText("NW"); break; } } void MDE_Title::setTemperature(QString temperature) { ui->label_temperature->setText(temperature); } bool MDE_Title::eventFilter(QObject *watched, QEvent *event) { if(watched == ui->label_direction && event->type() == QEvent::Paint) drawDirection(m_Direction); return QWidget::eventFilter(watched,event); } void MDE_Title::drawDirection(int direction) { QPainter painter(ui->label_direction); painter.setRenderHint((QPainter::SmoothPixmapTransform)); painter.setRenderHint(QPainter::HighQualityAntialiasing); painter.translate(20,20); painter.save(); painter.rotate(direction*45+90); painter.drawPixmap(-16,-10,32,20,QPixmap(":/Economic/Resources/MeterDisplay/Economic/MDET/Direction/7.png")); painter.restore(); }
Bottom information bar
This is not as like as two peas. No code.
lighting
The three modes use one light control. There is no difference except for the position.
Start animation
The animation is still in the front. Just move it over and use it.
void MD_Economic::slotShaoAll(int number) { m_title->setGeometry(0,-110+1.1*number,1920,110); if(m_title->y() >-110) { m_title->show(); } m_bottom->setGeometry(0,790-1.4*number,1920,70); if(m_bottom->y()<720) { m_bottom->show(); } m_left->setGeometry(-500 +6.2*number,130,500,460); if(m_left->x()>-500) { m_left->show(); } m_center->setGeometry((622+ (675/2.0 - 675.0/200.0*number)),(27+ (674/2 - 674/200.0*number)),6.75*number,6.74*number); if(m_center->width()>10) { m_center->show(); if(m_center->width() == 675) { // m_center->powerUpFinished(); } } m_right->setGeometry(2420 - 11.2*number,130,500,460); if(m_right->x()< 1920) { m_right->show(); } if(number == 100) { emit signalPowerUpfinished(); m_lightControl->show(); } }
Hidden in the gap
To write here, I really want to thank many netizens for their support, thanks to your early support and encouragement. To finish writing today. He mianzhun has written the multimedia module, and the UI has been looking for art to do. Is to copy the multimedia of Geely Borui 2017. Look forward to it.
Stage II achievement display
At present, to complete the development of HUD interface and interface, and the development of comfort mode and motion mode of LCD instrument. The display is as follows:
Automobile instrument simulation based on Qt 2.0
Phase I achievement display
At present, we have completed the development of HUD interface and interface, and the development of LCD instrument comfort mode. The display is as follows:
Automobile instrument simulation based on Qt (1.0)
explain:
The reference prototypes used in this project come from: [Geely] Borui GE | instrument HMI design,Geely Automobile HMI project.
The ownership and interpretation of the design drawings belong to Geely Automobile.
All resource documents of the project are provided by** The immortal Xiaohai **Replica production.
The code of this project will not be open source for the time being. If you need the source code, please contact me. QR code plus wechat in the upper left corner.
This project is only for learning and exchange, and commercial use is prohibited.