main.qml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. import QtQuick 2.12
  2. import QtQuick.Controls 2.5
  3. import "../Sending"
  4. import "../Receiving"
  5. import "../Messages"
  6. import "../Settings"
  7. import "../Help"
  8. import "../Connect"
  9. import "../Notifications"
  10. ApplicationWindow {
  11. id: window
  12. visible: true
  13. width: 1280
  14. height: 720
  15. maximumHeight: height
  16. maximumWidth: width
  17. font.capitalization: Font.MixedCase
  18. minimumHeight: height
  19. minimumWidth: width
  20. title: qsTr("Covert Channel - Control Panel")
  21. property string notificationTabTitle: "Notifications"
  22. Connections {
  23. target: _qmlHandler
  24. onNotification: {
  25. if (swipeView.currentIndex != 5)
  26. notificationTabTitle = "* Notifications"
  27. }
  28. }
  29. SwipeView {
  30. id: swipeView
  31. anchors.fill: parent
  32. currentIndex: header.currentIndex
  33. SendingForm {
  34. }
  35. ReceivingForm {
  36. }
  37. MessagesForm {
  38. }
  39. SettingsForm {
  40. }
  41. HelpForm {
  42. }
  43. NotificationsForm {
  44. }
  45. }
  46. header: TabBar {
  47. id: header
  48. currentIndex: swipeView.currentIndex
  49. contentHeight: 50
  50. TabButton {
  51. text: qsTr("Sending")
  52. }
  53. TabButton {
  54. text: qsTr("Receiving")
  55. }
  56. TabButton {
  57. text: qsTr("Messages")
  58. }
  59. TabButton {
  60. text: qsTr("Settings")
  61. }
  62. TabButton {
  63. text: qsTr("Help")
  64. }
  65. TabButton {
  66. text: notificationTabTitle
  67. onClicked: {
  68. text = "Notifications"
  69. }
  70. }
  71. }
  72. footer: FooterForm {
  73. }
  74. LoginSignupPopup {
  75. id: loginSignupPopup
  76. }
  77. IpPopup {
  78. id: ipPopup
  79. }
  80. NoConfigFoundPopup {
  81. id: noConfigFoundPopup
  82. }
  83. InvalidConfigPopup {
  84. id: invalidConfigPopup
  85. }
  86. InvalidCliPathPopup {
  87. id: invalidCliPathPopup
  88. }
  89. Component.onCompleted: {
  90. swipeView.interactive = false
  91. ipPopup.open()
  92. _qmlHandler.onStart()
  93. }
  94. }