MainView.qml 719 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import QtQuick 2.0
  2. import QtQuick.Controls 1.4
  3. import QtQuick.Dialogs 1.2
  4. Item {
  5. Row {
  6. id: selector
  7. Text {
  8. text: "Active repository" + repoOpenDialog.fileUrl
  9. }
  10. Button {
  11. text: "Choose..."
  12. onClicked: repoOpenDialog.open()
  13. }
  14. }
  15. Column {
  16. anchors.top: selector.bottom
  17. Repeater {
  18. model: _handler.repositories
  19. Text {
  20. text: model.repoName
  21. }
  22. }
  23. }
  24. FileDialog {
  25. id: repoOpenDialog
  26. folder: "."
  27. selectFolder: true
  28. selectMultiple: false
  29. onAccepted: {
  30. _handler.open(repoOpenDialog.fileUrl)
  31. }
  32. }
  33. }