fort/src/ui/qml/main.qml

58 lines
1.1 KiB
QML
Raw Normal View History

2017-09-01 13:13:12 +00:00
import QtQuick 2.9
import QtQuick.Controls 2.2
import "pages"
2017-09-02 10:17:51 +00:00
import com.fortfirewall 1.0
2017-09-01 13:13:12 +00:00
ApplicationWindow {
2017-09-03 05:57:35 +00:00
id: appWindow
2017-09-01 13:13:12 +00:00
2017-09-07 05:43:33 +00:00
width: 1025
height: 768
2017-09-02 14:25:47 +00:00
minimumWidth: 700
minimumHeight: 600
2017-09-01 13:13:12 +00:00
font.pixelSize: 16
2017-09-02 10:17:51 +00:00
readonly property FortSettings fortSettings: fortManager.fortSettings
readonly property FirewallConf firewallConf: fortManager.firewallConfToEdit
2017-09-11 06:16:51 +00:00
|| fortManager.firewallConf
2017-09-02 10:17:51 +00:00
2017-09-03 05:57:35 +00:00
onClosing: {
if (visible) {
close.accepted = false;
closeWindow();
}
}
2017-09-01 13:13:12 +00:00
function closeWindow() {
2017-09-03 05:57:35 +00:00
fortManager.closeWindow();
2017-09-01 13:13:12 +00:00
}
2017-09-05 11:06:21 +00:00
FileUtil {
id: fileUtil
}
NetUtil {
id: netUtil
}
OsUtil {
id: osUtil
}
Loader {
2017-09-01 13:13:12 +00:00
anchors.fill: parent
sourceComponent: appWindow.visible ? mainPageComponent : undefined
}
Component {
id: mainPageComponent
MainPage {
Keys.onEscapePressed: closeWindow()
2017-09-01 13:13:12 +00:00
Component.onCompleted: opened()
Component.onDestruction: closed()
}
2017-09-01 13:13:12 +00:00
}
}