Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.0
- import Ubuntu.Components 0.1
- import Communi 3.0
- Item{
- id: background
- width: parent.width
- height: parent.height
- property IrcBuffer buffer
- MessageFormatter {
- id: formatter
- }
- Connections {
- target: buffer
- onMessageReceived: {
- var line = formatter.formatMessage(message)
- if (line){
- textArea.insert(textArea.selectionEnd," \n")
- textArea.insert(textArea.selectionEnd,line)
- textArea.insert(textArea.selectionEnd," \n")
- }
- }
- }
- TextArea{
- id: textArea
- width: parent.width
- height: Math.round(parent.height)
- readOnly: true
- cursorVisible: false
- renderType: Text.QtRendering
- textFormat: TextEdit.RichText
- wrapMode: Text.WordWrap
- font.pixelSize: 12
- selectByMouse: false
- text: ""
- onLinkActivated: Qt.openUrlExternally(link)
- // SequentialAnimation on font.letterSpacing {
- // NumberAnimation { from: -2; to: 0; easing.type: Easing.InQuad; duration: 1200 }
- // ScriptAction {
- // script: {
- // background.y = (background.height / 4) + (Math.random() * background.height / 2)
- // background.x = (background.width / 4) + (Math.random() * background.width / 2)
- // }
- // }
- }
- }
- // Scrollbar{
- // flickableItem: textArea
- // }
- //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement