{"action":"created","comment":{"url":"https://api.github.com/repos/NREL/OpenStudio/pulls/comments/27341767","id":27341767,"diff_hunk":"@@ -0,0 +1,347 @@\n+/**********************************************************************\n+*  Copyright (c) 2008-2015, Alliance for Sustainable Energy.\n+*  All rights reserved.\n+*\n+*  This library is free software; you can redistribute it and/or\n+*  modify it under the terms of the GNU Lesser General Public\n+*  License as published by the Free Software Foundation; either\n+*  version 2.1 of the License, or (at your option) any later version.\n+*\n+*  This library 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 GNU\n+*  Lesser General Public License for more details.\n+*\n+*  You should have received a copy of the GNU Lesser General Public\n+*  License along with this library; if not, write to the Free Software\n+*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n+**********************************************************************/\n+\n+#include \"ProjectImportation.hpp\"\n+#include \"BIMserverConnection.hpp\"\n+\n+#include \"../osversion/VersionTranslator.hpp\"\n+\n+\n+#include <QFileDialog>\n+#include <QGridLayout>\n+#include <QVBoxLayout>\n+#include <QMessageBox>\n+#include <QLabel>\n+#include <QEventLoop>\n+\n+#include <QLineEdit>\n+#include <QPushButton>\n+#include <QDebug>\n+\n+namespace openstudio {\n+namespace bimserver {\n+\n+\tProjectImportation::ProjectImportation(QWidget *parent) :\n+\t\tQDialog(parent) {\n+\t\tQGridLayout *subLayout = new QGridLayout;\n+\t\tQVBoxLayout *mainLayout = new QVBoxLayout;\n+\n+\t\tQLabel *introLabel = new QLabel(\"Please select a project to import: \", this);\n+\t\tm_proList = new QListWidget(this);\n+\t\tm_ifcList = new QListWidget(this);\n+\t\tQPushButton *okButton = new QPushButton(tr(\"Download OSM File\"), this);\n+\t\tQPushButton *newButton = new QPushButton(tr(\"New Project\"), this);\n+\t\tQPushButton *loadButton = new QPushButton(tr(\"Check in IFC File\"), this);\n+\t\tQPushButton *selectButton = new QPushButton(tr(\" > \"), this);\n+\t\tQPushButton *cancelButton = new QPushButton(tr(\"Cancel\"), this);\n+\t\tQPushButton *settingButton = new QPushButton(tr(\"Setting\"), this);\n+\t\tm_statusBar = new QStatusBar(this);\n+\t\t\n+\t\tconnect(okButton, SIGNAL(clicked()),this, SLOT(okButton_clicked()));\n+\t\tconnect(newButton, SIGNAL(clicked()),this, SLOT(newButton_clicked()));\n+\t\tconnect(loadButton, SIGNAL(clicked()), this, SLOT(loadButton_clicked()));\n+\t\tconnect(selectButton, SIGNAL(clicked()), this, SLOT(selectButton_clicked()));\n+\t\tconnect(settingButton, SIGNAL(clicked()),this, SLOT(settingButton_clicked()));\n+\t\tconnect(cancelButton, SIGNAL(clicked()), this, SLOT(close()));\n+\n+\t\tsubLayout->addWidget(m_proList, 1, 0, 1, 1);\n+\t\tsubLayout->addWidget(m_ifcList, 1, 2, 1, 1);\n+\n+\t\tsubLayout->addWidget(introLabel, 0, 0, 1, 3);\n+\t\tsubLayout->addWidget(selectButton, 1, 1, 1, 1);\n+\t\tsubLayout->addWidget(newButton, 2, 0, 1, 1);\n+\t\tsubLayout->addWidget(loadButton, 2, 2, 1, 1);\n+\t\tsubLayout->addWidget(okButton, 3, 0, 1, 1);\n+\t\tsubLayout->addWidget(settingButton, 3, 1, 1, 1);\n+\t\tsubLayout->addWidget(cancelButton, 3, 2, 1, 1);\n+\n+\t\tmainLayout->addLayout(subLayout);\n+\n+\t\tmainLayout->addWidget(m_statusBar);\n+\n+\t\tsetLayout(mainLayout);\n+\n+\t\tsetWindowTitle(\"Import Project\");\n+\n+\t\tm_waitForOSM = new QEventLoop(this);\n+\t}\n+\n+\tProjectImportation::~ProjectImportation() {\n+\n+\t}\n+\n+\tboost::optional<model::Model> ProjectImportation::run() {","path":"openstudiocore/src/bimserver/ProjectImportation.cpp","position":89,"original_position":89,"commit_id":"774489e67a21aea4c261fef4ebbb3198883aeed5","original_commit_id":"774489e67a21aea4c261fef4ebbb3198883aeed5","user":{"login":"zhouchong90","id":3454289,"avatar_url":"https://avatars.githubusercontent.com/u/3454289?v=3","gravatar_id":"","url":"https://api.github.com/users/zhouchong90","html_url":"https://github.com/zhouchong90","followers_url":"https://api.github.com/users/zhouchong90/followers","following_url":"https://api.github.com/users/zhouchong90/following{/other_user}","gists_url":"https://api.github.com/users/zhouchong90/gists{/gist_id}","starred_url":"https://api.github.com/users/zhouchong90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhouchong90/subscriptions","organizations_url":"https://api.github.com/users/zhouchong90/orgs","repos_url":"https://api.github.com/users/zhouchong90/repos","events_url":"https://api.github.com/users/zhouchong90/events{/privacy}","received_events_url":"https://api.github.com/users/zhouchong90/received_events","type":"User","site_admin":false},"body":"@macumber I'm a little confused. Could you please elaborate about this? What could be factored out?","created_at":"2015-03-28T02:51:13Z","updated_at":"2015-03-28T02:51:13Z","html_url":"https://github.com/NREL/OpenStudio/pull/1565#discussion_r27341767","pull_request_url":"https://api.github.com/repos/NREL/OpenStudio/pulls/1565","_links":{"self":{"href":"https://api.github.com/repos/NREL/OpenStudio/pulls/comments/27341767"},"html":{"href":"https://github.com/NREL/OpenStudio/pull/1565#discussion_r27341767"},"pull_request":{"href":"https://api.github.com/repos/NREL/OpenStudio/pulls/1565"}}},"pull_request":{"url":"https://api.github.com/repos/NREL/OpenStudio/pulls/1565","id":32139182,"html_url":"https://github.com/NREL/OpenStudio/pull/1565","diff_url":"https://github.com/NREL/OpenStudio/pull/1565.diff","patch_url":"https://github.com/NREL/OpenStudio/pull/1565.patch","issue_url":"https://api.github.com/repos/NREL/OpenStudio/issues/1565","number":1565,"state":"open","locked":false,"title":"Bim data hub","user":{"login":"macumber","id":1327850,"avatar_url":"https://avatars.githubusercontent.com/u/1327850?v=3","gravatar_id":"","url":"https://api.github.com/users/macumber","html_url":"https://github.com/macumber","followers_url":"https://api.github.com/users/macumber/followers","following_url":"https://api.github.com/users/macumber/following{/other_user}","gists_url":"https://api.github.com/users/macumber/gists{/gist_id}","starred_url":"https://api.github.com/users/macumber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macumber/subscriptions","organizations_url":"https://api.github.com/users/macumber/orgs","repos_url":"https://api.github.com/users/macumber/repos","events_url":"https://api.github.com/users/macumber/events{/privacy}","received_events_url":"https://api.github.com/users/macumber/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-27T19:48:40Z","updated_at":"2015-03-28T02:51:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"499bd634976b758ebd60a5ac52c795557094d034","assignee":{"login":"macumber","id":1327850,"avatar_url":"https://avatars.githubusercontent.com/u/1327850?v=3","gravatar_id":"","url":"https://api.github.com/users/macumber","html_url":"https://github.com/macumber","followers_url":"https://api.github.com/users/macumber/followers","following_url":"https://api.github.com/users/macumber/following{/other_user}","gists_url":"https://api.github.com/users/macumber/gists{/gist_id}","starred_url":"https://api.github.com/users/macumber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macumber/subscriptions","organizations_url":"https://api.github.com/users/macumber/orgs","repos_url":"https://api.github.com/users/macumber/repos","events_url":"https://api.github.com/users/macumber/events{/privacy}","received_events_url":"https://api.github.com/users/macumber/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/NREL/OpenStudio/pulls/1565/commits","review_comments_url":"https://api.github.com/repos/NREL/OpenStudio/pulls/1565/comments","review_comment_url":"https://api.github.com/repos/NREL/OpenStudio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NREL/OpenStudio/issues/1565/comments","statuses_url":"https://api.github.com/repos/NREL/OpenStudio/statuses/774489e67a21aea4c261fef4ebbb3198883aeed5","head":{"label":"NREL:BIMDataHub","ref":"BIMDataHub","sha":"774489e67a21aea4c261fef4ebbb3198883aeed5","user":{"login":"NREL","id":1906800,"avatar_url":"https://avatars.githubusercontent.com/u/1906800?v=3","gravatar_id":"","url":"https://api.github.com/users/NREL","html_url":"https://github.com/NREL","followers_url":"https://api.github.com/users/NREL/followers","following_url":"https://api.github.com/users/NREL/following{/other_user}","gists_url":"https://api.github.com/users/NREL/gists{/gist_id}","starred_url":"https://api.github.com/users/NREL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NREL/subscriptions","organizations_url":"https://api.github.com/users/NREL/orgs","repos_url":"https://api.github.com/users/NREL/repos","events_url":"https://api.github.com/users/NREL/events{/privacy}","received_events_url":"https://api.github.com/users/NREL/received_events","type":"Organization","site_admin":false},"repo":{"id":11159552,"name":"OpenStudio","full_name":"NREL/OpenStudio","owner":{"login":"NREL","id":1906800,"avatar_url":"https://avatars.githubusercontent.com/u/1906800?v=3","gravatar_id":"","url":"https://api.github.com/users/NREL","html_url":"https://github.com/NREL","followers_url":"https://api.github.com/users/NREL/followers","following_url":"https://api.github.com/users/NREL/following{/other_user}","gists_url":"https://api.github.com/users/NREL/gists{/gist_id}","starred_url":"https://api.github.com/users/NREL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NREL/subscriptions","organizations_url":"https://api.github.com/users/NREL/orgs","repos_url":"https://api.github.com/users/NREL/repos","events_url":"https://api.github.com/users/NREL/events{/privacy}","received_events_url":"https://api.github.com/users/NREL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NREL/OpenStudio","description":"OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.","fork":false,"url":"https://api.github.com/repos/NREL/OpenStudio","forks_url":"https://api.github.com/repos/NREL/OpenStudio/forks","keys_url":"https://api.github.com/repos/NREL/OpenStudio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NREL/OpenStudio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NREL/OpenStudio/teams","hooks_url":"https://api.github.com/repos/NREL/OpenStudio/hooks","issue_events_url":"https://api.github.com/repos/NREL/OpenStudio/issues/events{/number}","events_url":"https://api.github.com/repos/NREL/OpenStudio/events","assignees_url":"https://api.github.com/repos/NREL/OpenStudio/assignees{/user}","branches_url":"https://api.github.com/repos/NREL/OpenStudio/branches{/branch}","tags_url":"https://api.github.com/repos/NREL/OpenStudio/tags","blobs_url":"https://api.github.com/repos/NREL/OpenStudio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NREL/OpenStudio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NREL/OpenStudio/git/refs{/sha}","trees_url":"https://api.github.com/repos/NREL/OpenStudio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NREL/OpenStudio/statuses/{sha}","languages_url":"https://api.github.com/repos/NREL/OpenStudio/languages","stargazers_url":"https://api.github.com/repos/NREL/OpenStudio/stargazers","contributors_url":"https://api.github.com/repos/NREL/OpenStudio/contributors","subscribers_url":"https://api.github.com/repos/NREL/OpenStudio/subscribers","subscription_url":"https://api.github.com/repos/NREL/OpenStudio/subscription","commits_url":"https://api.github.com/repos/NREL/OpenStudio/commits{/sha}","git_commits_url":"https://api.github.com/repos/NREL/OpenStudio/git/commits{/sha}","comments_url":"https://api.github.com/repos/NREL/OpenStudio/comments{/number}","issue_comment_url":"https://api.github.com/repos/NREL/OpenStudio/issues/comments{/number}","contents_url":"https://api.github.com/repos/NREL/OpenStudio/contents/{+path}","compare_url":"https://api.github.com/repos/NREL/OpenStudio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NREL/OpenStudio/merges","archive_url":"https://api.github.com/repos/NREL/OpenStudio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NREL/OpenStudio/downloads","issues_url":"https://api.github.com/repos/NREL/OpenStudio/issues{/number}","pulls_url":"https://api.github.com/repos/NREL/OpenStudio/pulls{/number}","milestones_url":"https://api.github.com/repos/NREL/OpenStudio/milestones{/number}","notifications_url":"https://api.github.com/repos/NREL/OpenStudio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NREL/OpenStudio/labels{/name}","releases_url":"https://api.github.com/repos/NREL/OpenStudio/releases{/id}","created_at":"2013-07-03T19:34:37Z","updated_at":"2015-03-27T17:27:11Z","pushed_at":"2015-03-27T19:48:40Z","git_url":"git://github.com/NREL/OpenStudio.git","ssh_url":"git@github.com:NREL/OpenStudio.git","clone_url":"https://github.com/NREL/OpenStudio.git","svn_url":"https://github.com/NREL/OpenStudio","homepage":"https://www.openstudio.net/","size":253088,"stargazers_count":74,"watchers_count":74,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":538,"forks":62,"open_issues":538,"watchers":74,"default_branch":"develop"}},"base":{"label":"NREL:develop","ref":"develop","sha":"fa54c93f809358f9d2e49511bc4e5634f7ffb739","user":{"login":"NREL","id":1906800,"avatar_url":"https://avatars.githubusercontent.com/u/1906800?v=3","gravatar_id":"","url":"https://api.github.com/users/NREL","html_url":"https://github.com/NREL","followers_url":"https://api.github.com/users/NREL/followers","following_url":"https://api.github.com/users/NREL/following{/other_user}","gists_url":"https://api.github.com/users/NREL/gists{/gist_id}","starred_url":"https://api.github.com/users/NREL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NREL/subscriptions","organizations_url":"https://api.github.com/users/NREL/orgs","repos_url":"https://api.github.com/users/NREL/repos","events_url":"https://api.github.com/users/NREL/events{/privacy}","received_events_url":"https://api.github.com/users/NREL/received_events","type":"Organization","site_admin":false},"repo":{"id":11159552,"name":"OpenStudio","full_name":"NREL/OpenStudio","owner":{"login":"NREL","id":1906800,"avatar_url":"https://avatars.githubusercontent.com/u/1906800?v=3","gravatar_id":"","url":"https://api.github.com/users/NREL","html_url":"https://github.com/NREL","followers_url":"https://api.github.com/users/NREL/followers","following_url":"https://api.github.com/users/NREL/following{/other_user}","gists_url":"https://api.github.com/users/NREL/gists{/gist_id}","starred_url":"https://api.github.com/users/NREL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NREL/subscriptions","organizations_url":"https://api.github.com/users/NREL/orgs","repos_url":"https://api.github.com/users/NREL/repos","events_url":"https://api.github.com/users/NREL/events{/privacy}","received_events_url":"https://api.github.com/users/NREL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NREL/OpenStudio","description":"OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.","fork":false,"url":"https://api.github.com/repos/NREL/OpenStudio","forks_url":"https://api.github.com/repos/NREL/OpenStudio/forks","keys_url":"https://api.github.com/repos/NREL/OpenStudio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NREL/OpenStudio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NREL/OpenStudio/teams","hooks_url":"https://api.github.com/repos/NREL/OpenStudio/hooks","issue_events_url":"https://api.github.com/repos/NREL/OpenStudio/issues/events{/number}","events_url":"https://api.github.com/repos/NREL/OpenStudio/events","assignees_url":"https://api.github.com/repos/NREL/OpenStudio/assignees{/user}","branches_url":"https://api.github.com/repos/NREL/OpenStudio/branches{/branch}","tags_url":"https://api.github.com/repos/NREL/OpenStudio/tags","blobs_url":"https://api.github.com/repos/NREL/OpenStudio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NREL/OpenStudio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NREL/OpenStudio/git/refs{/sha}","trees_url":"https://api.github.com/repos/NREL/OpenStudio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NREL/OpenStudio/statuses/{sha}","languages_url":"https://api.github.com/repos/NREL/OpenStudio/languages","stargazers_url":"https://api.github.com/repos/NREL/OpenStudio/stargazers","contributors_url":"https://api.github.com/repos/NREL/OpenStudio/contributors","subscribers_url":"https://api.github.com/repos/NREL/OpenStudio/subscribers","subscription_url":"https://api.github.com/repos/NREL/OpenStudio/subscription","commits_url":"https://api.github.com/repos/NREL/OpenStudio/commits{/sha}","git_commits_url":"https://api.github.com/repos/NREL/OpenStudio/git/commits{/sha}","comments_url":"https://api.github.com/repos/NREL/OpenStudio/comments{/number}","issue_comment_url":"https://api.github.com/repos/NREL/OpenStudio/issues/comments{/number}","contents_url":"https://api.github.com/repos/NREL/OpenStudio/contents/{+path}","compare_url":"https://api.github.com/repos/NREL/OpenStudio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NREL/OpenStudio/merges","archive_url":"https://api.github.com/repos/NREL/OpenStudio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NREL/OpenStudio/downloads","issues_url":"https://api.github.com/repos/NREL/OpenStudio/issues{/number}","pulls_url":"https://api.github.com/repos/NREL/OpenStudio/pulls{/number}","milestones_url":"https://api.github.com/repos/NREL/OpenStudio/milestones{/number}","notifications_url":"https://api.github.com/repos/NREL/OpenStudio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NREL/OpenStudio/labels{/name}","releases_url":"https://api.github.com/repos/NREL/OpenStudio/releases{/id}","created_at":"2013-07-03T19:34:37Z","updated_at":"2015-03-27T17:27:11Z","pushed_at":"2015-03-27T19:48:40Z","git_url":"git://github.com/NREL/OpenStudio.git","ssh_url":"git@github.com:NREL/OpenStudio.git","clone_url":"https://github.com/NREL/OpenStudio.git","svn_url":"https://github.com/NREL/OpenStudio","homepage":"https://www.openstudio.net/","size":253088,"stargazers_count":74,"watchers_count":74,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":538,"forks":62,"open_issues":538,"watchers":74,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/NREL/OpenStudio/pulls/1565"},"html":{"href":"https://github.com/NREL/OpenStudio/pull/1565"},"issue":{"href":"https://api.github.com/repos/NREL/OpenStudio/issues/1565"},"comments":{"href":"https://api.github.com/repos/NREL/OpenStudio/issues/1565/comments"},"review_comments":{"href":"https://api.github.com/repos/NREL/OpenStudio/pulls/1565/comments"},"review_comment":{"href":"https://api.github.com/repos/NREL/OpenStudio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NREL/OpenStudio/pulls/1565/commits"},"statuses":{"href":"https://api.github.com/repos/NREL/OpenStudio/statuses/774489e67a21aea4c261fef4ebbb3198883aeed5"}}}}