Populate fan curve data

This commit is contained in:
Luke D. Jones
2024-03-13 20:18:41 +13:00
parent 7a661a585e
commit 78f18959fb
4 changed files with 105 additions and 9 deletions

View File

@@ -6,6 +6,10 @@ import { PageAbout } from "pages/about.slint";
import { PageFans } from "pages/fans.slint";
import { PageAnime, AnimePageData } from "pages/anime.slint";
import { PageAura } from "pages/aura.slint";
import { Node } from "widgets/graph.slint";
export { Node }
import { FanPageData, FanType, Profile } from "types/fan_types.slint";
export { FanPageData, FanType, Profile }
import { AuraPageData, AuraDevType, AuraDevTuf, AuraDevRog1, PowerZones, KbAuraPowerState, AuraPowerDev, AuraEffect } from "types/aura_types.slint";
export { AuraPageData, AuraDevType, AuraDevTuf, AuraDevRog1, PowerZones, KbAuraPowerState, AuraPowerDev, AuraEffect }
import { PageAppSettings, AppSettingsPageData } from "pages/app_settings.slint";

View File

@@ -13,12 +13,18 @@ export enum FanType {
}
export global FanPageData {
in-out property <[Profile]> avilable_profiles: [Profile.Balanced, Profile.Performance, Profile.Quiet];
in-out property <[FanType]> avilable_fans: [FanType.CPU, FanType.Middle, FanType.GPU];
in-out property <[Profile]> available_profiles: [Profile.Balanced, Profile.Performance, Profile.Quiet];
in-out property <[FanType]> available_fans: [FanType.CPU, FanType.Middle, FanType.GPU];
in-out property <bool> balanced_cpu_available: true;
in-out property <bool> balanced_gpu_available: false;
in-out property <bool> balanced_mid_available: true;
in-out property <bool> balanced_gpu_available: true;
in-out property <bool> balanced_mid_available: false;
in-out property <bool> performance_cpu_available: true;
in-out property <bool> performance_gpu_available: true;
in-out property <bool> performance_mid_available: false;
in-out property <bool> quiet_cpu_available: true;
in-out property <bool> quiet_gpu_available: true;
in-out property <bool> quiet_mid_available: false;
in-out property <[Node]> balanced_cpu: [
{

View File

@@ -5,7 +5,7 @@ export struct Node { x: length, y: length}
export component Graph inherits Rectangle {
in-out property <[Node]> nodes;
in property <Node> node_min: { x: 0px, y: 0px };
in property <Node> node_max: { x: 100px, y: 100px };
in property <Node> node_max: { x: 100px, y: 255px };
property <length> graph_padding: 20px;
graph := Rectangle {
width: root.width - root.graph_padding * 2;