123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- import QtQuick 2.12
- import QtQuick.Layouts 1.3
- import QtQuick.Controls 2.5
- import QtQuick.Controls.Material 2.3
- import QtQuick.Dialogs 1.0
- Page {
- width: 1280
- height: 470
- id: page
- font.capitalization: Font.MixedCase
- Connections {
- target: _qmlHandler
- onCloseWindow: {
- window.close()
- }
- onLoadSettings: {
- settingsCovertMethodPicker.currentIndex = covertMethod
- settingsSaveIpSwitch.checked = saveIP
- settingsSaveUsernameSwitch.checked = saveUsername
- settingsCliPath.text = "CLI-Path: " + cliPath
- }
- }
- ColumnLayout {
- anchors.fill: parent
- RowLayout {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: parent.width
- Layout.preferredHeight: 400
- Layout.bottomMargin: 20
- ColumnLayout {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: 500
- Layout.preferredHeight: parent.height
- Text {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: 400
- Layout.preferredHeight: 50
- color: "#ffffff"
- text: "Covert Channel Method:"
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignLeft
- font.pixelSize: 20
- }
- Text {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: 400
- Layout.preferredHeight: 50
- color: "#ffffff"
- text: "Autofill default IP on start:"
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignLeft
- font.pixelSize: 20
- }
- Text {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: 400
- Layout.preferredHeight: 50
- color: "#ffffff"
- text: "Autofill default username on start:"
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignLeft
- font.pixelSize: 20
- }
- Text {
- id: settingsCliPath
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: 400
- Layout.preferredHeight: 50
- color: "#ffffff"
- text: "CLI-Path: "
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignLeft
- font.pixelSize: 20
- }
- Text {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: 400
- Layout.preferredHeight: 50
- color: "#ffffff"
- text: "Delete my account:"
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignLeft
- font.pixelSize: 20
- }
- }
- ColumnLayout {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: 500
- Layout.preferredHeight: parent.height
- ComboBox {
- id: settingsCovertMethodPicker
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: 50
- Layout.preferredWidth: 400
- model: ListModel {
- ListElement {
- text: "Method 1"
- }
- ListElement {
- text: "Method 2"
- }
- ListElement {
- text: "Method 3"
- }
- }
- }
- Switch {
- id: settingsSaveIpSwitch
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: 50
- Layout.preferredWidth: 400
- text: ""
- checked: false
- display: AbstractButton.IconOnly
- }
- Switch {
- id: settingsSaveUsernameSwitch
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: 50
- Layout.preferredWidth: 400
- text: ""
- checked: false
- display: AbstractButton.IconOnly
- }
- Button {
- id: settingsChangeCliPathButton
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: 50
- Layout.preferredWidth: 220
- text: "Change (req. restart)"
- font.pixelSize: 20
- // @disable-check M223
- onClicked: {
- // @disable-check M222
- settingsCliDialog.open()
- }
- }
- Button {
- id: settingsDeleteMeButton
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: 50
- Layout.preferredWidth: 150
- text: "Delete Me"
- font.pixelSize: 20
- // @disable-check M223
- onClicked: {
- // @disable-check M222
- deleteMePopup.open()
- }
- }
- }
- }
- Rectangle {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: parent.width
- Layout.preferredHeight: 2
- Layout.bottomMargin: 30
- color: Material.accent
- }
- RowLayout {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: parent.width
- Layout.preferredHeight: 50
- Layout.bottomMargin: 20
- Button {
- id: settingsResetButton
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: 200
- Layout.preferredHeight: 50
- text: "Select defaults"
- font.pixelSize: 20
- onClicked: {
- _qmlHandler.onSettingsResetButton()
- }
- }
- Button {
- id: settingsSaveButton
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: 200
- Layout.preferredHeight: 50
- text: "Save Changes"
- font.pixelSize: 20
- onClicked: {
- _qmlHandler.onSettingsSaveButton(
- settingsCovertMethodPicker.currentIndex,
- settingsSaveIpSwitch.checked,
- settingsSaveUsernameSwitch.checked,
- settingsCliPath.text.replace("CLI-Path: ",
- ""))
- }
- }
- Button {
- id: settingsRevertChangesButton
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: 200
- Layout.preferredHeight: 50
- text: "Revert Changes"
- font.pixelSize: 20
- onClicked: {
- _qmlHandler.onSettingsRevertChangesButton()
- }
- }
- }
- }
- FileDialog {
- id: settingsCliDialog
- nameFilters: ["CLI file (ccats-cli)"]
- title: "Please select the CLI File"
- folder: shortcuts.home
- // @disable-check M223
- onAccepted: {
- // @disable-check M222
- var path = settingsCliDialog.fileUrl.toString()
- path = path.replace(/^(file:\/{2})/, "")
- settingsCliPath.text = "CLI-Path: " + path
- }
- }
- DeleteMePopup {
- id: deleteMePopup
- }
- }
|