main.qml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. LoginSignupPopup {
  53. id: loginSignupPopup
  54. x: Math.round((parent.width - width) / 2)
  55. y: Math.round((parent.height - height) / 2)
  56. }
  57. IpPopup {
  58. id: ipPopup
  59. x: Math.round((parent.width - width) / 2)
  60. y: Math.round((parent.height - height) / 2)
  61. onClosed: loginSignupPopup.open()
  62. }
  63. Component.onCompleted: {
  64. swipeView.interactive = false
  65. ipPopup.open()
  66. }
  67. }