main.qml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. import QtQuick 2.12
  2. import QtQuick.Controls 2.5
  3. ApplicationWindow {
  4. id: window
  5. visible: true
  6. width: 1280
  7. height: 720
  8. title: qsTr("Covert Channel - Control Panel")
  9. Connections {
  10. target: _qmlHandler
  11. onSettingsOpenSwitchServerPopup: {
  12. switchDialog.open()
  13. }
  14. }
  15. SwipeView {
  16. id: swipeView
  17. anchors.fill: parent
  18. currentIndex: header.currentIndex
  19. SendingForm {
  20. }
  21. ReceivingForm {
  22. }
  23. MessagesForm {
  24. }
  25. SettingsForm {
  26. }
  27. HelpForm {
  28. }
  29. }
  30. header: TabBar {
  31. id: header
  32. currentIndex: swipeView.currentIndex
  33. contentHeight: 50
  34. TabButton {
  35. text: qsTr("Sending")
  36. }
  37. TabButton {
  38. text: qsTr("Receiving")
  39. }
  40. TabButton {
  41. text: qsTr("Messages")
  42. }
  43. TabButton {
  44. text: qsTr("Settings")
  45. }
  46. TabButton {
  47. text: qsTr("Help")
  48. }
  49. }
  50. footer: FooterForm {
  51. }
  52. IpPopupForm {
  53. id: ipDialog
  54. x: Math.round((parent.width - width) / 2)
  55. y: Math.round((parent.height - height) / 2)
  56. }
  57. SwitchIpPopupForm {
  58. id: switchDialog
  59. x: Math.round((parent.width - width) / 2)
  60. y: Math.round((parent.height - height) / 2)
  61. }
  62. Component.onCompleted: {
  63. swipeView.interactive = false
  64. ipDialog.open()
  65. }
  66. }