{"id":13084,"date":"2022-11-26T09:00:26","date_gmt":"2022-11-26T00:00:26","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=13084"},"modified":"2022-11-26T09:58:42","modified_gmt":"2022-11-26T00:58:42","slug":"pyqgis-tutorial-1-message-%ec%b6%9c%eb%a0%a5-%eb%93%b1ui%eb%a5%bc-%ed%86%b5%ed%95%9c-%ec%83%81%ed%98%b8%ec%9e%91%ec%9a%a9","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=13084","title":{"rendered":"pyQGIS\ub97c \uc774\uc6a9\ud55c \ubca1\ud130 \ub370\uc774\ud130 \ucc98\ub9ac 1 : Message, Progress \ucd9c\ub825"},"content":{"rendered":"<p><iframe loading=\"lazy\" width=\"1280\" height=\"720\" src=\"https:\/\/www.youtube.com\/embed\/JKsjj-hLP30\" title=\"pyQGIS\ub97c \uc774\uc6a9\ud55c \ubca1\ud130 \ub370\uc774\ud130 \ucc98\ub9ac: 1) Message, ProgressBar\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>QGIS \ud504\ub85c\uadf8\ub7a8 \uc548\uc5d0\uc11c \uc0ac\uc6a9\uc790\uc5d0\uac8c \uc5b4\ub5a4 \uba54\uc138\uc9c0\ub97c \uc804\ub2ec\ud558\uace0\uc790 \ud560 \ub54c\uc758 \ucf54\ub4dc\uc758 \uc608\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">\r\niface.messageBar().pushMessage(\"\uc548\ub155\ud558\uc138\uc694, pyQGIS\")\r\n<\/pre>\n<p>\uc2e4\ud589 \uacb0\uacfc\ub294 QGIS\uc758 \ub9f5\uc601\uc5ed \uc0c1\ub2e8\uc5d0 \ud45c\uc2dc\ub418\uba70 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2022\/11\/pyQGISmessage.jpg\" alt=\"\" width=\"897\" height=\"249\" class=\"alignnone size-full wp-image-13085\" \/><\/p>\n<p>iface\uc758 messageBar\ub97c \ud1b5\ud55c pushMessage \ub9e4\uc11c\ub4dc\ub294 \ub354 \ub9ce\uc740 \uc778\uc790\ub97c \ubc1b\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c \ucf54\ub4dc\ub97c \ubcf4\uba74\uc694.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">\r\niface.messageBar().pushMessage(\r\n    \"\ud658\uc601\", \r\n    \"\uc548\ub155\ud558\uc138\uc694, pyQGIS\",\r\n    level=Qgis.Success,\r\n    duration=5\r\n)\r\n<\/pre>\n<p>\uc544\ub798\uc758 \uc2e4\ud589 \uacb0\uacfc\ub97c \ud1b5\ud574 \uac01 \uc778\uc790\uc758 \uc758\ubbf8\ub97c \uc720\ucd94\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2022\/11\/pyQGISmessage2.jpg\" alt=\"\" width=\"926\" height=\"69\" class=\"alignnone size-full wp-image-13087\" \/><\/p>\n<p>\uc138\ubc88\uc9f8\uc640 \ub124\ubc88\uc9f8 \uc778\uc790\uc5d0 \ub300\ud574 \uc5b8\uae09\ud558\uba74 \uba3c\uc800 level \uc778\uc790\ub294 4\uac00\uc9c0 \uac12\uc744 \uac00\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4. Qgis.Critical, Qgis.Warning, Qgis.Info, Qgis.Success\uc774\uba70 \uac01\uac01 \uc5d0\ub7ec \uba54\uc138\uc9c0, \uacbd\uace0 \uba54\uc138\uc9c0, \uc815\ubcf4 \uba54\uc138\uc9c0, \uc131\uacf5 \uba54\uc138\uc9c0\uc5d0 \ub300\ud55c \uc544\uc774\ucf58\uc744 \ud45c\uc2dc\ud574 \uc90d\ub2c8\ub2e4. \uadf8\ub9ac\uace0 duration\uc740 \uba54\uc138\uc9c0\ub97c \uba87\ucd08\uac04 \ud45c\uc2dc\ud558\uace0 \uc0ac\ub77c\uc9c0\uac8c \ud560\uc9c0 \uc9c0\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>QGIS\uc5d0\uc11c\ub294 \uc2dc\uac04\uc774 \uc624\ub798 \uac78\ub9ac\ub294 \uc5f0\uc0b0\uc774 \ub9ce\uc774 \uc218\ud589\ub429\ub2c8\ub2e4. \uc774\ub54c \uc218\ud589\ub418\ub294 \uc5f0\uc0b0\uc758 \uc9c4\ud589\uc728\uc744 \uc0ac\uc6a9\uc790\uc5d0\uac8c \uc54c\ub824\uc8fc\ub294 \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">\r\nimport time\r\n\r\nprogressMessageBar = iface.messageBar().createMessage(\"\ucc98\ub9ac \uba54\uc138\uc9c0\")\r\n\r\nprogress = QProgressBar()\r\nprogress.setMaximum(100)\r\nprogressMessageBar.layout().addWidget(progress)\r\n\r\niface.messageBar().pushWidget(progressMessageBar, Qgis.Info)\r\n\r\nfor i in range(100):\r\n    time.sleep(0.01)\r\n    progress.setValue(i + 1)\r\n<\/pre>\n<p>time.sleep(0.01)\uc744 100\ubc88 \ud638\ucd9c\ud558\ubbc0\ub85c 1\ucd08\uc5d0 \uac78\uccd0 \ucd5c\ub300 100\uae4c\uc9c0 \uac12\uc744 \uc99d\uac00\uc2dc\ucf1c \uc9c4\ud589\uc728\uc744 \ud45c\uc2dc\ud569\ub2c8\ub2e4. \uc2e4\ud589\uacb0\uacfc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2022\/11\/pyQGISmessage3.jpg\" alt=\"\" width=\"756\" height=\"36\" class=\"alignnone size-full wp-image-13089\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>QGIS \ud504\ub85c\uadf8\ub7a8 \uc548\uc5d0\uc11c \uc0ac\uc6a9\uc790\uc5d0\uac8c \uc5b4\ub5a4 \uba54\uc138\uc9c0\ub97c \uc804\ub2ec\ud558\uace0\uc790 \ud560 \ub54c\uc758 \ucf54\ub4dc\uc758 \uc608\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. iface.messageBar().pushMessage(&#8220;\uc548\ub155\ud558\uc138\uc694, pyQGIS&#8221;) \uc2e4\ud589 \uacb0\uacfc\ub294 QGIS\uc758 \ub9f5\uc601\uc5ed \uc0c1\ub2e8\uc5d0 \ud45c\uc2dc\ub418\uba70 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. iface\uc758 messageBar\ub97c \ud1b5\ud55c pushMessage \ub9e4\uc11c\ub4dc\ub294 \ub354 \ub9ce\uc740 \uc778\uc790\ub97c \ubc1b\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c \ucf54\ub4dc\ub97c \ubcf4\uba74\uc694. iface.messageBar().pushMessage( &#8220;\ud658\uc601&#8221;, &#8220;\uc548\ub155\ud558\uc138\uc694, pyQGIS&#8221;, level=Qgis.Success, duration=5 ) \uc544\ub798\uc758 \uc2e4\ud589 \uacb0\uacfc\ub97c \ud1b5\ud574 \uac01 \uc778\uc790\uc758 \uc758\ubbf8\ub97c \uc720\ucd94\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc138\ubc88\uc9f8\uc640 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=13084\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;pyQGIS\ub97c \uc774\uc6a9\ud55c \ubca1\ud130 \ub370\uc774\ud130 \ucc98\ub9ac 1 : Message, Progress \ucd9c\ub825&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[146],"tags":[],"class_list":["post-13084","post","type-post","status-publish","format-standard","hentry","category-pyqgis"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/13084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13084"}],"version-history":[{"count":7,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/13084\/revisions"}],"predecessor-version":[{"id":13185,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/13084\/revisions\/13185"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13084"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}