{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/comments/27465177","id":27465177,"diff_hunk":"@@ -0,0 +1,240 @@\n+/*\n+    This file is part of cpp-ethereum.\n+\n+    cpp-ethereum is free software: you can redistribute it and/or modify\n+    it under the terms of the GNU General Public License as published by\n+    the Free Software Foundation, either version 3 of the License, or\n+    (at your option) any later version.\n+\n+    cpp-ethereum is distributed in the hope that it will be useful,\n+    but WITHOUT ANY WARRANTY; without even the implied warranty of\n+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+    GNU General Public License for more details.\n+\n+    You should have received a copy of the GNU General Public License\n+    along with cpp-ethereum.  If not, see <http://www.gnu.org/licenses/>.\n+*/\n+/** @file StatesComboBox.qml\n+ * @author Ali Mashatan ali@ethdev.com\n+ * @date 2015\n+ * Ethereum IDE client.\n+ */\n+\n+import QtQuick 2.0\n+import QtQuick.Controls 1.0\n+import QtQuick.Layouts 1.1\n+import QtGraphicalEffects 1.0\n+\n+Rectangle {\n+    id:statesComboBox\n+\n+    width:200;\n+    height: 20;\n+\n+    Component.onCompleted:\n+    {\n+        var top = dropDownList;\n+        while (top.parent)\n+        {\n+            top = top.parent\n+            if (top.objectName == \"debugPanel\")\n+                break;\n+        }\n+        var coordinates = dropDownList.mapToItem(top, 0, 0)\n+        //the order is important\n+        dropDownShowdowList.parent = top;\n+        dropDownList.parent = top;\n+\n+        dropDownShowdowList.x = coordinates.x\n+        dropDownShowdowList.y = coordinates.y\n+\n+        dropDownList.x = coordinates.x\n+        dropDownList.y = coordinates.y\n+    }\n+\n+    signal selectItem(real item);\n+    signal editItem(real item);\n+    signal selectCreate();\n+    property variant rowHeight:25;\n+    property variant items;\n+    readonly property alias selectedItem: chosenItemText.text;\n+    readonly property alias selectedIndex: listView.currentRow;\n+    function setSelectedIndex(index)\n+    {\n+        listView.currentRow = index;\n+        chosenItemText.text = statesComboBox.items.get(0).title;\n+    }\n+\n+    signal comboClicked;\n+\n+    property variant colorItem;\n+    property variant colorSelect;\n+\n+    smooth:true;\n+    Rectangle {\n+        id:chosenItem\n+        width:parent.width;\n+        height:statesComboBox.height;\n+        color: statesComboBox.color;\n+        smooth:true;\n+        Text {\n+            id:chosenItemText\n+            anchors.top: parent.top;\n+            anchors.left: parent.left;\n+            anchors.margins: 2;\n+            color: statesComboBox.colorItem;\n+            text:\"\"\n+            smooth:true\n+        }\n+\n+        MouseArea {\n+            anchors.fill: parent;\n+            onClicked: {\n+                statesComboBox.state = statesComboBox.state===\"dropDown\"?\"\":\"dropDown\"\n+            }\n+        }\n+    }\n+\n+    Rectangle {\n+        id:dropDownShowdowList\n+        width:statesComboBox.width;\n+        opacity: 0.3\n+        height:0;\n+        clip:true;\n+        radius:4;\n+        anchors.top: chosenItem.top;\n+        anchors.margins: 2;\n+        color: \"gray\"\n+    }\n+    //ToDo: We need scrollbar for items\n+    Rectangle {\n+        id:dropDownList\n+        width:statesComboBox.width;\n+        height:0;\n+        clip:true;\n+        radius:4;\n+        anchors.top: chosenItem.top;\n+        anchors.margins: 2;\n+        color: statesComboBox.color\n+\n+\n+        ColumnLayout{\n+            spacing: 2\n+            TableView {\n+                id:listView\n+                height:20;\n+                implicitHeight: 0\n+                width:statesComboBox.width;\n+                model: statesComboBox.items\n+                horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff;\n+                currentRow: -1\n+                headerVisible: false;\n+                backgroundVisible: false\n+                alternatingRowColors : false;\n+                frameVisible: false\n+\n+                TableViewColumn {\n+                    role: \"title\"\n+                    title: \"\"\n+                    width: statesComboBox.width;\n+                    delegate: mainItemDelegate\n+                }\n+                rowDelegate:  Rectangle {\n+                    width:statesComboBox.width;\n+                    height: statesComboBox.rowHeight;\n+                }\n+                Component {\n+                    id: mainItemDelegate\n+                    Rectangle {\n+                        id: itemDelegate\n+                        width:statesComboBox.width;\n+                        height: statesComboBox.height;\n+                        Text {\n+                            id: textItemid\n+                            text: styleData.value\n+                            color: statesComboBox.colorItem;\n+                            anchors.top: parent.top;\n+                            anchors.left: parent.left;\n+                            anchors.margins: 5;\n+\n+                        }\n+                        Image {\n+                            id: imageItemid\n+                            height:20\n+                            width:20;\n+                            anchors.right:parent.right\n+                            anchors.top: parent.top;\n+                            anchors.margins: 5;\n+                            visible: false;\n+                            fillMode: Image.PreserveAspectFit\n+                            source: \"img/edit_combox.png\"\n+                        }\n+\n+                        MouseArea {\n+                            anchors.fill: parent;\n+                            hoverEnabled : true\n+\n+                            onEntered: {\n+                                imageItemid.visible = true;\n+                                textItemid.color = statesComboBox.colorSelect;\n+                            }\n+                            onExited: {\n+                                imageItemid.visible = false;\n+                                textItemid.color = statesComboBox.colorItem;\n+                            }\n+                            onClicked: {\n+                                if (mouseX > imageItemid.x && mouseX < imageItemid.x+ imageItemid.width\n+                                        && mouseY > imageItemid.y && mouseY < imageItemid.y+ imageItemid.height)\n+                                    statesComboBox.editItem(styleData.row);\n+                                else {\n+                                    statesComboBox.state = \"\"\n+                                    var prevSelection = chosenItemText.text\n+                                    chosenItemText.text = styleData.value\n+                                    listView.currentRow = styleData.row;\n+                                    statesComboBox.selectItem(styleData.row);\n+                                }\n+                            }\n+                        }\n+                    }//Item\n+                }//Component\n+            }//Table View\n+\n+            RowLayout{","path":"mix/qml/StatesComboBox.qml","position":202,"original_position":202,"commit_id":"deaabe142a51fb14a64a8e912c45af49a531a810","original_commit_id":"a400c9aadd9c3220d0254a5412ac2bc9e3492e6f","user":{"login":"yann300","id":6940742,"avatar_url":"https://avatars.githubusercontent.com/u/6940742?v=3","gravatar_id":"","url":"https://api.github.com/users/yann300","html_url":"https://github.com/yann300","followers_url":"https://api.github.com/users/yann300/followers","following_url":"https://api.github.com/users/yann300/following{/other_user}","gists_url":"https://api.github.com/users/yann300/gists{/gist_id}","starred_url":"https://api.github.com/users/yann300/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yann300/subscriptions","organizations_url":"https://api.github.com/users/yann300/orgs","repos_url":"https://api.github.com/users/yann300/repos","events_url":"https://api.github.com/users/yann300/events{/privacy}","received_events_url":"https://api.github.com/users/yann300/received_events","type":"User","site_admin":false},"body":"Could you add space between control names and paren?","created_at":"2015-03-31T09:42:38Z","updated_at":"2015-03-31T09:42:38Z","html_url":"https://github.com/ethereum/cpp-ethereum/pull/1472#discussion_r27465177","pull_request_url":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/1472","_links":{"self":{"href":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/comments/27465177"},"html":{"href":"https://github.com/ethereum/cpp-ethereum/pull/1472#discussion_r27465177"},"pull_request":{"href":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/1472"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/1472","id":32264302,"html_url":"https://github.com/ethereum/cpp-ethereum/pull/1472","diff_url":"https://github.com/ethereum/cpp-ethereum/pull/1472.diff","patch_url":"https://github.com/ethereum/cpp-ethereum/pull/1472.patch","issue_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1472","number":1472,"state":"open","locked":false,"title":"Mix: Adding StatesComboBox","user":{"login":"Mashatan","id":4239108,"avatar_url":"https://avatars.githubusercontent.com/u/4239108?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashatan","html_url":"https://github.com/Mashatan","followers_url":"https://api.github.com/users/Mashatan/followers","following_url":"https://api.github.com/users/Mashatan/following{/other_user}","gists_url":"https://api.github.com/users/Mashatan/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashatan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashatan/subscriptions","organizations_url":"https://api.github.com/users/Mashatan/orgs","repos_url":"https://api.github.com/users/Mashatan/repos","events_url":"https://api.github.com/users/Mashatan/events{/privacy}","received_events_url":"https://api.github.com/users/Mashatan/received_events","type":"User","site_admin":false},"body":"Putting the add action as the last item within the dropdown and the edit action in the right side of each items.","created_at":"2015-03-30T20:31:54Z","updated_at":"2015-03-31T09:42:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"004ad02785ceec675190b89fb6ea9c9889eb79d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/1472/commits","review_comments_url":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/1472/comments","review_comment_url":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1472/comments","statuses_url":"https://api.github.com/repos/ethereum/cpp-ethereum/statuses/deaabe142a51fb14a64a8e912c45af49a531a810","head":{"label":"Mashatan:develop","ref":"develop","sha":"deaabe142a51fb14a64a8e912c45af49a531a810","user":{"login":"Mashatan","id":4239108,"avatar_url":"https://avatars.githubusercontent.com/u/4239108?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashatan","html_url":"https://github.com/Mashatan","followers_url":"https://api.github.com/users/Mashatan/followers","following_url":"https://api.github.com/users/Mashatan/following{/other_user}","gists_url":"https://api.github.com/users/Mashatan/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashatan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashatan/subscriptions","organizations_url":"https://api.github.com/users/Mashatan/orgs","repos_url":"https://api.github.com/users/Mashatan/repos","events_url":"https://api.github.com/users/Mashatan/events{/privacy}","received_events_url":"https://api.github.com/users/Mashatan/received_events","type":"User","site_admin":false},"repo":{"id":32516122,"name":"cpp-ethereum","full_name":"Mashatan/cpp-ethereum","owner":{"login":"Mashatan","id":4239108,"avatar_url":"https://avatars.githubusercontent.com/u/4239108?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashatan","html_url":"https://github.com/Mashatan","followers_url":"https://api.github.com/users/Mashatan/followers","following_url":"https://api.github.com/users/Mashatan/following{/other_user}","gists_url":"https://api.github.com/users/Mashatan/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashatan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashatan/subscriptions","organizations_url":"https://api.github.com/users/Mashatan/orgs","repos_url":"https://api.github.com/users/Mashatan/repos","events_url":"https://api.github.com/users/Mashatan/events{/privacy}","received_events_url":"https://api.github.com/users/Mashatan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mashatan/cpp-ethereum","description":"Gavin Wood's C++ implementation of the Ethereum yellowpaper.","fork":true,"url":"https://api.github.com/repos/Mashatan/cpp-ethereum","forks_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/forks","keys_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/teams","hooks_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/hooks","issue_events_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/events","assignees_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/tags","blobs_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/languages","stargazers_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/stargazers","contributors_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/contributors","subscribers_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/subscribers","subscription_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/subscription","commits_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/merges","archive_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/downloads","issues_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/Mashatan/cpp-ethereum/releases{/id}","created_at":"2015-03-19T10:54:30Z","updated_at":"2015-03-31T09:13:21Z","pushed_at":"2015-03-31T09:13:21Z","git_url":"git://github.com/Mashatan/cpp-ethereum.git","ssh_url":"git@github.com:Mashatan/cpp-ethereum.git","clone_url":"https://github.com/Mashatan/cpp-ethereum.git","svn_url":"https://github.com/Mashatan/cpp-ethereum","homepage":"www.gavwood.com/Paper.pdf","size":17297,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"034e807046c459ddc4edf91236f5dd97c33ff2e0","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":15460666,"name":"cpp-ethereum","full_name":"ethereum/cpp-ethereum","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/cpp-ethereum","description":"Gavin Wood's C++ implementation of the Ethereum yellowpaper.","fork":false,"url":"https://api.github.com/repos/ethereum/cpp-ethereum","forks_url":"https://api.github.com/repos/ethereum/cpp-ethereum/forks","keys_url":"https://api.github.com/repos/ethereum/cpp-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/cpp-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/cpp-ethereum/teams","hooks_url":"https://api.github.com/repos/ethereum/cpp-ethereum/hooks","issue_events_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/cpp-ethereum/events","assignees_url":"https://api.github.com/repos/ethereum/cpp-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/cpp-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/cpp-ethereum/tags","blobs_url":"https://api.github.com/repos/ethereum/cpp-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/cpp-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/cpp-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/cpp-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/cpp-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/cpp-ethereum/languages","stargazers_url":"https://api.github.com/repos/ethereum/cpp-ethereum/stargazers","contributors_url":"https://api.github.com/repos/ethereum/cpp-ethereum/contributors","subscribers_url":"https://api.github.com/repos/ethereum/cpp-ethereum/subscribers","subscription_url":"https://api.github.com/repos/ethereum/cpp-ethereum/subscription","commits_url":"https://api.github.com/repos/ethereum/cpp-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/cpp-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/cpp-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/cpp-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/cpp-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/cpp-ethereum/merges","archive_url":"https://api.github.com/repos/ethereum/cpp-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/cpp-ethereum/downloads","issues_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/cpp-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/cpp-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/cpp-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/cpp-ethereum/releases{/id}","created_at":"2013-12-26T21:26:06Z","updated_at":"2015-03-31T09:19:42Z","pushed_at":"2015-03-31T09:28:09Z","git_url":"git://github.com/ethereum/cpp-ethereum.git","ssh_url":"git@github.com:ethereum/cpp-ethereum.git","clone_url":"https://github.com/ethereum/cpp-ethereum.git","svn_url":"https://github.com/ethereum/cpp-ethereum","homepage":"www.gavwood.com/Paper.pdf","size":89533,"stargazers_count":436,"watchers_count":436,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":154,"mirror_url":null,"open_issues_count":141,"forks":154,"open_issues":141,"watchers":436,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/1472"},"html":{"href":"https://github.com/ethereum/cpp-ethereum/pull/1472"},"issue":{"href":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1472"},"comments":{"href":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1472/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/1472/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/cpp-ethereum/pulls/1472/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/cpp-ethereum/statuses/deaabe142a51fb14a64a8e912c45af49a531a810"}}}}