Add three general-purpose fields to DriverView
This commit is contained in:
@ -0,0 +1,39 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#include <gui_generated/containers/DriverViewFieldBase.hpp>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
DriverViewFieldBase::DriverViewFieldBase()
|
||||
{
|
||||
setWidth(160);
|
||||
setHeight(80);
|
||||
box.setPosition(0, 0, 160, 80);
|
||||
box.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
|
||||
box.setBorderColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
box.setBorderSize(3);
|
||||
add(box);
|
||||
|
||||
title.setPosition(0, 0, 160, 25);
|
||||
title.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
title.setLinespacing(0);
|
||||
title.setTypedText(touchgfx::TypedText(T___SINGLEUSE_0FBJ));
|
||||
add(title);
|
||||
|
||||
value.setPosition(0, 20, 160, 57);
|
||||
value.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
value.setLinespacing(0);
|
||||
value.setTypedText(touchgfx::TypedText(T___SINGLEUSE_K26P));
|
||||
add(value);
|
||||
}
|
||||
|
||||
DriverViewFieldBase::~DriverViewFieldBase()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DriverViewFieldBase::initialize()
|
||||
{
|
||||
|
||||
}
|
||||
@ -5,6 +5,7 @@
|
||||
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <images/BitmapDatabase.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
DriverViewViewBase::DriverViewViewBase()
|
||||
{
|
||||
@ -18,19 +19,19 @@ DriverViewViewBase::DriverViewViewBase()
|
||||
logo.setBitmap(touchgfx::Bitmap(BITMAP_FASTTUBE_LOGO_SMALL_WHITE_ID));
|
||||
add(logo);
|
||||
|
||||
tireTempRR.setXY(240, 167);
|
||||
tireTempRR.setXY(240, 182);
|
||||
add(tireTempRR);
|
||||
|
||||
tireTempFR.setXY(240, 92);
|
||||
tireTempFR.setXY(240, 107);
|
||||
add(tireTempFR);
|
||||
|
||||
tireTempRL.setXY(165, 167);
|
||||
tireTempRL.setXY(165, 182);
|
||||
add(tireTempRL);
|
||||
|
||||
tireTempFL.setXY(165, 92);
|
||||
tireTempFL.setXY(165, 107);
|
||||
add(tireTempFL);
|
||||
|
||||
ttDivVert.setPosition(239, 92, 3, 150);
|
||||
ttDivVert.setPosition(239, 107, 3, 150);
|
||||
ttDivVertPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
ttDivVert.setPainter(ttDivVertPainter);
|
||||
ttDivVert.setStart(0, 0);
|
||||
@ -39,7 +40,7 @@ DriverViewViewBase::DriverViewViewBase()
|
||||
ttDivVert.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||
add(ttDivVert);
|
||||
|
||||
ttDivHoriz.setPosition(165, 166, 150, 3);
|
||||
ttDivHoriz.setPosition(165, 181, 150, 3);
|
||||
ttDivHorizPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
ttDivHoriz.setPainter(ttDivHorizPainter);
|
||||
ttDivHoriz.setStart(0, 0);
|
||||
@ -48,7 +49,7 @@ DriverViewViewBase::DriverViewViewBase()
|
||||
ttDivHoriz.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||
add(ttDivHoriz);
|
||||
|
||||
tsVoltage.setXY(10, 92);
|
||||
tsVoltage.setXY(10, 107);
|
||||
tsVoltage.setProgressIndicatorPosition(0, 0, 40, 150);
|
||||
tsVoltage.setRange(0, 100);
|
||||
tsVoltage.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
|
||||
@ -61,7 +62,7 @@ DriverViewViewBase::DriverViewViewBase()
|
||||
tsVoltage.setValue(60);
|
||||
add(tsVoltage);
|
||||
|
||||
lvVoltage.setXY(88, 92);
|
||||
lvVoltage.setXY(430, 107);
|
||||
lvVoltage.setProgressIndicatorPosition(0, 0, 40, 150);
|
||||
lvVoltage.setRange(0, 100);
|
||||
lvVoltage.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
|
||||
@ -73,6 +74,33 @@ DriverViewViewBase::DriverViewViewBase()
|
||||
lvVoltage.setLineEndingStyle(touchgfx::Line::BUTT_CAP_ENDING);
|
||||
lvVoltage.setValue(80);
|
||||
add(lvVoltage);
|
||||
|
||||
tireLabel.setPosition(165, 82, 150, 25);
|
||||
tireLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
tireLabel.setLinespacing(0);
|
||||
tireLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_H6UX));
|
||||
add(tireLabel);
|
||||
|
||||
tsVoltLabel.setPosition(10, 82, 40, 25);
|
||||
tsVoltLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
tsVoltLabel.setLinespacing(0);
|
||||
tsVoltLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_PHFD));
|
||||
add(tsVoltLabel);
|
||||
|
||||
lvVoltLabel.setPosition(430, 82, 40, 25);
|
||||
lvVoltLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
lvVoltLabel.setLinespacing(0);
|
||||
lvVoltLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_4OBM));
|
||||
add(lvVoltLabel);
|
||||
|
||||
field1.setXY(0, 0);
|
||||
add(field1);
|
||||
|
||||
field2.setXY(160, 0);
|
||||
add(field2);
|
||||
|
||||
field3.setXY(320, 0);
|
||||
add(field3);
|
||||
}
|
||||
|
||||
DriverViewViewBase::~DriverViewViewBase()
|
||||
@ -86,4 +114,7 @@ void DriverViewViewBase::setupScreen()
|
||||
tireTempFR.initialize();
|
||||
tireTempRL.initialize();
|
||||
tireTempFL.initialize();
|
||||
field1.initialize();
|
||||
field2.initialize();
|
||||
field3.initialize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user