Metal Detector
 
Loading...
Searching...
No Matches
ui.c File Reference

User Interface source for MetalDetector project generated by SquareLine Studio. More...

#include "ui.h"
#include "ui_callbacks.h"

Functions

static void tab_init (void)
 Initializes the tabs for the user interface.
 
static void tab_main_init (void)
 Initializes the "Main" tab of the user interface.
 
static void tab_settings_init (void)
 Initializes the "Settings" tab in the tab view widget.
 
static void tab_chart_init (void)
 Initializes the "Chart" tab in the tab view widget.
 
static void tab_callbacks_init (void)
 Initializes event callbacks for UI components in the tab view.
 
void ui_init (void)
 Initializes the user interface components.
 

Variables

lv_obj_t * ui_Main
 
lv_obj_t * ui_Tab
 
lv_obj_t * ui_MainTab_
 
lv_obj_t * ui_PhaseMainPanel
 
lv_obj_t * ui_PhaseArc
 
lv_obj_t * ui_PhaseDecorSircle
 
lv_obj_t * ui_PhaseLabel
 
lv_obj_t * ui_DepthPanel
 
lv_obj_t * ui_DepthBar
 
lv_obj_t * ui_DepthLabel
 
lv_obj_t * ui_SettingsTab_
 
lv_obj_t * ui_GndBalancePanel
 
lv_obj_t * ui_GndBalanceConf
 
lv_obj_t * ui_GndBalanceLabel
 
lv_obj_t * ui_GndBalanceButton
 
lv_obj_t * ui_GndBalanceBtnLabel
 
lv_obj_t * ui_GndBalanceVal
 
lv_obj_t * ui_SensPanel
 
lv_obj_t * ui_SensConf_
 
lv_obj_t * ui_SensLabel
 
lv_obj_t * ui_SenseVal
 
lv_obj_t * ui_ChartDomainDropdown
 
lv_obj_t * ui_ChartTab_
 
lv_obj_t * ui_Chart
 
lv_obj_t * ui_Chart_Xaxis
 
lv_obj_t * ui_Chart_Yaxis1
 
lv_obj_t * ui_Chart_Yaxis2
 
lv_chart_series_t * ui_Chart_series_1
 
lv_chart_series_t * ui_Chart_series_2
 
lv_obj_t * ui____initial_actions0
 
UI_ChartDomains_t ui_chart_domain = CHART_TIME_DOMAIN
 

Detailed Description

User Interface source for MetalDetector project generated by SquareLine Studio.

This file contains the implementation of the user interface. It initializes the UI components and sets up the necessary callbacks and themes. Functions include initialization of tabs, setting up the theme, and loading the main screen.

Created on: Jul 30, 2024 Author: Viktor

Function Documentation

◆ tab_callbacks_init()

static void tab_callbacks_init ( void )
static

Initializes event callbacks for UI components in the tab view.

This function sets up event callbacks for various UI elements to handle user interactions and changes. The callbacks are triggered by specific events such as value changes and button clicks.

◆ tab_chart_init()

static void tab_chart_init ( void )
static

Initializes the "Chart" tab in the tab view widget.

This function creates and configures the "Chart" tab, sets up a chart with multiple axes and series, and applies specific styles to the chart and its components.

◆ tab_init()

static void tab_init ( void )
static

Initializes the tabs for the user interface.

This function creates the main screen object and a tab view. It configures the tab view by setting its size, alignment, and background color. It also removes certain flags to control its behavior, such as scrollable and gesture bubble. Additionally, it initializes each specific tab (main, settings, chart).

◆ tab_main_init()

static void tab_main_init ( void )
static

Initializes the "Main" tab of the user interface.

This function creates and configures the "Main" tab, including its layout and child objects. It sets up various UI elements such as panels, arcs, labels, and bars with specific styles and properties. The main components include:

  • A phase main panel with a centered arc and decorative circle.
  • A depth panel with a vertical bar and a label.

◆ tab_settings_init()

static void tab_settings_init ( void )
static

Initializes the "Settings" tab in the tab view widget.

This function creates and configures the "Settings" tab, adds various UI elements to it, such as panels, sliders, labels, and buttons, and sets their styles and positions.

◆ ui_init()

void ui_init ( void )

Initializes the user interface components.

Initialize the user interface.

This function sets up the default theme for the display, initializes all tabs, sets up callbacks, and loads the main screen. It configures the display theme using predefined color palettes and font settings.

Variable Documentation

◆ ui____initial_actions0

lv_obj_t* ui____initial_actions0

Initial actions object

◆ ui_Chart

lv_obj_t* ui_Chart

Chart object

◆ ui_chart_domain

Current chart domain

◆ ui_Chart_series_1

lv_chart_series_t* ui_Chart_series_1

Chart series 1 object

◆ ui_Chart_series_2

lv_chart_series_t* ui_Chart_series_2

Chart series 2 object

◆ ui_Chart_Xaxis

lv_obj_t* ui_Chart_Xaxis

Chart X-axis scale object

◆ ui_Chart_Yaxis1

lv_obj_t* ui_Chart_Yaxis1

Chart Y-axis 1 scale object

◆ ui_Chart_Yaxis2

lv_obj_t* ui_Chart_Yaxis2

Chart Y-axis 2 scale object

◆ ui_ChartDomainDropdown

lv_obj_t* ui_ChartDomainDropdown

Chart domain dropdown object

◆ ui_ChartTab_

lv_obj_t* ui_ChartTab_

Chart tab object

◆ ui_DepthBar

lv_obj_t* ui_DepthBar

Depth bar object

◆ ui_DepthLabel

lv_obj_t* ui_DepthLabel

Depth label object

◆ ui_DepthPanel

lv_obj_t* ui_DepthPanel

Depth panel object

◆ ui_GndBalanceBtnLabel

lv_obj_t* ui_GndBalanceBtnLabel

Ground balance button label object

◆ ui_GndBalanceButton

lv_obj_t* ui_GndBalanceButton

Ground balance button object

◆ ui_GndBalanceConf

lv_obj_t* ui_GndBalanceConf

Ground balance configuration slider object

◆ ui_GndBalanceLabel

lv_obj_t* ui_GndBalanceLabel

Ground balance label object

◆ ui_GndBalancePanel

lv_obj_t* ui_GndBalancePanel

Ground balance panel object

◆ ui_GndBalanceVal

lv_obj_t* ui_GndBalanceVal

Ground balance value label object

◆ ui_Main

lv_obj_t* ui_Main

Main screen object

◆ ui_MainTab_

lv_obj_t* ui_MainTab_

Main tab object

◆ ui_PhaseArc

lv_obj_t* ui_PhaseArc

Phase arc object

◆ ui_PhaseDecorSircle

lv_obj_t* ui_PhaseDecorSircle

Phase decoration circle object

◆ ui_PhaseLabel

lv_obj_t* ui_PhaseLabel

Phase label object

◆ ui_PhaseMainPanel

lv_obj_t* ui_PhaseMainPanel

Phase main panel object

◆ ui_SensConf_

lv_obj_t* ui_SensConf_

Sensitivity configuration slider object

◆ ui_SenseVal

lv_obj_t* ui_SenseVal

Sensitivity value label object

◆ ui_SensLabel

lv_obj_t* ui_SensLabel

Sensitivity label object

◆ ui_SensPanel

lv_obj_t* ui_SensPanel

Sensitivity panel object

◆ ui_SettingsTab_

lv_obj_t* ui_SettingsTab_

Settings tab object

◆ ui_Tab

lv_obj_t* ui_Tab

Tab view object