90 lines
3.0 KiB
C++
90 lines
3.0 KiB
C++
|
/*********************************************************************************/
|
||
|
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||
|
/*********************************************************************************/
|
||
|
#include <gui_generated/driverview_screen/DriverViewViewBase.hpp>
|
||
|
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
|
||
|
#include <touchgfx/Color.hpp>
|
||
|
#include <images/BitmapDatabase.hpp>
|
||
|
|
||
|
DriverViewViewBase::DriverViewViewBase()
|
||
|
{
|
||
|
touchgfx::CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);
|
||
|
|
||
|
__background.setPosition(0, 0, 480, 320);
|
||
|
__background.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
|
||
|
add(__background);
|
||
|
|
||
|
logo.setXY(160, 263);
|
||
|
logo.setBitmap(touchgfx::Bitmap(BITMAP_FASTTUBE_LOGO_SMALL_WHITE_ID));
|
||
|
add(logo);
|
||
|
|
||
|
tireTempRR.setXY(240, 167);
|
||
|
add(tireTempRR);
|
||
|
|
||
|
tireTempFR.setXY(240, 92);
|
||
|
add(tireTempFR);
|
||
|
|
||
|
tireTempRL.setXY(165, 167);
|
||
|
add(tireTempRL);
|
||
|
|
||
|
tireTempFL.setXY(165, 92);
|
||
|
add(tireTempFL);
|
||
|
|
||
|
ttDivVert.setPosition(239, 92, 3, 150);
|
||
|
ttDivVertPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||
|
ttDivVert.setPainter(ttDivVertPainter);
|
||
|
ttDivVert.setStart(0, 0);
|
||
|
ttDivVert.setEnd(0, 320);
|
||
|
ttDivVert.setLineWidth(10);
|
||
|
ttDivVert.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||
|
add(ttDivVert);
|
||
|
|
||
|
ttDivHoriz.setPosition(165, 166, 150, 3);
|
||
|
ttDivHorizPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||
|
ttDivHoriz.setPainter(ttDivHorizPainter);
|
||
|
ttDivHoriz.setStart(0, 0);
|
||
|
ttDivHoriz.setEnd(480, 0);
|
||
|
ttDivHoriz.setLineWidth(10);
|
||
|
ttDivHoriz.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||
|
add(ttDivHoriz);
|
||
|
|
||
|
tsVoltage.setXY(10, 92);
|
||
|
tsVoltage.setProgressIndicatorPosition(0, 0, 40, 150);
|
||
|
tsVoltage.setRange(0, 100);
|
||
|
tsVoltage.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
|
||
|
tsVoltagePainter.setColor(touchgfx::Color::getColorFromRGB(136, 255, 0));
|
||
|
tsVoltage.setPainter(tsVoltagePainter);
|
||
|
tsVoltage.setStart(9, 200);
|
||
|
tsVoltage.setEnd(9, 0);
|
||
|
tsVoltage.setLineWidth(100);
|
||
|
tsVoltage.setLineEndingStyle(touchgfx::Line::BUTT_CAP_ENDING);
|
||
|
tsVoltage.setValue(60);
|
||
|
add(tsVoltage);
|
||
|
|
||
|
lvVoltage.setXY(88, 92);
|
||
|
lvVoltage.setProgressIndicatorPosition(0, 0, 40, 150);
|
||
|
lvVoltage.setRange(0, 100);
|
||
|
lvVoltage.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
|
||
|
lvVoltagePainter.setColor(touchgfx::Color::getColorFromRGB(136, 255, 0));
|
||
|
lvVoltage.setPainter(lvVoltagePainter);
|
||
|
lvVoltage.setStart(9, 200);
|
||
|
lvVoltage.setEnd(9, 0);
|
||
|
lvVoltage.setLineWidth(100);
|
||
|
lvVoltage.setLineEndingStyle(touchgfx::Line::BUTT_CAP_ENDING);
|
||
|
lvVoltage.setValue(80);
|
||
|
add(lvVoltage);
|
||
|
}
|
||
|
|
||
|
DriverViewViewBase::~DriverViewViewBase()
|
||
|
{
|
||
|
touchgfx::CanvasWidgetRenderer::resetBuffer();
|
||
|
}
|
||
|
|
||
|
void DriverViewViewBase::setupScreen()
|
||
|
{
|
||
|
tireTempRR.initialize();
|
||
|
tireTempFR.initialize();
|
||
|
tireTempRL.initialize();
|
||
|
tireTempFL.initialize();
|
||
|
}
|