COnfiguration and systray

This commit is contained in:
2025-03-07 11:58:19 +01:00
parent fb81b764f1
commit 821da47f98
11 changed files with 248 additions and 30 deletions

View File

@@ -62,19 +62,6 @@ ApplicationWindow
property alias window: appWindow
}
Component.onCompleted:
{
if(bad_config)
{
importDialog.open()
}
else
{
if (db_con) appLoader.source= "LoginScreen.qml"
else appLoader.source= "NoDbConnection.qml"
}
}
Dialog
{
id: importDialog
@@ -127,4 +114,43 @@ ApplicationWindow
}
}
}
Component.onCompleted:
{
systray.activated.connect(showWindow)
if(bad_config)
{
importDialog.open()
}
else
{
if (db_con) appLoader.source= "LoginScreen.qml"
else appLoader.source= "NoDbConnection.qml"
}
}
function showWindow(why)
{
if (why === 3)
{
systray.setVisible(false)
appWindow.show()
}
}
onVisibilityChanged:
{
if (appWindow.visibility === Window.Minimized && config.systray())
{
systray.setVisible(true)
appWindow.hide()
}
}
onClosing: (close) =>
{
if (false)
{
console.log("Main window closed!! Was soll ich tun? kann ich mich beenden?!")
}
}
}