BRT Community

General Category => Discussion - EVE => Topic started by: huseyinkozan on September 19, 2019, 01:53:24 PM

Title: EVE Screen Designer to generate source code for Qt
Post by: huseyinkozan on September 19, 2019, 01:53:24 PM
Hi,

I also asked at NHD forum:
https://www.newhavendisplay.com/NHD_forum/index.php/topic,12110.0.html

We have NHD-3.5-320240FT-CSXN-CTP, and want to use it with a Toradex Colibri iMX6 module. A Qt/C++ application will run and control the display.

I tried the designer, but I dont know what target platform should I select.

Can we use EVE Screen Designer to generate source code for Qt/C++ ?
How can I integrate generated codes in to Qt project ?

Thanks
Title: Re: EVE Screen Designer to generate source code for Qt
Post by: karaketir16 on November 08, 2019, 07:23:48 AM
Hi,

To achive that we need linux hal files for using spi communication and gpio pins. And also create desginer project with appropriate resolution(for NHD_3_5C_FT813 it is QVGA 320x240). It doesn't matter which device selected, but resolution is important.

After you saved a project, Designer generate C code of your project under ProjectFolder/Generated. To use project with Qt create a project with Qt Creator and add `ProjectFolder/Generated` folder and sub directories and  `PathtoEveScreenDesigner/Libraries`  folder and sub directories except `ThirdPartyLib`. And add linux hal files to project. Don't forget to add folders with sub directories to include path.

You need to add some defines your code. To define globally, add them to `.pro` file.

#It depends on which hal file you want to use, I write hal file for this define
DEFINES += Linux_PLATFORM

#These are defines for lcd, different lcd models reuire different defines
DEFINES += DISPLAY_RESOLUTION_QVGA   
DEFINES += EVE_GRAPHICS_AVAILABLE
DEFINES += EVE_DISPLAY_AVAILABLE
DEFINES += FT813_ENABLE

There are lot of lower/upper case issues with file names because Designer is windows program and windows is not case sensitive with file names, however Linux is case sensitive. I have fixed it with, try to compile, get error, fix filename and try again.

An implementation of Linux_Hal and example project can be found  here  (https://github.com/karaketir16/Linux-Eve-Screen-Designer).