fort/src/ui/qml/main.qml

44 lines
821 B
QML
Raw Normal View History

2017-09-01 13:13:12 +00:00
import QtQuick 2.9
import QtQuick.Dialogs 1.2
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-01 15:13:17 +00:00
width: 800
height: 600
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-03 05:57:35 +00:00
onClosing: {
if (visible) {
close.accepted = false;
closeWindow();
}
}
onVisibleChanged: {
if (visible) {
mainPage.initialize();
}
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-03 05:57:35 +00:00
MainPage {
id: mainPage
2017-09-01 13:13:12 +00:00
anchors.fill: parent
Keys.onEscapePressed: closeWindow()
}
}