Skip to content

Commit

Permalink
Fix the GUI in Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederick Thomssen committed May 12, 2016
1 parent ce29055 commit 4231ebd
Show file tree
Hide file tree
Showing 9 changed files with 344 additions and 451 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Thumbs.db

# gh-pages
html

RedTimer
/*.ini
/redtimer_plugin_import.cpp
/redtimer_qml_plugin_import.cpp
Expand Down
15 changes: 2 additions & 13 deletions IssueCreator.qml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
import QtQuick 2.5

Item {
width: 400
height: 300

IssueCreatorForm {
id: issueCreator

anchors.rightMargin: 0
anchors.bottomMargin: 0
anchors.leftMargin: 0
anchors.topMargin: 0
anchors.fill: parent
}
IssueCreatorForm {
}

202 changes: 96 additions & 106 deletions IssueCreatorForm.ui.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,131 +2,121 @@ import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.2

Item {
id: issueCreator
objectName: "issueCreator"

GridLayout {
id: gridLayout1
anchors.rightMargin: 5
anchors.leftMargin: 5
anchors.bottomMargin: 5
anchors.topMargin: 5
columns: 2
anchors.fill: parent

Label {
id: label6
text: qsTr("Project")
}
GridLayout {
id: gridLayout1
columns: 2

ComboBox {
id: project
objectName: "project"
Layout.minimumWidth: 200
Layout.fillWidth: true
model: projectModel
textRole: "name"
}

Label {
id: label1
text: qsTr("Tracker")
}
Label {
id: label6
text: qsTr("Project")
}

ComboBox {
id: tracker
objectName: "tracker"
Layout.minimumWidth: 200
Layout.fillWidth: true
model: trackerModel
textRole: "name"
}
ComboBox {
id: project
objectName: "project"
Layout.minimumWidth: 200
Layout.fillWidth: true
model: projectModel
textRole: "name"
}

Label {
id: label2
text: qsTr("Subject")
}
Label {
id: label1
text: qsTr("Tracker")
}

TextField {
id: subject
Layout.fillWidth: true
objectName: "subject"
placeholderText: qsTr("")
}
ComboBox {
id: tracker
objectName: "tracker"
Layout.minimumWidth: 200
Layout.fillWidth: true
model: trackerModel
textRole: "name"
}

Label {
id: label2
text: qsTr("Subject")
}

Label {
id: label4
text: qsTr("Parent issue")
}
TextField {
id: subject
Layout.fillWidth: true
objectName: "subject"
placeholderText: qsTr("")
}

RowLayout {
width: 100
height: 100
Layout.fillWidth: true

TextField {
id: parentIssue
Layout.fillWidth: true
objectName: "parentIssue"
placeholderText: qsTr("")
}

ToolButton {
id: selectParentIssue
objectName: "selectParentIssue"
width: 23
iconSource: "open-iconic/svg/list.svg"
tooltip: "Select parent issue from list"
}
}
Label {
id: label4
text: qsTr("Parent issue")
}

Label {
id: label5
text: qsTr("Estimated time")
}
RowLayout {
width: 100
height: 100
Layout.fillWidth: true

TextField {
id: estimatedTime
id: parentIssue
Layout.fillWidth: true
objectName: "estimatedTime"
objectName: "parentIssue"
placeholderText: qsTr("")
}

Label {
id: label3
text: qsTr("Description")
ToolButton {
id: selectParentIssue
objectName: "selectParentIssue"
width: 23
iconSource: "open-iconic/svg/list.svg"
tooltip: "Select parent issue from list"
}
}

TextArea {
id: description
Layout.minimumHeight: 100
Layout.fillHeight: true
Layout.fillWidth: true
objectName: "description"
}
Label {
id: label5
text: qsTr("Estimated time")
}

RowLayout {
id: rowLayout1
width: 100
height: 100
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Layout.columnSpan: 2

Button {
id: create
objectName: "create"
text: qsTr("Create")
isDefault: true
}

Button {
id: cancel
objectName: "cancel"
text: qsTr("Cancel")
}
TextField {
id: estimatedTime
Layout.fillWidth: true
objectName: "estimatedTime"
placeholderText: qsTr("")
}

Label {
id: label3
text: qsTr("Description")
}

TextArea {
id: description
Layout.minimumHeight: 100
Layout.fillHeight: true
Layout.fillWidth: true
objectName: "description"
}

RowLayout {
id: rowLayout1
width: 100
height: 100
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Layout.columnSpan: 2

Button {
id: create
objectName: "create"
text: qsTr("Create")
isDefault: true
}

Button {
id: cancel
objectName: "cancel"
text: qsTr("Cancel")
}
}
}

19 changes: 4 additions & 15 deletions IssueSelector.qml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import QtQuick 2.5
import QtQuick.Layouts 1.2

Item {
width: 200
height: 400
IssueSelectorForm {
id: issueSelector // required by issueDelegate

Component{
id: issueDelegate

Item{
height: 25
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 0
anchors.rightMargin: 0

Text {
text: subject + " (#" + id + ")"
Expand All @@ -27,14 +26,4 @@ Item {
}
}
}

IssueSelectorForm {
id: issueSelector // required by issueDelegate

anchors.rightMargin: 0
anchors.bottomMargin: 0
anchors.leftMargin: 0
anchors.topMargin: 0
anchors.fill: parent
}
}
83 changes: 38 additions & 45 deletions IssueSelectorForm.ui.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,56 @@ import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.2

Item {
ColumnLayout {
id: columnLayout1
width: 200
height: 400
Layout.minimumWidth: 200
Layout.minimumHeight: 400

property alias issues: issues
property alias project: project
property alias search: search

ColumnLayout {
id: columnLayout1
anchors.fill: parent

ComboBox {
id: project
Layout.fillWidth: true
objectName: "project"
model: projectModel
textRole: "name"
}

TextField {
id: search
objectName: "search"
Layout.fillWidth: true
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
placeholderText: qsTr("Search in issue list")
}
ComboBox {
id: project
Layout.fillWidth: true
objectName: "project"
model: projectModel
textRole: "name"
}

ListView {
id: issues
clip: true
boundsBehavior: Flickable.StopAtBounds
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
objectName: "issues"
model: issuesModel
TextField {
id: search
objectName: "search"
Layout.fillWidth: true
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
placeholderText: qsTr("Search in issue list")
}

signal activated( int index )
ListView {
id: issues
height: 300
boundsBehavior: Flickable.StopAtBounds
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
objectName: "issues"
model: issuesModel

delegate: issueDelegate
signal activated( int index )

highlight: Rectangle {
color: "lightsteelblue";
radius: 5
}
delegate: issueDelegate

Layout.fillWidth: true
Layout.fillHeight: true
anchors.right: parent.right
anchors.rightMargin: 17
anchors.left: parent.left
anchors.leftMargin: 0
highlight: Rectangle {
color: "lightsteelblue";
radius: 5
}

Layout.fillWidth: true
Layout.fillHeight: true
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
}
}

Loading

0 comments on commit 4231ebd

Please sign in to comment.