App launching, some porting work complete

This commit is contained in:
2025-03-05 14:07:58 +01:00
parent ffd75d94dc
commit 92fcc4a6e7
20 changed files with 428 additions and 17 deletions

View File

@@ -0,0 +1,3 @@
from gui.popups import *

View File

@@ -0,0 +1,27 @@
<CreditsScreen>:
name: "credits"
canvas.before:
Color:
rgba: (50,50,50,0.2)
Rectangle:
size: self.size
pos: self.pos
FloatLayout:
Button:
text: "back"
size_hint: 0.4, 0.2
pos_hint: {"x":0.3, "y":0.1}
on_release:
app.root.current = "settings"
root.manager.transition.direction = "right"
GridLayout:
cols:1
pos_hint:{"x":0.05, "y":0.35}
size_hint: 0.9, 0.5
Label:
text: "This is a rework of the BiogasControllerApp V1, that was originally programmed by S. Reichmuth."
Label:
text: "Written by: Janis Hutz\nDesigned by: Janis Hutz\nDesign language: Kivy"
Label:
text: "This software is free Software licensed under the GPL V3 (GNU General Public License) and as such comes with absolutely no warranty. In return, you can use, modify, distribute or use any of the code of this software in your own project, if you reuse the same license. For more infos, you can find a copy of this license in the project folder."
text_size: self.width, None

View File

@@ -0,0 +1,8 @@
from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
class CreditsScreen(Screen):
pass
Builder.load_file('./gui/credits/credits.kv')

View File

@@ -0,0 +1,46 @@
<HomeScreen>:
name: "home"
canvas.before:
Color:
rgba: (50,50,50,0.2)
Rectangle:
size: self.size
pos: self.pos
GridLayout:
cols:1
Label:
text: "BiogasanlageControllerApp"
font_size: 50
color: (0, 113, 0, 1)
bold:True
italic:True
FloatLayout:
GridLayout:
cols: 2
size_hint: 0.8, 0.8
pos_hint: {"x": 0.1, "y": 0.1}
Button:
text: "Start"
background_color: (255, 0, 0, 0.6)
font_size: 30
on_release:
root.start()
Button:
text: "Quit"
background_color: (255, 0, 0, 0.6)
font_size: 30
on_release:
root.quit()
Label:
text: "App version"
id: app_version
font_size: 13
pos_hint: {"y": -0.45, "x":0.05}
Button:
text: "Settings"
font_size: 13
size_hint: 0.07, 0.06
pos_hint: {"x":0.01, "y":0.01}
background_color: (50, 0, 0, 0.2)
on_release:
root.to_settings()

View File

@@ -0,0 +1,17 @@
from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
class HomeScreen(Screen):
def start(self):
pass
def quit(self):
pass
def to_settings(self):
self.manager.current = 'settings'
self.manager.transition.direction = 'down'
Builder.load_file('./gui/home/home.kv')

View File

@@ -0,0 +1,105 @@
<SingleRowPopUp>:
title: "INFORMATION"
size_hint: 0.7, 0.5
auto_dismiss: True
GridLayout:
cols: 1
Label:
id: msg
text_size: self.width, None
GridLayout:
cols: 1
Button:
text: "Ok"
on_release:
root.dismiss()
<QuitPopUp>:
title: "BiogasControllerApp"
font_size: 50
size_hint: 0.5, 0.4
auto_dismiss: False
GridLayout:
cols:1
Label:
text: "Are you sure you want to leave?"
font_size: 20
GridLayout:
cols:2
Button:
text: "Yes"
font_size: 15
on_release:
root.quit()
app.stop()
Button:
text: "No"
font_size: 15
on_press:
root.dismiss()
<TwoActionPopup>:
title: "WARNING!"
font_size: 50
size_hint: 0.5, 0.4
auto_dismiss: False
GridLayout:
cols:1
Label:
id: msg
text: "Message"
font_size: 20
GridLayout:
cols:2
Button:
id: btn1
text: "Details"
on_release:
root.action()
Button:
text:"Ok"
on_release:
root.dismiss()
<DualRowPopup>:
title: "Details"
font_size: 50
size_hint: 0.7, 0.6
auto_dismiss: False
GridLayout:
cols:1
Label:
id: msg_title
text: "Message title"
font_size: 20
Label:
id: msg_body
text: "Message body"
font_size: 14
Button:
text:"Ok"
on_release:
root.dismiss()
<LargeTrippleRowPopUp>:
title: "DETAILS"
font_size: 50
size_hint: 1, 0.7
auto_dismiss: False
GridLayout:
Label:
cols:1
id: msg_title
text: "title"
font_size: 20
Label:
id: msg_body
text: "Message"
font_size: 13
Label:
text: msg_extra
font_size: 13
Button:
text:"Ok"
on_release:
root.dismiss()

View File

@@ -0,0 +1,16 @@
from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
class HomeScreen(Screen):
def start(self):
pass
def quit(self):
pass
def to_settings(self):
pass
Builder.load_file('./gui/home/home.kv')

View File

@@ -0,0 +1,16 @@
from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
class HomeScreen(Screen):
def start(self):
pass
def quit(self):
pass
def to_settings(self):
pass
Builder.load_file('./gui/home/home.kv')

View File

@@ -0,0 +1,37 @@
<SettingsScreen>:
name: "settings"
canvas.before:
Color:
rgba: (50,50,50,0.2)
Rectangle:
size: self.size
pos: self.pos
GridLayout:
cols: 1
Label:
text: "Settings"
font_size: 40
color: (0, 113, 0, 1)
bold: True
FloatLayout:
GridLayout:
pos_hint: {"x":0.05, "y":0.05}
size_hint: 0.9, 0.9
cols: 3
Button:
text: "Back"
background_color: (255,0,0,0.6)
on_release:
app.root.current = "home"
root.manager.transition.direction = "up"
Button:
text: "Report a\nBug"
background_color: (255,0,0,0.6)
on_release:
root.report_issue()
Button:
text: "Credits"
background_color: (255,0,0,0.6)
on_release:
app.root.current = "credits"
root.manager.transition.direction = "left"

View File

@@ -0,0 +1,10 @@
from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
import webbrowser
class SettingsScreen(Screen):
def report_issue(self):
webbrowser.open('https://github.com/janishutz/BiogasControllerApp/issues', new=2)
Builder.load_file('./gui/settings/settings.kv')