Initial GUI-Development progress - 2022-02-26-16:42
This commit is contained in:
@@ -1,69 +1,62 @@
|
||||
# This is the main runtime of the simplePCBuilding-PC-Configurator
|
||||
# IMPORTS
|
||||
import time
|
||||
|
||||
from kivy.uix.screenmanager import Screen, ScreenManager
|
||||
from kivy.uix.popup import Popup
|
||||
from kivy.app import App
|
||||
from kivy.lang import Builder
|
||||
from kivy.clock import mainthread
|
||||
from kivymd.app import MDApp
|
||||
from kivymd.uix.screen import MDScreen
|
||||
from kivy.clock import Clock
|
||||
|
||||
version = "alpha 1.0"
|
||||
print("""
|
||||
--------------------------------------------------------------------
|
||||
WELCOME TO THE simplePCBuilding PC CONFIGURATOR
|
||||
YOU ARE CURRENTLY RUNNING VERSION""", version, """
|
||||
---------------------------------------------------------------------""")
|
||||
time.sleep(1)
|
||||
print("""
|
||||
print(f"Launching the simplePCBuilding-PC-Configurator Version {version}!...\nthis might take some time...")
|
||||
|
||||
Please note that this software is developed and distributed by simplePCBuilding
|
||||
and as such you are not allowed to sell and / or distribute this software on
|
||||
your own. If you want to share this project with others, please refer to our
|
||||
guidelines and do only provide the official download-link.
|
||||
|
||||
""")
|
||||
time.sleep(1)
|
||||
print("""This software is split up into different modules you can use.
|
||||
Select the appropriate one:
|
||||
MODULE LIST:
|
||||
- Configurator (c)
|
||||
- Updater (u)
|
||||
- Package manager (p)
|
||||
- Quit (q)
|
||||
###########
|
||||
# SCREENS
|
||||
###########
|
||||
|
||||
To select a module, please type the correct letter (found in brackets behind
|
||||
the module name in the above list) in through your keyboard
|
||||
""")
|
||||
i = input("please choose the module you want to use: ")
|
||||
go = 1
|
||||
|
||||
while go == 1:
|
||||
if i == "c":
|
||||
print("starting configurator...")
|
||||
go = 0
|
||||
class Splash(MDScreen):
|
||||
pass
|
||||
|
||||
elif i == "u":
|
||||
print("starting updater...")
|
||||
go = 0
|
||||
|
||||
elif i == "p":
|
||||
print("starting package manager...")
|
||||
go = 0
|
||||
class Home(MDScreen):
|
||||
def test(self):
|
||||
print("class")
|
||||
|
||||
elif i == "q":
|
||||
print("killing processes....")
|
||||
time.sleep(0.5)
|
||||
print("Terminating...")
|
||||
go = 0
|
||||
|
||||
else:
|
||||
print("\nUnknown entry, please retry.\n ")
|
||||
time.sleep(0.5)
|
||||
print("""This software is split up into different modules you can use.
|
||||
Select the appropriate one:
|
||||
MODULE LIST:
|
||||
- Configurator (c)
|
||||
- Updater (u)
|
||||
- Package manager (p)
|
||||
- Quit (q)
|
||||
class ConfigureScreen(MDScreen):
|
||||
pass
|
||||
|
||||
To select a module, please type the correct letter (found in brackets behind
|
||||
the module name in the above list) in through your keyboard
|
||||
""")
|
||||
i = input("Please select a module and type in the corresponding letter: ")
|
||||
|
||||
#################
|
||||
# SCREEN-MANAGER
|
||||
#################
|
||||
|
||||
|
||||
class PCConfigurator(MDApp):
|
||||
global screen_manager
|
||||
screen_manager = ScreenManager()
|
||||
def build(self):
|
||||
self.title = "simplePCBuilding-PC-Configurator"
|
||||
self.theme_cls.primary_palette = "Blue"
|
||||
self.theme_cls.accent_palette = "BlueGray"
|
||||
# self.icon = "./BiogasControllerAppLogo.png"
|
||||
screen_manager.add_widget(Builder.load_file("./gui_main/splashscreen.kv"))
|
||||
screen_manager.add_widget(Builder.load_file("./gui_main/main-gui.kv"))
|
||||
screen_manager.add_widget(Builder.load_file("./gui_main/configurator.kv"))
|
||||
|
||||
return screen_manager
|
||||
|
||||
def on_start(self):
|
||||
Clock.schedule_once(self.launch_app, 1)
|
||||
|
||||
def launch_app(self, dt):
|
||||
screen_manager.current = "HomeScreen"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
PCConfigurator().run()
|
||||
|
||||
Reference in New Issue
Block a user