AboutPage.qml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. // import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
  2. import QtQuick 1.1
  3. MyPage {
  4. id: aboutPage
  5. ToolBar {
  6. id: toolBar
  7. ToolButton {
  8. id: toolBarButtonDialog
  9. icon: "qrc:/qml/images/bar_roster.png"
  10. anchors.left: parent.left
  11. anchors.leftMargin: 30
  12. onClicked: {
  13. aboutPage.closePage( "qrc:/qml/RosterPage.qml" )
  14. }
  15. pauseAnim: 500
  16. }
  17. }
  18. /**-----------------------------**/
  19. onVisibleChanged: {
  20. if( visible ) {
  21. animImage.running = true
  22. }
  23. }
  24. ParallelAnimation {
  25. id: animImage
  26. running: false
  27. NumberAnimation { target: imgAbout; property: "scale"; from: 10; to: 1; duration: 600 }
  28. NumberAnimation { target: imgAbout; property: "opacity"; from: 0; to: 1; duration: 1200 }
  29. }
  30. Item {
  31. id: mainPane
  32. anchors.left: parent.left
  33. anchors.right: parent.right
  34. anchors.top: parent.top
  35. anchors.bottom: toolBar.top
  36. anchors.leftMargin: 12
  37. anchors.rightMargin: 12
  38. anchors.topMargin: 12
  39. anchors.bottomMargin: 12
  40. Item {
  41. id: img_about
  42. anchors.top: parent.top
  43. anchors.left: parent.feft
  44. width: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? parent.width/2 : parent.width
  45. height: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? parent.height : parent.height/2
  46. Image {
  47. id: imgAbout
  48. source: "qrc:/meegim80.png"
  49. width: 120
  50. height: 120
  51. anchors.horizontalCenter: parent.horizontalCenter
  52. anchors.top: parent.top
  53. anchors.topMargin: 60
  54. smooth: true
  55. fillMode: Image.PreserveAspectFit
  56. }
  57. Text {
  58. id: lblQnetMan
  59. anchors.top: imgAbout.bottom
  60. anchors.topMargin: 30
  61. anchors.horizontalCenter: parent.horizontalCenter
  62. text: "MeegIM";
  63. font.pixelSize: 40
  64. font.bold: true
  65. color: "blue"
  66. }
  67. }
  68. //------------------
  69. Item {
  70. id: textAbout
  71. width: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? parent.width/2 : parent.width
  72. height: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? parent.height : parent.height/2
  73. anchors.top: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? parent.top : img_about.bottom
  74. anchors.bottom: parent.bottom
  75. anchors.left: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? img_about.right : parent.left
  76. anchors.topMargin: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? 0 : -80
  77. //anchors.bottomMargin: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? 0 : -50
  78. anchors.leftMargin: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? -10 : 10
  79. anchors.rightMargin: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? -20 : 10
  80. Flickable {
  81. id: flickAboutText
  82. anchors.top: parent.top
  83. anchors.topMargin: 5
  84. anchors.bottom: parent.bottom
  85. anchors.bottomMargin: 5
  86. contentHeight: colAboutText.height
  87. contentWidth: colAboutText.width
  88. flickableDirection: Flickable.VerticalFlick
  89. height: textAbout.height
  90. width: textAbout.width
  91. clip: true
  92. Column {
  93. id: colAboutText
  94. spacing: 20
  95. Text { font.pixelSize: 22; text: "<b>" + qsTr("Version") +":</b> "+ xmppClient.version }
  96. Text { font.pixelSize: 22; text: "<b>" + qsTr("Author") + ":</b> " + qsTr("Anatoly Kozlov") }
  97. Text { font.pixelSize: 22; text: "<b>" + qsTr("Licence")+":</b>" }
  98. Text { font.pixelSize: 22; text: qsTr("GPL v3") }
  99. Text { font.pixelSize: 22; text: "<a href='http://www.gnu.org/licenses/gpl.html'>http://www.gnu.org/licenses/gpl.html</a>"; onLinkActivated: { Qt.openUrlExternally (link) } }
  100. Text { font.pixelSize: 22; text: qsTr("MeegIM is a simple XMPP client. \nIt is written in QML/C++ and uses \nthe Qt framework.") }
  101. Text { font.pixelSize: 22; text: qsTr("This application is open source.\nSource code and other details \non the web-page of the project:") }
  102. Text { /*anchors.horizontalCenter: parent.horizontalCenter;*/ font.pixelSize: 22; text: "<a href='http://code.google.com/p/meegim'>http://code.google.com/p/meegim</a><br/>"; onLinkActivated: { Qt.openUrlExternally (link) } }
  103. Text { text: "\n" }
  104. Text { font.pixelSize: 22; text: qsTr("Based on:") }
  105. Text { font.pixelSize: 22; text: qsTr("* Qxmpp:") }
  106. Text { font.pixelSize: 22; text: "<a href='http://code.google.com/p/qxmpp/'>http://code.google.com/p/qxmpp/</a>"; onLinkActivated: { Qt.openUrlExternally (link) } }
  107. Text { font.pixelSize: 22; text: qsTr("* Faenza icons:") }
  108. Text { font.pixelSize: 20; text: "<a href='http://code.google.com/p/faenza-icon-theme/'>http://code.google.com/p/faenza-icon-theme/</a>"; onLinkActivated: { Qt.openUrlExternally (link) } }
  109. Text { text: "\n" }
  110. Row {
  111. anchors.horizontalCenter: parent.horizontalCenter
  112. spacing: 6
  113. Image { height: 36; width: height; smooth: true; anchors.verticalCenter: parent.verticalCenter; source: "qrc:/qml/images/twitter.png" }
  114. Text { anchors.verticalCenter: parent.verticalCenter; font.pixelSize: 24; text: "<a href='http://twitter.com/anatolyk82'>Twitter</a> #meegim<br/>"; onLinkActivated: { Qt.openUrlExternally (link) } }
  115. }
  116. }
  117. } //Flickable
  118. } //Column
  119. } //Item
  120. }