{"id":22152,"date":"2017-05-08T15:43:13","date_gmt":"2017-05-08T07:43:13","guid":{"rendered":"https:\/\/www.deepin.org\/?page_id=22152"},"modified":"2018-06-06T21:42:29","modified_gmt":"2018-06-06T13:42:29","slug":"dock-plugin","status":"publish","type":"page","link":"https:\/\/www.deepin.org\/en\/developer-community\/dock-plugin\/","title":{"rendered":"Dock Plugin"},"content":{"rendered":"<h1>Preparation<\/h1>\n<p>Before developing the Dock plugin, you need to install some of the package and tools to assist the developing work. Execute the following command in terminal:<\/p>\n<pre>\u00a0sudo apt-get install dde-dock-dev build-essential qt5-qmake qt5-default qtcreator<\/pre>\n<p>In these packages, the qt5-default is optional, mainly configure qt5 instead of qt4 as the default development environment. If you don't understand this, install qt5-default directly.<\/p>\n<a href=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2016\/12\/helloworld.tar.gz\" class=\"su-button su-button-style-default\" style=\"color:#666666;background-color:#f1f3f1;border-color:#c1c3c1;border-radius:7px;-moz-border-radius:7px;-webkit-border-radius:7px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#666666;padding:7px 20px;font-size:16px;line-height:24px;border-color:#f6f7f6;border-radius:7px;-moz-border-radius:7px;-webkit-border-radius:7px;text-shadow:none;-moz-text-shadow:none;-webkit-text-shadow:none\"><i class=\"sui sui-download\" style=\"font-size:16px;color:#666666\"><\/i> Example<\/span><\/a> \u00a0 <a href=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2016\/12\/Dock-Plugin-API-en.pdf\" class=\"su-button su-button-style-default\" style=\"color:#666666;background-color:#f1f3f1;border-color:#c1c3c1;border-radius:7px;-moz-border-radius:7px;-webkit-border-radius:7px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#666666;padding:7px 20px;font-size:16px;line-height:24px;border-color:#f6f7f6;border-radius:7px;-moz-border-radius:7px;-webkit-border-radius:7px;text-shadow:none;-moz-text-shadow:none;-webkit-text-shadow:none\"><i class=\"sui sui-file-o\" style=\"font-size:16px;color:#666666\"><\/i> API Documentation<\/span><\/a> \u00a0 <a href=\"https:\/\/bbs.deepin.org\/forum.php?mod=forumdisplay&amp;fid=70\" class=\"su-button su-button-style-default\" style=\"color:#666666;background-color:#f1f3f1;border-color:#c1c3c1;border-radius:7px;-moz-border-radius:7px;-webkit-border-radius:7px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#666666;padding:7px 20px;font-size:16px;line-height:24px;border-color:#f6f7f6;border-radius:7px;-moz-border-radius:7px;-webkit-border-radius:7px;text-shadow:none;-moz-text-shadow:none;-webkit-text-shadow:none\"><i class=\"sui sui-cloud-upload\" style=\"font-size:16px;color:#666666\"><\/i> Upload<\/span><\/a>\n<p>&nbsp;<\/p>\n<h1 class=\"md-end-block md-heading\">Introduction with Images<\/h1>\n<p>1. Open QtCreator, created a new \"Qt Plugin\" project, for example, named \"helloworld\".<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-20326\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi1.png\" alt=\"deepin-dock-pluginapi1\" width=\"900\" height=\"478\" srcset=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi1.png 900w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi1-300x159.png 300w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi1-768x408.png 768w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi1-24x13.png 24w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi1-36x19.png 36w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi1-48x25.png 48w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-20327\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi2.png\" alt=\"deepin-dock-pluginapi2\" width=\"880\" height=\"548\" srcset=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi2.png 880w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi2-300x187.png 300w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi2-768x478.png 768w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi2-24x15.png 24w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi2-36x22.png 36w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi2-48x30.png 48w\" sizes=\"(max-width: 880px) 100vw, 880px\" \/><\/p>\n<p>2. Created a class named \"HelloWorldPlugin\" as the entry point of the plugin.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-20328\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi3.png\" alt=\"deepin-dock-pluginapi3\" width=\"900\" height=\"478\" srcset=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi3.png 900w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi3-300x159.png 300w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi3-768x408.png 768w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi3-24x13.png 24w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi3-36x19.png 36w, https:\/\/www.deepin.org\/wp-content\/uploads\/2017\/01\/deepin-dock-pluginapi3-48x25.png 48w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>3. After created the project, you need to modify some of the created project config.","protected":false},"excerpt":{"rendered":"<p>Preparation Before developing the Dock plugin, you need to install some of the package and tools to assist the developing work. Execute the following command in terminal: \u00a0sudo apt-get install dde-dock-dev build-essential qt5-qmake qt5-default qtcreator In these packages, the qt5-default is optional, mainly configure qt5 instead of qt4 as the default development environment. If you don't understand this, install qt5-default directly. \u00a0 \u00a0 &nbsp; Introduction with Images 1. Open QtCreator, created a new \"Qt Plugin\" project, for example, named \"helloworld\". 2. Created a class named \"HelloWorldPlugin\" as the entry point of the plugin. 3. After created the project, you need ...<a href=https:\/\/www.deepin.org\/en\/developer-community\/dock-plugin\/>Read more<\/a><\/p>\n","protected":false},"author":54,"featured_media":0,"parent":124,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.deepin.org\/en\/wp-json\/wp\/v2\/pages\/22152"}],"collection":[{"href":"https:\/\/www.deepin.org\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.deepin.org\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.deepin.org\/en\/wp-json\/wp\/v2\/users\/54"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deepin.org\/en\/wp-json\/wp\/v2\/comments?post=22152"}],"version-history":[{"count":24,"href":"https:\/\/www.deepin.org\/en\/wp-json\/wp\/v2\/pages\/22152\/revisions"}],"predecessor-version":[{"id":27696,"href":"https:\/\/www.deepin.org\/en\/wp-json\/wp\/v2\/pages\/22152\/revisions\/27696"}],"up":[{"embeddable":true,"href":"https:\/\/www.deepin.org\/en\/wp-json\/wp\/v2\/pages\/124"}],"wp:attachment":[{"href":"https:\/\/www.deepin.org\/en\/wp-json\/wp\/v2\/media?parent=22152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}