diff --git a/404.html b/404.html index c818326c0..3f820faf3 100644 --- a/404.html +++ b/404.html @@ -3,7 +3,7 @@ - + Page Not Found @@ -20,9 +20,9 @@

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + - + \ No newline at end of file diff --git a/blog/index.html b/blog/index.html index c351afa17..da3603695 100644 --- a/blog/index.html +++ b/blog/index.html @@ -3,7 +3,7 @@ - + Blog @@ -24,9 +24,9 @@

Welcome

May 30, 2019
Atul R

Atul R

Maintainer @NodeGui

This is the new blog site for NodeGui. This will be updated soon.

- + - + diff --git a/blog/tags/hello/index.html b/blog/tags/hello/index.html index 396a78568..f25948ae2 100644 --- a/blog/tags/hello/index.html +++ b/blog/tags/hello/index.html @@ -3,7 +3,7 @@ - + Blog | Tagged "hello" @@ -24,9 +24,9 @@

1 post(s) tagged with "hello"

View All Tags

Welcome

May 30, 2019
Atul R

Atul R

Maintainer @NodeGui

This is the new blog site for NodeGui. This will be updated soon.

- + - + diff --git a/blog/tags/index.html b/blog/tags/index.html index bc55b8b63..3ce25030b 100644 --- a/blog/tags/index.html +++ b/blog/tags/index.html @@ -3,7 +3,7 @@ - + Blog Tags @@ -22,9 +22,9 @@
- + - + diff --git a/blog/tags/nodegui/index.html b/blog/tags/nodegui/index.html index 453310ace..e036f3ec3 100644 --- a/blog/tags/nodegui/index.html +++ b/blog/tags/nodegui/index.html @@ -3,7 +3,7 @@ - + Blog | Tagged "nodegui" @@ -24,9 +24,9 @@

1 post(s) tagged with "nodegui"

View All Tags

Welcome

May 30, 2019
Atul R

Atul R

Maintainer @NodeGui

This is the new blog site for NodeGui. This will be updated soon.

- + - + diff --git a/blog/welcome/index.html b/blog/welcome/index.html index 5d92cc333..59cddc748 100644 --- a/blog/welcome/index.html +++ b/blog/welcome/index.html @@ -3,7 +3,7 @@ - + Welcome @@ -24,9 +24,9 @@

Welcome

May 30, 2019
Atul R

Atul R

Maintainer @NodeGui

This is the new blog site for NodeGui. This will be updated soon.

- + - + diff --git a/chunk-map.json b/chunk-map.json index caf1ab557..57fbec012 100644 --- a/chunk-map.json +++ b/chunk-map.json @@ -1,7 +1,7 @@ { "main": [ "/main.f66713773e9ba37b90fe.css", - "/main.df23129c6a8dca8ab908.js" + "/main.8d444715bf5acf76b69f.js" ], "component---site-src-pages-index-jsc-4-f-f99": [ "/component---site-src-pages-index-jsc-4-f-f99.71bf8f44fd9ac59b6a50.css", @@ -30,365 +30,365 @@ "/component---theme-doc-legacy-page-9-e-7-ca5.f5d90ad6613508f9bb4b.js" ], "docsMetadata---docs-150-2d6": [ - "/docsMetadata---docs-150-2d6.dbac39bfa2e3d6968559.js" + "/docsMetadata---docs-150-2d6.bf705dd7e91425af443a.js" ], "component---theme-doc-legacy-item-031-769": [ "/component---theme-doc-legacy-item-031-769.1f1ce10374de019f5d3a.css", "/component---theme-doc-legacy-item-031-769.89c72f3cd114f0722210.js" ], - "content---docs-faq-048-db5": [ - "/content---docs-faq-048-db5.5525c687cb63aa66b087.js" - ], - "metadata---docs-faq-59-d-2b9": [ - "/metadata---docs-faq-59-d-2b9.fac6dd94ae51c2c0aa28.js" - ], "content---docs-doc-1-b-2-f-e80": [ - "/content---docs-doc-1-b-2-f-e80.155f26d0e2515ddecad7.js" + "/content---docs-doc-1-b-2-f-e80.ddd073b1341446b818e6.js" ], "metadata---docs-doc-12-a-3-5a1": [ - "/metadata---docs-doc-12-a-3-5a1.f3b9bb0d78acf6a22788.js" - ], - "content---docs-development-common-errorsf-15-a5b": [ - "/content---docs-development-common-errorsf-15-a5b.3c446456ebcde11f2e0c.js" - ], - "metadata---docs-development-common-errors-402-ef4": [ - "/metadata---docs-development-common-errors-402-ef4.2278b16151ee83b70d42.js" - ], - "content---docs-development-readme-149-437": [ - "/content---docs-development-readme-149-437.88d3682f8536e933a815.js" - ], - "metadata---docs-development-readm-ec-6-c-332": [ - "/metadata---docs-development-readm-ec-6-c-332.89a6ec882abd5a9d2dbf.js" + "/metadata---docs-doc-12-a-3-5a1.f25ce25e5861f75b58b8.js" ], "content---docs-development-debuggingb-54-9ed": [ - "/content---docs-development-debuggingb-54-9ed.d76308cc2f9733de248d.js" + "/content---docs-development-debuggingb-54-9ed.4f82aa6c1fa69c252786.js" ], "metadata---docs-development-debuggingc-36-26a": [ - "/metadata---docs-development-debuggingc-36-26a.ece7f5fe52e59a94edc7.js" + "/metadata---docs-development-debuggingc-36-26a.64754469222720788ce3.js" ], "content---docs-development-getting-started-139-387": [ - "/content---docs-development-getting-started-139-387.9789bece43bb79d98058.js" + "/content---docs-development-getting-started-139-387.c6e8d2bbfc2d32220f5c.js" ], "metadata---docs-development-getting-started-89-b-c7a": [ - "/metadata---docs-development-getting-started-89-b-c7a.7cb9980eac431c87f351.js" + "/metadata---docs-development-getting-started-89-b-c7a.fb9319d03e6e86a45c0e.js" + ], + "content---docs-faq-048-db5": [ + "/content---docs-faq-048-db5.308d32219777536fd0c1.js" + ], + "metadata---docs-faq-59-d-2b9": [ + "/metadata---docs-faq-59-d-2b9.5d114d4e232f1a0cf459.js" ], "content---docs-development-setting-up-28-c-666": [ - "/content---docs-development-setting-up-28-c-666.93469fbea5d970326d62.js" + "/content---docs-development-setting-up-28-c-666.f8486e337d7e2d0b3177.js" ], "metadata---docs-development-setting-up-979-75f": [ - "/metadata---docs-development-setting-up-979-75f.2dc3a735cddac97a14cc.js" - ], - "content---docs-development-signal-and-event-handling-7-d-4-f3f": [ - "/content---docs-development-signal-and-event-handling-7-d-4-f3f.8f1478c9222a4363963f.js" - ], - "metadata---docs-development-signal-and-event-handling-0-b-5-692": [ - "/metadata---docs-development-signal-and-event-handling-0-b-5-692.96786c0bf5b413a0c737.js" - ], - "content---docs-development-wrapping-widgets-84-b-538": [ - "/content---docs-development-wrapping-widgets-84-b-538.d89aa40f77ccea2817e5.js" - ], - "metadata---docs-development-wrapping-widgets-303-fb8": [ - "/metadata---docs-development-wrapping-widgets-303-fb8.7de59ea4ff29a4f9f36c.js" + "/metadata---docs-development-setting-up-979-75f.3b741015d72dfa75b196.js" ], "content---docs-development-styling-293-cad": [ - "/content---docs-development-styling-293-cad.7a035f4c17a4f8b41e6d.js" + "/content---docs-development-styling-293-cad.4a8b2b2aed4392cce082.js" ], "metadata---docs-development-styling-1-c-2-0d6": [ - "/metadata---docs-development-styling-1-c-2-0d6.8829c5502955ccec4576.js" + "/metadata---docs-development-styling-1-c-2-0d6.8540757286a4f42cfdf6.js" + ], + "content---docs-development-signal-and-event-handling-7-d-4-f3f": [ + "/content---docs-development-signal-and-event-handling-7-d-4-f3f.49f8d18d02694764da59.js" + ], + "metadata---docs-development-signal-and-event-handling-0-b-5-692": [ + "/metadata---docs-development-signal-and-event-handling-0-b-5-692.35b33da93ce5da99e907.js" + ], + "content---docs-development-wrapping-widgets-84-b-538": [ + "/content---docs-development-wrapping-widgets-84-b-538.ee884707b55dee4704c9.js" + ], + "metadata---docs-development-wrapping-widgets-303-fb8": [ + "/metadata---docs-development-wrapping-widgets-303-fb8.2d38d581040b086d6d3b.js" ], "content---docs-api-component-4-ef-195": [ - "/content---docs-api-component-4-ef-195.ac86aa3082e629a0fd98.js" + "/content---docs-api-component-4-ef-195.1e360de96ebacb00f20d.js" ], "metadata---docs-api-component-3-e-5-43d": [ - "/metadata---docs-api-component-3-e-5-43d.9b39404632ecfdb50982.js" - ], - "content---docs-api-flex-layout-3-dc-a16": [ - "/content---docs-api-flex-layout-3-dc-a16.e9a291d5978a978e915d.js" - ], - "metadata---docs-api-flex-layoutecf-540": [ - "/metadata---docs-api-flex-layoutecf-540.ca6234a76603a3721091.js" + "/metadata---docs-api-component-3-e-5-43d.bb8314c7d47b206d9b67.js" ], "content---docs-api-event-widgetac-6-11b": [ - "/content---docs-api-event-widgetac-6-11b.ea7e99ed29f9723e18e6.js" + "/content---docs-api-event-widgetac-6-11b.2d175fd230d2b7d3074c.js" ], "metadata---docs-api-event-widget-39-a-9ea": [ - "/metadata---docs-api-event-widget-39-a-9ea.3983b253515b2f468440.js" + "/metadata---docs-api-event-widget-39-a-9ea.c325827a7e2ec2b04e2c.js" ], - "content---docs-api-node-widget-080-a39": [ - "/content---docs-api-node-widget-080-a39.fdf17f177a4ce4b722a9.js" + "content---docs-api-flex-layout-3-dc-a16": [ + "/content---docs-api-flex-layout-3-dc-a16.d9197beb7ed7082424b9.js" ], - "metadata---docs-api-node-widgeta-92-a4f": [ - "/metadata---docs-api-node-widgeta-92-a4f.15d6f9a9b198fb1c83f8.js" + "metadata---docs-api-flex-layoutecf-540": [ + "/metadata---docs-api-flex-layoutecf-540.7d8d1f213636d427c23a.js" ], "content---docs-api-node-layoutd-28-11a": [ - "/content---docs-api-node-layoutd-28-11a.847e9d4d8496c50cdba3.js" + "/content---docs-api-node-layoutd-28-11a.7f96edb54add3535633a.js" ], "metadata---docs-api-node-layout-1-e-9-c15": [ - "/metadata---docs-api-node-layout-1-e-9-c15.9cc3a52940035afa4a55.js" + "/metadata---docs-api-node-layout-1-e-9-c15.14259600bacb115017fa.js" + ], + "content---docs-api-node-widget-080-a39": [ + "/content---docs-api-node-widget-080-a39.4809ef000dc72fd628b4.js" + ], + "metadata---docs-api-node-widgeta-92-a4f": [ + "/metadata---docs-api-node-widgeta-92-a4f.09a44256617fb7cf73e0.js" ], "content---docs-api-q-abstract-slider-3-e-0-54d": [ - "/content---docs-api-q-abstract-slider-3-e-0-54d.8809abfe357004f7d063.js" + "/content---docs-api-q-abstract-slider-3-e-0-54d.33bf2f3d144bd7c5df0b.js" ], "metadata---docs-api-q-abstract-sliderdfa-ab7": [ - "/metadata---docs-api-q-abstract-sliderdfa-ab7.d238f455e58818870dd6.js" + "/metadata---docs-api-q-abstract-sliderdfa-ab7.b9fda1be4def5e55beb5.js" ], "content---docs-api-q-applicationd-3-e-0a3": [ - "/content---docs-api-q-applicationd-3-e-0a3.5ba1fb22df7f78d91cfe.js" + "/content---docs-api-q-applicationd-3-e-0a3.a21dbe352b92a02ae653.js" ], "metadata---docs-api-q-applicationc-1-d-8a4": [ - "/metadata---docs-api-q-applicationc-1-d-8a4.0d8cd2b346473211ab17.js" - ], - "content---docs-api-q-check-boxd-9-b-c95": [ - "/content---docs-api-q-check-boxd-9-b-c95.f20de1581af2b72e6825.js" - ], - "metadata---docs-api-q-check-box-132-293": [ - "/metadata---docs-api-q-check-box-132-293.f6f40baaa756bcf823f3.js" + "/metadata---docs-api-q-applicationc-1-d-8a4.d3c601c1cbaf23a28e47.js" ], "content---docs-api-q-action-051-425": [ - "/content---docs-api-q-action-051-425.4498dbda0355b4f799f6.js" + "/content---docs-api-q-action-051-425.4032133d5c1f0eeb0028.js" ], "metadata---docs-api-q-actioncfb-cfc": [ - "/metadata---docs-api-q-actioncfb-cfc.8280c5c7e256edca447e.js" + "/metadata---docs-api-q-actioncfb-cfc.c0e1a0072fa9fa574a4e.js" ], - "content---docs-api-q-abstract-scroll-area-3-e-6-d7f": [ - "/content---docs-api-q-abstract-scroll-area-3-e-6-d7f.11049cd8c56d47f16e47.js" + "content---docs-api-q-check-boxd-9-b-c95": [ + "/content---docs-api-q-check-boxd-9-b-c95.f4343402981e369422f1.js" ], - "metadata---docs-api-q-abstract-scroll-area-59-d-279": [ - "/metadata---docs-api-q-abstract-scroll-area-59-d-279.c37831b751e416067786.js" + "metadata---docs-api-q-check-box-132-293": [ + "/metadata---docs-api-q-check-box-132-293.e2275c586f1fa38b153a.js" ], "content---docs-api-q-clipboard-69-d-2ef": [ - "/content---docs-api-q-clipboard-69-d-2ef.37d806252ceae9ce9066.js" + "/content---docs-api-q-clipboard-69-d-2ef.2e66daf3759a1023c6af.js" ], "metadata---docs-api-q-clipboard-486-b21": [ - "/metadata---docs-api-q-clipboard-486-b21.0d081407e4731ac1d902.js" - ], - "content---docs-api-q-dial-80-b-99a": [ - "/content---docs-api-q-dial-80-b-99a.4f88543f01722ffa22a9.js" - ], - "metadata---docs-api-q-dialbfb-aef": [ - "/metadata---docs-api-q-dialbfb-aef.14cf6fc384352f5e906c.js" - ], - "content---docs-api-q-grid-layouta-4-e-552": [ - "/content---docs-api-q-grid-layouta-4-e-552.18fc004232075bb70ff7.js" - ], - "metadata---docs-api-q-grid-layout-7-db-030": [ - "/metadata---docs-api-q-grid-layout-7-db-030.1b4418c30294e7920975.js" + "/metadata---docs-api-q-clipboard-486-b21.fcd03aff3248524dc8f5.js" ], "content---docs-api-q-cursor-362-d51": [ - "/content---docs-api-q-cursor-362-d51.a8951173d79cc5b6743b.js" + "/content---docs-api-q-cursor-362-d51.d7f2f5cef2bb3d6bbab7.js" ], "metadata---docs-api-q-cursor-887-11e": [ - "/metadata---docs-api-q-cursor-887-11e.155beb474ce4b9a123a3.js" + "/metadata---docs-api-q-cursor-887-11e.2ca40fd02ed552bd73a0.js" ], - "content---docs-api-q-label-2-f-9-04b": [ - "/content---docs-api-q-label-2-f-9-04b.36c3d2c55db21788f964.js" + "content---docs-api-q-dial-80-b-99a": [ + "/content---docs-api-q-dial-80-b-99a.0840ed72631e3e799a59.js" ], - "metadata---docs-api-q-label-165-210": [ - "/metadata---docs-api-q-label-165-210.5f49e6eaa464f0e20e46.js" - ], - "content---docs-api-q-key-sequence-6-b-2-ebe": [ - "/content---docs-api-q-key-sequence-6-b-2-ebe.030be1701aa851096d50.js" - ], - "metadata---docs-api-q-key-sequence-623-1a1": [ - "/metadata---docs-api-q-key-sequence-623-1a1.4368978c57564e220a16.js" - ], - "content---docs-api-q-line-editea-0-53d": [ - "/content---docs-api-q-line-editea-0-53d.fefd53f666fefaddd62a.js" - ], - "metadata---docs-api-q-line-edit-13-f-b8a": [ - "/metadata---docs-api-q-line-edit-13-f-b8a.6ff72d32eab993d3ae53.js" + "metadata---docs-api-q-dialbfb-aef": [ + "/metadata---docs-api-q-dialbfb-aef.ba6578fc738da9ae890f.js" ], "content---docs-api-q-icone-5-f-b0d": [ - "/content---docs-api-q-icone-5-f-b0d.ba5e99f7546b1f2ecbd6.js" + "/content---docs-api-q-icone-5-f-b0d.78bdb97f434bec83087f.js" ], "metadata---docs-api-q-icone-6-d-093": [ - "/metadata---docs-api-q-icone-6-d-093.475fb513784156ad8449.js" + "/metadata---docs-api-q-icone-6-d-093.9de3a345411f18b995e1.js" ], - "content---docs-api-q-menu-39-e-ecd": [ - "/content---docs-api-q-menu-39-e-ecd.923b1cbe5c188c45d9eb.js" + "content---docs-api-q-grid-layouta-4-e-552": [ + "/content---docs-api-q-grid-layouta-4-e-552.0af8922fd4b8cc1894d9.js" ], - "metadata---docs-api-q-menuc-6-b-9ab": [ - "/metadata---docs-api-q-menuc-6-b-9ab.dd1782d6fb79d439483f.js" + "metadata---docs-api-q-grid-layout-7-db-030": [ + "/metadata---docs-api-q-grid-layout-7-db-030.20655fb8ee969b611f58.js" ], - "content---docs-api-q-pixmap-8-dd-cb2": [ - "/content---docs-api-q-pixmap-8-dd-cb2.9c5d57a238adc65ab809.js" + "content---docs-api-q-key-sequence-6-b-2-ebe": [ + "/content---docs-api-q-key-sequence-6-b-2-ebe.e1775d3e8d629cf9408f.js" ], - "metadata---docs-api-q-pixmapfdf-820": [ - "/metadata---docs-api-q-pixmapfdf-820.72c507a3c613398100d9.js" + "metadata---docs-api-q-key-sequence-623-1a1": [ + "/metadata---docs-api-q-key-sequence-623-1a1.265559f693467c9e306d.js" + ], + "content---docs-api-q-label-2-f-9-04b": [ + "/content---docs-api-q-label-2-f-9-04b.a222a4cffb59fdbc1ab4.js" + ], + "metadata---docs-api-q-label-165-210": [ + "/metadata---docs-api-q-label-165-210.4c95a2dcffba11d998f5.js" + ], + "content---docs-api-q-line-editea-0-53d": [ + "/content---docs-api-q-line-editea-0-53d.2105b986bf0579235eb1.js" + ], + "metadata---docs-api-q-line-edit-13-f-b8a": [ + "/metadata---docs-api-q-line-edit-13-f-b8a.36fce5750d4eec4abf7a.js" ], "content---docs-api-q-main-window-0-e-7-299": [ - "/content---docs-api-q-main-window-0-e-7-299.e0854f14e4725b528b19.js" + "/content---docs-api-q-main-window-0-e-7-299.dfc37db8803910eb1225.js" ], "metadata---docs-api-q-main-window-04-f-efb": [ - "/metadata---docs-api-q-main-window-04-f-efb.0591632b4db762f30099.js" + "/metadata---docs-api-q-main-window-04-f-efb.dfd696d0b4623fd650fb.js" + ], + "content---docs-api-q-menu-39-e-ecd": [ + "/content---docs-api-q-menu-39-e-ecd.6e2620c7e68119421801.js" + ], + "metadata---docs-api-q-menuc-6-b-9ab": [ + "/metadata---docs-api-q-menuc-6-b-9ab.9bf26515e2ae57334d41.js" ], "content---docs-api-q-menu-bar-8-d-2-872": [ - "/content---docs-api-q-menu-bar-8-d-2-872.fdf8987a4bf88fc8901e.js" + "/content---docs-api-q-menu-bar-8-d-2-872.06cfac88ec0e61c045e0.js" ], "metadata---docs-api-q-menu-bare-25-882": [ - "/metadata---docs-api-q-menu-bare-25-882.1fa4c845b8584b483b86.js" + "/metadata---docs-api-q-menu-bare-25-882.606e323867fa55a91b8b.js" + ], + "content---docs-api-q-pixmap-8-dd-cb2": [ + "/content---docs-api-q-pixmap-8-dd-cb2.134596b75d5f36bf0bcb.js" + ], + "metadata---docs-api-q-pixmapfdf-820": [ + "/metadata---docs-api-q-pixmapfdf-820.dedac9f14bb09dc6ef90.js" ], "content---docs-api-q-plain-text-edit-7-c-8-081": [ - "/content---docs-api-q-plain-text-edit-7-c-8-081.9db7524cdd62d2a47a9f.js" + "/content---docs-api-q-plain-text-edit-7-c-8-081.251254f4aa01dcd7a551.js" ], "metadata---docs-api-q-plain-text-edit-161-ecc": [ - "/metadata---docs-api-q-plain-text-edit-161-ecc.7cdd26f1914f8ca77d53.js" - ], - "content---docs-api-q-push-button-06-c-73e": [ - "/content---docs-api-q-push-button-06-c-73e.658e7b21e29049ac304b.js" - ], - "metadata---docs-api-q-push-button-96-d-c92": [ - "/metadata---docs-api-q-push-button-96-d-c92.cec82aa08fc0493ebc84.js" + "/metadata---docs-api-q-plain-text-edit-161-ecc.281752317bb6261bec64.js" ], "content---docs-api-q-progress-barc-46-afe": [ - "/content---docs-api-q-progress-barc-46-afe.40cb24422798867a7abd.js" + "/content---docs-api-q-progress-barc-46-afe.ba83fcc6e1f4191f3ce3.js" ], "metadata---docs-api-q-progress-bar-43-d-07e": [ - "/metadata---docs-api-q-progress-bar-43-d-07e.e9ed6760ad1f932febd4.js" + "/metadata---docs-api-q-progress-bar-43-d-07e.4b4a8e422871290718d3.js" + ], + "content---docs-api-q-push-button-06-c-73e": [ + "/content---docs-api-q-push-button-06-c-73e.340b06cd16b877f6ec50.js" + ], + "metadata---docs-api-q-push-button-96-d-c92": [ + "/metadata---docs-api-q-push-button-96-d-c92.84f3786728982928ac81.js" ], "content---docs-api-q-radio-buttone-54-746": [ - "/content---docs-api-q-radio-buttone-54-746.a6bc25d8a8096f9cf66c.js" + "/content---docs-api-q-radio-buttone-54-746.4fd2d6429a0724f456db.js" ], "metadata---docs-api-q-radio-button-367-f7c": [ - "/metadata---docs-api-q-radio-button-367-f7c.b3daca0385d4d56b5349.js" + "/metadata---docs-api-q-radio-button-367-f7c.5c69d7be23b06f0b2aa5.js" ], "content---docs-api-q-scroll-area-8-c-4-3fd": [ - "/content---docs-api-q-scroll-area-8-c-4-3fd.a89daa731969b2d3f2a5.js" + "/content---docs-api-q-scroll-area-8-c-4-3fd.bfb906cd2cf5da9998d4.js" ], "metadata---docs-api-q-scroll-area-46-a-96e": [ - "/metadata---docs-api-q-scroll-area-46-a-96e.04a812277402d3a8e819.js" + "/metadata---docs-api-q-scroll-area-46-a-96e.7ce4f18eed24d386b901.js" ], "content---docs-api-q-shortcut-271-2d3": [ - "/content---docs-api-q-shortcut-271-2d3.a23160cb2c5ac65e7c60.js" + "/content---docs-api-q-shortcut-271-2d3.c5bb55a6df222e8368a2.js" ], "metadata---docs-api-q-shortcut-5-e-7-1aa": [ - "/metadata---docs-api-q-shortcut-5-e-7-1aa.88762d3d7fb8ccc3c204.js" - ], - "content---docs-api-q-tab-widget-508-95e": [ - "/content---docs-api-q-tab-widget-508-95e.5ece3d8e00fddb1469c1.js" - ], - "metadata---docs-api-q-tab-widgetebc-5aa": [ - "/metadata---docs-api-q-tab-widgetebc-5aa.1c2702d1aaedf58cadb0.js" - ], - "content---docs-api-q-system-tray-icon-4-b-8-4c7": [ - "/content---docs-api-q-system-tray-icon-4-b-8-4c7.c1c846e0aa1550a71fed.js" - ], - "metadata---docs-api-q-system-tray-icon-711-f90": [ - "/metadata---docs-api-q-system-tray-icon-711-f90.0b37c5f9af3987644ba9.js" - ], - "content---docs-api-q-widget-04-a-59f": [ - "/content---docs-api-q-widget-04-a-59f.b622c9de949ee036de5d.js" - ], - "metadata---docs-api-q-widget-287-e6c": [ - "/metadata---docs-api-q-widget-287-e6c.5cbf78a727e1cde95092.js" + "/metadata---docs-api-q-shortcut-5-e-7-1aa.c5ad5be12868b939f812.js" ], "content---docs-api-q-spin-box-1-ce-bfd": [ - "/content---docs-api-q-spin-box-1-ce-bfd.722df01f421031412fb8.js" + "/content---docs-api-q-spin-box-1-ce-bfd.760074f7b54e25049cd1.js" ], "metadata---docs-api-q-spin-box-809-ae0": [ - "/metadata---docs-api-q-spin-box-809-ae0.69bd6d9dfa703ffe4d2c.js" + "/metadata---docs-api-q-spin-box-809-ae0.aace0298c10637079d95.js" ], - "content---docs-api-yoga-widgeta-42-cc7": [ - "/content---docs-api-yoga-widgeta-42-cc7.b1a320dbb203d69d51cd.js" + "content---docs-api-q-system-tray-icon-4-b-8-4c7": [ + "/content---docs-api-q-system-tray-icon-4-b-8-4c7.1932a9ead5197196726f.js" ], - "metadata---docs-api-yoga-widget-95-c-f8b": [ - "/metadata---docs-api-yoga-widget-95-c-f8b.4288592a965b2478e365.js" + "metadata---docs-api-q-system-tray-icon-711-f90": [ + "/metadata---docs-api-q-system-tray-icon-711-f90.cb86c7c41e771286636c.js" + ], + "content---docs-api-q-tab-widget-508-95e": [ + "/content---docs-api-q-tab-widget-508-95e.bc25a321407c21e0e331.js" + ], + "metadata---docs-api-q-tab-widgetebc-5aa": [ + "/metadata---docs-api-q-tab-widgetebc-5aa.fbfda6490f02cae23799.js" + ], + "content---docs-api-q-widget-04-a-59f": [ + "/content---docs-api-q-widget-04-a-59f.fdaeee1f1b8db4b398c8.js" + ], + "metadata---docs-api-q-widget-287-e6c": [ + "/metadata---docs-api-q-widget-287-e6c.752cd1b3016df638f94a.js" ], "content---docs-api-qt-enumsfd-7-cf3": [ - "/content---docs-api-qt-enumsfd-7-cf3.e7202e3e187c517ff19b.js" + "/content---docs-api-qt-enumsfd-7-cf3.409fb94f6d91a1286f2d.js" ], "metadata---docs-api-qt-enums-423-cf9": [ - "/metadata---docs-api-qt-enums-423-cf9.799ad4b2f7ae2ad9e3e5.js" + "/metadata---docs-api-qt-enums-423-cf9.9c502c0df6e86ab24cca.js" + ], + "content---docs-api-yoga-widgeta-42-cc7": [ + "/content---docs-api-yoga-widgeta-42-cc7.74a45daabc42f256151b.js" + ], + "metadata---docs-api-yoga-widget-95-c-f8b": [ + "/metadata---docs-api-yoga-widget-95-c-f8b.7d9a86f2886eb45b6048.js" ], "content---docs-api-process-5-ec-b1e": [ - "/content---docs-api-process-5-ec-b1e.0e51f069220cb4cdb517.js" + "/content---docs-api-process-5-ec-b1e.f86de99d938d1de81693.js" ], "metadata---docs-api-process-32-d-09e": [ - "/metadata---docs-api-process-32-d-09e.eba5fff2f66bf0bc66c9.js" + "/metadata---docs-api-process-32-d-09e.b25027bb34874c2ec738.js" ], "content---docs-api-synopsis-7-bb-e1c": [ - "/content---docs-api-synopsis-7-bb-e1c.fd9a9dedb6493fbec889.js" + "/content---docs-api-synopsis-7-bb-e1c.965b0780ea42fdecf6df.js" ], "metadata---docs-api-synopsis-21-f-a62": [ - "/metadata---docs-api-synopsis-21-f-a62.6465165dff9d1055905a.js" + "/metadata---docs-api-synopsis-21-f-a62.c56bf2a521ae6b497e20.js" + ], + "content---docs-guides-custom-nodegui-native-plugin-632-9db": [ + "/content---docs-guides-custom-nodegui-native-plugin-632-9db.69e4f9d5cf0b7d406d30.js" + ], + "metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f": [ + "/metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f.63d65d8e47af687086a3.js" + ], + "content---docs-guides-debugging-in-vscodebd-7-cec": [ + "/content---docs-guides-debugging-in-vscodebd-7-cec.7d98672e5a72962fe44f.js" + ], + "metadata---docs-guides-debugging-in-vscodebf-8-5b0": [ + "/metadata---docs-guides-debugging-in-vscodebf-8-5b0.aa11112a440d189ae143.js" + ], + "content---docs-guides-debuggingf-3-f-cf5": [ + "/content---docs-guides-debuggingf-3-f-cf5.d0acd8666bd57a06338c.js" + ], + "metadata---docs-guides-debugging-970-fb8": [ + "/metadata---docs-guides-debugging-970-fb8.05d6da3585364e561eac.js" ], "content---docs-guides-getting-startedc-9-e-20f": [ - "/content---docs-guides-getting-startedc-9-e-20f.ab2cfcda0993e1d7f4aa.js" + "/content---docs-guides-getting-startedc-9-e-20f.2f06552f5a1f946c3ba8.js" ], "metadata---docs-guides-getting-started-2-b-7-1a4": [ "/metadata---docs-guides-getting-started-2-b-7-1a4.e5d14670e71cc0a6374f.js" ], - "content---docs-guides-debuggingf-3-f-cf5": [ - "/content---docs-guides-debuggingf-3-f-cf5.0e5e6363c35844ddb164.js" - ], - "metadata---docs-guides-debugging-970-fb8": [ - "/metadata---docs-guides-debugging-970-fb8.6d5daf600011c2bbb3d0.js" - ], - "content---docs-guides-debugging-in-vscodebd-7-cec": [ - "/content---docs-guides-debugging-in-vscodebd-7-cec.216a1ec2b1810da330e8.js" - ], - "metadata---docs-guides-debugging-in-vscodebf-8-5b0": [ - "/metadata---docs-guides-debugging-in-vscodebf-8-5b0.391f49f7fdbdeb652131.js" - ], - "content---docs-guides-custom-nodegui-native-plugin-632-9db": [ - "/content---docs-guides-custom-nodegui-native-plugin-632-9db.95323b60cd95d318e46d.js" - ], - "metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f": [ - "/metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f.111c69f6181f9610cd3a.js" - ], - "content---docs-guides-images-991-065": [ - "/content---docs-guides-images-991-065.51a08c5cfcb7493ad2c0.js" - ], - "metadata---docs-guides-images-915-5ee": [ - "/metadata---docs-guides-images-915-5ee.73d32cbb57e807926c33.js" - ], "content---docs-guides-handle-events-160-4b0": [ - "/content---docs-guides-handle-events-160-4b0.fe5fb2010d2e8cadf3a1.js" + "/content---docs-guides-handle-events-160-4b0.9ed14b92a65cd0e938a5.js" ], "metadata---docs-guides-handle-events-5-eb-540": [ - "/metadata---docs-guides-handle-events-5-eb-540.b339e07967c7ac77fa33.js" + "/metadata---docs-guides-handle-events-5-eb-540.ada1b27a8ef4d934f262.js" + ], + "content---docs-guides-images-991-065": [ + "/content---docs-guides-images-991-065.b0aff2bd6627ac4b896a.js" + ], + "metadata---docs-guides-images-915-5ee": [ + "/metadata---docs-guides-images-915-5ee.5818714c1c2236829cd9.js" ], "content---docs-guides-layoutdf-5-a64": [ - "/content---docs-guides-layoutdf-5-a64.4934a0cf62b893749063.js" + "/content---docs-guides-layoutdf-5-a64.bf9d4c29efde527ff301.js" ], "metadata---docs-guides-layoutf-65-d7d": [ - "/metadata---docs-guides-layoutf-65-d7d.2ce91fdc2faeac2302fc.js" - ], - "content---docs-guides-scroll-view-76-e-87c": [ - "/content---docs-guides-scroll-view-76-e-87c.fda5184f1e490846605b.js" - ], - "metadata---docs-guides-scroll-view-9-a-9-2ac": [ - "/metadata---docs-guides-scroll-view-9-a-9-2ac.e6132cbe30a884a62018.js" - ], - "content---docs-guides-tutoriale-53-6ab": [ - "/content---docs-guides-tutoriale-53-6ab.b35f6bf3928554740dad.js" - ], - "metadata---docs-guides-tutorial-1-f-1-23b": [ - "/metadata---docs-guides-tutorial-1-f-1-23b.ffe199dc74b1462b11cb.js" + "/metadata---docs-guides-layoutf-65-d7d.7b9529aa7167e6e9c279.js" ], "content---docs-guides-networking-374-03e": [ - "/content---docs-guides-networking-374-03e.6d1bafa13a89dae0bc95.js" + "/content---docs-guides-networking-374-03e.d33d57a4fbe0bd439a1e.js" ], "metadata---docs-guides-networkingdfd-ce0": [ - "/metadata---docs-guides-networkingdfd-ce0.368b614be03a050c631f.js" + "/metadata---docs-guides-networkingdfd-ce0.f1ba336ad88ed6000688.js" ], "content---docs-guides-nodegui-architecture-262-19e": [ - "/content---docs-guides-nodegui-architecture-262-19e.47eba35fe493ed03e2c7.js" + "/content---docs-guides-nodegui-architecture-262-19e.3fceba62c44edfd74f0b.js" ], "metadata---docs-guides-nodegui-architecture-550-b82": [ - "/metadata---docs-guides-nodegui-architecture-550-b82.b594e6687cc37be69cb8.js" + "/metadata---docs-guides-nodegui-architecture-550-b82.4560a51d468b6245da2a.js" + ], + "content---docs-guides-scroll-view-76-e-87c": [ + "/content---docs-guides-scroll-view-76-e-87c.db1246e7dbe2a2ed7adc.js" + ], + "metadata---docs-guides-scroll-view-9-a-9-2ac": [ + "/metadata---docs-guides-scroll-view-9-a-9-2ac.1493d9e831f35d3006ba.js" ], "content---docs-guides-stylingfec-977": [ - "/content---docs-guides-stylingfec-977.63a50b46dba99c94a4ed.js" + "/content---docs-guides-stylingfec-977.239b58e6973ac6dbba32.js" ], "metadata---docs-guides-styling-9-ea-213": [ - "/metadata---docs-guides-styling-9-ea-213.818c1fa17aa62a091b0a.js" + "/metadata---docs-guides-styling-9-ea-213.5ebc576a6a9642dbbe5d.js" ], "content---docs-guides-using-native-node-modules-3-ab-104": [ - "/content---docs-guides-using-native-node-modules-3-ab-104.1efbefcc3ddc283d0c81.js" + "/content---docs-guides-using-native-node-modules-3-ab-104.085d48de6e8e37965c43.js" ], "metadata---docs-guides-using-native-node-modules-31-f-551": [ - "/metadata---docs-guides-using-native-node-modules-31-f-551.ec0eb319d94123d20db5.js" + "/metadata---docs-guides-using-native-node-modules-31-f-551.283cc113c9ff085e69e1.js" + ], + "content---docs-api-q-abstract-scroll-area-3-e-6-d7f": [ + "/content---docs-api-q-abstract-scroll-area-3-e-6-d7f.ccfb2bff1255952b20a4.js" + ], + "metadata---docs-api-q-abstract-scroll-area-59-d-279": [ + "/metadata---docs-api-q-abstract-scroll-area-59-d-279.f0937de6486bb8e0fa1e.js" + ], + "content---docs-development-common-errorsf-15-a5b": [ + "/content---docs-development-common-errorsf-15-a5b.cb1e79ec83f7fabe18b4.js" + ], + "metadata---docs-development-common-errors-402-ef4": [ + "/metadata---docs-development-common-errors-402-ef4.298f336a8991bfbcf6bb.js" + ], + "content---docs-guides-tutoriale-53-6ab": [ + "/content---docs-guides-tutoriale-53-6ab.8ae0f011844ca012225e.js" + ], + "metadata---docs-guides-tutorial-1-f-1-23b": [ + "/metadata---docs-guides-tutorial-1-f-1-23b.81a7a090a6ceb13dc5b6.js" + ], + "content---docs-development-readme-149-437": [ + "/content---docs-development-readme-149-437.ae3386a3246a5a4e2dbb.js" + ], + "metadata---docs-development-readm-ec-6-c-332": [ + "/metadata---docs-development-readm-ec-6-c-332.240c99c245a33c70d252.js" ], "content---docs-mdxce-3-7d1": [ "/content---docs-mdxce-3-7d1.4f1fe676030f8efe010c.js" diff --git a/client-manifest.json b/client-manifest.json index d6c5fed1c..54ea0cd74 100644 --- a/client-manifest.json +++ b/client-manifest.json @@ -629,531 +629,531 @@ "12": { "js": [ { - "file": "content---docs-api-component-4-ef-195.ac86aa3082e629a0fd98.js", - "hash": "7d6a5e6bc30fcf928371", - "publicPath": "/content---docs-api-component-4-ef-195.ac86aa3082e629a0fd98.js" + "file": "content---docs-api-component-4-ef-195.1e360de96ebacb00f20d.js", + "hash": "daf88ff577f2fd7b6d3b", + "publicPath": "/content---docs-api-component-4-ef-195.1e360de96ebacb00f20d.js" } ] }, "13": { "js": [ { - "file": "content---docs-api-event-widgetac-6-11b.ea7e99ed29f9723e18e6.js", - "hash": "5b85713c5eff205ca8b0", - "publicPath": "/content---docs-api-event-widgetac-6-11b.ea7e99ed29f9723e18e6.js" + "file": "content---docs-api-event-widgetac-6-11b.2d175fd230d2b7d3074c.js", + "hash": "0daf75be3e6e7cf931dd", + "publicPath": "/content---docs-api-event-widgetac-6-11b.2d175fd230d2b7d3074c.js" } ] }, "14": { "js": [ { - "file": "content---docs-api-flex-layout-3-dc-a16.e9a291d5978a978e915d.js", - "hash": "3fab25e4fc693f6dd67c", - "publicPath": "/content---docs-api-flex-layout-3-dc-a16.e9a291d5978a978e915d.js" + "file": "content---docs-api-flex-layout-3-dc-a16.d9197beb7ed7082424b9.js", + "hash": "c043ed47cd94227556c0", + "publicPath": "/content---docs-api-flex-layout-3-dc-a16.d9197beb7ed7082424b9.js" } ] }, "15": { "js": [ { - "file": "content---docs-api-node-layoutd-28-11a.847e9d4d8496c50cdba3.js", - "hash": "6109d80bdb8eada8049e", - "publicPath": "/content---docs-api-node-layoutd-28-11a.847e9d4d8496c50cdba3.js" + "file": "content---docs-api-node-layoutd-28-11a.7f96edb54add3535633a.js", + "hash": "e3d7c6c374e6ec767664", + "publicPath": "/content---docs-api-node-layoutd-28-11a.7f96edb54add3535633a.js" } ] }, "16": { "js": [ { - "file": "content---docs-api-node-widget-080-a39.fdf17f177a4ce4b722a9.js", - "hash": "4a846584c4d8604de207", - "publicPath": "/content---docs-api-node-widget-080-a39.fdf17f177a4ce4b722a9.js" + "file": "content---docs-api-node-widget-080-a39.4809ef000dc72fd628b4.js", + "hash": "70b663e192f958b2217a", + "publicPath": "/content---docs-api-node-widget-080-a39.4809ef000dc72fd628b4.js" } ] }, "17": { "js": [ { - "file": "content---docs-api-process-5-ec-b1e.0e51f069220cb4cdb517.js", - "hash": "f6ddaa7d346d16ef3ccb", - "publicPath": "/content---docs-api-process-5-ec-b1e.0e51f069220cb4cdb517.js" + "file": "content---docs-api-process-5-ec-b1e.f86de99d938d1de81693.js", + "hash": "e8dc6aeb23472670525e", + "publicPath": "/content---docs-api-process-5-ec-b1e.f86de99d938d1de81693.js" } ] }, "18": { "js": [ { - "file": "content---docs-api-q-abstract-scroll-area-3-e-6-d7f.11049cd8c56d47f16e47.js", - "hash": "36baec58f65ab815a6ef", - "publicPath": "/content---docs-api-q-abstract-scroll-area-3-e-6-d7f.11049cd8c56d47f16e47.js" + "file": "content---docs-api-q-abstract-scroll-area-3-e-6-d7f.ccfb2bff1255952b20a4.js", + "hash": "926a8d99cb6ac61d8ea2", + "publicPath": "/content---docs-api-q-abstract-scroll-area-3-e-6-d7f.ccfb2bff1255952b20a4.js" } ] }, "19": { "js": [ { - "file": "content---docs-api-q-abstract-slider-3-e-0-54d.8809abfe357004f7d063.js", - "hash": "a09b63ca9083bf5635f3", - "publicPath": "/content---docs-api-q-abstract-slider-3-e-0-54d.8809abfe357004f7d063.js" + "file": "content---docs-api-q-abstract-slider-3-e-0-54d.33bf2f3d144bd7c5df0b.js", + "hash": "e9024b9321a7416129ef", + "publicPath": "/content---docs-api-q-abstract-slider-3-e-0-54d.33bf2f3d144bd7c5df0b.js" } ] }, "20": { "js": [ { - "file": "content---docs-api-q-action-051-425.4498dbda0355b4f799f6.js", - "hash": "84f7292b51c4c717dfe6", - "publicPath": "/content---docs-api-q-action-051-425.4498dbda0355b4f799f6.js" + "file": "content---docs-api-q-action-051-425.4032133d5c1f0eeb0028.js", + "hash": "4b69674895907127af18", + "publicPath": "/content---docs-api-q-action-051-425.4032133d5c1f0eeb0028.js" } ] }, "21": { "js": [ { - "file": "content---docs-api-q-applicationd-3-e-0a3.5ba1fb22df7f78d91cfe.js", - "hash": "e73723f33112c5339473", - "publicPath": "/content---docs-api-q-applicationd-3-e-0a3.5ba1fb22df7f78d91cfe.js" + "file": "content---docs-api-q-applicationd-3-e-0a3.a21dbe352b92a02ae653.js", + "hash": "74948fe3d7ce64205cbd", + "publicPath": "/content---docs-api-q-applicationd-3-e-0a3.a21dbe352b92a02ae653.js" } ] }, "22": { "js": [ { - "file": "content---docs-api-q-check-boxd-9-b-c95.f20de1581af2b72e6825.js", - "hash": "20c9621bcef110c70257", - "publicPath": "/content---docs-api-q-check-boxd-9-b-c95.f20de1581af2b72e6825.js" + "file": "content---docs-api-q-check-boxd-9-b-c95.f4343402981e369422f1.js", + "hash": "12c01264911a716d6721", + "publicPath": "/content---docs-api-q-check-boxd-9-b-c95.f4343402981e369422f1.js" } ] }, "23": { "js": [ { - "file": "content---docs-api-q-clipboard-69-d-2ef.37d806252ceae9ce9066.js", - "hash": "e7a6ebee0b93ce453f45", - "publicPath": "/content---docs-api-q-clipboard-69-d-2ef.37d806252ceae9ce9066.js" + "file": "content---docs-api-q-clipboard-69-d-2ef.2e66daf3759a1023c6af.js", + "hash": "2fe006588857655c5437", + "publicPath": "/content---docs-api-q-clipboard-69-d-2ef.2e66daf3759a1023c6af.js" } ] }, "24": { "js": [ { - "file": "content---docs-api-q-cursor-362-d51.a8951173d79cc5b6743b.js", - "hash": "6324c99b5608af6d2c96", - "publicPath": "/content---docs-api-q-cursor-362-d51.a8951173d79cc5b6743b.js" + "file": "content---docs-api-q-cursor-362-d51.d7f2f5cef2bb3d6bbab7.js", + "hash": "6ea2a1715135024a2fdb", + "publicPath": "/content---docs-api-q-cursor-362-d51.d7f2f5cef2bb3d6bbab7.js" } ] }, "25": { "js": [ { - "file": "content---docs-api-q-dial-80-b-99a.4f88543f01722ffa22a9.js", - "hash": "542637d103bb14a108eb", - "publicPath": "/content---docs-api-q-dial-80-b-99a.4f88543f01722ffa22a9.js" + "file": "content---docs-api-q-dial-80-b-99a.0840ed72631e3e799a59.js", + "hash": "c42d393f27473a8f672f", + "publicPath": "/content---docs-api-q-dial-80-b-99a.0840ed72631e3e799a59.js" } ] }, "26": { "js": [ { - "file": "content---docs-api-q-grid-layouta-4-e-552.18fc004232075bb70ff7.js", - "hash": "3ceca1fd5a421373c273", - "publicPath": "/content---docs-api-q-grid-layouta-4-e-552.18fc004232075bb70ff7.js" + "file": "content---docs-api-q-grid-layouta-4-e-552.0af8922fd4b8cc1894d9.js", + "hash": "44e01bc31688856f1f88", + "publicPath": "/content---docs-api-q-grid-layouta-4-e-552.0af8922fd4b8cc1894d9.js" } ] }, "27": { "js": [ { - "file": "content---docs-api-q-icone-5-f-b0d.ba5e99f7546b1f2ecbd6.js", - "hash": "7b82f2e0b9e4bbdf0d15", - "publicPath": "/content---docs-api-q-icone-5-f-b0d.ba5e99f7546b1f2ecbd6.js" + "file": "content---docs-api-q-icone-5-f-b0d.78bdb97f434bec83087f.js", + "hash": "8d34d0acf4125204557a", + "publicPath": "/content---docs-api-q-icone-5-f-b0d.78bdb97f434bec83087f.js" } ] }, "28": { "js": [ { - "file": "content---docs-api-q-key-sequence-6-b-2-ebe.030be1701aa851096d50.js", - "hash": "1ff196ff9d7aa684bb7d", - "publicPath": "/content---docs-api-q-key-sequence-6-b-2-ebe.030be1701aa851096d50.js" + "file": "content---docs-api-q-key-sequence-6-b-2-ebe.e1775d3e8d629cf9408f.js", + "hash": "60f681e3bd6c4d36cc3d", + "publicPath": "/content---docs-api-q-key-sequence-6-b-2-ebe.e1775d3e8d629cf9408f.js" } ] }, "29": { "js": [ { - "file": "content---docs-api-q-label-2-f-9-04b.36c3d2c55db21788f964.js", - "hash": "d52382c88b011929d143", - "publicPath": "/content---docs-api-q-label-2-f-9-04b.36c3d2c55db21788f964.js" + "file": "content---docs-api-q-label-2-f-9-04b.a222a4cffb59fdbc1ab4.js", + "hash": "f3da79b2411c02b8c6a8", + "publicPath": "/content---docs-api-q-label-2-f-9-04b.a222a4cffb59fdbc1ab4.js" } ] }, "30": { "js": [ { - "file": "content---docs-api-q-line-editea-0-53d.fefd53f666fefaddd62a.js", - "hash": "b2947148184f8692be0a", - "publicPath": "/content---docs-api-q-line-editea-0-53d.fefd53f666fefaddd62a.js" + "file": "content---docs-api-q-line-editea-0-53d.2105b986bf0579235eb1.js", + "hash": "b624f7a420359effd1b3", + "publicPath": "/content---docs-api-q-line-editea-0-53d.2105b986bf0579235eb1.js" } ] }, "31": { "js": [ { - "file": "content---docs-api-q-main-window-0-e-7-299.e0854f14e4725b528b19.js", - "hash": "8bf738970caa46197ff9", - "publicPath": "/content---docs-api-q-main-window-0-e-7-299.e0854f14e4725b528b19.js" + "file": "content---docs-api-q-main-window-0-e-7-299.dfc37db8803910eb1225.js", + "hash": "38c91ce4b6b0dcd9c9e3", + "publicPath": "/content---docs-api-q-main-window-0-e-7-299.dfc37db8803910eb1225.js" } ] }, "32": { "js": [ { - "file": "content---docs-api-q-menu-39-e-ecd.923b1cbe5c188c45d9eb.js", - "hash": "d2fc1a2814e55ed1c548", - "publicPath": "/content---docs-api-q-menu-39-e-ecd.923b1cbe5c188c45d9eb.js" + "file": "content---docs-api-q-menu-39-e-ecd.6e2620c7e68119421801.js", + "hash": "4658b3579d56feab3e1f", + "publicPath": "/content---docs-api-q-menu-39-e-ecd.6e2620c7e68119421801.js" } ] }, "33": { "js": [ { - "file": "content---docs-api-q-menu-bar-8-d-2-872.fdf8987a4bf88fc8901e.js", - "hash": "8b2128c7424f3d589740", - "publicPath": "/content---docs-api-q-menu-bar-8-d-2-872.fdf8987a4bf88fc8901e.js" + "file": "content---docs-api-q-menu-bar-8-d-2-872.06cfac88ec0e61c045e0.js", + "hash": "142c055dd10c9bf3e04c", + "publicPath": "/content---docs-api-q-menu-bar-8-d-2-872.06cfac88ec0e61c045e0.js" } ] }, "34": { "js": [ { - "file": "content---docs-api-q-pixmap-8-dd-cb2.9c5d57a238adc65ab809.js", - "hash": "dbd7bf6fa2d82b7ef8bd", - "publicPath": "/content---docs-api-q-pixmap-8-dd-cb2.9c5d57a238adc65ab809.js" + "file": "content---docs-api-q-pixmap-8-dd-cb2.134596b75d5f36bf0bcb.js", + "hash": "f3384bfbe20a7196768f", + "publicPath": "/content---docs-api-q-pixmap-8-dd-cb2.134596b75d5f36bf0bcb.js" } ] }, "35": { "js": [ { - "file": "content---docs-api-q-plain-text-edit-7-c-8-081.9db7524cdd62d2a47a9f.js", - "hash": "909e8d94f7b9ad1f2add", - "publicPath": "/content---docs-api-q-plain-text-edit-7-c-8-081.9db7524cdd62d2a47a9f.js" + "file": "content---docs-api-q-plain-text-edit-7-c-8-081.251254f4aa01dcd7a551.js", + "hash": "7bd9ac88d678782f3990", + "publicPath": "/content---docs-api-q-plain-text-edit-7-c-8-081.251254f4aa01dcd7a551.js" } ] }, "36": { "js": [ { - "file": "content---docs-api-q-progress-barc-46-afe.40cb24422798867a7abd.js", - "hash": "b4156f7b7ba3c3d15826", - "publicPath": "/content---docs-api-q-progress-barc-46-afe.40cb24422798867a7abd.js" + "file": "content---docs-api-q-progress-barc-46-afe.ba83fcc6e1f4191f3ce3.js", + "hash": "6475fa49652dec833e6a", + "publicPath": "/content---docs-api-q-progress-barc-46-afe.ba83fcc6e1f4191f3ce3.js" } ] }, "37": { "js": [ { - "file": "content---docs-api-q-push-button-06-c-73e.658e7b21e29049ac304b.js", - "hash": "9a15ebc8df2212b8d6c4", - "publicPath": "/content---docs-api-q-push-button-06-c-73e.658e7b21e29049ac304b.js" + "file": "content---docs-api-q-push-button-06-c-73e.340b06cd16b877f6ec50.js", + "hash": "d21409e684f60c502136", + "publicPath": "/content---docs-api-q-push-button-06-c-73e.340b06cd16b877f6ec50.js" } ] }, "38": { "js": [ { - "file": "content---docs-api-q-radio-buttone-54-746.a6bc25d8a8096f9cf66c.js", - "hash": "ff879f73341f01666a69", - "publicPath": "/content---docs-api-q-radio-buttone-54-746.a6bc25d8a8096f9cf66c.js" + "file": "content---docs-api-q-radio-buttone-54-746.4fd2d6429a0724f456db.js", + "hash": "cf0e4f7ad41ffa6239ed", + "publicPath": "/content---docs-api-q-radio-buttone-54-746.4fd2d6429a0724f456db.js" } ] }, "39": { "js": [ { - "file": "content---docs-api-q-scroll-area-8-c-4-3fd.a89daa731969b2d3f2a5.js", - "hash": "2816eeed8dfb2eafc0a4", - "publicPath": "/content---docs-api-q-scroll-area-8-c-4-3fd.a89daa731969b2d3f2a5.js" + "file": "content---docs-api-q-scroll-area-8-c-4-3fd.bfb906cd2cf5da9998d4.js", + "hash": "5bd9a57d9d93639c1b44", + "publicPath": "/content---docs-api-q-scroll-area-8-c-4-3fd.bfb906cd2cf5da9998d4.js" } ] }, "40": { "js": [ { - "file": "content---docs-api-q-shortcut-271-2d3.a23160cb2c5ac65e7c60.js", - "hash": "6bcbb4eb23967c4431b7", - "publicPath": "/content---docs-api-q-shortcut-271-2d3.a23160cb2c5ac65e7c60.js" + "file": "content---docs-api-q-shortcut-271-2d3.c5bb55a6df222e8368a2.js", + "hash": "33c8f7d600fe9411fd41", + "publicPath": "/content---docs-api-q-shortcut-271-2d3.c5bb55a6df222e8368a2.js" } ] }, "41": { "js": [ { - "file": "content---docs-api-q-spin-box-1-ce-bfd.722df01f421031412fb8.js", - "hash": "be94fef36a1a9b89d35b", - "publicPath": "/content---docs-api-q-spin-box-1-ce-bfd.722df01f421031412fb8.js" + "file": "content---docs-api-q-spin-box-1-ce-bfd.760074f7b54e25049cd1.js", + "hash": "cc4bef692119231866ba", + "publicPath": "/content---docs-api-q-spin-box-1-ce-bfd.760074f7b54e25049cd1.js" } ] }, "42": { "js": [ { - "file": "content---docs-api-q-system-tray-icon-4-b-8-4c7.c1c846e0aa1550a71fed.js", - "hash": "d0aac08f08cc3c6b56da", - "publicPath": "/content---docs-api-q-system-tray-icon-4-b-8-4c7.c1c846e0aa1550a71fed.js" + "file": "content---docs-api-q-system-tray-icon-4-b-8-4c7.1932a9ead5197196726f.js", + "hash": "d9ee2458ad7637b9648f", + "publicPath": "/content---docs-api-q-system-tray-icon-4-b-8-4c7.1932a9ead5197196726f.js" } ] }, "43": { "js": [ { - "file": "content---docs-api-q-tab-widget-508-95e.5ece3d8e00fddb1469c1.js", - "hash": "2631408f53f182934a9d", - "publicPath": "/content---docs-api-q-tab-widget-508-95e.5ece3d8e00fddb1469c1.js" + "file": "content---docs-api-q-tab-widget-508-95e.bc25a321407c21e0e331.js", + "hash": "cfcf7caa3e9dee8087b5", + "publicPath": "/content---docs-api-q-tab-widget-508-95e.bc25a321407c21e0e331.js" } ] }, "44": { "js": [ { - "file": "content---docs-api-q-widget-04-a-59f.b622c9de949ee036de5d.js", - "hash": "c7ba7f05ff0e3f47ded0", - "publicPath": "/content---docs-api-q-widget-04-a-59f.b622c9de949ee036de5d.js" + "file": "content---docs-api-q-widget-04-a-59f.fdaeee1f1b8db4b398c8.js", + "hash": "145d6863722cea642ca4", + "publicPath": "/content---docs-api-q-widget-04-a-59f.fdaeee1f1b8db4b398c8.js" } ] }, "45": { "js": [ { - "file": "content---docs-api-qt-enumsfd-7-cf3.e7202e3e187c517ff19b.js", - "hash": "13c0d4ec2e0b4b3d55b0", - "publicPath": "/content---docs-api-qt-enumsfd-7-cf3.e7202e3e187c517ff19b.js" + "file": "content---docs-api-qt-enumsfd-7-cf3.409fb94f6d91a1286f2d.js", + "hash": "cebd88451324d8043762", + "publicPath": "/content---docs-api-qt-enumsfd-7-cf3.409fb94f6d91a1286f2d.js" } ] }, "46": { "js": [ { - "file": "content---docs-api-synopsis-7-bb-e1c.fd9a9dedb6493fbec889.js", - "hash": "5f4d2fc1832fa4b0efbf", - "publicPath": "/content---docs-api-synopsis-7-bb-e1c.fd9a9dedb6493fbec889.js" + "file": "content---docs-api-synopsis-7-bb-e1c.965b0780ea42fdecf6df.js", + "hash": "b52d0f5da6ec5a2abff1", + "publicPath": "/content---docs-api-synopsis-7-bb-e1c.965b0780ea42fdecf6df.js" } ] }, "47": { "js": [ { - "file": "content---docs-api-yoga-widgeta-42-cc7.b1a320dbb203d69d51cd.js", - "hash": "1499017a9dc9f72c783e", - "publicPath": "/content---docs-api-yoga-widgeta-42-cc7.b1a320dbb203d69d51cd.js" + "file": "content---docs-api-yoga-widgeta-42-cc7.74a45daabc42f256151b.js", + "hash": "f180ea943efe92ce4534", + "publicPath": "/content---docs-api-yoga-widgeta-42-cc7.74a45daabc42f256151b.js" } ] }, "48": { "js": [ { - "file": "content---docs-development-common-errorsf-15-a5b.3c446456ebcde11f2e0c.js", - "hash": "8a31df69b89d1de2715c", - "publicPath": "/content---docs-development-common-errorsf-15-a5b.3c446456ebcde11f2e0c.js" + "file": "content---docs-development-common-errorsf-15-a5b.cb1e79ec83f7fabe18b4.js", + "hash": "a7cd27a73a7c1730041e", + "publicPath": "/content---docs-development-common-errorsf-15-a5b.cb1e79ec83f7fabe18b4.js" } ] }, "49": { "js": [ { - "file": "content---docs-development-debuggingb-54-9ed.d76308cc2f9733de248d.js", - "hash": "c65e847a7862d95e9e05", - "publicPath": "/content---docs-development-debuggingb-54-9ed.d76308cc2f9733de248d.js" + "file": "content---docs-development-debuggingb-54-9ed.4f82aa6c1fa69c252786.js", + "hash": "70682750c736e836f179", + "publicPath": "/content---docs-development-debuggingb-54-9ed.4f82aa6c1fa69c252786.js" } ] }, "50": { "js": [ { - "file": "content---docs-development-getting-started-139-387.9789bece43bb79d98058.js", - "hash": "6e626126e71d94dc6dfc", - "publicPath": "/content---docs-development-getting-started-139-387.9789bece43bb79d98058.js" + "file": "content---docs-development-getting-started-139-387.c6e8d2bbfc2d32220f5c.js", + "hash": "affeb02809ce0956e030", + "publicPath": "/content---docs-development-getting-started-139-387.c6e8d2bbfc2d32220f5c.js" } ] }, "51": { "js": [ { - "file": "content---docs-development-readme-149-437.88d3682f8536e933a815.js", - "hash": "8151dad0cec558d9b907", - "publicPath": "/content---docs-development-readme-149-437.88d3682f8536e933a815.js" + "file": "content---docs-development-readme-149-437.ae3386a3246a5a4e2dbb.js", + "hash": "ee1c1f840054105cba01", + "publicPath": "/content---docs-development-readme-149-437.ae3386a3246a5a4e2dbb.js" } ] }, "52": { "js": [ { - "file": "content---docs-development-setting-up-28-c-666.93469fbea5d970326d62.js", - "hash": "f59bbf52906beef7b692", - "publicPath": "/content---docs-development-setting-up-28-c-666.93469fbea5d970326d62.js" + "file": "content---docs-development-setting-up-28-c-666.f8486e337d7e2d0b3177.js", + "hash": "7a3b4440ce67fc734454", + "publicPath": "/content---docs-development-setting-up-28-c-666.f8486e337d7e2d0b3177.js" } ] }, "53": { "js": [ { - "file": "content---docs-development-signal-and-event-handling-7-d-4-f3f.8f1478c9222a4363963f.js", - "hash": "41fe6ec9cc8382e0c1c3", - "publicPath": "/content---docs-development-signal-and-event-handling-7-d-4-f3f.8f1478c9222a4363963f.js" + "file": "content---docs-development-signal-and-event-handling-7-d-4-f3f.49f8d18d02694764da59.js", + "hash": "ea95958a74e31b26cb16", + "publicPath": "/content---docs-development-signal-and-event-handling-7-d-4-f3f.49f8d18d02694764da59.js" } ] }, "54": { "js": [ { - "file": "content---docs-development-styling-293-cad.7a035f4c17a4f8b41e6d.js", - "hash": "2f50301d30a737aa817c", - "publicPath": "/content---docs-development-styling-293-cad.7a035f4c17a4f8b41e6d.js" + "file": "content---docs-development-styling-293-cad.4a8b2b2aed4392cce082.js", + "hash": "9a6af9dad604b7cb4f2e", + "publicPath": "/content---docs-development-styling-293-cad.4a8b2b2aed4392cce082.js" } ] }, "55": { "js": [ { - "file": "content---docs-development-wrapping-widgets-84-b-538.d89aa40f77ccea2817e5.js", - "hash": "7a678aebe4ec389e941a", - "publicPath": "/content---docs-development-wrapping-widgets-84-b-538.d89aa40f77ccea2817e5.js" + "file": "content---docs-development-wrapping-widgets-84-b-538.ee884707b55dee4704c9.js", + "hash": "674d903b7b29f338b128", + "publicPath": "/content---docs-development-wrapping-widgets-84-b-538.ee884707b55dee4704c9.js" } ] }, "56": { "js": [ { - "file": "content---docs-doc-1-b-2-f-e80.155f26d0e2515ddecad7.js", - "hash": "f7fd4770bb408d4d8fe5", - "publicPath": "/content---docs-doc-1-b-2-f-e80.155f26d0e2515ddecad7.js" + "file": "content---docs-doc-1-b-2-f-e80.ddd073b1341446b818e6.js", + "hash": "42ff1bf7ba1762d2b118", + "publicPath": "/content---docs-doc-1-b-2-f-e80.ddd073b1341446b818e6.js" } ] }, "57": { "js": [ { - "file": "content---docs-faq-048-db5.5525c687cb63aa66b087.js", - "hash": "60aa4465f440a8be04fa", - "publicPath": "/content---docs-faq-048-db5.5525c687cb63aa66b087.js" + "file": "content---docs-faq-048-db5.308d32219777536fd0c1.js", + "hash": "7d283024300711b75655", + "publicPath": "/content---docs-faq-048-db5.308d32219777536fd0c1.js" } ] }, "58": { "js": [ { - "file": "content---docs-guides-custom-nodegui-native-plugin-632-9db.95323b60cd95d318e46d.js", - "hash": "002b800085d420254714", - "publicPath": "/content---docs-guides-custom-nodegui-native-plugin-632-9db.95323b60cd95d318e46d.js" + "file": "content---docs-guides-custom-nodegui-native-plugin-632-9db.69e4f9d5cf0b7d406d30.js", + "hash": "dbe80fea872f260fb2a6", + "publicPath": "/content---docs-guides-custom-nodegui-native-plugin-632-9db.69e4f9d5cf0b7d406d30.js" } ] }, "59": { "js": [ { - "file": "content---docs-guides-debugging-in-vscodebd-7-cec.216a1ec2b1810da330e8.js", - "hash": "306d6daccaea35aafe55", - "publicPath": "/content---docs-guides-debugging-in-vscodebd-7-cec.216a1ec2b1810da330e8.js" + "file": "content---docs-guides-debugging-in-vscodebd-7-cec.7d98672e5a72962fe44f.js", + "hash": "f157ba9066147b3ccd59", + "publicPath": "/content---docs-guides-debugging-in-vscodebd-7-cec.7d98672e5a72962fe44f.js" } ] }, "60": { "js": [ { - "file": "content---docs-guides-debuggingf-3-f-cf5.0e5e6363c35844ddb164.js", - "hash": "42c96bfdbad3adda7aab", - "publicPath": "/content---docs-guides-debuggingf-3-f-cf5.0e5e6363c35844ddb164.js" + "file": "content---docs-guides-debuggingf-3-f-cf5.d0acd8666bd57a06338c.js", + "hash": "f9a72bf0575d247b453a", + "publicPath": "/content---docs-guides-debuggingf-3-f-cf5.d0acd8666bd57a06338c.js" } ] }, "61": { "js": [ { - "file": "content---docs-guides-getting-startedc-9-e-20f.ab2cfcda0993e1d7f4aa.js", - "hash": "9a4b6cb51b09e16a440c", - "publicPath": "/content---docs-guides-getting-startedc-9-e-20f.ab2cfcda0993e1d7f4aa.js" + "file": "content---docs-guides-getting-startedc-9-e-20f.2f06552f5a1f946c3ba8.js", + "hash": "691619debb41c8b71eb2", + "publicPath": "/content---docs-guides-getting-startedc-9-e-20f.2f06552f5a1f946c3ba8.js" } ] }, "62": { "js": [ { - "file": "content---docs-guides-handle-events-160-4b0.fe5fb2010d2e8cadf3a1.js", - "hash": "9d188a059a3cea4341ed", - "publicPath": "/content---docs-guides-handle-events-160-4b0.fe5fb2010d2e8cadf3a1.js" + "file": "content---docs-guides-handle-events-160-4b0.9ed14b92a65cd0e938a5.js", + "hash": "5e44abef536e5505500e", + "publicPath": "/content---docs-guides-handle-events-160-4b0.9ed14b92a65cd0e938a5.js" } ] }, "63": { "js": [ { - "file": "content---docs-guides-images-991-065.51a08c5cfcb7493ad2c0.js", - "hash": "e83792fc542504935791", - "publicPath": "/content---docs-guides-images-991-065.51a08c5cfcb7493ad2c0.js" + "file": "content---docs-guides-images-991-065.b0aff2bd6627ac4b896a.js", + "hash": "ddb9ca92fd230dcdb651", + "publicPath": "/content---docs-guides-images-991-065.b0aff2bd6627ac4b896a.js" } ] }, "64": { "js": [ { - "file": "content---docs-guides-layoutdf-5-a64.4934a0cf62b893749063.js", - "hash": "1088515d64b6d01319c9", - "publicPath": "/content---docs-guides-layoutdf-5-a64.4934a0cf62b893749063.js" + "file": "content---docs-guides-layoutdf-5-a64.bf9d4c29efde527ff301.js", + "hash": "74b87602dc34eccf971f", + "publicPath": "/content---docs-guides-layoutdf-5-a64.bf9d4c29efde527ff301.js" } ] }, "65": { "js": [ { - "file": "content---docs-guides-networking-374-03e.6d1bafa13a89dae0bc95.js", - "hash": "b9f0027cdbcbc035b5b4", - "publicPath": "/content---docs-guides-networking-374-03e.6d1bafa13a89dae0bc95.js" + "file": "content---docs-guides-networking-374-03e.d33d57a4fbe0bd439a1e.js", + "hash": "a6e45c925bdd34a92d33", + "publicPath": "/content---docs-guides-networking-374-03e.d33d57a4fbe0bd439a1e.js" } ] }, "66": { "js": [ { - "file": "content---docs-guides-nodegui-architecture-262-19e.47eba35fe493ed03e2c7.js", - "hash": "6b554b5e9c74e563ff04", - "publicPath": "/content---docs-guides-nodegui-architecture-262-19e.47eba35fe493ed03e2c7.js" + "file": "content---docs-guides-nodegui-architecture-262-19e.3fceba62c44edfd74f0b.js", + "hash": "2f70673b729c531b1b8c", + "publicPath": "/content---docs-guides-nodegui-architecture-262-19e.3fceba62c44edfd74f0b.js" } ] }, "67": { "js": [ { - "file": "content---docs-guides-scroll-view-76-e-87c.fda5184f1e490846605b.js", - "hash": "41aa72d8135559445412", - "publicPath": "/content---docs-guides-scroll-view-76-e-87c.fda5184f1e490846605b.js" + "file": "content---docs-guides-scroll-view-76-e-87c.db1246e7dbe2a2ed7adc.js", + "hash": "b955cbc2649df8600334", + "publicPath": "/content---docs-guides-scroll-view-76-e-87c.db1246e7dbe2a2ed7adc.js" } ] }, "68": { "js": [ { - "file": "content---docs-guides-stylingfec-977.63a50b46dba99c94a4ed.js", - "hash": "32381224534b90c5bf7d", - "publicPath": "/content---docs-guides-stylingfec-977.63a50b46dba99c94a4ed.js" + "file": "content---docs-guides-stylingfec-977.239b58e6973ac6dbba32.js", + "hash": "e0a7c03f30bf4626598a", + "publicPath": "/content---docs-guides-stylingfec-977.239b58e6973ac6dbba32.js" } ] }, "69": { "js": [ { - "file": "content---docs-guides-tutoriale-53-6ab.b35f6bf3928554740dad.js", - "hash": "cdd4f6a7d2ea7d880751", - "publicPath": "/content---docs-guides-tutoriale-53-6ab.b35f6bf3928554740dad.js" + "file": "content---docs-guides-tutoriale-53-6ab.8ae0f011844ca012225e.js", + "hash": "4fd229c19306e0cb9cd1", + "publicPath": "/content---docs-guides-tutoriale-53-6ab.8ae0f011844ca012225e.js" } ] }, "70": { "js": [ { - "file": "content---docs-guides-using-native-node-modules-3-ab-104.1efbefcc3ddc283d0c81.js", - "hash": "d099b44bbf6eb7ceb42e", - "publicPath": "/content---docs-guides-using-native-node-modules-3-ab-104.1efbefcc3ddc283d0c81.js" + "file": "content---docs-guides-using-native-node-modules-3-ab-104.085d48de6e8e37965c43.js", + "hash": "bb7cb15bb99d037611be", + "publicPath": "/content---docs-guides-using-native-node-modules-3-ab-104.085d48de6e8e37965c43.js" } ] }, @@ -1169,9 +1169,9 @@ "72": { "js": [ { - "file": "docsMetadata---docs-150-2d6.dbac39bfa2e3d6968559.js", - "hash": "6bc3cb5e54af25f296d0", - "publicPath": "/docsMetadata---docs-150-2d6.dbac39bfa2e3d6968559.js" + "file": "docsMetadata---docs-150-2d6.bf705dd7e91425af443a.js", + "hash": "e02202898de3c08cc046", + "publicPath": "/docsMetadata---docs-150-2d6.bf705dd7e91425af443a.js" } ] }, @@ -1179,15 +1179,15 @@ "css": [ { "file": "main.f66713773e9ba37b90fe.css", - "hash": "6cbdf374aa2e63b0d5dc", + "hash": "086d4c9fa9dae84d3521", "publicPath": "/main.f66713773e9ba37b90fe.css" } ], "js": [ { - "file": "main.df23129c6a8dca8ab908.js", - "hash": "6cbdf374aa2e63b0d5dc", - "publicPath": "/main.df23129c6a8dca8ab908.js" + "file": "main.8d444715bf5acf76b69f.js", + "hash": "086d4c9fa9dae84d3521", + "publicPath": "/main.8d444715bf5acf76b69f.js" } ] }, @@ -1230,441 +1230,441 @@ "78": { "js": [ { - "file": "metadata---docs-api-component-3-e-5-43d.9b39404632ecfdb50982.js", - "hash": "7e923e6484ce109d2e18", - "publicPath": "/metadata---docs-api-component-3-e-5-43d.9b39404632ecfdb50982.js" + "file": "metadata---docs-api-component-3-e-5-43d.bb8314c7d47b206d9b67.js", + "hash": "2f66d813839e6e9c62b8", + "publicPath": "/metadata---docs-api-component-3-e-5-43d.bb8314c7d47b206d9b67.js" } ] }, "79": { "js": [ { - "file": "metadata---docs-api-event-widget-39-a-9ea.3983b253515b2f468440.js", - "hash": "f3434c3494363b380a03", - "publicPath": "/metadata---docs-api-event-widget-39-a-9ea.3983b253515b2f468440.js" + "file": "metadata---docs-api-event-widget-39-a-9ea.c325827a7e2ec2b04e2c.js", + "hash": "1e154e2bdafa958831ee", + "publicPath": "/metadata---docs-api-event-widget-39-a-9ea.c325827a7e2ec2b04e2c.js" } ] }, "80": { "js": [ { - "file": "metadata---docs-api-flex-layoutecf-540.ca6234a76603a3721091.js", - "hash": "24279d81033f9b73ff97", - "publicPath": "/metadata---docs-api-flex-layoutecf-540.ca6234a76603a3721091.js" + "file": "metadata---docs-api-flex-layoutecf-540.7d8d1f213636d427c23a.js", + "hash": "98dcf862e9d4504a6877", + "publicPath": "/metadata---docs-api-flex-layoutecf-540.7d8d1f213636d427c23a.js" } ] }, "81": { "js": [ { - "file": "metadata---docs-api-node-layout-1-e-9-c15.9cc3a52940035afa4a55.js", - "hash": "0fbb060c5b4b4ba4432f", - "publicPath": "/metadata---docs-api-node-layout-1-e-9-c15.9cc3a52940035afa4a55.js" + "file": "metadata---docs-api-node-layout-1-e-9-c15.14259600bacb115017fa.js", + "hash": "97b76317d7d2ff44d39a", + "publicPath": "/metadata---docs-api-node-layout-1-e-9-c15.14259600bacb115017fa.js" } ] }, "82": { "js": [ { - "file": "metadata---docs-api-node-widgeta-92-a4f.15d6f9a9b198fb1c83f8.js", - "hash": "9d1a0c61497db9a558aa", - "publicPath": "/metadata---docs-api-node-widgeta-92-a4f.15d6f9a9b198fb1c83f8.js" + "file": "metadata---docs-api-node-widgeta-92-a4f.09a44256617fb7cf73e0.js", + "hash": "2706896463e12a011dd3", + "publicPath": "/metadata---docs-api-node-widgeta-92-a4f.09a44256617fb7cf73e0.js" } ] }, "83": { "js": [ { - "file": "metadata---docs-api-process-32-d-09e.eba5fff2f66bf0bc66c9.js", - "hash": "debd72bf16fd94a6c1c7", - "publicPath": "/metadata---docs-api-process-32-d-09e.eba5fff2f66bf0bc66c9.js" + "file": "metadata---docs-api-process-32-d-09e.b25027bb34874c2ec738.js", + "hash": "43e4e6a188dcad26dc34", + "publicPath": "/metadata---docs-api-process-32-d-09e.b25027bb34874c2ec738.js" } ] }, "84": { "js": [ { - "file": "metadata---docs-api-q-abstract-scroll-area-59-d-279.c37831b751e416067786.js", - "hash": "1ec9e71625589c27f325", - "publicPath": "/metadata---docs-api-q-abstract-scroll-area-59-d-279.c37831b751e416067786.js" + "file": "metadata---docs-api-q-abstract-scroll-area-59-d-279.f0937de6486bb8e0fa1e.js", + "hash": "9abbda3701df6ee7b378", + "publicPath": "/metadata---docs-api-q-abstract-scroll-area-59-d-279.f0937de6486bb8e0fa1e.js" } ] }, "85": { "js": [ { - "file": "metadata---docs-api-q-abstract-sliderdfa-ab7.d238f455e58818870dd6.js", - "hash": "cdec32aa8c75b9b164c0", - "publicPath": "/metadata---docs-api-q-abstract-sliderdfa-ab7.d238f455e58818870dd6.js" + "file": "metadata---docs-api-q-abstract-sliderdfa-ab7.b9fda1be4def5e55beb5.js", + "hash": "271f49a928d9330c9a9c", + "publicPath": "/metadata---docs-api-q-abstract-sliderdfa-ab7.b9fda1be4def5e55beb5.js" } ] }, "86": { "js": [ { - "file": "metadata---docs-api-q-actioncfb-cfc.8280c5c7e256edca447e.js", - "hash": "8aa2f3f31d15e7fbc6f6", - "publicPath": "/metadata---docs-api-q-actioncfb-cfc.8280c5c7e256edca447e.js" + "file": "metadata---docs-api-q-actioncfb-cfc.c0e1a0072fa9fa574a4e.js", + "hash": "642dff83df9803e873cd", + "publicPath": "/metadata---docs-api-q-actioncfb-cfc.c0e1a0072fa9fa574a4e.js" } ] }, "87": { "js": [ { - "file": "metadata---docs-api-q-applicationc-1-d-8a4.0d8cd2b346473211ab17.js", - "hash": "d9770f255a5184cef404", - "publicPath": "/metadata---docs-api-q-applicationc-1-d-8a4.0d8cd2b346473211ab17.js" + "file": "metadata---docs-api-q-applicationc-1-d-8a4.d3c601c1cbaf23a28e47.js", + "hash": "c463e09a14b03fc4710b", + "publicPath": "/metadata---docs-api-q-applicationc-1-d-8a4.d3c601c1cbaf23a28e47.js" } ] }, "88": { "js": [ { - "file": "metadata---docs-api-q-check-box-132-293.f6f40baaa756bcf823f3.js", - "hash": "e1532727b41e7aab3db8", - "publicPath": "/metadata---docs-api-q-check-box-132-293.f6f40baaa756bcf823f3.js" + "file": "metadata---docs-api-q-check-box-132-293.e2275c586f1fa38b153a.js", + "hash": "914e74baf16ba566dc10", + "publicPath": "/metadata---docs-api-q-check-box-132-293.e2275c586f1fa38b153a.js" } ] }, "89": { "js": [ { - "file": "metadata---docs-api-q-clipboard-486-b21.0d081407e4731ac1d902.js", - "hash": "9c3347dd93a7e9b62f51", - "publicPath": "/metadata---docs-api-q-clipboard-486-b21.0d081407e4731ac1d902.js" + "file": "metadata---docs-api-q-clipboard-486-b21.fcd03aff3248524dc8f5.js", + "hash": "54b5433e71be577ef6af", + "publicPath": "/metadata---docs-api-q-clipboard-486-b21.fcd03aff3248524dc8f5.js" } ] }, "90": { "js": [ { - "file": "metadata---docs-api-q-cursor-887-11e.155beb474ce4b9a123a3.js", - "hash": "ffeb730824210f7b2f01", - "publicPath": "/metadata---docs-api-q-cursor-887-11e.155beb474ce4b9a123a3.js" + "file": "metadata---docs-api-q-cursor-887-11e.2ca40fd02ed552bd73a0.js", + "hash": "036193ec636bec7a1d71", + "publicPath": "/metadata---docs-api-q-cursor-887-11e.2ca40fd02ed552bd73a0.js" } ] }, "91": { "js": [ { - "file": "metadata---docs-api-q-dialbfb-aef.14cf6fc384352f5e906c.js", - "hash": "ed45fff5c7975b453ccd", - "publicPath": "/metadata---docs-api-q-dialbfb-aef.14cf6fc384352f5e906c.js" + "file": "metadata---docs-api-q-dialbfb-aef.ba6578fc738da9ae890f.js", + "hash": "f023d6d7dde185713c73", + "publicPath": "/metadata---docs-api-q-dialbfb-aef.ba6578fc738da9ae890f.js" } ] }, "92": { "js": [ { - "file": "metadata---docs-api-q-grid-layout-7-db-030.1b4418c30294e7920975.js", - "hash": "d076ca48e352f129ebfb", - "publicPath": "/metadata---docs-api-q-grid-layout-7-db-030.1b4418c30294e7920975.js" + "file": "metadata---docs-api-q-grid-layout-7-db-030.20655fb8ee969b611f58.js", + "hash": "d30742885548a747692c", + "publicPath": "/metadata---docs-api-q-grid-layout-7-db-030.20655fb8ee969b611f58.js" } ] }, "93": { "js": [ { - "file": "metadata---docs-api-q-icone-6-d-093.475fb513784156ad8449.js", - "hash": "51d737c8954e064801ba", - "publicPath": "/metadata---docs-api-q-icone-6-d-093.475fb513784156ad8449.js" + "file": "metadata---docs-api-q-icone-6-d-093.9de3a345411f18b995e1.js", + "hash": "0ebef6edffb9ecfa210d", + "publicPath": "/metadata---docs-api-q-icone-6-d-093.9de3a345411f18b995e1.js" } ] }, "94": { "js": [ { - "file": "metadata---docs-api-q-key-sequence-623-1a1.4368978c57564e220a16.js", - "hash": "4d124ffc8b75958a1b65", - "publicPath": "/metadata---docs-api-q-key-sequence-623-1a1.4368978c57564e220a16.js" + "file": "metadata---docs-api-q-key-sequence-623-1a1.265559f693467c9e306d.js", + "hash": "54587aa6a5e5548c9cad", + "publicPath": "/metadata---docs-api-q-key-sequence-623-1a1.265559f693467c9e306d.js" } ] }, "95": { "js": [ { - "file": "metadata---docs-api-q-label-165-210.5f49e6eaa464f0e20e46.js", - "hash": "888d28a9f896da24108e", - "publicPath": "/metadata---docs-api-q-label-165-210.5f49e6eaa464f0e20e46.js" + "file": "metadata---docs-api-q-label-165-210.4c95a2dcffba11d998f5.js", + "hash": "eb09babf5beac66eb773", + "publicPath": "/metadata---docs-api-q-label-165-210.4c95a2dcffba11d998f5.js" } ] }, "96": { "js": [ { - "file": "metadata---docs-api-q-line-edit-13-f-b8a.6ff72d32eab993d3ae53.js", - "hash": "bdbe880085fa93bb2064", - "publicPath": "/metadata---docs-api-q-line-edit-13-f-b8a.6ff72d32eab993d3ae53.js" + "file": "metadata---docs-api-q-line-edit-13-f-b8a.36fce5750d4eec4abf7a.js", + "hash": "195815f79b818955fd66", + "publicPath": "/metadata---docs-api-q-line-edit-13-f-b8a.36fce5750d4eec4abf7a.js" } ] }, "97": { "js": [ { - "file": "metadata---docs-api-q-main-window-04-f-efb.0591632b4db762f30099.js", - "hash": "c889289415a1ea762110", - "publicPath": "/metadata---docs-api-q-main-window-04-f-efb.0591632b4db762f30099.js" + "file": "metadata---docs-api-q-main-window-04-f-efb.dfd696d0b4623fd650fb.js", + "hash": "1db37d3a7b27037269d1", + "publicPath": "/metadata---docs-api-q-main-window-04-f-efb.dfd696d0b4623fd650fb.js" } ] }, "98": { "js": [ { - "file": "metadata---docs-api-q-menu-bare-25-882.1fa4c845b8584b483b86.js", - "hash": "5a5483a4341af51d0575", - "publicPath": "/metadata---docs-api-q-menu-bare-25-882.1fa4c845b8584b483b86.js" + "file": "metadata---docs-api-q-menu-bare-25-882.606e323867fa55a91b8b.js", + "hash": "335e151f1491154a5564", + "publicPath": "/metadata---docs-api-q-menu-bare-25-882.606e323867fa55a91b8b.js" } ] }, "99": { "js": [ { - "file": "metadata---docs-api-q-menuc-6-b-9ab.dd1782d6fb79d439483f.js", - "hash": "d662ea71e5cf29bf7e03", - "publicPath": "/metadata---docs-api-q-menuc-6-b-9ab.dd1782d6fb79d439483f.js" + "file": "metadata---docs-api-q-menuc-6-b-9ab.9bf26515e2ae57334d41.js", + "hash": "a546a3100b17aab521f6", + "publicPath": "/metadata---docs-api-q-menuc-6-b-9ab.9bf26515e2ae57334d41.js" } ] }, "100": { "js": [ { - "file": "metadata---docs-api-q-pixmapfdf-820.72c507a3c613398100d9.js", - "hash": "cfe6ccfeccec2149e4ea", - "publicPath": "/metadata---docs-api-q-pixmapfdf-820.72c507a3c613398100d9.js" + "file": "metadata---docs-api-q-pixmapfdf-820.dedac9f14bb09dc6ef90.js", + "hash": "97c71b48a1a66576b80c", + "publicPath": "/metadata---docs-api-q-pixmapfdf-820.dedac9f14bb09dc6ef90.js" } ] }, "101": { "js": [ { - "file": "metadata---docs-api-q-plain-text-edit-161-ecc.7cdd26f1914f8ca77d53.js", - "hash": "97b4f219374780775a1b", - "publicPath": "/metadata---docs-api-q-plain-text-edit-161-ecc.7cdd26f1914f8ca77d53.js" + "file": "metadata---docs-api-q-plain-text-edit-161-ecc.281752317bb6261bec64.js", + "hash": "21e3710520c32d88770a", + "publicPath": "/metadata---docs-api-q-plain-text-edit-161-ecc.281752317bb6261bec64.js" } ] }, "102": { "js": [ { - "file": "metadata---docs-api-q-progress-bar-43-d-07e.e9ed6760ad1f932febd4.js", - "hash": "a16af9037d9637caa871", - "publicPath": "/metadata---docs-api-q-progress-bar-43-d-07e.e9ed6760ad1f932febd4.js" + "file": "metadata---docs-api-q-progress-bar-43-d-07e.4b4a8e422871290718d3.js", + "hash": "6de826f8915b4bf22bc3", + "publicPath": "/metadata---docs-api-q-progress-bar-43-d-07e.4b4a8e422871290718d3.js" } ] }, "103": { "js": [ { - "file": "metadata---docs-api-q-push-button-96-d-c92.cec82aa08fc0493ebc84.js", - "hash": "f6d85196b518f564d022", - "publicPath": "/metadata---docs-api-q-push-button-96-d-c92.cec82aa08fc0493ebc84.js" + "file": "metadata---docs-api-q-push-button-96-d-c92.84f3786728982928ac81.js", + "hash": "47461d29127e1811ca08", + "publicPath": "/metadata---docs-api-q-push-button-96-d-c92.84f3786728982928ac81.js" } ] }, "104": { "js": [ { - "file": "metadata---docs-api-q-radio-button-367-f7c.b3daca0385d4d56b5349.js", - "hash": "d44bfc1500f7a122d579", - "publicPath": "/metadata---docs-api-q-radio-button-367-f7c.b3daca0385d4d56b5349.js" + "file": "metadata---docs-api-q-radio-button-367-f7c.5c69d7be23b06f0b2aa5.js", + "hash": "e8d4c36b6655774343cd", + "publicPath": "/metadata---docs-api-q-radio-button-367-f7c.5c69d7be23b06f0b2aa5.js" } ] }, "105": { "js": [ { - "file": "metadata---docs-api-q-scroll-area-46-a-96e.04a812277402d3a8e819.js", - "hash": "44958af7748cf480497c", - "publicPath": "/metadata---docs-api-q-scroll-area-46-a-96e.04a812277402d3a8e819.js" + "file": "metadata---docs-api-q-scroll-area-46-a-96e.7ce4f18eed24d386b901.js", + "hash": "be4cccfd120b74c39196", + "publicPath": "/metadata---docs-api-q-scroll-area-46-a-96e.7ce4f18eed24d386b901.js" } ] }, "106": { "js": [ { - "file": "metadata---docs-api-q-shortcut-5-e-7-1aa.88762d3d7fb8ccc3c204.js", - "hash": "1c62688911cd84282117", - "publicPath": "/metadata---docs-api-q-shortcut-5-e-7-1aa.88762d3d7fb8ccc3c204.js" + "file": "metadata---docs-api-q-shortcut-5-e-7-1aa.c5ad5be12868b939f812.js", + "hash": "aa2a774afec3a23ca401", + "publicPath": "/metadata---docs-api-q-shortcut-5-e-7-1aa.c5ad5be12868b939f812.js" } ] }, "107": { "js": [ { - "file": "metadata---docs-api-q-spin-box-809-ae0.69bd6d9dfa703ffe4d2c.js", - "hash": "097d363ec1d9f5784539", - "publicPath": "/metadata---docs-api-q-spin-box-809-ae0.69bd6d9dfa703ffe4d2c.js" + "file": "metadata---docs-api-q-spin-box-809-ae0.aace0298c10637079d95.js", + "hash": "442244ae9fae03bef24e", + "publicPath": "/metadata---docs-api-q-spin-box-809-ae0.aace0298c10637079d95.js" } ] }, "108": { "js": [ { - "file": "metadata---docs-api-q-system-tray-icon-711-f90.0b37c5f9af3987644ba9.js", - "hash": "60d1063fe94e8b04363b", - "publicPath": "/metadata---docs-api-q-system-tray-icon-711-f90.0b37c5f9af3987644ba9.js" + "file": "metadata---docs-api-q-system-tray-icon-711-f90.cb86c7c41e771286636c.js", + "hash": "3af473fbfabd64fc76a4", + "publicPath": "/metadata---docs-api-q-system-tray-icon-711-f90.cb86c7c41e771286636c.js" } ] }, "109": { "js": [ { - "file": "metadata---docs-api-q-tab-widgetebc-5aa.1c2702d1aaedf58cadb0.js", - "hash": "100445b0dd8890f342af", - "publicPath": "/metadata---docs-api-q-tab-widgetebc-5aa.1c2702d1aaedf58cadb0.js" + "file": "metadata---docs-api-q-tab-widgetebc-5aa.fbfda6490f02cae23799.js", + "hash": "ccf58a2f2da8ec5f7567", + "publicPath": "/metadata---docs-api-q-tab-widgetebc-5aa.fbfda6490f02cae23799.js" } ] }, "110": { "js": [ { - "file": "metadata---docs-api-q-widget-287-e6c.5cbf78a727e1cde95092.js", - "hash": "3eed8f1ee8b9ea81819f", - "publicPath": "/metadata---docs-api-q-widget-287-e6c.5cbf78a727e1cde95092.js" + "file": "metadata---docs-api-q-widget-287-e6c.752cd1b3016df638f94a.js", + "hash": "4ec2a2157a5c81e1b61a", + "publicPath": "/metadata---docs-api-q-widget-287-e6c.752cd1b3016df638f94a.js" } ] }, "111": { "js": [ { - "file": "metadata---docs-api-qt-enums-423-cf9.799ad4b2f7ae2ad9e3e5.js", - "hash": "15d086a6b85499a9eeb8", - "publicPath": "/metadata---docs-api-qt-enums-423-cf9.799ad4b2f7ae2ad9e3e5.js" + "file": "metadata---docs-api-qt-enums-423-cf9.9c502c0df6e86ab24cca.js", + "hash": "5b1cb210ad48c042c3d9", + "publicPath": "/metadata---docs-api-qt-enums-423-cf9.9c502c0df6e86ab24cca.js" } ] }, "112": { "js": [ { - "file": "metadata---docs-api-synopsis-21-f-a62.6465165dff9d1055905a.js", - "hash": "de5fd2e956a6614580e7", - "publicPath": "/metadata---docs-api-synopsis-21-f-a62.6465165dff9d1055905a.js" + "file": "metadata---docs-api-synopsis-21-f-a62.c56bf2a521ae6b497e20.js", + "hash": "3216cdf1c1f516b02af9", + "publicPath": "/metadata---docs-api-synopsis-21-f-a62.c56bf2a521ae6b497e20.js" } ] }, "113": { "js": [ { - "file": "metadata---docs-api-yoga-widget-95-c-f8b.4288592a965b2478e365.js", - "hash": "c568a6f188429f675748", - "publicPath": "/metadata---docs-api-yoga-widget-95-c-f8b.4288592a965b2478e365.js" + "file": "metadata---docs-api-yoga-widget-95-c-f8b.7d9a86f2886eb45b6048.js", + "hash": "506a6ccfce59bfcb7737", + "publicPath": "/metadata---docs-api-yoga-widget-95-c-f8b.7d9a86f2886eb45b6048.js" } ] }, "114": { "js": [ { - "file": "metadata---docs-development-common-errors-402-ef4.2278b16151ee83b70d42.js", - "hash": "254069c68f9f54bbd62f", - "publicPath": "/metadata---docs-development-common-errors-402-ef4.2278b16151ee83b70d42.js" + "file": "metadata---docs-development-common-errors-402-ef4.298f336a8991bfbcf6bb.js", + "hash": "c344cbe2428a22fa5896", + "publicPath": "/metadata---docs-development-common-errors-402-ef4.298f336a8991bfbcf6bb.js" } ] }, "115": { "js": [ { - "file": "metadata---docs-development-debuggingc-36-26a.ece7f5fe52e59a94edc7.js", - "hash": "cb68d06bf7928b68e269", - "publicPath": "/metadata---docs-development-debuggingc-36-26a.ece7f5fe52e59a94edc7.js" + "file": "metadata---docs-development-debuggingc-36-26a.64754469222720788ce3.js", + "hash": "baf7848556d1211992fc", + "publicPath": "/metadata---docs-development-debuggingc-36-26a.64754469222720788ce3.js" } ] }, "116": { "js": [ { - "file": "metadata---docs-development-getting-started-89-b-c7a.7cb9980eac431c87f351.js", - "hash": "9b54ba62c5b2ccfbbb3d", - "publicPath": "/metadata---docs-development-getting-started-89-b-c7a.7cb9980eac431c87f351.js" + "file": "metadata---docs-development-getting-started-89-b-c7a.fb9319d03e6e86a45c0e.js", + "hash": "b220d5f863b10cc3e9f5", + "publicPath": "/metadata---docs-development-getting-started-89-b-c7a.fb9319d03e6e86a45c0e.js" } ] }, "117": { "js": [ { - "file": "metadata---docs-development-readm-ec-6-c-332.89a6ec882abd5a9d2dbf.js", - "hash": "e5a5163a39ce7a0499e2", - "publicPath": "/metadata---docs-development-readm-ec-6-c-332.89a6ec882abd5a9d2dbf.js" + "file": "metadata---docs-development-readm-ec-6-c-332.240c99c245a33c70d252.js", + "hash": "c0fa9a5ada2fe097991c", + "publicPath": "/metadata---docs-development-readm-ec-6-c-332.240c99c245a33c70d252.js" } ] }, "118": { "js": [ { - "file": "metadata---docs-development-setting-up-979-75f.2dc3a735cddac97a14cc.js", - "hash": "6ced0e0b739b7929b531", - "publicPath": "/metadata---docs-development-setting-up-979-75f.2dc3a735cddac97a14cc.js" + "file": "metadata---docs-development-setting-up-979-75f.3b741015d72dfa75b196.js", + "hash": "a4a8686220d42cecfe8a", + "publicPath": "/metadata---docs-development-setting-up-979-75f.3b741015d72dfa75b196.js" } ] }, "119": { "js": [ { - "file": "metadata---docs-development-signal-and-event-handling-0-b-5-692.96786c0bf5b413a0c737.js", - "hash": "2b069e87a2387ebabbc1", - "publicPath": "/metadata---docs-development-signal-and-event-handling-0-b-5-692.96786c0bf5b413a0c737.js" + "file": "metadata---docs-development-signal-and-event-handling-0-b-5-692.35b33da93ce5da99e907.js", + "hash": "1eeab5ef11440d2708ca", + "publicPath": "/metadata---docs-development-signal-and-event-handling-0-b-5-692.35b33da93ce5da99e907.js" } ] }, "120": { "js": [ { - "file": "metadata---docs-development-styling-1-c-2-0d6.8829c5502955ccec4576.js", - "hash": "b2d89a39af5a4382649b", - "publicPath": "/metadata---docs-development-styling-1-c-2-0d6.8829c5502955ccec4576.js" + "file": "metadata---docs-development-styling-1-c-2-0d6.8540757286a4f42cfdf6.js", + "hash": "717b487ff88453d360ed", + "publicPath": "/metadata---docs-development-styling-1-c-2-0d6.8540757286a4f42cfdf6.js" } ] }, "121": { "js": [ { - "file": "metadata---docs-development-wrapping-widgets-303-fb8.7de59ea4ff29a4f9f36c.js", - "hash": "3e7d6f98266420e44eff", - "publicPath": "/metadata---docs-development-wrapping-widgets-303-fb8.7de59ea4ff29a4f9f36c.js" + "file": "metadata---docs-development-wrapping-widgets-303-fb8.2d38d581040b086d6d3b.js", + "hash": "67f20efffe3f37cf9a4f", + "publicPath": "/metadata---docs-development-wrapping-widgets-303-fb8.2d38d581040b086d6d3b.js" } ] }, "122": { "js": [ { - "file": "metadata---docs-doc-12-a-3-5a1.f3b9bb0d78acf6a22788.js", - "hash": "c9fb94c8fc9e1d8e423a", - "publicPath": "/metadata---docs-doc-12-a-3-5a1.f3b9bb0d78acf6a22788.js" + "file": "metadata---docs-doc-12-a-3-5a1.f25ce25e5861f75b58b8.js", + "hash": "d626786e1ac28dc631e5", + "publicPath": "/metadata---docs-doc-12-a-3-5a1.f25ce25e5861f75b58b8.js" } ] }, "123": { "js": [ { - "file": "metadata---docs-faq-59-d-2b9.fac6dd94ae51c2c0aa28.js", - "hash": "c8a2aeab85d0317d1adf", - "publicPath": "/metadata---docs-faq-59-d-2b9.fac6dd94ae51c2c0aa28.js" + "file": "metadata---docs-faq-59-d-2b9.5d114d4e232f1a0cf459.js", + "hash": "811c1949c6121d5ce64f", + "publicPath": "/metadata---docs-faq-59-d-2b9.5d114d4e232f1a0cf459.js" } ] }, "124": { "js": [ { - "file": "metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f.111c69f6181f9610cd3a.js", - "hash": "03db78e0fc1be1002f70", - "publicPath": "/metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f.111c69f6181f9610cd3a.js" + "file": "metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f.63d65d8e47af687086a3.js", + "hash": "04ae1097ba2bbc54b4a7", + "publicPath": "/metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f.63d65d8e47af687086a3.js" } ] }, "125": { "js": [ { - "file": "metadata---docs-guides-debugging-970-fb8.6d5daf600011c2bbb3d0.js", - "hash": "4a070ecf1fe941d77060", - "publicPath": "/metadata---docs-guides-debugging-970-fb8.6d5daf600011c2bbb3d0.js" + "file": "metadata---docs-guides-debugging-970-fb8.05d6da3585364e561eac.js", + "hash": "eb93fa6fb0ef1a0e14e1", + "publicPath": "/metadata---docs-guides-debugging-970-fb8.05d6da3585364e561eac.js" } ] }, "126": { "js": [ { - "file": "metadata---docs-guides-debugging-in-vscodebf-8-5b0.391f49f7fdbdeb652131.js", - "hash": "880d9e791f076a4e3128", - "publicPath": "/metadata---docs-guides-debugging-in-vscodebf-8-5b0.391f49f7fdbdeb652131.js" + "file": "metadata---docs-guides-debugging-in-vscodebf-8-5b0.aa11112a440d189ae143.js", + "hash": "adc91bcc0465ec91a704", + "publicPath": "/metadata---docs-guides-debugging-in-vscodebf-8-5b0.aa11112a440d189ae143.js" } ] }, @@ -1680,81 +1680,81 @@ "128": { "js": [ { - "file": "metadata---docs-guides-handle-events-5-eb-540.b339e07967c7ac77fa33.js", - "hash": "308599142b4df6f92383", - "publicPath": "/metadata---docs-guides-handle-events-5-eb-540.b339e07967c7ac77fa33.js" + "file": "metadata---docs-guides-handle-events-5-eb-540.ada1b27a8ef4d934f262.js", + "hash": "167339054ce92cb3eddb", + "publicPath": "/metadata---docs-guides-handle-events-5-eb-540.ada1b27a8ef4d934f262.js" } ] }, "129": { "js": [ { - "file": "metadata---docs-guides-images-915-5ee.73d32cbb57e807926c33.js", - "hash": "8de73f6acf594ca02a47", - "publicPath": "/metadata---docs-guides-images-915-5ee.73d32cbb57e807926c33.js" + "file": "metadata---docs-guides-images-915-5ee.5818714c1c2236829cd9.js", + "hash": "52f149bb2e0578312b95", + "publicPath": "/metadata---docs-guides-images-915-5ee.5818714c1c2236829cd9.js" } ] }, "130": { "js": [ { - "file": "metadata---docs-guides-layoutf-65-d7d.2ce91fdc2faeac2302fc.js", - "hash": "5a172ff7d4a7cfe9f156", - "publicPath": "/metadata---docs-guides-layoutf-65-d7d.2ce91fdc2faeac2302fc.js" + "file": "metadata---docs-guides-layoutf-65-d7d.7b9529aa7167e6e9c279.js", + "hash": "80b7abc9764555fc7618", + "publicPath": "/metadata---docs-guides-layoutf-65-d7d.7b9529aa7167e6e9c279.js" } ] }, "131": { "js": [ { - "file": "metadata---docs-guides-networkingdfd-ce0.368b614be03a050c631f.js", - "hash": "76c892169b6190e2e576", - "publicPath": "/metadata---docs-guides-networkingdfd-ce0.368b614be03a050c631f.js" + "file": "metadata---docs-guides-networkingdfd-ce0.f1ba336ad88ed6000688.js", + "hash": "3b3ce04e99dc170eb5dc", + "publicPath": "/metadata---docs-guides-networkingdfd-ce0.f1ba336ad88ed6000688.js" } ] }, "132": { "js": [ { - "file": "metadata---docs-guides-nodegui-architecture-550-b82.b594e6687cc37be69cb8.js", - "hash": "29574585f506d4ece7ee", - "publicPath": "/metadata---docs-guides-nodegui-architecture-550-b82.b594e6687cc37be69cb8.js" + "file": "metadata---docs-guides-nodegui-architecture-550-b82.4560a51d468b6245da2a.js", + "hash": "01506b7371fee09741b1", + "publicPath": "/metadata---docs-guides-nodegui-architecture-550-b82.4560a51d468b6245da2a.js" } ] }, "133": { "js": [ { - "file": "metadata---docs-guides-scroll-view-9-a-9-2ac.e6132cbe30a884a62018.js", - "hash": "85a222933ae99a86a3df", - "publicPath": "/metadata---docs-guides-scroll-view-9-a-9-2ac.e6132cbe30a884a62018.js" + "file": "metadata---docs-guides-scroll-view-9-a-9-2ac.1493d9e831f35d3006ba.js", + "hash": "8558f4098b422c8de454", + "publicPath": "/metadata---docs-guides-scroll-view-9-a-9-2ac.1493d9e831f35d3006ba.js" } ] }, "134": { "js": [ { - "file": "metadata---docs-guides-styling-9-ea-213.818c1fa17aa62a091b0a.js", - "hash": "040107372d6d8e1fda76", - "publicPath": "/metadata---docs-guides-styling-9-ea-213.818c1fa17aa62a091b0a.js" + "file": "metadata---docs-guides-styling-9-ea-213.5ebc576a6a9642dbbe5d.js", + "hash": "a2edecdce08eea484e10", + "publicPath": "/metadata---docs-guides-styling-9-ea-213.5ebc576a6a9642dbbe5d.js" } ] }, "135": { "js": [ { - "file": "metadata---docs-guides-tutorial-1-f-1-23b.ffe199dc74b1462b11cb.js", - "hash": "c3b9dfe538cde3985456", - "publicPath": "/metadata---docs-guides-tutorial-1-f-1-23b.ffe199dc74b1462b11cb.js" + "file": "metadata---docs-guides-tutorial-1-f-1-23b.81a7a090a6ceb13dc5b6.js", + "hash": "336486bcb0e9aeaf97cf", + "publicPath": "/metadata---docs-guides-tutorial-1-f-1-23b.81a7a090a6ceb13dc5b6.js" } ] }, "136": { "js": [ { - "file": "metadata---docs-guides-using-native-node-modules-31-f-551.ec0eb319d94123d20db5.js", - "hash": "f5b91b4192ca85bd83bf", - "publicPath": "/metadata---docs-guides-using-native-node-modules-31-f-551.ec0eb319d94123d20db5.js" + "file": "metadata---docs-guides-using-native-node-modules-31-f-551.283cc113c9ff085e69e1.js", + "hash": "6dd15b771f90929f94bf", + "publicPath": "/metadata---docs-guides-using-native-node-modules-31-f-551.283cc113c9ff085e69e1.js" } ] }, @@ -1770,9 +1770,9 @@ "138": { "js": [ { - "file": "runtime~main.ba7378f2c7d4a1c03261.js", - "hash": "2ca298b0682fa5978331", - "publicPath": "/runtime~main.ba7378f2c7d4a1c03261.js" + "file": "runtime~main.ee8acd8ccaafe5ef3d75.js", + "hash": "ec745d1d40cfbe8eae7a", + "publicPath": "/runtime~main.ee8acd8ccaafe5ef3d75.js" } ] }, diff --git a/content---docs-api-component-4-ef-195.ac86aa3082e629a0fd98.js b/content---docs-api-component-4-ef-195.1e360de96ebacb00f20d.js similarity index 97% rename from content---docs-api-component-4-ef-195.ac86aa3082e629a0fd98.js rename to content---docs-api-component-4-ef-195.1e360de96ebacb00f20d.js index 43a4949e8..137e1f045 100644 --- a/content---docs-api-component-4-ef-195.ac86aa3082e629a0fd98.js +++ b/content---docs-api-component-4-ef-195.1e360de96ebacb00f20d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(0),o=n.n(r),a=o.a.createContext({}),i=function(e){var t=o.a.useContext(a),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return o.a.createElement(a.Provider,{value:t},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},p=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),u=r,d=p[c+"."+u]||p[u]||l[u]||a;return n?o.a.createElement(d,Object.assign({},{ref:t},s,{components:n})):o.a.createElement(d,Object.assign({},{ref:t},s))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:r,i[1]=c;for(var u=2;u=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={sidebar_label:"Component",title:"Component"},c=[{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[]}],s={rightToc:c},l="wrapper";function p(e){var t=e.components,n=a(e,["components"]);return Object(r.b)(l,o({},s,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Abstract class that is root most base class for all widgets and layouts in the NodeGui World.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"This class is used to add core properties to all widgets, layouts etc in NodeGui world. Currently it helps us maintain references to the native C++ instance of the widget or layout. It also helps in preventing gc of child elements of a layout or widget")),Object(r.b)("p",null,Object(r.b)("inlineCode",{parentName:"p"},"Component")," is an abstract class and hence no instances of the same should be created. It exists so that we can add core functionalities to all widgets and layouts easily. This is an internal class."),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Component is the base class for YogaWidget and NodeLayout which means all widgets and layouts inherit it aswell. Its the root base class in NodeGui world")),Object(r.b)("p",null,"To get a clearer picture you can take a look at the Component source code here: ",Object(r.b)("inlineCode",{parentName:"p"},"src/lib/core/Component/index.ts")),Object(r.b)("h2",{id:"static-methods"},"Static Methods"),Object(r.b)("p",null,"There are no public static methods for Component."),Object(r.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(r.b)("p",null,"There are no public instance properties for Component."),Object(r.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(r.b)("p",null,"There are no public instance methods for Component."))}p.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(0),o=n.n(r),a=o.a.createContext({}),i=function(e){var t=o.a.useContext(a),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return o.a.createElement(a.Provider,{value:t},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},p=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),u=r,d=p[c+"."+u]||p[u]||l[u]||a;return n?o.a.createElement(d,Object.assign({},{ref:t},s,{components:n})):o.a.createElement(d,Object.assign({},{ref:t},s))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:r,i[1]=c;for(var u=2;u=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={sidebar_label:"Component",title:"Component"},c=[{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[]}],s={rightToc:c},l="wrapper";function p(e){var t=e.components,n=a(e,["components"]);return Object(r.b)(l,o({},s,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Abstract class that is root most base class for all widgets and layouts in the NodeGui World.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"This class is used to add core properties to all widgets, layouts etc in NodeGui world. Currently it helps us maintain references to the native C++ instance of the widget or layout. It also helps in preventing gc of child elements of a layout or widget")),Object(r.b)("p",null,Object(r.b)("inlineCode",{parentName:"p"},"Component")," is an abstract class and hence no instances of the same should be created. It exists so that we can add core functionalities to all widgets and layouts easily. This is an internal class."),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Component is the base class for YogaWidget and NodeLayout which means all widgets and layouts inherit it aswell. Its the root base class in NodeGui world")),Object(r.b)("p",null,"To get a clearer picture you can take a look at the Component source code here: ",Object(r.b)("inlineCode",{parentName:"p"},"src/lib/core/Component/index.ts")),Object(r.b)("h2",{id:"static-methods"},"Static Methods"),Object(r.b)("p",null,"There are no public static methods for Component."),Object(r.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(r.b)("p",null,"There are no public instance properties for Component."),Object(r.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(r.b)("p",null,"There are no public instance methods for Component."))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-event-widgetac-6-11b.ea7e99ed29f9723e18e6.js b/content---docs-api-event-widgetac-6-11b.2d175fd230d2b7d3074c.js similarity index 98% rename from content---docs-api-event-widgetac-6-11b.ea7e99ed29f9723e18e6.js rename to content---docs-api-event-widgetac-6-11b.2d175fd230d2b7d3074c.js index 87d94593b..01e4400f7 100644 --- a/content---docs-api-event-widgetac-6-11b.ea7e99ed29f9723e18e6.js +++ b/content---docs-api-event-widgetac-6-11b.2d175fd230d2b7d3074c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return p}));var a=n(0),i=n.n(a),r=i.a.createContext({}),l=function(e){var t=i.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},o=function(e){var t=l(e.components);return i.a.createElement(r.Provider,{value:t},e.children)};var s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),d=l(n),p=a,b=d[o+"."+p]||d[p]||c[p]||r;return n?i.a.createElement(b,Object.assign({},{ref:t},s,{components:n})):i.a.createElement(b,Object.assign({},{ref:t},s))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,l=new Array(r);l[0]=d;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[s]="string"==typeof e?e:a,l[1]=o;for(var p=2;p=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l={sidebar_label:"EventWidget",title:"EventWidget"},o=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"widget.addEventListener(eventType, callback)",id:"widgetaddeventlistenereventtype-callback",children:[]},{value:"widget.removeEventListener(eventType, callback?)",id:"widgetremoveeventlistenereventtype-callback",children:[]}]}],s={rightToc:o},c="wrapper";function d(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(c,i({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Abstract class that adds event handling support to all widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class implements an event emitter and merges it with Qt's event and signal system. It allows us to register and unregister event and signal listener at will from javascript")),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"EventWidget")," is an abstract class and hence no instances of the same should be created. It exists so that we can add event handling functionalities to all widget's easily. This is an internal class."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"EventWidget is the base class for NodeWidget which means all widgets inherit it aswell. It inherits from another abstract class ",Object(a.b)("a",i({parentName:"strong"},{href:"/docs/api/YogaWidget"}),"YogaWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-javascript"}),'const { QWidget, QWidgetEvents } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\n// addEventListener is a method from EventWidget\nview.addEventListener("MouseMove", () => {\n console.log("mouse moved");\n});\n\nor;\n\n// addEventListener is a method from EventWidget\nview.addEventListener(QWidgetEvents.MouseMove, () => {\n console.log("mouse moved");\n});\n')),Object(a.b)("p",null,"EventWidget will contain all methods and properties that are useful to handle events and signals of widgets in the NodeGui world."),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"EventWidget can access all the static methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/YogaWidget"}),"YogaWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"EventWidget can access all the instance properties defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/YogaWidget"}),"YogaWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"EventWidget can access all the instance methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/YogaWidget"}),"YogaWidget")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"widgetaddeventlistenereventtype-callback"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.addEventListener(eventType, callback)")),Object(a.b)("p",null,"Adds an event listener to the widget to listen to events that occur on a widget."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"eventType")," string - The event or signal you wish to listen to for the widget. Every widget exports its own enum of all possible events and signal types it can take. For example: ",Object(a.b)("inlineCode",{parentName:"p"},"QWidget")," exports ",Object(a.b)("inlineCode",{parentName:"p"},"QWidgetEvents"),", ",Object(a.b)("inlineCode",{parentName:"p"},"QPushButton")," exports ",Object(a.b)("inlineCode",{parentName:"p"},"QPushButtonEvents"),".")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"callback")," (payload?: NativeEvent | any) => void - A callback function to invoke when an event occurs. Usually you receive a nativeEvent or a string as argument."))),Object(a.b)("h3",{id:"widgetremoveeventlistenereventtype-callback"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.removeEventListener(eventType, callback?)")),Object(a.b)("p",null,"Removes the specified event listener from the widget."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"eventType")," string - The event or signal for which you wish to remove the listener.")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"callback")," Function (",Object(a.b)("em",{parentName:"p"},"Optional"),") - If specified the removeEventListener will remove the specified listener only, otherwise all eventlisteners of the eventType on the widget will be removed."))))}d.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return p}));var a=n(0),i=n.n(a),r=i.a.createContext({}),l=function(e){var t=i.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},o=function(e){var t=l(e.components);return i.a.createElement(r.Provider,{value:t},e.children)};var s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),d=l(n),p=a,b=d[o+"."+p]||d[p]||c[p]||r;return n?i.a.createElement(b,Object.assign({},{ref:t},s,{components:n})):i.a.createElement(b,Object.assign({},{ref:t},s))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,l=new Array(r);l[0]=d;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[s]="string"==typeof e?e:a,l[1]=o;for(var p=2;p=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l={sidebar_label:"EventWidget",title:"EventWidget"},o=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"widget.addEventListener(eventType, callback)",id:"widgetaddeventlistenereventtype-callback",children:[]},{value:"widget.removeEventListener(eventType, callback?)",id:"widgetremoveeventlistenereventtype-callback",children:[]}]}],s={rightToc:o},c="wrapper";function d(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(c,i({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Abstract class that adds event handling support to all widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class implements an event emitter and merges it with Qt's event and signal system. It allows us to register and unregister event and signal listener at will from javascript")),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"EventWidget")," is an abstract class and hence no instances of the same should be created. It exists so that we can add event handling functionalities to all widget's easily. This is an internal class."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"EventWidget is the base class for NodeWidget which means all widgets inherit it aswell. It inherits from another abstract class ",Object(a.b)("a",i({parentName:"strong"},{href:"/docs/api/YogaWidget"}),"YogaWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-javascript"}),'const { QWidget, QWidgetEvents } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\n// addEventListener is a method from EventWidget\nview.addEventListener("MouseMove", () => {\n console.log("mouse moved");\n});\n\nor;\n\n// addEventListener is a method from EventWidget\nview.addEventListener(QWidgetEvents.MouseMove, () => {\n console.log("mouse moved");\n});\n')),Object(a.b)("p",null,"EventWidget will contain all methods and properties that are useful to handle events and signals of widgets in the NodeGui world."),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"EventWidget can access all the static methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/YogaWidget"}),"YogaWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"EventWidget can access all the instance properties defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/YogaWidget"}),"YogaWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"EventWidget can access all the instance methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/YogaWidget"}),"YogaWidget")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"widgetaddeventlistenereventtype-callback"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.addEventListener(eventType, callback)")),Object(a.b)("p",null,"Adds an event listener to the widget to listen to events that occur on a widget."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"eventType")," string - The event or signal you wish to listen to for the widget. Every widget exports its own enum of all possible events and signal types it can take. For example: ",Object(a.b)("inlineCode",{parentName:"p"},"QWidget")," exports ",Object(a.b)("inlineCode",{parentName:"p"},"QWidgetEvents"),", ",Object(a.b)("inlineCode",{parentName:"p"},"QPushButton")," exports ",Object(a.b)("inlineCode",{parentName:"p"},"QPushButtonEvents"),".")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"callback")," (payload?: NativeEvent | any) => void - A callback function to invoke when an event occurs. Usually you receive a nativeEvent or a string as argument."))),Object(a.b)("h3",{id:"widgetremoveeventlistenereventtype-callback"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.removeEventListener(eventType, callback?)")),Object(a.b)("p",null,"Removes the specified event listener from the widget."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"eventType")," string - The event or signal for which you wish to remove the listener.")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"callback")," Function (",Object(a.b)("em",{parentName:"p"},"Optional"),") - If specified the removeEventListener will remove the specified listener only, otherwise all eventlisteners of the eventType on the widget will be removed."))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-flex-layout-3-dc-a16.e9a291d5978a978e915d.js b/content---docs-api-flex-layout-3-dc-a16.d9197beb7ed7082424b9.js similarity index 98% rename from content---docs-api-flex-layout-3-dc-a16.e9a291d5978a978e915d.js rename to content---docs-api-flex-layout-3-dc-a16.d9197beb7ed7082424b9.js index 8b10915cf..9d976e5fd 100644 --- a/content---docs-api-flex-layout-3-dc-a16.e9a291d5978a978e915d.js +++ b/content---docs-api-flex-layout-3-dc-a16.d9197beb7ed7082424b9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{173:function(e,t,l){"use strict";l.d(t,"a",(function(){return d})),l.d(t,"b",(function(){return u}));var i=l(0),n=l.n(i),a=n.a.createContext({}),o=function(e){var t=n.a.useContext(a),l=t;return e&&(l="function"==typeof e?e(t):Object.assign({},t,e)),l},d=function(e){var t=o(e.components);return n.a.createElement(a.Provider,{value:t},e.children)};var c="mdxType",r={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},b=Object(i.forwardRef)((function(e,t){var l=e.components,i=e.mdxType,a=e.originalType,d=e.parentName,c=function(e,t){var l={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(l[i]=e[i]);return l}(e,["components","mdxType","originalType","parentName"]),b=o(l),u=i,h=b[d+"."+u]||b[u]||r[u]||a;return l?n.a.createElement(h,Object.assign({},{ref:t},c,{components:l})):n.a.createElement(h,Object.assign({},{ref:t},c))}));function u(e,t){var l=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=l.length,o=new Array(a);o[0]=b;var d={};for(var r in t)hasOwnProperty.call(t,r)&&(d[r]=t[r]);d.originalType=e,d[c]="string"==typeof e?e:i,o[1]=d;for(var u=2;u=0||(n[l]=e[l]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(n[l]=e[l])}return n}var o={sidebar_label:"FlexLayout",title:"FlexLayout"},d=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"layout.addWidget(childWidget, childFlexNode?)",id:"layoutaddwidgetchildwidget-childflexnode",children:[]},{value:"layout.insertChildBefore(childWidget, beforeChildWidget, childFlexNode?, beforeChildFlexNode?)",id:"layoutinsertchildbeforechildwidget-beforechildwidget-childflexnode-beforechildflexnode",children:[]},{value:"layout.removeWidget(childWidget, childFlexNode?)",id:"layoutremovewidgetchildwidget-childflexnode",children:[]},{value:"layout.setFlexNode(flexNode)",id:"layoutsetflexnodeflexnode",children:[]}]}],c={rightToc:d},r="wrapper";function b(e){var t=e.components,l=a(e,["components"]);return Object(i.b)(r,n({},c,l,{components:t,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Custom layout to help layout child widgets using flex layout.")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"This class is a JS wrapper around custom Qt layout implemented using ",Object(i.b)("a",n({parentName:"strong"},{href:"https://github.com/facebook/yoga"}),"Yoga"))),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"FlexLayout")," can be used to layout all child NodeGui widgets using flex."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"FlexLayout inherits from ",Object(i.b)("a",n({parentName:"strong"},{href:"/docs/api/NodeLayout"}),"NodeLayout"))),Object(i.b)("h3",{id:"example"},"Example"),Object(i.b)("pre",null,Object(i.b)("code",n({parentName:"pre"},{className:"language-javascript"}),'const { FlexLayout, QWidget, QLabel } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nconst layout = new FlexLayout();\nview.setLayout(layout);\n\nconst label = new QLabel();\nlabel.setText("label1");\nconst label2 = new QLabel();\nlabel2.setText("label2");\n\nlayout.addWidget(label);\nlayout.addWidget(label2);\n')),Object(i.b)("h2",{id:"static-methods"},"Static Methods"),Object(i.b)("p",null,"FlexLayout can access all the static methods defined in ",Object(i.b)("a",n({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(i.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(i.b)("p",null,"FlexLayout can access all the instance properties defined in ",Object(i.b)("a",n({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(i.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(i.b)("p",null,"FlexLayout can access all the instance methods defined in ",Object(i.b)("a",n({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(i.b)("p",null,"Additionally it also has the following instance methods:"),Object(i.b)("h3",{id:"layoutaddwidgetchildwidget-childflexnode"},Object(i.b)("inlineCode",{parentName:"h3"},"layout.addWidget(childWidget, childFlexNode?)")),Object(i.b)("p",null,"Adds the childWidget to the layout. It calls the native method of custom FlexLayout."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - child widget that needs to be added to the layout."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childFlexNode")," flexNode ref (",Object(i.b)("em",{parentName:"li"},"Optional"),") - flexNode reference of the child widget. You can get this by calling ",Object(i.b)("inlineCode",{parentName:"li"},"childWidget.getFlexNode()"),".")),Object(i.b)("h3",{id:"layoutinsertchildbeforechildwidget-beforechildwidget-childflexnode-beforechildflexnode"},Object(i.b)("inlineCode",{parentName:"h3"},"layout.insertChildBefore(childWidget, beforeChildWidget, childFlexNode?, beforeChildFlexNode?)")),Object(i.b)("p",null,"Adds the childWidget before another already set childWidget in the layout. It calls the native method of custom FlexLayout."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - child widget that needs to be added to the layout."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"beforeChildWidget")," NodeWidget - the widget before which the ",Object(i.b)("inlineCode",{parentName:"li"},"childWidget")," needs to be added in the layout."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childFlexNode")," flexNode ref (",Object(i.b)("em",{parentName:"li"},"Optional"),") - flexNode reference of the child widget. You can get this by calling ",Object(i.b)("inlineCode",{parentName:"li"},"childWidget.getFlexNode()"),"."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"beforeChildFlexNode")," flexNode ref (",Object(i.b)("em",{parentName:"li"},"Optional"),") - flexNode reference of the before child widget. You can get this by calling ",Object(i.b)("inlineCode",{parentName:"li"},"beforeChildWidget.getFlexNode()"),".")),Object(i.b)("h3",{id:"layoutremovewidgetchildwidget-childflexnode"},Object(i.b)("inlineCode",{parentName:"h3"},"layout.removeWidget(childWidget, childFlexNode?)")),Object(i.b)("p",null,"Removes the childWidget from the layout. It calls the native method of custom FlexLayout."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - child widget that needs to be added to the layout."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childFlexNode")," flexNode ref (",Object(i.b)("em",{parentName:"li"},"Optional"),") - flexNode reference of the child widget. You can get this by calling ",Object(i.b)("inlineCode",{parentName:"li"},"childWidget.getFlexNode()"),".")),Object(i.b)("h3",{id:"layoutsetflexnodeflexnode"},Object(i.b)("inlineCode",{parentName:"h3"},"layout.setFlexNode(flexNode)")),Object(i.b)("p",null,"A layout doesnt have its own flexNode. This method sets the flex Node to use for calculating position of the child widgets. Hence this should be always equal to the flex node of widget for which this layout is set. This is called internally by ",Object(i.b)("inlineCode",{parentName:"p"},"widget.setLayout"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"flexNode")," flexNode ref - flexNode reference of the widget for which this layout is set. You can get this by calling ",Object(i.b)("inlineCode",{parentName:"li"},"widget.getFlexNode()"),".")))}b.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{173:function(e,t,l){"use strict";l.d(t,"a",(function(){return d})),l.d(t,"b",(function(){return u}));var i=l(0),n=l.n(i),a=n.a.createContext({}),o=function(e){var t=n.a.useContext(a),l=t;return e&&(l="function"==typeof e?e(t):Object.assign({},t,e)),l},d=function(e){var t=o(e.components);return n.a.createElement(a.Provider,{value:t},e.children)};var c="mdxType",r={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},b=Object(i.forwardRef)((function(e,t){var l=e.components,i=e.mdxType,a=e.originalType,d=e.parentName,c=function(e,t){var l={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(l[i]=e[i]);return l}(e,["components","mdxType","originalType","parentName"]),b=o(l),u=i,h=b[d+"."+u]||b[u]||r[u]||a;return l?n.a.createElement(h,Object.assign({},{ref:t},c,{components:l})):n.a.createElement(h,Object.assign({},{ref:t},c))}));function u(e,t){var l=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=l.length,o=new Array(a);o[0]=b;var d={};for(var r in t)hasOwnProperty.call(t,r)&&(d[r]=t[r]);d.originalType=e,d[c]="string"==typeof e?e:i,o[1]=d;for(var u=2;u=0||(n[l]=e[l]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(n[l]=e[l])}return n}var o={sidebar_label:"FlexLayout",title:"FlexLayout"},d=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"layout.addWidget(childWidget, childFlexNode?)",id:"layoutaddwidgetchildwidget-childflexnode",children:[]},{value:"layout.insertChildBefore(childWidget, beforeChildWidget, childFlexNode?, beforeChildFlexNode?)",id:"layoutinsertchildbeforechildwidget-beforechildwidget-childflexnode-beforechildflexnode",children:[]},{value:"layout.removeWidget(childWidget, childFlexNode?)",id:"layoutremovewidgetchildwidget-childflexnode",children:[]},{value:"layout.setFlexNode(flexNode)",id:"layoutsetflexnodeflexnode",children:[]}]}],c={rightToc:d},r="wrapper";function b(e){var t=e.components,l=a(e,["components"]);return Object(i.b)(r,n({},c,l,{components:t,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Custom layout to help layout child widgets using flex layout.")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"This class is a JS wrapper around custom Qt layout implemented using ",Object(i.b)("a",n({parentName:"strong"},{href:"https://github.com/facebook/yoga"}),"Yoga"))),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"FlexLayout")," can be used to layout all child NodeGui widgets using flex."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"FlexLayout inherits from ",Object(i.b)("a",n({parentName:"strong"},{href:"/docs/api/NodeLayout"}),"NodeLayout"))),Object(i.b)("h3",{id:"example"},"Example"),Object(i.b)("pre",null,Object(i.b)("code",n({parentName:"pre"},{className:"language-javascript"}),'const { FlexLayout, QWidget, QLabel } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nconst layout = new FlexLayout();\nview.setLayout(layout);\n\nconst label = new QLabel();\nlabel.setText("label1");\nconst label2 = new QLabel();\nlabel2.setText("label2");\n\nlayout.addWidget(label);\nlayout.addWidget(label2);\n')),Object(i.b)("h2",{id:"static-methods"},"Static Methods"),Object(i.b)("p",null,"FlexLayout can access all the static methods defined in ",Object(i.b)("a",n({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(i.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(i.b)("p",null,"FlexLayout can access all the instance properties defined in ",Object(i.b)("a",n({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(i.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(i.b)("p",null,"FlexLayout can access all the instance methods defined in ",Object(i.b)("a",n({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(i.b)("p",null,"Additionally it also has the following instance methods:"),Object(i.b)("h3",{id:"layoutaddwidgetchildwidget-childflexnode"},Object(i.b)("inlineCode",{parentName:"h3"},"layout.addWidget(childWidget, childFlexNode?)")),Object(i.b)("p",null,"Adds the childWidget to the layout. It calls the native method of custom FlexLayout."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - child widget that needs to be added to the layout."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childFlexNode")," flexNode ref (",Object(i.b)("em",{parentName:"li"},"Optional"),") - flexNode reference of the child widget. You can get this by calling ",Object(i.b)("inlineCode",{parentName:"li"},"childWidget.getFlexNode()"),".")),Object(i.b)("h3",{id:"layoutinsertchildbeforechildwidget-beforechildwidget-childflexnode-beforechildflexnode"},Object(i.b)("inlineCode",{parentName:"h3"},"layout.insertChildBefore(childWidget, beforeChildWidget, childFlexNode?, beforeChildFlexNode?)")),Object(i.b)("p",null,"Adds the childWidget before another already set childWidget in the layout. It calls the native method of custom FlexLayout."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - child widget that needs to be added to the layout."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"beforeChildWidget")," NodeWidget - the widget before which the ",Object(i.b)("inlineCode",{parentName:"li"},"childWidget")," needs to be added in the layout."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childFlexNode")," flexNode ref (",Object(i.b)("em",{parentName:"li"},"Optional"),") - flexNode reference of the child widget. You can get this by calling ",Object(i.b)("inlineCode",{parentName:"li"},"childWidget.getFlexNode()"),"."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"beforeChildFlexNode")," flexNode ref (",Object(i.b)("em",{parentName:"li"},"Optional"),") - flexNode reference of the before child widget. You can get this by calling ",Object(i.b)("inlineCode",{parentName:"li"},"beforeChildWidget.getFlexNode()"),".")),Object(i.b)("h3",{id:"layoutremovewidgetchildwidget-childflexnode"},Object(i.b)("inlineCode",{parentName:"h3"},"layout.removeWidget(childWidget, childFlexNode?)")),Object(i.b)("p",null,"Removes the childWidget from the layout. It calls the native method of custom FlexLayout."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - child widget that needs to be added to the layout."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"childFlexNode")," flexNode ref (",Object(i.b)("em",{parentName:"li"},"Optional"),") - flexNode reference of the child widget. You can get this by calling ",Object(i.b)("inlineCode",{parentName:"li"},"childWidget.getFlexNode()"),".")),Object(i.b)("h3",{id:"layoutsetflexnodeflexnode"},Object(i.b)("inlineCode",{parentName:"h3"},"layout.setFlexNode(flexNode)")),Object(i.b)("p",null,"A layout doesnt have its own flexNode. This method sets the flex Node to use for calculating position of the child widgets. Hence this should be always equal to the flex node of widget for which this layout is set. This is called internally by ",Object(i.b)("inlineCode",{parentName:"p"},"widget.setLayout"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"flexNode")," flexNode ref - flexNode reference of the widget for which this layout is set. You can get this by calling ",Object(i.b)("inlineCode",{parentName:"li"},"widget.getFlexNode()"),".")))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-node-layoutd-28-11a.847e9d4d8496c50cdba3.js b/content---docs-api-node-layoutd-28-11a.7f96edb54add3535633a.js similarity index 98% rename from content---docs-api-node-layoutd-28-11a.847e9d4d8496c50cdba3.js rename to content---docs-api-node-layoutd-28-11a.7f96edb54add3535633a.js index 79f9965ec..80ea4a3a9 100644 --- a/content---docs-api-node-layoutd-28-11a.847e9d4d8496c50cdba3.js +++ b/content---docs-api-node-layoutd-28-11a.7f96edb54add3535633a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{173:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return u}));var n=a(0),o=a.n(n),i=o.a.createContext({}),l=function(e){var t=o.a.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):Object.assign({},t,e)),a},r=function(e){var t=l(e.components);return o.a.createElement(i.Provider,{value:t},e.children)};var c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},s=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,r=e.parentName,c=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(a[n]=e[n]);return a}(e,["components","mdxType","originalType","parentName"]),s=l(a),u=n,p=s[r+"."+u]||s[u]||d[u]||i;return a?o.a.createElement(p,Object.assign({},{ref:t},c,{components:a})):o.a.createElement(p,Object.assign({},{ref:t},c))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=s;var r={};for(var d in t)hasOwnProperty.call(t,d)&&(r[d]=t[d]);r.originalType=e,r[c]="string"==typeof e?e:n,l[1]=r;for(var u=2;u=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var l={sidebar_label:"NodeLayout",title:"NodeLayout"},r=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"layout.type",id:"layouttype",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"layout.addWidget(childWidget, ...args)",id:"layoutaddwidgetchildwidget-args",children:[]},{value:"layout.activate()",id:"layoutactivate",children:[]},{value:"layout.invalidate()",id:"layoutinvalidate",children:[]},{value:"layout.update()",id:"layoutupdate",children:[]}]}],c={rightToc:r},d="wrapper";function s(e){var t=e.components,a=i(e,["components"]);return Object(n.b)(d,o({},c,a,{components:t,mdxType:"MDXLayout"}),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Abstract class to add functionalities common to all Layout.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"This class implements all methods, properties of Qt's ",Object(n.b)("a",o({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qlayout.html"}),"QLayout class")," so that it can be inherited by all layouts")),Object(n.b)("p",null,Object(n.b)("inlineCode",{parentName:"p"},"NodeLayout")," is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all layout's easily. Additionally it helps in typechecking process."),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"NodeLayout is the base class for all layouts. It inherits from another abstract class ",Object(n.b)("a",o({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(n.b)("h3",{id:"example"},"Example"),Object(n.b)("pre",null,Object(n.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const {\n NodeLayout,\n NodeWidget,\n FlexLayout,\n GridLayout,\n QPushButton,\n QWidget\n} = require("@nodegui/nodegui");\n\n// addChildToLayout can accept any layout since it expects NodeLayout\nconst addChildToLayout = (layout: NodeLayout, widget: NodeWidget) => {\n layout.addWidget(widget);\n};\n\naddChildToLayout(new FlexLayout(), new QPushButton());\naddChildToLayout(new GridLayout(), new QWidget());\n')),Object(n.b)("p",null,"NodeLayout will list all methods and properties that are common to all layouts in the NodeGui world."),Object(n.b)("h2",{id:"static-methods"},"Static Methods"),Object(n.b)("p",null,"NodeLayout can access all the static methods defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(n.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(n.b)("p",null,"NodeLayout can access all the instance properties defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(n.b)("p",null,"Additionally it also has the following instance properties:"),Object(n.b)("h3",{id:"layouttype"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.type")),Object(n.b)("p",null,"This will return the string ",Object(n.b)("inlineCode",{parentName:"p"},"layout")," for all layouts."),Object(n.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(n.b)("p",null,"NodeLayout can access all the instance methods defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(n.b)("p",null,"Additionally it also has the following instance methods:"),Object(n.b)("h3",{id:"layoutaddwidgetchildwidget-args"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.addWidget(childWidget, ...args)")),Object(n.b)("p",null,"This is an abstract method in NodeLayout class. All Layouts inheriting from NodeLayout should implement this method."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - Any widget in the NodeGui world."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"...args")," any[] - Additional params as required by the layout.")),Object(n.b)("h3",{id:"layoutactivate"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.activate()")),Object(n.b)("p",null,"Redoes the layout for parent widget of this layout if necessary. Returns true if the layout was redone."),Object(n.b)("h3",{id:"layoutinvalidate"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.invalidate()")),Object(n.b)("p",null,"Invalidates any cached information in this layout."),Object(n.b)("h3",{id:"layoutupdate"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.update()")),Object(n.b)("p",null,"Updates the layout for parent widget of this layout. You should generally not need to call this because it is automatically called at the most appropriate times."))}s.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{173:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return u}));var n=a(0),o=a.n(n),i=o.a.createContext({}),l=function(e){var t=o.a.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):Object.assign({},t,e)),a},r=function(e){var t=l(e.components);return o.a.createElement(i.Provider,{value:t},e.children)};var c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},s=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,r=e.parentName,c=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(a[n]=e[n]);return a}(e,["components","mdxType","originalType","parentName"]),s=l(a),u=n,p=s[r+"."+u]||s[u]||d[u]||i;return a?o.a.createElement(p,Object.assign({},{ref:t},c,{components:a})):o.a.createElement(p,Object.assign({},{ref:t},c))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=s;var r={};for(var d in t)hasOwnProperty.call(t,d)&&(r[d]=t[d]);r.originalType=e,r[c]="string"==typeof e?e:n,l[1]=r;for(var u=2;u=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var l={sidebar_label:"NodeLayout",title:"NodeLayout"},r=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"layout.type",id:"layouttype",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"layout.addWidget(childWidget, ...args)",id:"layoutaddwidgetchildwidget-args",children:[]},{value:"layout.activate()",id:"layoutactivate",children:[]},{value:"layout.invalidate()",id:"layoutinvalidate",children:[]},{value:"layout.update()",id:"layoutupdate",children:[]}]}],c={rightToc:r},d="wrapper";function s(e){var t=e.components,a=i(e,["components"]);return Object(n.b)(d,o({},c,a,{components:t,mdxType:"MDXLayout"}),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Abstract class to add functionalities common to all Layout.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"This class implements all methods, properties of Qt's ",Object(n.b)("a",o({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qlayout.html"}),"QLayout class")," so that it can be inherited by all layouts")),Object(n.b)("p",null,Object(n.b)("inlineCode",{parentName:"p"},"NodeLayout")," is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all layout's easily. Additionally it helps in typechecking process."),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"NodeLayout is the base class for all layouts. It inherits from another abstract class ",Object(n.b)("a",o({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(n.b)("h3",{id:"example"},"Example"),Object(n.b)("pre",null,Object(n.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const {\n NodeLayout,\n NodeWidget,\n FlexLayout,\n GridLayout,\n QPushButton,\n QWidget\n} = require("@nodegui/nodegui");\n\n// addChildToLayout can accept any layout since it expects NodeLayout\nconst addChildToLayout = (layout: NodeLayout, widget: NodeWidget) => {\n layout.addWidget(widget);\n};\n\naddChildToLayout(new FlexLayout(), new QPushButton());\naddChildToLayout(new GridLayout(), new QWidget());\n')),Object(n.b)("p",null,"NodeLayout will list all methods and properties that are common to all layouts in the NodeGui world."),Object(n.b)("h2",{id:"static-methods"},"Static Methods"),Object(n.b)("p",null,"NodeLayout can access all the static methods defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(n.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(n.b)("p",null,"NodeLayout can access all the instance properties defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(n.b)("p",null,"Additionally it also has the following instance properties:"),Object(n.b)("h3",{id:"layouttype"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.type")),Object(n.b)("p",null,"This will return the string ",Object(n.b)("inlineCode",{parentName:"p"},"layout")," for all layouts."),Object(n.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(n.b)("p",null,"NodeLayout can access all the instance methods defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(n.b)("p",null,"Additionally it also has the following instance methods:"),Object(n.b)("h3",{id:"layoutaddwidgetchildwidget-args"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.addWidget(childWidget, ...args)")),Object(n.b)("p",null,"This is an abstract method in NodeLayout class. All Layouts inheriting from NodeLayout should implement this method."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - Any widget in the NodeGui world."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"...args")," any[] - Additional params as required by the layout.")),Object(n.b)("h3",{id:"layoutactivate"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.activate()")),Object(n.b)("p",null,"Redoes the layout for parent widget of this layout if necessary. Returns true if the layout was redone."),Object(n.b)("h3",{id:"layoutinvalidate"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.invalidate()")),Object(n.b)("p",null,"Invalidates any cached information in this layout."),Object(n.b)("h3",{id:"layoutupdate"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.update()")),Object(n.b)("p",null,"Updates the layout for parent widget of this layout. You should generally not need to call this because it is automatically called at the most appropriate times."))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-node-widget-080-a39.fdf17f177a4ce4b722a9.js b/content---docs-api-node-widget-080-a39.4809ef000dc72fd628b4.js similarity index 99% rename from content---docs-api-node-widget-080-a39.fdf17f177a4ce4b722a9.js rename to content---docs-api-node-widget-080-a39.4809ef000dc72fd628b4.js index 92a511276..6e02ef0f0 100644 --- a/content---docs-api-node-widget-080-a39.fdf17f177a4ce4b722a9.js +++ b/content---docs-api-node-widget-080-a39.4809ef000dc72fd628b4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{173:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return c}));var n=i(0),a=i.n(n),d=a.a.createContext({}),l=function(e){var t=a.a.useContext(d),i=t;return e&&(i="function"==typeof e?e(t):Object.assign({},t,e)),i},r=function(e){var t=l(e.components);return a.a.createElement(d.Provider,{value:t},e.children)};var s="mdxType",b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},o=Object(n.forwardRef)((function(e,t){var i=e.components,n=e.mdxType,d=e.originalType,r=e.parentName,s=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(i[n]=e[n]);return i}(e,["components","mdxType","originalType","parentName"]),o=l(i),c=n,h=o[r+"."+c]||o[c]||b[c]||d;return i?a.a.createElement(h,Object.assign({},{ref:t},s,{components:i})):a.a.createElement(h,Object.assign({},{ref:t},s))}));function c(e,t){var i=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var d=i.length,l=new Array(d);l[0]=o;var r={};for(var b in t)hasOwnProperty.call(t,b)&&(r[b]=t[b]);r.originalType=e,r[s]="string"==typeof e?e:n,l[1]=r;for(var c=2;c=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var l={sidebar_label:"NodeWidget",title:"NodeWidget"},r=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"widget.layout",id:"widgetlayout",children:[]},{value:"widget.type",id:"widgettype",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"widget.show()",id:"widgetshow",children:[]},{value:"widget.resize(width, height)",id:"widgetresizewidth-height",children:[]},{value:"widget.close()",id:"widgetclose",children:[]},{value:"widget.setLayout(layout)",id:"widgetsetlayoutlayout",children:[]},{value:"widget.setStyleSheet(styleSheet)",id:"widgetsetstylesheetstylesheet",children:[]},{value:"widget.setCursor(cursor)",id:"widgetsetcursorcursor",children:[]},{value:"widget.setWindowIcon(icon)",id:"widgetsetwindowiconicon",children:[]},{value:"widget.setWindowState(state)",id:"widgetsetwindowstatestate",children:[]},{value:"widget.setWindowTitle(title)",id:"widgetsetwindowtitletitle",children:[]},{value:"widget.styleSheet()",id:"widgetstylesheet",children:[]},{value:"widget.hide()",id:"widgethide",children:[]},{value:"widget.move(x, y)",id:"widgetmovex-y",children:[]},{value:"widget.setObjectName(objectName)",id:"widgetsetobjectnameobjectname",children:[]},{value:"widget.objectName()",id:"widgetobjectname",children:[]},{value:"widget.setMouseTracking(isMouseTracked)",id:"widgetsetmousetrackingismousetracked",children:[]},{value:"widget.setEnabled(enabled)",id:"widgetsetenabledenabled",children:[]},{value:"widget.setFixedSize(width, height)",id:"widgetsetfixedsizewidth-height",children:[]},{value:"widget.setGeometry(x, y, width, height)",id:"widgetsetgeometryx-y-width-height",children:[]},{value:"widget.setMaximumSize(width, height)",id:"widgetsetmaximumsizewidth-height",children:[]},{value:"widget.setMinimumSize(width, height)",id:"widgetsetminimumsizewidth-height",children:[]},{value:"widget.repaint()",id:"widgetrepaint",children:[]},{value:"widget.update()",id:"widgetupdate",children:[]},{value:"widget.pos()",id:"widgetpos",children:[]},{value:"widget.size()",id:"widgetsize",children:[]},{value:"widget.updateGeometry()",id:"widgetupdategeometry",children:[]},{value:"widget.setAttribute(attributeName, switchOn)",id:"widgetsetattributeattributename-switchon",children:[]},{value:"widget.testAttribute(attributeName)",id:"widgettestattributeattributename",children:[]}]}],s={rightToc:r},b="wrapper";function o(e){var t=e.components,i=d(e,["components"]);return Object(n.b)(b,a({},s,i,{components:t,mdxType:"MDXLayout"}),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Abstract class to add functionalities common to all Widgets.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"This class implements all methods, properties of Qt's ",Object(n.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qwidget.html"}),"QWidget class")," so that it can be inherited by all widgets")),Object(n.b)("p",null,Object(n.b)("inlineCode",{parentName:"p"},"NodeWidget")," is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all widget's easily. Additionally it helps in type checking process. If you wish to create a ",Object(n.b)("inlineCode",{parentName:"p"},"div")," like widget use ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/QWidget"}),"QWidget")," instead."),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"NodeWidget is the base class for all widgets. It inherits from another abstract class ",Object(n.b)("a",a({parentName:"strong"},{href:"/docs/api/EventWidget"}),"EventWidget"))),Object(n.b)("h3",{id:"example"},"Example"),Object(n.b)("pre",null,Object(n.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const {\n NodeWidget,\n QPushButton,\n QWidget,\n QRadioButton\n} = require("@nodegui/nodegui");\n\n// showWidget can accept any widget since it expects NodeWidget\nconst showWidget = (widget: NodeWidget) => {\n widget.show();\n};\n\nshowWidget(new QPushButton());\nshowWidget(new QWidget());\nshowWidget(new QRadioButton());\n')),Object(n.b)("p",null,"NodeWidget will list all methods and properties that are common to all widgets in the NodeGui world."),Object(n.b)("h2",{id:"static-methods"},"Static Methods"),Object(n.b)("p",null,"NodeWidget can access all the static methods defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(n.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(n.b)("p",null,"NodeWidget can access all the instance properties defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(n.b)("p",null,"Additionally it also has the following instance properties:"),Object(n.b)("h3",{id:"widgetlayout"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.layout")),Object(n.b)("p",null,"A ",Object(n.b)("inlineCode",{parentName:"p"},"NodeLayout")," representing current layout that is set on the widget."),Object(n.b)("h3",{id:"widgettype"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.type")),Object(n.b)("p",null,"This will return the string ",Object(n.b)("inlineCode",{parentName:"p"},"widget")," for all widgets."),Object(n.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(n.b)("p",null,"NodeWidget can access all the instance methods defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(n.b)("p",null,"Additionally it also has the following instance methods:"),Object(n.b)("h3",{id:"widgetshow"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.show()")),Object(n.b)("p",null,"Shows the widget and its children. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#show"}),"QWidget: show"),"."),Object(n.b)("h3",{id:"widgetresizewidth-height"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.resize(width, height)")),Object(n.b)("p",null,"Resizes the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#resize-1"}),"QWidget: resize"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"width")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"height")," number - Pixels.")),Object(n.b)("h3",{id:"widgetclose"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.close()")),Object(n.b)("p",null,"Closes this widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#close"}),"QWidget: close"),".\nReturns true if the widget was closed; otherwise returns false."),Object(n.b)("h3",{id:"widgetsetlayoutlayout"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setLayout(layout)")),Object(n.b)("p",null,"Sets the layout manager for this widget to layout. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setLayout"}),"QWidget: setLayout"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"layout")," NodeLayout - Any layout that inherits from NodeLayout class.")),Object(n.b)("h3",{id:"widgetsetstylesheetstylesheet"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setStyleSheet(styleSheet)")),Object(n.b)("p",null,"Sets the property that holds the widget's style sheet. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#styleSheet-prop"}),"QWidget: styleSheet"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"styleSheet")," string - String which holds the widget's style sheet. Make sure you create this string using ",Object(n.b)("inlineCode",{parentName:"li"},"StyleSheet.create()"))),Object(n.b)("h3",{id:"widgetsetcursorcursor"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setCursor(cursor)")),Object(n.b)("p",null,"Sets the window mouse cursor. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#cursor-prop"}),"QWidget: setCursor"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"cursor")," CursorShape - Specifies current cursor for the window ",Object(n.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"CursorShape is an enum from Qt"))),Object(n.b)("h3",{id:"widgetsetwindowiconicon"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setWindowIcon(icon)")),Object(n.b)("p",null,"Sets the window icon. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#windowIcon-prop"}),"QWidget: setWindowIcon"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"icon")," QIcon - Specifies icon for the window.")),Object(n.b)("h3",{id:"widgetsetwindowstatestate"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setWindowState(state)")),Object(n.b)("p",null,"Sets the window state. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setWindowState"}),"QWidget: setWindowState"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"state")," WindowState - Specifies current state for the window ",Object(n.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"WindowState is an enum from Qt"))),Object(n.b)("h3",{id:"widgetsetwindowtitletitle"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setWindowTitle(title)")),Object(n.b)("p",null,"Sets the window title property. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#windowTitle-prop"}),"QWidget: setWindowTitle"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"title")," string - String which holds the windows title.")),Object(n.b)("h3",{id:"widgetstylesheet"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.styleSheet()")),Object(n.b)("p",null,"Gets the property that holds the widget's style sheet. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#styleSheet-prop"}),"QWidget: styleSheet"),"."),Object(n.b)("h3",{id:"widgethide"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.hide()")),Object(n.b)("p",null,"Hides the widget and its children. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#hide"}),"QWidget: hide"),"."),Object(n.b)("h3",{id:"widgetmovex-y"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.move(x, y)")),Object(n.b)("p",null,"Sets the screen position of the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#move-1"}),"QWidget: move"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"x")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"y")," number - Pixels.")),Object(n.b)("h3",{id:"widgetsetobjectnameobjectname"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setObjectName(objectName)")),Object(n.b)("p",null,"Sets the object name of the widget in Qt. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qobject.html#objectName-prop"}),"QObject: setObjectName"),". Object name can be analogous to ",Object(n.b)("inlineCode",{parentName:"p"},"id")," of an element in the web world. Using the objectName of the widget one can reference it in the Qt's stylesheet much like what we do with id in the web world."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"objectName")," string - String which holds the widget's object name.")),Object(n.b)("h3",{id:"widgetobjectname"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.objectName()")),Object(n.b)("p",null,"Gets the property that holds the widget's object name. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qobject.html#objectName-prop"}),"QObject: setObjectName"),"."),Object(n.b)("h3",{id:"widgetsetmousetrackingismousetracked"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setMouseTracking(isMouseTracked)")),Object(n.b)("p",null,"Sets the property that tells whether mouseTracking is enabled for the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#mouseTracking-prop"}),"QWidget: mouseTracking"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"isMouseTracked")," boolean - Set it to true to enable mouse tracking.")),Object(n.b)("h3",{id:"widgetsetenabledenabled"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setEnabled(enabled)")),Object(n.b)("p",null,"Sets the property that tells whether the widget is enabled. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#enabled-prop"}),"QWidget: enabled"),". In general an enabled widget handles keyboard and mouse events; a disabled widget does not."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"enabled")," boolean - Set it to true to enable the widget.")),Object(n.b)("h3",{id:"widgetsetfixedsizewidth-height"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setFixedSize(width, height)")),Object(n.b)("p",null,"Sets both the minimum and maximum sizes of the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setFixedSize"}),"QWidget: setFixedSize"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"width")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"height")," number - Pixels.")),Object(n.b)("h3",{id:"widgetsetgeometryx-y-width-height"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setGeometry(x, y, width, height)")),Object(n.b)("p",null,"Sets the screen position as well as size of the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setGeometry-1"}),"QWidget: setGeometry"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"x")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"y")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"width")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"height")," number - Pixels.")),Object(n.b)("h3",{id:"widgetsetmaximumsizewidth-height"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setMaximumSize(width, height)")),Object(n.b)("p",null,"Sets the maximum size of the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setMaximumSize-1"}),"QWidget: setMaximumSize"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"width")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"height")," number - Pixels.")),Object(n.b)("h3",{id:"widgetsetminimumsizewidth-height"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setMinimumSize(width, height)")),Object(n.b)("p",null,"Sets the minimum size of the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setMinimumSize-1"}),"QWidget: setMinimumSize"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"width")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"height")," number - Pixels.")),Object(n.b)("h3",{id:"widgetrepaint"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.repaint()")),Object(n.b)("p",null,"Repaints the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#repaint"}),"QWidget: repaint"),"."),Object(n.b)("h3",{id:"widgetupdate"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.update()")),Object(n.b)("p",null,"Updates the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#update"}),"QWidget: update"),"."),Object(n.b)("h3",{id:"widgetpos"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.pos()")),Object(n.b)("p",null,"Returns the current widget position. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#pos-prop"}),"QWidget: pos"),". The returned size object contains x and y coordinates in pixels."),Object(n.b)("h3",{id:"widgetsize"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.size()")),Object(n.b)("p",null,"Returns the current widget size. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#size-prop"}),"QWidget: size"),". The returned size object contains width and height in pixels."),Object(n.b)("h3",{id:"widgetupdategeometry"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.updateGeometry()")),Object(n.b)("p",null,"Notifies the layout system that this widget has changed and may need to change geometry."),Object(n.b)("h3",{id:"widgetsetattributeattributename-switchon"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setAttribute(attributeName, switchOn)")),Object(n.b)("p",null,"Sets the attribute attribute on this widget if on is true; otherwise clears the attribute. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setAttribute"}),"QWidget: setAttribute"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"attributeName")," WidgetAttribute - Enum from WidgetAttribute."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"switchOn")," boolean - set it to true if you want to enable an attribute.")),Object(n.b)("h3",{id:"widgettestattributeattributename"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.testAttribute(attributeName)")),Object(n.b)("p",null,"Returns true if attribute attribute is set on this widget; otherwise returns false. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#testAttribute"}),"QWidget: testAttribute"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"attributeName")," WidgetAttribute - Enum from WidgetAttribute.")),Object(n.b)("h4",{id:"widgetinheritsclassname"},Object(n.b)("inlineCode",{parentName:"h4"},"widget.inherits(className)")),Object(n.b)("p",null,"Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. A class is considered to inherit itself. Example:"),Object(n.b)("pre",null,Object(n.b)("code",a({parentName:"pre"},{className:"language-ts"}),'const progressBar = new QProgressBar();\nprogressBar.inherits("QObject"); // returns true\nprogressBar.inherits("QProgressBar"); // returns true\nprogressBar.inherits("QTabWidget"); // returns false\n')),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"className")," string - Name of the class to get if this widget inherits from.")))}o.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{173:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return c}));var n=i(0),a=i.n(n),d=a.a.createContext({}),l=function(e){var t=a.a.useContext(d),i=t;return e&&(i="function"==typeof e?e(t):Object.assign({},t,e)),i},r=function(e){var t=l(e.components);return a.a.createElement(d.Provider,{value:t},e.children)};var s="mdxType",b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},o=Object(n.forwardRef)((function(e,t){var i=e.components,n=e.mdxType,d=e.originalType,r=e.parentName,s=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(i[n]=e[n]);return i}(e,["components","mdxType","originalType","parentName"]),o=l(i),c=n,h=o[r+"."+c]||o[c]||b[c]||d;return i?a.a.createElement(h,Object.assign({},{ref:t},s,{components:i})):a.a.createElement(h,Object.assign({},{ref:t},s))}));function c(e,t){var i=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var d=i.length,l=new Array(d);l[0]=o;var r={};for(var b in t)hasOwnProperty.call(t,b)&&(r[b]=t[b]);r.originalType=e,r[s]="string"==typeof e?e:n,l[1]=r;for(var c=2;c=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var l={sidebar_label:"NodeWidget",title:"NodeWidget"},r=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"widget.layout",id:"widgetlayout",children:[]},{value:"widget.type",id:"widgettype",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"widget.show()",id:"widgetshow",children:[]},{value:"widget.resize(width, height)",id:"widgetresizewidth-height",children:[]},{value:"widget.close()",id:"widgetclose",children:[]},{value:"widget.setLayout(layout)",id:"widgetsetlayoutlayout",children:[]},{value:"widget.setStyleSheet(styleSheet)",id:"widgetsetstylesheetstylesheet",children:[]},{value:"widget.setCursor(cursor)",id:"widgetsetcursorcursor",children:[]},{value:"widget.setWindowIcon(icon)",id:"widgetsetwindowiconicon",children:[]},{value:"widget.setWindowState(state)",id:"widgetsetwindowstatestate",children:[]},{value:"widget.setWindowTitle(title)",id:"widgetsetwindowtitletitle",children:[]},{value:"widget.styleSheet()",id:"widgetstylesheet",children:[]},{value:"widget.hide()",id:"widgethide",children:[]},{value:"widget.move(x, y)",id:"widgetmovex-y",children:[]},{value:"widget.setObjectName(objectName)",id:"widgetsetobjectnameobjectname",children:[]},{value:"widget.objectName()",id:"widgetobjectname",children:[]},{value:"widget.setMouseTracking(isMouseTracked)",id:"widgetsetmousetrackingismousetracked",children:[]},{value:"widget.setEnabled(enabled)",id:"widgetsetenabledenabled",children:[]},{value:"widget.setFixedSize(width, height)",id:"widgetsetfixedsizewidth-height",children:[]},{value:"widget.setGeometry(x, y, width, height)",id:"widgetsetgeometryx-y-width-height",children:[]},{value:"widget.setMaximumSize(width, height)",id:"widgetsetmaximumsizewidth-height",children:[]},{value:"widget.setMinimumSize(width, height)",id:"widgetsetminimumsizewidth-height",children:[]},{value:"widget.repaint()",id:"widgetrepaint",children:[]},{value:"widget.update()",id:"widgetupdate",children:[]},{value:"widget.pos()",id:"widgetpos",children:[]},{value:"widget.size()",id:"widgetsize",children:[]},{value:"widget.updateGeometry()",id:"widgetupdategeometry",children:[]},{value:"widget.setAttribute(attributeName, switchOn)",id:"widgetsetattributeattributename-switchon",children:[]},{value:"widget.testAttribute(attributeName)",id:"widgettestattributeattributename",children:[]}]}],s={rightToc:r},b="wrapper";function o(e){var t=e.components,i=d(e,["components"]);return Object(n.b)(b,a({},s,i,{components:t,mdxType:"MDXLayout"}),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Abstract class to add functionalities common to all Widgets.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"This class implements all methods, properties of Qt's ",Object(n.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qwidget.html"}),"QWidget class")," so that it can be inherited by all widgets")),Object(n.b)("p",null,Object(n.b)("inlineCode",{parentName:"p"},"NodeWidget")," is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all widget's easily. Additionally it helps in type checking process. If you wish to create a ",Object(n.b)("inlineCode",{parentName:"p"},"div")," like widget use ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/QWidget"}),"QWidget")," instead."),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"NodeWidget is the base class for all widgets. It inherits from another abstract class ",Object(n.b)("a",a({parentName:"strong"},{href:"/docs/api/EventWidget"}),"EventWidget"))),Object(n.b)("h3",{id:"example"},"Example"),Object(n.b)("pre",null,Object(n.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const {\n NodeWidget,\n QPushButton,\n QWidget,\n QRadioButton\n} = require("@nodegui/nodegui");\n\n// showWidget can accept any widget since it expects NodeWidget\nconst showWidget = (widget: NodeWidget) => {\n widget.show();\n};\n\nshowWidget(new QPushButton());\nshowWidget(new QWidget());\nshowWidget(new QRadioButton());\n')),Object(n.b)("p",null,"NodeWidget will list all methods and properties that are common to all widgets in the NodeGui world."),Object(n.b)("h2",{id:"static-methods"},"Static Methods"),Object(n.b)("p",null,"NodeWidget can access all the static methods defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(n.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(n.b)("p",null,"NodeWidget can access all the instance properties defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(n.b)("p",null,"Additionally it also has the following instance properties:"),Object(n.b)("h3",{id:"widgetlayout"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.layout")),Object(n.b)("p",null,"A ",Object(n.b)("inlineCode",{parentName:"p"},"NodeLayout")," representing current layout that is set on the widget."),Object(n.b)("h3",{id:"widgettype"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.type")),Object(n.b)("p",null,"This will return the string ",Object(n.b)("inlineCode",{parentName:"p"},"widget")," for all widgets."),Object(n.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(n.b)("p",null,"NodeWidget can access all the instance methods defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(n.b)("p",null,"Additionally it also has the following instance methods:"),Object(n.b)("h3",{id:"widgetshow"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.show()")),Object(n.b)("p",null,"Shows the widget and its children. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#show"}),"QWidget: show"),"."),Object(n.b)("h3",{id:"widgetresizewidth-height"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.resize(width, height)")),Object(n.b)("p",null,"Resizes the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#resize-1"}),"QWidget: resize"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"width")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"height")," number - Pixels.")),Object(n.b)("h3",{id:"widgetclose"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.close()")),Object(n.b)("p",null,"Closes this widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#close"}),"QWidget: close"),".\nReturns true if the widget was closed; otherwise returns false."),Object(n.b)("h3",{id:"widgetsetlayoutlayout"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setLayout(layout)")),Object(n.b)("p",null,"Sets the layout manager for this widget to layout. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setLayout"}),"QWidget: setLayout"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"layout")," NodeLayout - Any layout that inherits from NodeLayout class.")),Object(n.b)("h3",{id:"widgetsetstylesheetstylesheet"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setStyleSheet(styleSheet)")),Object(n.b)("p",null,"Sets the property that holds the widget's style sheet. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#styleSheet-prop"}),"QWidget: styleSheet"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"styleSheet")," string - String which holds the widget's style sheet. Make sure you create this string using ",Object(n.b)("inlineCode",{parentName:"li"},"StyleSheet.create()"))),Object(n.b)("h3",{id:"widgetsetcursorcursor"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setCursor(cursor)")),Object(n.b)("p",null,"Sets the window mouse cursor. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#cursor-prop"}),"QWidget: setCursor"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"cursor")," CursorShape - Specifies current cursor for the window ",Object(n.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"CursorShape is an enum from Qt"))),Object(n.b)("h3",{id:"widgetsetwindowiconicon"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setWindowIcon(icon)")),Object(n.b)("p",null,"Sets the window icon. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#windowIcon-prop"}),"QWidget: setWindowIcon"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"icon")," QIcon - Specifies icon for the window.")),Object(n.b)("h3",{id:"widgetsetwindowstatestate"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setWindowState(state)")),Object(n.b)("p",null,"Sets the window state. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setWindowState"}),"QWidget: setWindowState"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"state")," WindowState - Specifies current state for the window ",Object(n.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"WindowState is an enum from Qt"))),Object(n.b)("h3",{id:"widgetsetwindowtitletitle"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setWindowTitle(title)")),Object(n.b)("p",null,"Sets the window title property. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#windowTitle-prop"}),"QWidget: setWindowTitle"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"title")," string - String which holds the windows title.")),Object(n.b)("h3",{id:"widgetstylesheet"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.styleSheet()")),Object(n.b)("p",null,"Gets the property that holds the widget's style sheet. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#styleSheet-prop"}),"QWidget: styleSheet"),"."),Object(n.b)("h3",{id:"widgethide"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.hide()")),Object(n.b)("p",null,"Hides the widget and its children. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#hide"}),"QWidget: hide"),"."),Object(n.b)("h3",{id:"widgetmovex-y"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.move(x, y)")),Object(n.b)("p",null,"Sets the screen position of the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#move-1"}),"QWidget: move"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"x")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"y")," number - Pixels.")),Object(n.b)("h3",{id:"widgetsetobjectnameobjectname"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setObjectName(objectName)")),Object(n.b)("p",null,"Sets the object name of the widget in Qt. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qobject.html#objectName-prop"}),"QObject: setObjectName"),". Object name can be analogous to ",Object(n.b)("inlineCode",{parentName:"p"},"id")," of an element in the web world. Using the objectName of the widget one can reference it in the Qt's stylesheet much like what we do with id in the web world."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"objectName")," string - String which holds the widget's object name.")),Object(n.b)("h3",{id:"widgetobjectname"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.objectName()")),Object(n.b)("p",null,"Gets the property that holds the widget's object name. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qobject.html#objectName-prop"}),"QObject: setObjectName"),"."),Object(n.b)("h3",{id:"widgetsetmousetrackingismousetracked"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setMouseTracking(isMouseTracked)")),Object(n.b)("p",null,"Sets the property that tells whether mouseTracking is enabled for the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#mouseTracking-prop"}),"QWidget: mouseTracking"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"isMouseTracked")," boolean - Set it to true to enable mouse tracking.")),Object(n.b)("h3",{id:"widgetsetenabledenabled"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setEnabled(enabled)")),Object(n.b)("p",null,"Sets the property that tells whether the widget is enabled. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#enabled-prop"}),"QWidget: enabled"),". In general an enabled widget handles keyboard and mouse events; a disabled widget does not."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"enabled")," boolean - Set it to true to enable the widget.")),Object(n.b)("h3",{id:"widgetsetfixedsizewidth-height"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setFixedSize(width, height)")),Object(n.b)("p",null,"Sets both the minimum and maximum sizes of the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setFixedSize"}),"QWidget: setFixedSize"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"width")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"height")," number - Pixels.")),Object(n.b)("h3",{id:"widgetsetgeometryx-y-width-height"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setGeometry(x, y, width, height)")),Object(n.b)("p",null,"Sets the screen position as well as size of the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setGeometry-1"}),"QWidget: setGeometry"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"x")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"y")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"width")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"height")," number - Pixels.")),Object(n.b)("h3",{id:"widgetsetmaximumsizewidth-height"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setMaximumSize(width, height)")),Object(n.b)("p",null,"Sets the maximum size of the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setMaximumSize-1"}),"QWidget: setMaximumSize"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"width")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"height")," number - Pixels.")),Object(n.b)("h3",{id:"widgetsetminimumsizewidth-height"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setMinimumSize(width, height)")),Object(n.b)("p",null,"Sets the minimum size of the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setMinimumSize-1"}),"QWidget: setMinimumSize"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"width")," number - Pixels."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"height")," number - Pixels.")),Object(n.b)("h3",{id:"widgetrepaint"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.repaint()")),Object(n.b)("p",null,"Repaints the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#repaint"}),"QWidget: repaint"),"."),Object(n.b)("h3",{id:"widgetupdate"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.update()")),Object(n.b)("p",null,"Updates the widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#update"}),"QWidget: update"),"."),Object(n.b)("h3",{id:"widgetpos"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.pos()")),Object(n.b)("p",null,"Returns the current widget position. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#pos-prop"}),"QWidget: pos"),". The returned size object contains x and y coordinates in pixels."),Object(n.b)("h3",{id:"widgetsize"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.size()")),Object(n.b)("p",null,"Returns the current widget size. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#size-prop"}),"QWidget: size"),". The returned size object contains width and height in pixels."),Object(n.b)("h3",{id:"widgetupdategeometry"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.updateGeometry()")),Object(n.b)("p",null,"Notifies the layout system that this widget has changed and may need to change geometry."),Object(n.b)("h3",{id:"widgetsetattributeattributename-switchon"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.setAttribute(attributeName, switchOn)")),Object(n.b)("p",null,"Sets the attribute attribute on this widget if on is true; otherwise clears the attribute. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#setAttribute"}),"QWidget: setAttribute"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"attributeName")," WidgetAttribute - Enum from WidgetAttribute."),Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"switchOn")," boolean - set it to true if you want to enable an attribute.")),Object(n.b)("h3",{id:"widgettestattributeattributename"},Object(n.b)("inlineCode",{parentName:"h3"},"widget.testAttribute(attributeName)")),Object(n.b)("p",null,"Returns true if attribute attribute is set on this widget; otherwise returns false. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#testAttribute"}),"QWidget: testAttribute"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"attributeName")," WidgetAttribute - Enum from WidgetAttribute.")),Object(n.b)("h4",{id:"widgetinheritsclassname"},Object(n.b)("inlineCode",{parentName:"h4"},"widget.inherits(className)")),Object(n.b)("p",null,"Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. A class is considered to inherit itself. Example:"),Object(n.b)("pre",null,Object(n.b)("code",a({parentName:"pre"},{className:"language-ts"}),'const progressBar = new QProgressBar();\nprogressBar.inherits("QObject"); // returns true\nprogressBar.inherits("QProgressBar"); // returns true\nprogressBar.inherits("QTabWidget"); // returns false\n')),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"className")," string - Name of the class to get if this widget inherits from.")))}o.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-process-5-ec-b1e.0e51f069220cb4cdb517.js b/content---docs-api-process-5-ec-b1e.f86de99d938d1de81693.js similarity index 98% rename from content---docs-api-process-5-ec-b1e.0e51f069220cb4cdb517.js rename to content---docs-api-process-5-ec-b1e.f86de99d938d1de81693.js index 05dc57a6a..312f1ba81 100644 --- a/content---docs-api-process-5-ec-b1e.0e51f069220cb4cdb517.js +++ b/content---docs-api-process-5-ec-b1e.f86de99d938d1de81693.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{131:function(e,n,r){"use strict";r.r(n),r.d(n,"frontMatter",(function(){return a})),r.d(n,"rightToc",(function(){return s})),r.d(n,"default",(function(){return l}));r(0);var t=r(173);function o(){return(o=Object.assign||function(e){for(var n=1;n=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var a={sidebar_label:"process",title:"process"},s=[{value:"Properties",id:"properties",children:[{value:"process.versions.qode Readonly",id:"processversionsqode-readonly",children:[]},{value:"process.versions.qt(compiled) Readonly",id:"processversionsqtcompiled-readonly",children:[]},{value:"process.versions.qt(runtime) Readonly",id:"processversionsqtruntime-readonly",children:[]}]}],c={rightToc:s},p="wrapper";function l(e){var n=e.components,r=i(e,["components"]);return Object(t.b)(p,o({},c,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("blockquote",null,Object(t.b)("p",{parentName:"blockquote"},"Extensions to process object.")),Object(t.b)("p",null,"Qode's ",Object(t.b)("inlineCode",{parentName:"p"},"process")," object is extended from the\n",Object(t.b)("a",o({parentName:"p"},{href:"https://nodejs.org/api/process.html"}),"Node.js ",Object(t.b)("inlineCode",{parentName:"a"},"process")," object"),".\nIt adds the following properties :"),Object(t.b)("h2",{id:"properties"},"Properties"),Object(t.b)("h3",{id:"processversionsqode-readonly"},Object(t.b)("inlineCode",{parentName:"h3"},"process.versions.qode")," ",Object(t.b)("em",{parentName:"h3"},"Readonly")),Object(t.b)("p",null,"A ",Object(t.b)("inlineCode",{parentName:"p"},"String")," representing Qode's version string. Qode is a lightly modified version of NodeJs that allows running Qt and NodeJs under a single process."),Object(t.b)("h3",{id:"processversionsqtcompiled-readonly"},Object(t.b)("inlineCode",{parentName:"h3"},"process.versions.qt(compiled)")," ",Object(t.b)("em",{parentName:"h3"},"Readonly")),Object(t.b)("p",null,"A ",Object(t.b)("inlineCode",{parentName:"p"},"String")," representing Qt version used when compile Qode binary. This can be useful to know which version of Qt is binary compatible with the version of Qode you are running. This is useful when running qode with a different version of Qt than what it was compiled with."),Object(t.b)("h3",{id:"processversionsqtruntime-readonly"},Object(t.b)("inlineCode",{parentName:"h3"},"process.versions.qt(runtime)")," ",Object(t.b)("em",{parentName:"h3"},"Readonly")),Object(t.b)("p",null,"A ",Object(t.b)("inlineCode",{parentName:"p"},"String")," representing Qt version of the Qt library loaded during runtime. This can be useful to know which version of Qt you are using at runtime as compared to the version of Qt used when Qode was compiled.This is possible since Qt is dynamically linked to Qode and you could replace the Qt dynamic libraries with any binary compatible library. Hence, this is useful when running qode with a different version of Qt than what it was compiled with."))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return s})),r.d(n,"b",(function(){return d}));var t=r(0),o=r.n(t),i=o.a.createContext({}),a=function(e){var n=o.a.useContext(i),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},s=function(e){var n=a(e.components);return o.a.createElement(i.Provider,{value:n},e.children)};var c="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,i=e.originalType,s=e.parentName,c=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=a(r),d=t,u=l[s+"."+d]||l[d]||p[d]||i;return r?o.a.createElement(u,Object.assign({},{ref:n},c,{components:r})):o.a.createElement(u,Object.assign({},{ref:n},c))}));function d(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var i=r.length,a=new Array(i);a[0]=l;var s={};for(var p in n)hasOwnProperty.call(n,p)&&(s[p]=n[p]);s.originalType=e,s[c]="string"==typeof e?e:t,a[1]=s;for(var d=2;d=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var a={sidebar_label:"process",title:"process"},s=[{value:"Properties",id:"properties",children:[{value:"process.versions.qode Readonly",id:"processversionsqode-readonly",children:[]},{value:"process.versions.qt(compiled) Readonly",id:"processversionsqtcompiled-readonly",children:[]},{value:"process.versions.qt(runtime) Readonly",id:"processversionsqtruntime-readonly",children:[]}]}],c={rightToc:s},p="wrapper";function l(e){var n=e.components,r=i(e,["components"]);return Object(t.b)(p,o({},c,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("blockquote",null,Object(t.b)("p",{parentName:"blockquote"},"Extensions to process object.")),Object(t.b)("p",null,"Qode's ",Object(t.b)("inlineCode",{parentName:"p"},"process")," object is extended from the\n",Object(t.b)("a",o({parentName:"p"},{href:"https://nodejs.org/api/process.html"}),"Node.js ",Object(t.b)("inlineCode",{parentName:"a"},"process")," object"),".\nIt adds the following properties :"),Object(t.b)("h2",{id:"properties"},"Properties"),Object(t.b)("h3",{id:"processversionsqode-readonly"},Object(t.b)("inlineCode",{parentName:"h3"},"process.versions.qode")," ",Object(t.b)("em",{parentName:"h3"},"Readonly")),Object(t.b)("p",null,"A ",Object(t.b)("inlineCode",{parentName:"p"},"String")," representing Qode's version string. Qode is a lightly modified version of NodeJs that allows running Qt and NodeJs under a single process."),Object(t.b)("h3",{id:"processversionsqtcompiled-readonly"},Object(t.b)("inlineCode",{parentName:"h3"},"process.versions.qt(compiled)")," ",Object(t.b)("em",{parentName:"h3"},"Readonly")),Object(t.b)("p",null,"A ",Object(t.b)("inlineCode",{parentName:"p"},"String")," representing Qt version used when compile Qode binary. This can be useful to know which version of Qt is binary compatible with the version of Qode you are running. This is useful when running qode with a different version of Qt than what it was compiled with."),Object(t.b)("h3",{id:"processversionsqtruntime-readonly"},Object(t.b)("inlineCode",{parentName:"h3"},"process.versions.qt(runtime)")," ",Object(t.b)("em",{parentName:"h3"},"Readonly")),Object(t.b)("p",null,"A ",Object(t.b)("inlineCode",{parentName:"p"},"String")," representing Qt version of the Qt library loaded during runtime. This can be useful to know which version of Qt you are using at runtime as compared to the version of Qt used when Qode was compiled.This is possible since Qt is dynamically linked to Qode and you could replace the Qt dynamic libraries with any binary compatible library. Hence, this is useful when running qode with a different version of Qt than what it was compiled with."))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return s})),r.d(n,"b",(function(){return d}));var t=r(0),o=r.n(t),i=o.a.createContext({}),a=function(e){var n=o.a.useContext(i),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},s=function(e){var n=a(e.components);return o.a.createElement(i.Provider,{value:n},e.children)};var c="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,i=e.originalType,s=e.parentName,c=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=a(r),d=t,u=l[s+"."+d]||l[d]||p[d]||i;return r?o.a.createElement(u,Object.assign({},{ref:n},c,{components:r})):o.a.createElement(u,Object.assign({},{ref:n},c))}));function d(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var i=r.length,a=new Array(i);a[0]=l;var s={};for(var p in n)hasOwnProperty.call(n,p)&&(s[p]=n[p]);s.originalType=e,s[c]="string"==typeof e?e:t,a[1]=s;for(var d=2;d=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i={sidebar_label:"QAbstractScrollArea",title:"QAbstractScrollArea"},c=[{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"widget.setViewport(widget)",id:"widgetsetviewportwidget",children:[]},{value:"widget.viewport()",id:"widgetviewport",children:[]}]}],l={rightToc:c},s="wrapper";function d(e){var t=e.components,r=o(e,["components"]);return Object(a.b)(s,n({},l,r,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Abstract class to add functionalities common to all scrollarea based widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class implements all methods, properties of Qt's ",Object(a.b)("a",n({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qabstractscrollarea.html"}),"QAbstractScrollArea class")," so that it can be inherited by all scroll based widgets")),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"QAbstractScrollArea")," is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all scrollable widget's easily. If you wish to create a scrollarea use ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/QScrollArea"}),"QScrollArea")," instead."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QAbstractScrollArea is the base class for all widgets. It inherits from another abstract class ",Object(a.b)("a",n({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("p",null,"QAbstractScrollArea will list all methods and properties that are common to all scrollable widgets in the NodeGui world."),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QAbstractScrollArea can access all the static methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QAbstractScrollArea can access all the instance properties defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QAbstractScrollArea can access all the instance methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"widgetsetviewportwidget"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setViewport(widget)")),Object(a.b)("p",null,"Sets the viewport to be the given widget. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractscrollarea.html#setViewport"}),"QAbstractScrollArea: setViewport"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"widget")," NodeWidget.")),Object(a.b)("h3",{id:"widgetviewport"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.viewport()")),Object(a.b)("p",null,"Returns the viewport widget (NodeWidget). It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractscrollarea.html#viewport"}),"QAbstractScrollArea: viewport"),"."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-abstract-scroll-area-3-e-6-d7f.ccfb2bff1255952b20a4.js b/content---docs-api-q-abstract-scroll-area-3-e-6-d7f.ccfb2bff1255952b20a4.js new file mode 100644 index 000000000..6b413636d --- /dev/null +++ b/content---docs-api-q-abstract-scroll-area-3-e-6-d7f.ccfb2bff1255952b20a4.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{153:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"rightToc",(function(){return c})),r.d(t,"default",(function(){return d}));r(0);var a=r(173);function n(){return(n=Object.assign||function(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i={sidebar_label:"QAbstractScrollArea",title:"QAbstractScrollArea"},c=[{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"widget.setViewport(widget)",id:"widgetsetviewportwidget",children:[]},{value:"widget.viewport()",id:"widgetviewport",children:[]}]}],l={rightToc:c},s="wrapper";function d(e){var t=e.components,r=o(e,["components"]);return Object(a.b)(s,n({},l,r,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Abstract class to add functionalities common to all scrollarea based widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class implements all methods, properties of Qt's ",Object(a.b)("a",n({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qabstractscrollarea.html"}),"QAbstractScrollArea class")," so that it can be inherited by all scroll based widgets")),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"QAbstractScrollArea")," is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all scrollable widget's easily. If you wish to create a scrollarea use ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/QScrollArea"}),"QScrollArea")," instead."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QAbstractScrollArea is the base class for all widgets. It inherits from another abstract class ",Object(a.b)("a",n({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("p",null,"QAbstractScrollArea will list all methods and properties that are common to all scrollable widgets in the NodeGui world."),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QAbstractScrollArea can access all the static methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QAbstractScrollArea can access all the instance properties defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QAbstractScrollArea can access all the instance methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"widgetsetviewportwidget"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setViewport(widget)")),Object(a.b)("p",null,"Sets the viewport to be the given widget. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractscrollarea.html#setViewport"}),"QAbstractScrollArea: setViewport"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"widget")," NodeWidget.")),Object(a.b)("h3",{id:"widgetviewport"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.viewport()")),Object(a.b)("p",null,"Returns the viewport widget (NodeWidget). It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractscrollarea.html#viewport"}),"QAbstractScrollArea: viewport"),"."))}d.isMDXComponent=!0},173:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return p}));var a=r(0),n=r.n(a),o=n.a.createContext({}),i=function(e){var t=n.a.useContext(o),r=t;return e&&(r="function"==typeof e?e(t):Object.assign({},t,e)),r},c=function(e){var t=i(e.components);return n.a.createElement(o.Provider,{value:t},e.children)};var l="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,l=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(r[a]=e[a]);return r}(e,["components","mdxType","originalType","parentName"]),d=i(r),p=a,b=d[c+"."+p]||d[p]||s[p]||o;return r?n.a.createElement(b,Object.assign({},{ref:t},l,{components:r})):n.a.createElement(b,Object.assign({},{ref:t},l))}));function p(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=d;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[l]="string"==typeof e?e:a,i[1]=c;for(var p=2;p=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var l={sidebar_label:"QAbstractSlider",title:"QAbstractSlider"},s=[{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"widget.setSingleStep(step)",id:"widgetsetsinglestepstep",children:[]},{value:"widget.setMaximum(maximum)",id:"widgetsetmaximummaximum",children:[]},{value:"widget.setMinimum(minimum)",id:"widgetsetminimumminimum",children:[]},{value:"widget.setValue(value)",id:"widgetsetvaluevalue",children:[]},{value:"widget.setOrientation(orientation)",id:"widgetsetorientationorientation",children:[]},{value:"slider.maximum()",id:"slidermaximum",children:[]},{value:"slider.minimum()",id:"sliderminimum",children:[]},{value:"slider.value()",id:"slidervalue",children:[]}]}],c={rightToc:s},o="wrapper";function d(e){var t=e.components,i=r(e,["components"]);return Object(a.b)(o,n({},c,i,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Abstract class to add functionalities common to all slider based widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class implements all methods, properties of Qt's ",Object(a.b)("a",n({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qabstractslider.html"}),"QAbstractSlider class")," so that it can be inherited by all slider based widgets")),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"QAbstractSlider")," is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all slider widget's easily. If you wish to create a slider use ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/QDial"}),"QDial")," instead."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QAbstractSlider is the base class for all widgets. It inherits from another abstract class ",Object(a.b)("a",n({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("p",null,"QAbstractSlider will list all methods and properties that are common to all slider widgets in the NodeGui world."),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QAbstractSlider can access all the static methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QAbstractSlider can access all the instance properties defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QAbstractSlider can access all the instance methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"widgetsetsinglestepstep"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setSingleStep(step)")),Object(a.b)("p",null,"Sets the step value for user arrow key slider interaction. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#singleStep-prop"}),"QAbstractSlider: setSingleStep"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"step")," number - Specified single step value.")),Object(a.b)("h3",{id:"widgetsetmaximummaximum"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setMaximum(maximum)")),Object(a.b)("p",null,"Sets the maximum value for slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#maximum-prop"}),"QAbstractSlider: setMaximum"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"maximum")," number - Specified maximum slider value.")),Object(a.b)("h3",{id:"widgetsetminimumminimum"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setMinimum(minimum)")),Object(a.b)("p",null,"Sets the minimum value for slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#minimum-prop"}),"QAbstractSlider: setMinimum"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"minimum")," number - Specified minimum slider value.")),Object(a.b)("h3",{id:"widgetsetvaluevalue"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setValue(value)")),Object(a.b)("p",null,"Sets the current value for slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#value-prop"}),"QAbstractSlider: setValue"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"value")," number - Specified current slider value.")),Object(a.b)("h3",{id:"widgetsetorientationorientation"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setOrientation(orientation)")),Object(a.b)("p",null,"Sets the current orientation for slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#orientation-prop"}),"QAbstractSlider: setOrientation"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"orientation")," Orientation - Specifies visual orientation of the slider. ",Object(a.b)("a",n({parentName:"li"},{href:"/docs/api/QtEnums"}),"Orientation is an enum from Qt"))),Object(a.b)("h3",{id:"slidermaximum"},Object(a.b)("inlineCode",{parentName:"h3"},"slider.maximum()")),Object(a.b)("p",null,"Returns the maximum value (Number) of the slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#maximum-prop"}),"QAbstractSlider: maximum"),"."),Object(a.b)("h3",{id:"sliderminimum"},Object(a.b)("inlineCode",{parentName:"h3"},"slider.minimum()")),Object(a.b)("p",null,"Returns the minimum value (Number) of the slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#minimum-prop"}),"QAbstractSlider: minimum"),"."),Object(a.b)("h3",{id:"slidervalue"},Object(a.b)("inlineCode",{parentName:"h3"},"slider.value()")),Object(a.b)("p",null,"Returns the current value (Number) of the slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#value-prop"}),"QAbstractSlider: value"),"."))}d.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{173:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return m}));var a=i(0),n=i.n(a),r=n.a.createContext({}),l=function(e){var t=n.a.useContext(r),i=t;return e&&(i="function"==typeof e?e(t):Object.assign({},t,e)),i},s=function(e){var t=l(e.components);return n.a.createElement(r.Provider,{value:t},e.children)};var c="mdxType",o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var i=e.components,a=e.mdxType,r=e.originalType,s=e.parentName,c=function(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(i[a]=e[a]);return i}(e,["components","mdxType","originalType","parentName"]),d=l(i),m=a,b=d[s+"."+m]||d[m]||o[m]||r;return i?n.a.createElement(b,Object.assign({},{ref:t},c,{components:i})):n.a.createElement(b,Object.assign({},{ref:t},c))}));function m(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=i.length,l=new Array(r);l[0]=d;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[c]="string"==typeof e?e:a,l[1]=s;for(var m=2;m=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var l={sidebar_label:"QAbstractSlider",title:"QAbstractSlider"},s=[{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"widget.setSingleStep(step)",id:"widgetsetsinglestepstep",children:[]},{value:"widget.setMaximum(maximum)",id:"widgetsetmaximummaximum",children:[]},{value:"widget.setMinimum(minimum)",id:"widgetsetminimumminimum",children:[]},{value:"widget.setValue(value)",id:"widgetsetvaluevalue",children:[]},{value:"widget.setOrientation(orientation)",id:"widgetsetorientationorientation",children:[]},{value:"slider.maximum()",id:"slidermaximum",children:[]},{value:"slider.minimum()",id:"sliderminimum",children:[]},{value:"slider.value()",id:"slidervalue",children:[]}]}],c={rightToc:s},o="wrapper";function d(e){var t=e.components,i=r(e,["components"]);return Object(a.b)(o,n({},c,i,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Abstract class to add functionalities common to all slider based widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class implements all methods, properties of Qt's ",Object(a.b)("a",n({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qabstractslider.html"}),"QAbstractSlider class")," so that it can be inherited by all slider based widgets")),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"QAbstractSlider")," is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all slider widget's easily. If you wish to create a slider use ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/QDial"}),"QDial")," instead."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QAbstractSlider is the base class for all widgets. It inherits from another abstract class ",Object(a.b)("a",n({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("p",null,"QAbstractSlider will list all methods and properties that are common to all slider widgets in the NodeGui world."),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QAbstractSlider can access all the static methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QAbstractSlider can access all the instance properties defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QAbstractSlider can access all the instance methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"widgetsetsinglestepstep"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setSingleStep(step)")),Object(a.b)("p",null,"Sets the step value for user arrow key slider interaction. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#singleStep-prop"}),"QAbstractSlider: setSingleStep"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"step")," number - Specified single step value.")),Object(a.b)("h3",{id:"widgetsetmaximummaximum"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setMaximum(maximum)")),Object(a.b)("p",null,"Sets the maximum value for slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#maximum-prop"}),"QAbstractSlider: setMaximum"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"maximum")," number - Specified maximum slider value.")),Object(a.b)("h3",{id:"widgetsetminimumminimum"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setMinimum(minimum)")),Object(a.b)("p",null,"Sets the minimum value for slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#minimum-prop"}),"QAbstractSlider: setMinimum"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"minimum")," number - Specified minimum slider value.")),Object(a.b)("h3",{id:"widgetsetvaluevalue"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setValue(value)")),Object(a.b)("p",null,"Sets the current value for slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#value-prop"}),"QAbstractSlider: setValue"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"value")," number - Specified current slider value.")),Object(a.b)("h3",{id:"widgetsetorientationorientation"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.setOrientation(orientation)")),Object(a.b)("p",null,"Sets the current orientation for slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#orientation-prop"}),"QAbstractSlider: setOrientation"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"orientation")," Orientation - Specifies visual orientation of the slider. ",Object(a.b)("a",n({parentName:"li"},{href:"/docs/api/QtEnums"}),"Orientation is an enum from Qt"))),Object(a.b)("h3",{id:"slidermaximum"},Object(a.b)("inlineCode",{parentName:"h3"},"slider.maximum()")),Object(a.b)("p",null,"Returns the maximum value (Number) of the slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#maximum-prop"}),"QAbstractSlider: maximum"),"."),Object(a.b)("h3",{id:"sliderminimum"},Object(a.b)("inlineCode",{parentName:"h3"},"slider.minimum()")),Object(a.b)("p",null,"Returns the minimum value (Number) of the slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#minimum-prop"}),"QAbstractSlider: minimum"),"."),Object(a.b)("h3",{id:"slidervalue"},Object(a.b)("inlineCode",{parentName:"h3"},"slider.value()")),Object(a.b)("p",null,"Returns the current value (Number) of the slider. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractslider.html#value-prop"}),"QAbstractSlider: value"),"."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-action-051-425.4498dbda0355b4f799f6.js b/content---docs-api-q-action-051-425.4032133d5c1f0eeb0028.js similarity index 99% rename from content---docs-api-q-action-051-425.4498dbda0355b4f799f6.js rename to content---docs-api-q-action-051-425.4032133d5c1f0eeb0028.js index 7ca5bd623..aa0483e28 100644 --- a/content---docs-api-q-action-051-425.4498dbda0355b4f799f6.js +++ b/content---docs-api-q-action-051-425.4032133d5c1f0eeb0028.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return p}));var a=n(0),c=n.n(a),i=c.a.createContext({}),o=function(e){var t=c.a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=o(e.components);return c.a.createElement(i.Provider,{value:t},e.children)};var l="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},b=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,l=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),b=o(n),p=a,h=b[r+"."+p]||b[p]||s[p]||i;return n?c.a.createElement(h,Object.assign({},{ref:t},l,{components:n})):c.a.createElement(h,Object.assign({},{ref:t},l))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=b;var r={};for(var s in t)hasOwnProperty.call(t,s)&&(r[s]=t[s]);r.originalType=e,r[l]="string"==typeof e?e:a,o[1]=r;for(var p=2;p=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var o={sidebar_label:"QAction",title:"QAction"},r=[{value:"Example",id:"example",children:[]},{value:"new QAction(parent?)",id:"new-qactionparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"action.setEnabled(enabled)",id:"actionsetenabledenabled",children:[]},{value:"action.setText(on)",id:"actionsettexton",children:[]},{value:"action.setIcon(icon)",id:"actionseticonicon",children:[]},{value:"action.setMenu(menu)",id:"actionsetmenumenu",children:[]},{value:"action.setShortcut(keySequence)",id:"actionsetshortcutkeysequence",children:[]},{value:"action.setShortcutContext(contextEnum)",id:"actionsetshortcutcontextcontextenum",children:[]},{value:"action.isCheckable()",id:"actionischeckable",children:[]},{value:"action.setCheckable(isCheckable)",id:"actionsetcheckableischeckable",children:[]},{value:"action.isChecked()",id:"actionischecked",children:[]},{value:"action.setChecked(isChecked)",id:"actionsetcheckedischecked",children:[]},{value:"action.isSeparator()",id:"actionisseparator",children:[]},{value:"action.setSeparator(isSeparator)",id:"actionsetseparatorisseparator",children:[]}]}],l={rightToc:r},s="wrapper";function b(e){var t=e.components,n=i(e,["components"]);return Object(a.b)(s,c({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QAction class provides an abstract user interface action that can be inserted into widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",c({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qaction.html"}),"QAction class"))),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QAction inherits from ",Object(a.b)("a",c({parentName:"strong"},{href:"/docs/api/EventWidget"}),"EventWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",c({parentName:"pre"},{className:"language-javascript"}),'const { QAction, QMenu } = require("@nodegui/nodegui");\n\nconst menu = new QMenu();\nconst menuAction = new QAction();\nmenuAction.setText("subAction");\nmenuAction.addEventListener("triggered", () => {\n console.log("Action clicked");\n});\nmenu.addAction(menuAction);\n')),Object(a.b)("h3",{id:"new-qactionparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QAction(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget. Constructs an action with parent. If parent is an action group the action will be automatically inserted into the group.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QAction can access all the static methods defined in ",Object(a.b)("a",c({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QAction can access all the instance properties defined in ",Object(a.b)("a",c({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QAction can access all the instance methods defined in ",Object(a.b)("a",c({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"actionsetenabledenabled"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setEnabled(enabled)")),Object(a.b)("p",null,"This property holds whether the action is enabled. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#enabled-prop"}),"QAction: setEnabled"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"enabled")," - Boolean")),Object(a.b)("h3",{id:"actionsettexton"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setText(on)")),Object(a.b)("p",null,"This property holds the action's descriptive text. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#text-prop"}),"QAction: setText"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"text")," - string")),Object(a.b)("h3",{id:"actionseticonicon"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setIcon(icon)")),Object(a.b)("p",null,"Sets the icon of action. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#icon-prop"}),"QAction: setIcon"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"icon")," ",Object(a.b)("a",c({parentName:"li"},{href:"/docs/api/QIcon"}),"QIcon"))),Object(a.b)("h3",{id:"actionsetmenumenu"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setMenu(menu)")),Object(a.b)("p",null,"Sets the menu contained by this action to the specified menu. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#setMenu"}),"QAction: setMenu"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"menu")," ",Object(a.b)("a",c({parentName:"li"},{href:"/docs/api/QMenu"}),"QMenu"))),Object(a.b)("h3",{id:"actionsetshortcutkeysequence"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setShortcut(keySequence)")),Object(a.b)("p",null,"This property holds the action's key sequence. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#shortcut-prop"}),"QAction: setShortcut"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"keySequence")," ",Object(a.b)("a",c({parentName:"li"},{href:"/docs/api/QKeySequence"}),"QKeySequence"))),Object(a.b)("h3",{id:"actionsetshortcutcontextcontextenum"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setShortcutContext(contextEnum)")),Object(a.b)("p",null,"This property holds the context in which the action is valid. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#shortcutContext-prop"}),"QAction: setShortcutContext"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"contextEnum")," - ShortcutContext enum.")),Object(a.b)("h3",{id:"actionischeckable"},Object(a.b)("inlineCode",{parentName:"h3"},"action.isCheckable()")),Object(a.b)("p",null,"Returns true if this action has been marked as checkable. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#checkable-prop"}),"QAction: isCheckable"),"."),Object(a.b)("h3",{id:"actionsetcheckableischeckable"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setCheckable(isCheckable)")),Object(a.b)("p",null,"Indicate that this action is checkable."),Object(a.b)("p",null,"A checkable action is one which has an on/off state. For example, in a word processor, a Bold toolbar button may be either on or off. An action which is not a toggle action is a command action; a command action is simply executed, e.g. file save. By default, this property is ",Object(a.b)("inlineCode",{parentName:"p"},"false"),"."),Object(a.b)("p",null,"It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#checkable-prop"}),"QAction: setCheckable"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"isCheckable"),": boolean")),Object(a.b)("h3",{id:"actionischecked"},Object(a.b)("inlineCode",{parentName:"h3"},"action.isChecked()")),Object(a.b)("p",null,"Returns true if this action has been marked as checked. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#checked-prop"}),"QAction: isChecked"),"."),Object(a.b)("h3",{id:"actionsetcheckedischecked"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setChecked(isChecked)")),Object(a.b)("p",null,"Indicate that this action is checked."),Object(a.b)("p",null,"Only checkable actions can be checked. By default, this is false (the action is unchecked)."),Object(a.b)("p",null,"It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#checkable-prop"}),"QAction: setChecked"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"isChecked"),": boolean")),Object(a.b)("h3",{id:"actionisseparator"},Object(a.b)("inlineCode",{parentName:"h3"},"action.isSeparator()")),Object(a.b)("p",null,"Returns ",Object(a.b)("inlineCode",{parentName:"p"},"true")," if this action is a separator action; otherwise it returns ",Object(a.b)("inlineCode",{parentName:"p"},"false"),". It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#isSeparator"}),"QAction: isSeparator"),"."),Object(a.b)("h3",{id:"actionsetseparatorisseparator"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setSeparator(isSeparator)")),Object(a.b)("p",null,"If ",Object(a.b)("inlineCode",{parentName:"p"},"isSeparator")," is ",Object(a.b)("inlineCode",{parentName:"p"},"true")," then this action will be considered a separator."),Object(a.b)("p",null,"How a separator is represented depends on the widget it is inserted into. Under most circumstances the text, submenu, and icon will be ignored for separator actions."),Object(a.b)("p",null,"It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#setSeparator"}),"QAction: setSeparator"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"isSeparator"),": boolean")))}b.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return p}));var a=n(0),c=n.n(a),i=c.a.createContext({}),o=function(e){var t=c.a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=o(e.components);return c.a.createElement(i.Provider,{value:t},e.children)};var l="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},b=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,l=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),b=o(n),p=a,h=b[r+"."+p]||b[p]||s[p]||i;return n?c.a.createElement(h,Object.assign({},{ref:t},l,{components:n})):c.a.createElement(h,Object.assign({},{ref:t},l))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=b;var r={};for(var s in t)hasOwnProperty.call(t,s)&&(r[s]=t[s]);r.originalType=e,r[l]="string"==typeof e?e:a,o[1]=r;for(var p=2;p=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var o={sidebar_label:"QAction",title:"QAction"},r=[{value:"Example",id:"example",children:[]},{value:"new QAction(parent?)",id:"new-qactionparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"action.setEnabled(enabled)",id:"actionsetenabledenabled",children:[]},{value:"action.setText(on)",id:"actionsettexton",children:[]},{value:"action.setIcon(icon)",id:"actionseticonicon",children:[]},{value:"action.setMenu(menu)",id:"actionsetmenumenu",children:[]},{value:"action.setShortcut(keySequence)",id:"actionsetshortcutkeysequence",children:[]},{value:"action.setShortcutContext(contextEnum)",id:"actionsetshortcutcontextcontextenum",children:[]},{value:"action.isCheckable()",id:"actionischeckable",children:[]},{value:"action.setCheckable(isCheckable)",id:"actionsetcheckableischeckable",children:[]},{value:"action.isChecked()",id:"actionischecked",children:[]},{value:"action.setChecked(isChecked)",id:"actionsetcheckedischecked",children:[]},{value:"action.isSeparator()",id:"actionisseparator",children:[]},{value:"action.setSeparator(isSeparator)",id:"actionsetseparatorisseparator",children:[]}]}],l={rightToc:r},s="wrapper";function b(e){var t=e.components,n=i(e,["components"]);return Object(a.b)(s,c({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QAction class provides an abstract user interface action that can be inserted into widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",c({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qaction.html"}),"QAction class"))),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QAction inherits from ",Object(a.b)("a",c({parentName:"strong"},{href:"/docs/api/EventWidget"}),"EventWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",c({parentName:"pre"},{className:"language-javascript"}),'const { QAction, QMenu } = require("@nodegui/nodegui");\n\nconst menu = new QMenu();\nconst menuAction = new QAction();\nmenuAction.setText("subAction");\nmenuAction.addEventListener("triggered", () => {\n console.log("Action clicked");\n});\nmenu.addAction(menuAction);\n')),Object(a.b)("h3",{id:"new-qactionparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QAction(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget. Constructs an action with parent. If parent is an action group the action will be automatically inserted into the group.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QAction can access all the static methods defined in ",Object(a.b)("a",c({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QAction can access all the instance properties defined in ",Object(a.b)("a",c({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QAction can access all the instance methods defined in ",Object(a.b)("a",c({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"actionsetenabledenabled"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setEnabled(enabled)")),Object(a.b)("p",null,"This property holds whether the action is enabled. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#enabled-prop"}),"QAction: setEnabled"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"enabled")," - Boolean")),Object(a.b)("h3",{id:"actionsettexton"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setText(on)")),Object(a.b)("p",null,"This property holds the action's descriptive text. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#text-prop"}),"QAction: setText"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"text")," - string")),Object(a.b)("h3",{id:"actionseticonicon"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setIcon(icon)")),Object(a.b)("p",null,"Sets the icon of action. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#icon-prop"}),"QAction: setIcon"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"icon")," ",Object(a.b)("a",c({parentName:"li"},{href:"/docs/api/QIcon"}),"QIcon"))),Object(a.b)("h3",{id:"actionsetmenumenu"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setMenu(menu)")),Object(a.b)("p",null,"Sets the menu contained by this action to the specified menu. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#setMenu"}),"QAction: setMenu"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"menu")," ",Object(a.b)("a",c({parentName:"li"},{href:"/docs/api/QMenu"}),"QMenu"))),Object(a.b)("h3",{id:"actionsetshortcutkeysequence"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setShortcut(keySequence)")),Object(a.b)("p",null,"This property holds the action's key sequence. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#shortcut-prop"}),"QAction: setShortcut"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"keySequence")," ",Object(a.b)("a",c({parentName:"li"},{href:"/docs/api/QKeySequence"}),"QKeySequence"))),Object(a.b)("h3",{id:"actionsetshortcutcontextcontextenum"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setShortcutContext(contextEnum)")),Object(a.b)("p",null,"This property holds the context in which the action is valid. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#shortcutContext-prop"}),"QAction: setShortcutContext"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"contextEnum")," - ShortcutContext enum.")),Object(a.b)("h3",{id:"actionischeckable"},Object(a.b)("inlineCode",{parentName:"h3"},"action.isCheckable()")),Object(a.b)("p",null,"Returns true if this action has been marked as checkable. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#checkable-prop"}),"QAction: isCheckable"),"."),Object(a.b)("h3",{id:"actionsetcheckableischeckable"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setCheckable(isCheckable)")),Object(a.b)("p",null,"Indicate that this action is checkable."),Object(a.b)("p",null,"A checkable action is one which has an on/off state. For example, in a word processor, a Bold toolbar button may be either on or off. An action which is not a toggle action is a command action; a command action is simply executed, e.g. file save. By default, this property is ",Object(a.b)("inlineCode",{parentName:"p"},"false"),"."),Object(a.b)("p",null,"It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#checkable-prop"}),"QAction: setCheckable"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"isCheckable"),": boolean")),Object(a.b)("h3",{id:"actionischecked"},Object(a.b)("inlineCode",{parentName:"h3"},"action.isChecked()")),Object(a.b)("p",null,"Returns true if this action has been marked as checked. It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#checked-prop"}),"QAction: isChecked"),"."),Object(a.b)("h3",{id:"actionsetcheckedischecked"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setChecked(isChecked)")),Object(a.b)("p",null,"Indicate that this action is checked."),Object(a.b)("p",null,"Only checkable actions can be checked. By default, this is false (the action is unchecked)."),Object(a.b)("p",null,"It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#checkable-prop"}),"QAction: setChecked"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"isChecked"),": boolean")),Object(a.b)("h3",{id:"actionisseparator"},Object(a.b)("inlineCode",{parentName:"h3"},"action.isSeparator()")),Object(a.b)("p",null,"Returns ",Object(a.b)("inlineCode",{parentName:"p"},"true")," if this action is a separator action; otherwise it returns ",Object(a.b)("inlineCode",{parentName:"p"},"false"),". It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#isSeparator"}),"QAction: isSeparator"),"."),Object(a.b)("h3",{id:"actionsetseparatorisseparator"},Object(a.b)("inlineCode",{parentName:"h3"},"action.setSeparator(isSeparator)")),Object(a.b)("p",null,"If ",Object(a.b)("inlineCode",{parentName:"p"},"isSeparator")," is ",Object(a.b)("inlineCode",{parentName:"p"},"true")," then this action will be considered a separator."),Object(a.b)("p",null,"How a separator is represented depends on the widget it is inserted into. Under most circumstances the text, submenu, and icon will be ignored for separator actions."),Object(a.b)("p",null,"It calls the native method ",Object(a.b)("a",c({parentName:"p"},{href:"https://doc.qt.io/qt-5/qaction.html#setSeparator"}),"QAction: setSeparator"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"isSeparator"),": boolean")))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-applicationd-3-e-0a3.5ba1fb22df7f78d91cfe.js b/content---docs-api-q-applicationd-3-e-0a3.a21dbe352b92a02ae653.js similarity index 98% rename from content---docs-api-q-applicationd-3-e-0a3.5ba1fb22df7f78d91cfe.js rename to content---docs-api-q-applicationd-3-e-0a3.a21dbe352b92a02ae653.js index b86073bb7..7cc6a0d46 100644 --- a/content---docs-api-q-applicationd-3-e-0a3.5ba1fb22df7f78d91cfe.js +++ b/content---docs-api-q-applicationd-3-e-0a3.a21dbe352b92a02ae653.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return b}));var a=n(0),i=n.n(a),p=i.a.createContext({}),c=function(e){var t=i.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},o=function(e){var t=c(e.components);return i.a.createElement(p.Provider,{value:t},e.children)};var r="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},s=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,p=e.originalType,o=e.parentName,r=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),s=c(n),b=a,d=s[o+"."+b]||s[b]||l[b]||p;return n?i.a.createElement(d,Object.assign({},{ref:t},r,{components:n})):i.a.createElement(d,Object.assign({},{ref:t},r))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var p=n.length,c=new Array(p);c[0]=s;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[r]="string"==typeof e?e:a,c[1]=o;for(var b=2;b=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c={sidebar_label:"QApplication",title:"QApplication"},o=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[{value:"QApplication.instance()",id:"qapplicationinstance",children:[]},{value:"QApplication.clipboard()",id:"qapplicationclipboard",children:[]}]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"qApp.quit()",id:"qappquit",children:[]},{value:"qApp.exit(returnCode)",id:"qappexitreturncode",children:[]},{value:"qApp.processEvents()",id:"qappprocessevents",children:[]},{value:"qApp.exec()",id:"qappexec",children:[]}]}],r={rightToc:o},l="wrapper";function s(e){var t=e.components,n=p(e,["components"]);return Object(a.b)(l,i({},r,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"QApplication is the root object for the entire application. It manages app level settings.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",i({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qapplication.html"}),"QApplication class"))),Object(a.b)("p",null,"The QApplication class manages the GUI application's control flow and main settings. In NodeGui you will never create an instance of it manually. NodeGui's internal runtime ",Object(a.b)("inlineCode",{parentName:"p"},"Qode")," does it for you on app start. You can access the initialised QApplication though if needed."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QApplication inherits from ",Object(a.b)("a",i({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-js"}),'const { QApplication } = require("@nodegui/nodegui");\n\nconst qApp = QApplication.instance();\nqApp.quit();\n')),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QApplication can access all the static methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component"),". Additionally it also has the following static methods."),Object(a.b)("h3",{id:"qapplicationinstance"},Object(a.b)("inlineCode",{parentName:"h3"},"QApplication.instance()")),Object(a.b)("p",null,"Returns the already initialised QApplication instance. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qcoreapplication.html#instance"}),"QApplication: instance"),"."),Object(a.b)("h3",{id:"qapplicationclipboard"},Object(a.b)("inlineCode",{parentName:"h3"},"QApplication.clipboard()")),Object(a.b)("p",null,"Returns the object for interacting with the clipboard. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qguiapplication.html#clipboard"}),"QApplication: clipboard"),". See QClipboard."),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QApplication can access all the instance properties defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QApplication can access all the instance methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"qappquit"},Object(a.b)("inlineCode",{parentName:"h3"},"qApp.quit()")),Object(a.b)("p",null,"Quits the entire app. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qcoreapplication.html#quit"}),"QApplication: quit"),"."),Object(a.b)("h3",{id:"qappexitreturncode"},Object(a.b)("inlineCode",{parentName:"h3"},"qApp.exit(returnCode)")),Object(a.b)("p",null,"Tells the application to exit with a return code. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qcoreapplication.html#exit"}),"QApplication: exit"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"returnCode")," number - The exit code while quitting the app.")),Object(a.b)("h3",{id:"qappprocessevents"},Object(a.b)("inlineCode",{parentName:"h3"},"qApp.processEvents()")),Object(a.b)("p",null,"Processes all pending events for the calling thread . It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qcoreapplication.html#processEvents"}),"QApplication: processEvents"),"."),Object(a.b)("h3",{id:"qappexec"},Object(a.b)("inlineCode",{parentName:"h3"},"qApp.exec()")),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"We will never call this method in NodeGui, since Qode will execute this function for us. It exists for experiments only.")),Object(a.b)("p",null,"Enters the main event loop and waits until exit() is called. Returns the value that was passed to exit() (which is 0 if exit() is called via quit()). It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qcoreapplication.html#exec"}),"QApplication: exec"),"."),Object(a.b)("p",null,"Returns the exit code after app exits."))}s.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return b}));var a=n(0),i=n.n(a),p=i.a.createContext({}),c=function(e){var t=i.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},o=function(e){var t=c(e.components);return i.a.createElement(p.Provider,{value:t},e.children)};var r="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},s=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,p=e.originalType,o=e.parentName,r=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),s=c(n),b=a,d=s[o+"."+b]||s[b]||l[b]||p;return n?i.a.createElement(d,Object.assign({},{ref:t},r,{components:n})):i.a.createElement(d,Object.assign({},{ref:t},r))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var p=n.length,c=new Array(p);c[0]=s;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[r]="string"==typeof e?e:a,c[1]=o;for(var b=2;b=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c={sidebar_label:"QApplication",title:"QApplication"},o=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[{value:"QApplication.instance()",id:"qapplicationinstance",children:[]},{value:"QApplication.clipboard()",id:"qapplicationclipboard",children:[]}]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"qApp.quit()",id:"qappquit",children:[]},{value:"qApp.exit(returnCode)",id:"qappexitreturncode",children:[]},{value:"qApp.processEvents()",id:"qappprocessevents",children:[]},{value:"qApp.exec()",id:"qappexec",children:[]}]}],r={rightToc:o},l="wrapper";function s(e){var t=e.components,n=p(e,["components"]);return Object(a.b)(l,i({},r,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"QApplication is the root object for the entire application. It manages app level settings.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",i({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qapplication.html"}),"QApplication class"))),Object(a.b)("p",null,"The QApplication class manages the GUI application's control flow and main settings. In NodeGui you will never create an instance of it manually. NodeGui's internal runtime ",Object(a.b)("inlineCode",{parentName:"p"},"Qode")," does it for you on app start. You can access the initialised QApplication though if needed."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QApplication inherits from ",Object(a.b)("a",i({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-js"}),'const { QApplication } = require("@nodegui/nodegui");\n\nconst qApp = QApplication.instance();\nqApp.quit();\n')),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QApplication can access all the static methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component"),". Additionally it also has the following static methods."),Object(a.b)("h3",{id:"qapplicationinstance"},Object(a.b)("inlineCode",{parentName:"h3"},"QApplication.instance()")),Object(a.b)("p",null,"Returns the already initialised QApplication instance. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qcoreapplication.html#instance"}),"QApplication: instance"),"."),Object(a.b)("h3",{id:"qapplicationclipboard"},Object(a.b)("inlineCode",{parentName:"h3"},"QApplication.clipboard()")),Object(a.b)("p",null,"Returns the object for interacting with the clipboard. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qguiapplication.html#clipboard"}),"QApplication: clipboard"),". See QClipboard."),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QApplication can access all the instance properties defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QApplication can access all the instance methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"qappquit"},Object(a.b)("inlineCode",{parentName:"h3"},"qApp.quit()")),Object(a.b)("p",null,"Quits the entire app. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qcoreapplication.html#quit"}),"QApplication: quit"),"."),Object(a.b)("h3",{id:"qappexitreturncode"},Object(a.b)("inlineCode",{parentName:"h3"},"qApp.exit(returnCode)")),Object(a.b)("p",null,"Tells the application to exit with a return code. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qcoreapplication.html#exit"}),"QApplication: exit"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"returnCode")," number - The exit code while quitting the app.")),Object(a.b)("h3",{id:"qappprocessevents"},Object(a.b)("inlineCode",{parentName:"h3"},"qApp.processEvents()")),Object(a.b)("p",null,"Processes all pending events for the calling thread . It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qcoreapplication.html#processEvents"}),"QApplication: processEvents"),"."),Object(a.b)("h3",{id:"qappexec"},Object(a.b)("inlineCode",{parentName:"h3"},"qApp.exec()")),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"We will never call this method in NodeGui, since Qode will execute this function for us. It exists for experiments only.")),Object(a.b)("p",null,"Enters the main event loop and waits until exit() is called. Returns the value that was passed to exit() (which is 0 if exit() is called via quit()). It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qcoreapplication.html#exec"}),"QApplication: exec"),"."),Object(a.b)("p",null,"Returns the exit code after app exits."))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-check-boxd-9-b-c95.f20de1581af2b72e6825.js b/content---docs-api-q-check-boxd-9-b-c95.f4343402981e369422f1.js similarity index 98% rename from content---docs-api-q-check-boxd-9-b-c95.f20de1581af2b72e6825.js rename to content---docs-api-q-check-boxd-9-b-c95.f4343402981e369422f1.js index 37ca2ce6a..d27f8d686 100644 --- a/content---docs-api-q-check-boxd-9-b-c95.f20de1581af2b72e6825.js +++ b/content---docs-api-q-check-boxd-9-b-c95.f4343402981e369422f1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return d}));var c=n(0),a=n.n(c),r=a.a.createContext({}),o=function(e){var t=a.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},i=function(e){var t=o(e.components);return a.a.createElement(r.Provider,{value:t},e.children)};var l="mdxType",b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},h=Object(c.forwardRef)((function(e,t){var n=e.components,c=e.mdxType,r=e.originalType,i=e.parentName,l=function(e,t){var n={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&-1===t.indexOf(c)&&(n[c]=e[c]);return n}(e,["components","mdxType","originalType","parentName"]),h=o(n),d=c,p=h[i+"."+d]||h[d]||b[d]||r;return n?a.a.createElement(p,Object.assign({},{ref:t},l,{components:n})):a.a.createElement(p,Object.assign({},{ref:t},l))}));function d(e,t){var n=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var r=n.length,o=new Array(r);o[0]=h;var i={};for(var b in t)hasOwnProperty.call(t,b)&&(i[b]=t[b]);i.originalType=e,i[l]="string"==typeof e?e:c,o[1]=i;for(var d=2;d=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o={sidebar_label:"QCheckBox",title:"QCheckBox"},i=[{value:"Example",id:"example",children:[]},{value:"new QCheckBox(parent?)",id:"new-qcheckboxparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"checkbox.setText(text)",id:"checkboxsettexttext",children:[]},{value:"checkbox.isChecked()",id:"checkboxischecked",children:[]},{value:"checkbox.setChecked(check)",id:"checkboxsetcheckedcheck",children:[]}]}],l={rightToc:i},b="wrapper";function h(e){var t=e.components,n=r(e,["components"]);return Object(c.b)(b,a({},l,n,{components:t,mdxType:"MDXLayout"}),Object(c.b)("blockquote",null,Object(c.b)("p",{parentName:"blockquote"},"Create and control checkbox.")),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(c.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qcheckbox.html"}),"QCheckBox class"))),Object(c.b)("p",null,"A ",Object(c.b)("inlineCode",{parentName:"p"},"QCheckBox")," provides ability to add and manipulate native checkbox widgets."),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"QCheckBox inherits from ",Object(c.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(c.b)("h3",{id:"example"},"Example"),Object(c.b)("pre",null,Object(c.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QCheckBox } = require("@nodegui/nodegui");\n\nconst checkbox = new QCheckBox();\ncheckbox.setText("Hello");\n')),Object(c.b)("h3",{id:"new-qcheckboxparent"},Object(c.b)("inlineCode",{parentName:"h3"},"new QCheckBox(parent?)")),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(c.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(c.b)("h2",{id:"static-methods"},"Static Methods"),Object(c.b)("p",null,"QCheckBox can access all the static methods defined in ",Object(c.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(c.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(c.b)("p",null,"QCheckBox can access all the instance properties defined in ",Object(c.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(c.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(c.b)("p",null,"QCheckBox can access all the instance methods defined in ",Object(c.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(c.b)("p",null,"Additionally it also has the following instance methods:"),Object(c.b)("h3",{id:"checkboxsettexttext"},Object(c.b)("inlineCode",{parentName:"h3"},"checkbox.setText(text)")),Object(c.b)("p",null,"Sets the given text to the checkbox."),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"text")," string")),Object(c.b)("h3",{id:"checkboxischecked"},Object(c.b)("inlineCode",{parentName:"h3"},"checkbox.isChecked()")),Object(c.b)("p",null,"returns whether the checkbox is checked or not. It calls the native method ",Object(c.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractbutton.html#checked-prop"}),"QAbstractButton: isChecked"),"."),Object(c.b)("h3",{id:"checkboxsetcheckedcheck"},Object(c.b)("inlineCode",{parentName:"h3"},"checkbox.setChecked(check)")),Object(c.b)("p",null,"This property holds whether the button is checked. It calls the native method ",Object(c.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractbutton.html#checked-prop"}),"QAbstractButton: setChecked"),"."),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"check")," boolean")))}h.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return d}));var c=n(0),a=n.n(c),r=a.a.createContext({}),o=function(e){var t=a.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},i=function(e){var t=o(e.components);return a.a.createElement(r.Provider,{value:t},e.children)};var l="mdxType",b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},h=Object(c.forwardRef)((function(e,t){var n=e.components,c=e.mdxType,r=e.originalType,i=e.parentName,l=function(e,t){var n={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&-1===t.indexOf(c)&&(n[c]=e[c]);return n}(e,["components","mdxType","originalType","parentName"]),h=o(n),d=c,p=h[i+"."+d]||h[d]||b[d]||r;return n?a.a.createElement(p,Object.assign({},{ref:t},l,{components:n})):a.a.createElement(p,Object.assign({},{ref:t},l))}));function d(e,t){var n=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var r=n.length,o=new Array(r);o[0]=h;var i={};for(var b in t)hasOwnProperty.call(t,b)&&(i[b]=t[b]);i.originalType=e,i[l]="string"==typeof e?e:c,o[1]=i;for(var d=2;d=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o={sidebar_label:"QCheckBox",title:"QCheckBox"},i=[{value:"Example",id:"example",children:[]},{value:"new QCheckBox(parent?)",id:"new-qcheckboxparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"checkbox.setText(text)",id:"checkboxsettexttext",children:[]},{value:"checkbox.isChecked()",id:"checkboxischecked",children:[]},{value:"checkbox.setChecked(check)",id:"checkboxsetcheckedcheck",children:[]}]}],l={rightToc:i},b="wrapper";function h(e){var t=e.components,n=r(e,["components"]);return Object(c.b)(b,a({},l,n,{components:t,mdxType:"MDXLayout"}),Object(c.b)("blockquote",null,Object(c.b)("p",{parentName:"blockquote"},"Create and control checkbox.")),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(c.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qcheckbox.html"}),"QCheckBox class"))),Object(c.b)("p",null,"A ",Object(c.b)("inlineCode",{parentName:"p"},"QCheckBox")," provides ability to add and manipulate native checkbox widgets."),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"QCheckBox inherits from ",Object(c.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(c.b)("h3",{id:"example"},"Example"),Object(c.b)("pre",null,Object(c.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QCheckBox } = require("@nodegui/nodegui");\n\nconst checkbox = new QCheckBox();\ncheckbox.setText("Hello");\n')),Object(c.b)("h3",{id:"new-qcheckboxparent"},Object(c.b)("inlineCode",{parentName:"h3"},"new QCheckBox(parent?)")),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(c.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(c.b)("h2",{id:"static-methods"},"Static Methods"),Object(c.b)("p",null,"QCheckBox can access all the static methods defined in ",Object(c.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(c.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(c.b)("p",null,"QCheckBox can access all the instance properties defined in ",Object(c.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(c.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(c.b)("p",null,"QCheckBox can access all the instance methods defined in ",Object(c.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(c.b)("p",null,"Additionally it also has the following instance methods:"),Object(c.b)("h3",{id:"checkboxsettexttext"},Object(c.b)("inlineCode",{parentName:"h3"},"checkbox.setText(text)")),Object(c.b)("p",null,"Sets the given text to the checkbox."),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"text")," string")),Object(c.b)("h3",{id:"checkboxischecked"},Object(c.b)("inlineCode",{parentName:"h3"},"checkbox.isChecked()")),Object(c.b)("p",null,"returns whether the checkbox is checked or not. It calls the native method ",Object(c.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractbutton.html#checked-prop"}),"QAbstractButton: isChecked"),"."),Object(c.b)("h3",{id:"checkboxsetcheckedcheck"},Object(c.b)("inlineCode",{parentName:"h3"},"checkbox.setChecked(check)")),Object(c.b)("p",null,"This property holds whether the button is checked. It calls the native method ",Object(c.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qabstractbutton.html#checked-prop"}),"QAbstractButton: setChecked"),"."),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("inlineCode",{parentName:"li"},"check")," boolean")))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-clipboard-69-d-2ef.37d806252ceae9ce9066.js b/content---docs-api-q-clipboard-69-d-2ef.2e66daf3759a1023c6af.js similarity index 98% rename from content---docs-api-q-clipboard-69-d-2ef.37d806252ceae9ce9066.js rename to content---docs-api-q-clipboard-69-d-2ef.2e66daf3759a1023c6af.js index 8bb16e452..86614c7c4 100644 --- a/content---docs-api-q-clipboard-69-d-2ef.37d806252ceae9ce9066.js +++ b/content---docs-api-q-clipboard-69-d-2ef.2e66daf3759a1023c6af.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return b}));var a=n(0),o=n.n(a),r=o.a.createContext({}),i=function(e){var t=o.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return o.a.createElement(r.Provider,{value:t},e.children)};var l="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,l=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),d=i(n),b=a,s=d[c+"."+b]||d[b]||p[b]||r;return n?o.a.createElement(s,Object.assign({},{ref:t},l,{components:n})):o.a.createElement(s,Object.assign({},{ref:t},l))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[l]="string"==typeof e?e:a,i[1]=c;for(var b=2;b=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={sidebar_label:"QClipboard",title:"QClipboard"},c=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"clipboard.clear(mode)",id:"clipboardclearmode",children:[]},{value:"clipboard.setText(text, mode)",id:"clipboardsettexttext-mode",children:[]},{value:"clipboard.text(mode)",id:"clipboardtextmode",children:[]}]}],l={rightToc:c},p="wrapper";function d(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QClipboard class provides access to the window system clipboard.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",o({parentName:"strong"},{href:"https://doc.qt.io/qt-5/QClipboard.html"}),"QClipboard class"))),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QClipboard inherits from ",Object(a.b)("a",o({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const {\n QClipboard,\n QClipboardMode,\n QApplication\n} = require("@nodegui/nodegui");\n\nconst clipboard = QApplication.clipboard();\nconst text = clipboard.text(QClipboardMode.Clipboard);\n')),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QClipboard can access all the static methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QClipboard can access all the instance properties defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QClipboard can access all the instance methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component"),". Additionally it has:"),Object(a.b)("h3",{id:"clipboardclearmode"},Object(a.b)("inlineCode",{parentName:"h3"},"clipboard.clear(mode)")),Object(a.b)("p",null,"Clear the clipboard contents. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qclipboard.html#clear"}),"QClipboard: clear"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"mode")," - This enum type is used to control which part of the system clipboard is used. See ",Object(a.b)("a",o({parentName:"li"},{href:"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum"}),"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum"))),Object(a.b)("h3",{id:"clipboardsettexttext-mode"},Object(a.b)("inlineCode",{parentName:"h3"},"clipboard.setText(text, mode)")),Object(a.b)("p",null,"Copies text into the clipboard as plain text. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qclipboard.html#setText"}),"QClipboard: setText"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"text")," - The text you want to copy to clipboard.")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"mode")," - This enum type is used to control which part of the system clipboard is used. See ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum"}),"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum")))),Object(a.b)("h3",{id:"clipboardtextmode"},Object(a.b)("inlineCode",{parentName:"h3"},"clipboard.text(mode)")),Object(a.b)("p",null,"Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any text. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qclipboard.html#text"}),"QClipboard: text"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"mode")," - This enum type is used to control which part of the system clipboard is used. See ",Object(a.b)("a",o({parentName:"li"},{href:"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum"}),"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum"))))}d.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return b}));var a=n(0),o=n.n(a),r=o.a.createContext({}),i=function(e){var t=o.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return o.a.createElement(r.Provider,{value:t},e.children)};var l="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,l=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),d=i(n),b=a,s=d[c+"."+b]||d[b]||p[b]||r;return n?o.a.createElement(s,Object.assign({},{ref:t},l,{components:n})):o.a.createElement(s,Object.assign({},{ref:t},l))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[l]="string"==typeof e?e:a,i[1]=c;for(var b=2;b=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={sidebar_label:"QClipboard",title:"QClipboard"},c=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"clipboard.clear(mode)",id:"clipboardclearmode",children:[]},{value:"clipboard.setText(text, mode)",id:"clipboardsettexttext-mode",children:[]},{value:"clipboard.text(mode)",id:"clipboardtextmode",children:[]}]}],l={rightToc:c},p="wrapper";function d(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QClipboard class provides access to the window system clipboard.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",o({parentName:"strong"},{href:"https://doc.qt.io/qt-5/QClipboard.html"}),"QClipboard class"))),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QClipboard inherits from ",Object(a.b)("a",o({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const {\n QClipboard,\n QClipboardMode,\n QApplication\n} = require("@nodegui/nodegui");\n\nconst clipboard = QApplication.clipboard();\nconst text = clipboard.text(QClipboardMode.Clipboard);\n')),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QClipboard can access all the static methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QClipboard can access all the instance properties defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QClipboard can access all the instance methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component"),". Additionally it has:"),Object(a.b)("h3",{id:"clipboardclearmode"},Object(a.b)("inlineCode",{parentName:"h3"},"clipboard.clear(mode)")),Object(a.b)("p",null,"Clear the clipboard contents. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qclipboard.html#clear"}),"QClipboard: clear"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"mode")," - This enum type is used to control which part of the system clipboard is used. See ",Object(a.b)("a",o({parentName:"li"},{href:"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum"}),"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum"))),Object(a.b)("h3",{id:"clipboardsettexttext-mode"},Object(a.b)("inlineCode",{parentName:"h3"},"clipboard.setText(text, mode)")),Object(a.b)("p",null,"Copies text into the clipboard as plain text. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qclipboard.html#setText"}),"QClipboard: setText"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"text")," - The text you want to copy to clipboard.")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},Object(a.b)("inlineCode",{parentName:"p"},"mode")," - This enum type is used to control which part of the system clipboard is used. See ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum"}),"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum")))),Object(a.b)("h3",{id:"clipboardtextmode"},Object(a.b)("inlineCode",{parentName:"h3"},"clipboard.text(mode)")),Object(a.b)("p",null,"Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any text. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qclipboard.html#text"}),"QClipboard: text"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"mode")," - This enum type is used to control which part of the system clipboard is used. See ",Object(a.b)("a",o({parentName:"li"},{href:"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum"}),"https://doc.qt.io/qt-5/qclipboard.html#Mode-enum"))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-cursor-362-d51.a8951173d79cc5b6743b.js b/content---docs-api-q-cursor-362-d51.d7f2f5cef2bb3d6bbab7.js similarity index 96% rename from content---docs-api-q-cursor-362-d51.a8951173d79cc5b6743b.js rename to content---docs-api-q-cursor-362-d51.d7f2f5cef2bb3d6bbab7.js index 98f23c2d4..324e41099 100644 --- a/content---docs-api-q-cursor-362-d51.a8951173d79cc5b6743b.js +++ b/content---docs-api-q-cursor-362-d51.d7f2f5cef2bb3d6bbab7.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{173:function(e,r,n){"use strict";n.d(r,"a",(function(){return u})),n.d(r,"b",(function(){return p}));var t=n(0),a=n.n(t),o=a.a.createContext({}),c=function(e){var r=a.a.useContext(o),n=r;return e&&(n="function"==typeof e?e(r):Object.assign({},r,e)),n},u=function(e){var r=c(e.components);return a.a.createElement(o.Provider,{value:r},e.children)};var i="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return a.a.createElement(a.a.Fragment,{},r)}},l=Object(t.forwardRef)((function(e,r){var n=e.components,t=e.mdxType,o=e.originalType,u=e.parentName,i=function(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===r.indexOf(t)&&(n[t]=e[t]);return n}(e,["components","mdxType","originalType","parentName"]),l=c(n),p=t,b=l[u+"."+p]||l[p]||s[p]||o;return n?a.a.createElement(b,Object.assign({},{ref:r},i,{components:n})):a.a.createElement(b,Object.assign({},{ref:r},i))}));function p(e,r){var n=arguments,t=r&&r.mdxType;if("string"==typeof e||t){var o=n.length,c=new Array(o);c[0]=l;var u={};for(var s in r)hasOwnProperty.call(r,s)&&(u[s]=r[s]);u.originalType=e,u[i]="string"==typeof e?e:t,c[1]=u;for(var p=2;p=0||(a[n]=e[n]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c={sidebar_label:"QCursor",title:"QCursor"},u=[{value:"Example",id:"example",children:[]},{value:"new QCursor(cursor)",id:"new-qcursorcursor",children:[]}],i={rightToc:u},s="wrapper";function l(e){var r=e.components,n=o(e,["components"]);return Object(t.b)(s,a({},i,n,{components:r,mdxType:"MDXLayout"}),Object(t.b)("blockquote",null,Object(t.b)("p",{parentName:"blockquote"},"The QCursor class provides scalable icons in different modes and states.")),Object(t.b)("p",null,Object(t.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(t.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qcursor.html"}),"QCursor class"))),Object(t.b)("h3",{id:"example"},"Example"),Object(t.b)("pre",null,Object(t.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QCursor } = require("@nodegui/nodegui");\n\nconst cursor = new QCursor();\n')),Object(t.b)("h3",{id:"new-qcursorcursor"},Object(t.b)("inlineCode",{parentName:"h3"},"new QCursor(cursor)")),Object(t.b)("ul",null,Object(t.b)("li",{parentName:"ul"},Object(t.b)("inlineCode",{parentName:"li"},"cursor")," CursorShape (",Object(t.b)("em",{parentName:"li"},"optional"),"). Defines shape for the cursor. ",Object(t.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"CursorShape is an enum from Qt"))))}l.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{173:function(e,r,n){"use strict";n.d(r,"a",(function(){return u})),n.d(r,"b",(function(){return p}));var t=n(0),a=n.n(t),o=a.a.createContext({}),c=function(e){var r=a.a.useContext(o),n=r;return e&&(n="function"==typeof e?e(r):Object.assign({},r,e)),n},u=function(e){var r=c(e.components);return a.a.createElement(o.Provider,{value:r},e.children)};var i="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return a.a.createElement(a.a.Fragment,{},r)}},l=Object(t.forwardRef)((function(e,r){var n=e.components,t=e.mdxType,o=e.originalType,u=e.parentName,i=function(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===r.indexOf(t)&&(n[t]=e[t]);return n}(e,["components","mdxType","originalType","parentName"]),l=c(n),p=t,b=l[u+"."+p]||l[p]||s[p]||o;return n?a.a.createElement(b,Object.assign({},{ref:r},i,{components:n})):a.a.createElement(b,Object.assign({},{ref:r},i))}));function p(e,r){var n=arguments,t=r&&r.mdxType;if("string"==typeof e||t){var o=n.length,c=new Array(o);c[0]=l;var u={};for(var s in r)hasOwnProperty.call(r,s)&&(u[s]=r[s]);u.originalType=e,u[i]="string"==typeof e?e:t,c[1]=u;for(var p=2;p=0||(a[n]=e[n]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c={sidebar_label:"QCursor",title:"QCursor"},u=[{value:"Example",id:"example",children:[]},{value:"new QCursor(cursor)",id:"new-qcursorcursor",children:[]}],i={rightToc:u},s="wrapper";function l(e){var r=e.components,n=o(e,["components"]);return Object(t.b)(s,a({},i,n,{components:r,mdxType:"MDXLayout"}),Object(t.b)("blockquote",null,Object(t.b)("p",{parentName:"blockquote"},"The QCursor class provides scalable icons in different modes and states.")),Object(t.b)("p",null,Object(t.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(t.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qcursor.html"}),"QCursor class"))),Object(t.b)("h3",{id:"example"},"Example"),Object(t.b)("pre",null,Object(t.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QCursor } = require("@nodegui/nodegui");\n\nconst cursor = new QCursor();\n')),Object(t.b)("h3",{id:"new-qcursorcursor"},Object(t.b)("inlineCode",{parentName:"h3"},"new QCursor(cursor)")),Object(t.b)("ul",null,Object(t.b)("li",{parentName:"ul"},Object(t.b)("inlineCode",{parentName:"li"},"cursor")," CursorShape (",Object(t.b)("em",{parentName:"li"},"optional"),"). Defines shape for the cursor. ",Object(t.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"CursorShape is an enum from Qt"))))}l.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-dial-80-b-99a.4f88543f01722ffa22a9.js b/content---docs-api-q-dial-80-b-99a.0840ed72631e3e799a59.js similarity index 98% rename from content---docs-api-q-dial-80-b-99a.4f88543f01722ffa22a9.js rename to content---docs-api-q-dial-80-b-99a.0840ed72631e3e799a59.js index 4d22c15b3..b2898a2ec 100644 --- a/content---docs-api-q-dial-80-b-99a.4f88543f01722ffa22a9.js +++ b/content---docs-api-q-dial-80-b-99a.0840ed72631e3e799a59.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{173:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return d}));var n=a(0),i=a.n(n),l=i.a.createContext({}),r=function(e){var t=i.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):Object.assign({},t,e)),a},o=function(e){var t=r(e.components);return i.a.createElement(l.Provider,{value:t},e.children)};var c="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},p=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,o=e.parentName,c=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(a[n]=e[n]);return a}(e,["components","mdxType","originalType","parentName"]),p=r(a),d=n,b=p[o+"."+d]||p[d]||s[d]||l;return a?i.a.createElement(b,Object.assign({},{ref:t},c,{components:a})):i.a.createElement(b,Object.assign({},{ref:t},c))}));function d(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,r=new Array(l);r[0]=p;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:n,r[1]=o;for(var d=2;d=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var r={sidebar_label:"QDial",title:"QDial"},o=[{value:"Example",id:"example",children:[]},{value:"new QDial(parent?)",id:"new-qdialparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"dial.setNotchesVisible(visible)",id:"dialsetnotchesvisiblevisible",children:[]},{value:"dial.setWrapping(on)",id:"dialsetwrappingon",children:[]},{value:"dial.setNotchTarget(target)",id:"dialsetnotchtargettarget",children:[]},{value:"dial.notchTarget()",id:"dialnotchtarget",children:[]},{value:"dial.notchesVisible()",id:"dialnotchesvisible",children:[]},{value:"dial.notchesVisible()",id:"dialnotchesvisible-1",children:[]},{value:"dial.wrapping()",id:"dialwrapping",children:[]}]}],c={rightToc:o},s="wrapper";function p(e){var t=e.components,a=l(e,["components"]);return Object(n.b)(s,i({},c,a,{components:t,mdxType:"MDXLayout"}),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Create and control dial slider widgets.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(n.b)("a",i({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qdial.html"}),"QDial class"))),Object(n.b)("p",null,"A ",Object(n.b)("inlineCode",{parentName:"p"},"QDial")," provides ability to add and manipulate native dial slider widgets."),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"QDial inherits from ",Object(n.b)("a",i({parentName:"strong"},{href:"/docs/api/QAbstractSlider"}),"QAbstractSlider"))),Object(n.b)("h3",{id:"example"},"Example"),Object(n.b)("pre",null,Object(n.b)("code",i({parentName:"pre"},{className:"language-javascript"}),'const { QDial } = require("@nodegui/nodegui");\n\nconst dial = new QDial();\n')),Object(n.b)("h3",{id:"new-qdialparent"},Object(n.b)("inlineCode",{parentName:"h3"},"new QDial(parent?)")),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(n.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(n.b)("h2",{id:"static-methods"},"Static Methods"),Object(n.b)("p",null,"QDial can access all the static methods defined in ",Object(n.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(n.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(n.b)("p",null,"QDial can access all the instance properties defined in ",Object(n.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(n.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(n.b)("p",null,"QDial can access all the instance methods defined in ",Object(n.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(n.b)("h3",{id:"dialsetnotchesvisiblevisible"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.setNotchesVisible(visible)")),Object(n.b)("p",null,"Sets the visibility of notches drawn around the dial. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#notchTarget-prop"}),"QDial: setNotchesVisible"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"visible")," boolean - Set the value as current notch visibility.")),Object(n.b)("h3",{id:"dialsetwrappingon"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.setWrapping(on)")),Object(n.b)("p",null,"Sets the ability to wrap arrow around the dial instead of limiting it to upper part of the dial. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#wrapping-prop"}),"QDial: setWrapping"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"on")," boolean - Set the value as current wrapping setting.")),Object(n.b)("h3",{id:"dialsetnotchtargettarget"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.setNotchTarget(target)")),Object(n.b)("p",null,"Sets the number of pixels between dial notches. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#notchTarget-prop"}),"QDial: setNotchTarget"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"target")," number - Specifies number of pixels between notches.")),Object(n.b)("h3",{id:"dialnotchtarget"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.notchTarget()")),Object(n.b)("p",null,"Returns the current number of pixels between dial notches. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#notchTarget-prop"}),"QDial: notchTarget"),"."),Object(n.b)("h3",{id:"dialnotchesvisible"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.notchesVisible()")),Object(n.b)("p",null,"Returns the visibility status (Boolean) of dial notches. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#notchesVisible-prop"}),"QDial: notchesVisible"),"."),Object(n.b)("h3",{id:"dialnotchesvisible-1"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.notchesVisible()")),Object(n.b)("p",null,"Returns the visibility status (Boolean) of dial notches. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#notchesVisible-prop"}),"QDial: notchesVisible"),"."),Object(n.b)("h3",{id:"dialwrapping"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.wrapping()")),Object(n.b)("p",null,"Returns the current wrapping (Boolean) state of the dial. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#wrapping-prop"}),"QDial: wrapping"),"."))}p.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{173:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return d}));var n=a(0),i=a.n(n),l=i.a.createContext({}),r=function(e){var t=i.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):Object.assign({},t,e)),a},o=function(e){var t=r(e.components);return i.a.createElement(l.Provider,{value:t},e.children)};var c="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},p=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,o=e.parentName,c=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(a[n]=e[n]);return a}(e,["components","mdxType","originalType","parentName"]),p=r(a),d=n,b=p[o+"."+d]||p[d]||s[d]||l;return a?i.a.createElement(b,Object.assign({},{ref:t},c,{components:a})):i.a.createElement(b,Object.assign({},{ref:t},c))}));function d(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,r=new Array(l);r[0]=p;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:n,r[1]=o;for(var d=2;d=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var r={sidebar_label:"QDial",title:"QDial"},o=[{value:"Example",id:"example",children:[]},{value:"new QDial(parent?)",id:"new-qdialparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"dial.setNotchesVisible(visible)",id:"dialsetnotchesvisiblevisible",children:[]},{value:"dial.setWrapping(on)",id:"dialsetwrappingon",children:[]},{value:"dial.setNotchTarget(target)",id:"dialsetnotchtargettarget",children:[]},{value:"dial.notchTarget()",id:"dialnotchtarget",children:[]},{value:"dial.notchesVisible()",id:"dialnotchesvisible",children:[]},{value:"dial.notchesVisible()",id:"dialnotchesvisible-1",children:[]},{value:"dial.wrapping()",id:"dialwrapping",children:[]}]}],c={rightToc:o},s="wrapper";function p(e){var t=e.components,a=l(e,["components"]);return Object(n.b)(s,i({},c,a,{components:t,mdxType:"MDXLayout"}),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Create and control dial slider widgets.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(n.b)("a",i({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qdial.html"}),"QDial class"))),Object(n.b)("p",null,"A ",Object(n.b)("inlineCode",{parentName:"p"},"QDial")," provides ability to add and manipulate native dial slider widgets."),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"QDial inherits from ",Object(n.b)("a",i({parentName:"strong"},{href:"/docs/api/QAbstractSlider"}),"QAbstractSlider"))),Object(n.b)("h3",{id:"example"},"Example"),Object(n.b)("pre",null,Object(n.b)("code",i({parentName:"pre"},{className:"language-javascript"}),'const { QDial } = require("@nodegui/nodegui");\n\nconst dial = new QDial();\n')),Object(n.b)("h3",{id:"new-qdialparent"},Object(n.b)("inlineCode",{parentName:"h3"},"new QDial(parent?)")),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(n.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(n.b)("h2",{id:"static-methods"},"Static Methods"),Object(n.b)("p",null,"QDial can access all the static methods defined in ",Object(n.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(n.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(n.b)("p",null,"QDial can access all the instance properties defined in ",Object(n.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(n.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(n.b)("p",null,"QDial can access all the instance methods defined in ",Object(n.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(n.b)("h3",{id:"dialsetnotchesvisiblevisible"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.setNotchesVisible(visible)")),Object(n.b)("p",null,"Sets the visibility of notches drawn around the dial. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#notchTarget-prop"}),"QDial: setNotchesVisible"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"visible")," boolean - Set the value as current notch visibility.")),Object(n.b)("h3",{id:"dialsetwrappingon"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.setWrapping(on)")),Object(n.b)("p",null,"Sets the ability to wrap arrow around the dial instead of limiting it to upper part of the dial. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#wrapping-prop"}),"QDial: setWrapping"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"on")," boolean - Set the value as current wrapping setting.")),Object(n.b)("h3",{id:"dialsetnotchtargettarget"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.setNotchTarget(target)")),Object(n.b)("p",null,"Sets the number of pixels between dial notches. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#notchTarget-prop"}),"QDial: setNotchTarget"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"target")," number - Specifies number of pixels between notches.")),Object(n.b)("h3",{id:"dialnotchtarget"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.notchTarget()")),Object(n.b)("p",null,"Returns the current number of pixels between dial notches. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#notchTarget-prop"}),"QDial: notchTarget"),"."),Object(n.b)("h3",{id:"dialnotchesvisible"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.notchesVisible()")),Object(n.b)("p",null,"Returns the visibility status (Boolean) of dial notches. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#notchesVisible-prop"}),"QDial: notchesVisible"),"."),Object(n.b)("h3",{id:"dialnotchesvisible-1"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.notchesVisible()")),Object(n.b)("p",null,"Returns the visibility status (Boolean) of dial notches. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#notchesVisible-prop"}),"QDial: notchesVisible"),"."),Object(n.b)("h3",{id:"dialwrapping"},Object(n.b)("inlineCode",{parentName:"h3"},"dial.wrapping()")),Object(n.b)("p",null,"Returns the current wrapping (Boolean) state of the dial. It calls the native method ",Object(n.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qdial.html#wrapping-prop"}),"QDial: wrapping"),"."))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-grid-layouta-4-e-552.18fc004232075bb70ff7.js b/content---docs-api-q-grid-layouta-4-e-552.0af8922fd4b8cc1894d9.js similarity index 97% rename from content---docs-api-q-grid-layouta-4-e-552.18fc004232075bb70ff7.js rename to content---docs-api-q-grid-layouta-4-e-552.0af8922fd4b8cc1894d9.js index f82ae7c52..903112983 100644 --- a/content---docs-api-q-grid-layouta-4-e-552.18fc004232075bb70ff7.js +++ b/content---docs-api-q-grid-layouta-4-e-552.0af8922fd4b8cc1894d9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{173:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return s}));var n=a(0),o=a.n(n),r=o.a.createContext({}),i=function(e){var t=o.a.useContext(r),a=t;return e&&(a="function"==typeof e?e(t):Object.assign({},t,e)),a},d=function(e){var t=i(e.components);return o.a.createElement(r.Provider,{value:t},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},u=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,d=e.parentName,l=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(a[n]=e[n]);return a}(e,["components","mdxType","originalType","parentName"]),u=i(a),s=n,p=u[d+"."+s]||u[s]||c[s]||r;return a?o.a.createElement(p,Object.assign({},{ref:t},l,{components:a})):o.a.createElement(p,Object.assign({},{ref:t},l))}));function s(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,i=new Array(r);i[0]=u;var d={};for(var c in t)hasOwnProperty.call(t,c)&&(d[c]=t[c]);d.originalType=e,d[l]="string"==typeof e?e:n,i[1]=d;for(var s=2;s=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var i={sidebar_label:"QGridLayout",title:"QGridLayout"},d=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"layout.addWidget(childWidget)",id:"layoutaddwidgetchildwidget",children:[]},{value:"layout.removeWidget(childWidget)",id:"layoutremovewidgetchildwidget",children:[]}]}],l={rightToc:d},c="wrapper";function u(e){var t=e.components,a=r(e,["components"]);return Object(n.b)(c,o({},l,a,{components:t,mdxType:"MDXLayout"}),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"The QGridLayout class lays out widgets in a grid.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(n.b)("a",o({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qgridlayout.html"}),"QGridLayout"))),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"QGridLayout inherits from ",Object(n.b)("a",o({parentName:"strong"},{href:"/docs/api/NodeLayout"}),"NodeLayout"))),Object(n.b)("h3",{id:"example"},"Example"),Object(n.b)("pre",null,Object(n.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const { QGridLayout, QWidget, QLabel } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nconst layout = new QGridLayout();\nview.setLayout(layout);\n\nconst label = new QLabel();\nlabel.setText("label1");\nconst label2 = new QLabel();\nlabel2.setText("label2");\n\nlayout.addWidget(label);\nlayout.addWidget(label2);\n')),Object(n.b)("h2",{id:"static-methods"},"Static Methods"),Object(n.b)("p",null,"QGridLayout can access all the static methods defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(n.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(n.b)("p",null,"QGridLayout can access all the instance properties defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(n.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(n.b)("p",null,"QGridLayout can access all the instance methods defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(n.b)("p",null,"Additionally it also has the following instance methods:"),Object(n.b)("h3",{id:"layoutaddwidgetchildwidget"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.addWidget(childWidget)")),Object(n.b)("p",null,"Adds the childWidget to the layout. It calls the native method QGridLayout ",Object(n.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#show"}),"QGridLayout: addWidget"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - child widget that needs to be added to the layout.")),Object(n.b)("h3",{id:"layoutremovewidgetchildwidget"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.removeWidget(childWidget)")),Object(n.b)("p",null,"Removes the childWidget from the layout. It calls the native method of custom QGridLayout. ",Object(n.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qlayout.html#removeWidget"}),"QGridLayout: removeWidget"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - child widget that needs to be added to the layout.")))}u.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{173:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return s}));var n=a(0),o=a.n(n),r=o.a.createContext({}),i=function(e){var t=o.a.useContext(r),a=t;return e&&(a="function"==typeof e?e(t):Object.assign({},t,e)),a},d=function(e){var t=i(e.components);return o.a.createElement(r.Provider,{value:t},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},u=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,d=e.parentName,l=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(a[n]=e[n]);return a}(e,["components","mdxType","originalType","parentName"]),u=i(a),s=n,p=u[d+"."+s]||u[s]||c[s]||r;return a?o.a.createElement(p,Object.assign({},{ref:t},l,{components:a})):o.a.createElement(p,Object.assign({},{ref:t},l))}));function s(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,i=new Array(r);i[0]=u;var d={};for(var c in t)hasOwnProperty.call(t,c)&&(d[c]=t[c]);d.originalType=e,d[l]="string"==typeof e?e:n,i[1]=d;for(var s=2;s=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var i={sidebar_label:"QGridLayout",title:"QGridLayout"},d=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"layout.addWidget(childWidget)",id:"layoutaddwidgetchildwidget",children:[]},{value:"layout.removeWidget(childWidget)",id:"layoutremovewidgetchildwidget",children:[]}]}],l={rightToc:d},c="wrapper";function u(e){var t=e.components,a=r(e,["components"]);return Object(n.b)(c,o({},l,a,{components:t,mdxType:"MDXLayout"}),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"The QGridLayout class lays out widgets in a grid.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(n.b)("a",o({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qgridlayout.html"}),"QGridLayout"))),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"QGridLayout inherits from ",Object(n.b)("a",o({parentName:"strong"},{href:"/docs/api/NodeLayout"}),"NodeLayout"))),Object(n.b)("h3",{id:"example"},"Example"),Object(n.b)("pre",null,Object(n.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const { QGridLayout, QWidget, QLabel } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nconst layout = new QGridLayout();\nview.setLayout(layout);\n\nconst label = new QLabel();\nlabel.setText("label1");\nconst label2 = new QLabel();\nlabel2.setText("label2");\n\nlayout.addWidget(label);\nlayout.addWidget(label2);\n')),Object(n.b)("h2",{id:"static-methods"},"Static Methods"),Object(n.b)("p",null,"QGridLayout can access all the static methods defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(n.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(n.b)("p",null,"QGridLayout can access all the instance properties defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(n.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(n.b)("p",null,"QGridLayout can access all the instance methods defined in ",Object(n.b)("a",o({parentName:"p"},{href:"/docs/api/NodeLayout"}),"NodeLayout")),Object(n.b)("p",null,"Additionally it also has the following instance methods:"),Object(n.b)("h3",{id:"layoutaddwidgetchildwidget"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.addWidget(childWidget)")),Object(n.b)("p",null,"Adds the childWidget to the layout. It calls the native method QGridLayout ",Object(n.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#show"}),"QGridLayout: addWidget"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - child widget that needs to be added to the layout.")),Object(n.b)("h3",{id:"layoutremovewidgetchildwidget"},Object(n.b)("inlineCode",{parentName:"h3"},"layout.removeWidget(childWidget)")),Object(n.b)("p",null,"Removes the childWidget from the layout. It calls the native method of custom QGridLayout. ",Object(n.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qlayout.html#removeWidget"}),"QGridLayout: removeWidget"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"childWidget")," NodeWidget - child widget that needs to be added to the layout.")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-icone-5-f-b0d.ba5e99f7546b1f2ecbd6.js b/content---docs-api-q-icone-5-f-b0d.78bdb97f434bec83087f.js similarity index 98% rename from content---docs-api-q-icone-5-f-b0d.ba5e99f7546b1f2ecbd6.js rename to content---docs-api-q-icone-5-f-b0d.78bdb97f434bec83087f.js index 23f6fc006..9830bbeb3 100644 --- a/content---docs-api-q-icone-5-f-b0d.ba5e99f7546b1f2ecbd6.js +++ b/content---docs-api-q-icone-5-f-b0d.78bdb97f434bec83087f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return b}));var a=n(0),i=n.n(a),r=i.a.createContext({}),o=function(e){var t=i.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=o(e.components);return i.a.createElement(r.Provider,{value:t},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},p=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),p=o(n),b=a,m=p[c+"."+b]||p[b]||l[b]||r;return n?i.a.createElement(m,Object.assign({},{ref:t},s,{components:n})):i.a.createElement(m,Object.assign({},{ref:t},s))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:a,o[1]=c;for(var b=2;b=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o={sidebar_label:"QIcon",title:"QIcon"},c=[{value:"Example",id:"example",children:[]},{value:"new QIcon(imageUrl?)",id:"new-qiconimageurl",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"icon.pixmap(width, height, mode?, state?) (v0.1.10 & up)",id:"iconpixmapwidth-height-mode-state-v0110--up",children:[]},{value:"icon.isMask()",id:"iconismask",children:[]},{value:"icon.setIsMask(isMask)",id:"iconsetismaskismask",children:[]}]}],s={rightToc:c},l="wrapper";function p(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(l,i({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QIcon class provides scalable icons in different modes and states.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",i({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qicon.html"}),"QIcon class"))),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QIcon inherits from ",Object(a.b)("a",i({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-javascript"}),'const { QIcon } = require("@nodegui/nodegui");\n\nconst imageUrl = "path/to/png";\nconst icon = new QIcon(imageUrl);\n')),Object(a.b)("h3",{id:"new-qiconimageurl"},Object(a.b)("inlineCode",{parentName:"h3"},"new QIcon(imageUrl?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"imageUrl")," string (",Object(a.b)("em",{parentName:"li"},"optional"),"). Absolute path of the image that needs to be loaded in the memory.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QIcon can access all the static methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QIcon can access all the instance properties defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QIcon can access all the instance methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component"),"\nAdditionally it also has the following instance methods:"),Object(a.b)("h3",{id:"iconpixmapwidth-height-mode-state-v0110--up"},Object(a.b)("inlineCode",{parentName:"h3"},"icon.pixmap(width, height, mode?, state?)")," (v0.1.10 & up)"),Object(a.b)("p",null,"Returns a pixmap with the requested size, mode, and state, generating one if necessary. The pixmap might be smaller than requested, but never larger.\n. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qicon.html#pixmap-3"}),"QIcon: pixmap"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"width"),": number,"),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"height"),": number"),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"mode?"),": QIconMode"),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"state?"),": QIconState")),Object(a.b)("h3",{id:"iconismask"},Object(a.b)("inlineCode",{parentName:"h3"},"icon.isMask()")),Object(a.b)("p",null,"Returns true if this icon has been marked as a mask image. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qicon.html#isMask"}),"QIcon: isMask"),"."),Object(a.b)("h3",{id:"iconsetismaskismask"},Object(a.b)("inlineCode",{parentName:"h3"},"icon.setIsMask(isMask)")),Object(a.b)("p",null,"Indicate that this icon is a mask image, and hence can potentially be modified based on where it's displayed. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qicon.html#setIsMask"}),"QIcon: setIsMask"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"isMask"),": boolean")))}p.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return b}));var a=n(0),i=n.n(a),r=i.a.createContext({}),o=function(e){var t=i.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=o(e.components);return i.a.createElement(r.Provider,{value:t},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},p=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),p=o(n),b=a,m=p[c+"."+b]||p[b]||l[b]||r;return n?i.a.createElement(m,Object.assign({},{ref:t},s,{components:n})):i.a.createElement(m,Object.assign({},{ref:t},s))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:a,o[1]=c;for(var b=2;b=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o={sidebar_label:"QIcon",title:"QIcon"},c=[{value:"Example",id:"example",children:[]},{value:"new QIcon(imageUrl?)",id:"new-qiconimageurl",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"icon.pixmap(width, height, mode?, state?) (v0.1.10 & up)",id:"iconpixmapwidth-height-mode-state-v0110--up",children:[]},{value:"icon.isMask()",id:"iconismask",children:[]},{value:"icon.setIsMask(isMask)",id:"iconsetismaskismask",children:[]}]}],s={rightToc:c},l="wrapper";function p(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(l,i({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QIcon class provides scalable icons in different modes and states.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",i({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qicon.html"}),"QIcon class"))),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QIcon inherits from ",Object(a.b)("a",i({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-javascript"}),'const { QIcon } = require("@nodegui/nodegui");\n\nconst imageUrl = "path/to/png";\nconst icon = new QIcon(imageUrl);\n')),Object(a.b)("h3",{id:"new-qiconimageurl"},Object(a.b)("inlineCode",{parentName:"h3"},"new QIcon(imageUrl?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"imageUrl")," string (",Object(a.b)("em",{parentName:"li"},"optional"),"). Absolute path of the image that needs to be loaded in the memory.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QIcon can access all the static methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QIcon can access all the instance properties defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QIcon can access all the instance methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component"),"\nAdditionally it also has the following instance methods:"),Object(a.b)("h3",{id:"iconpixmapwidth-height-mode-state-v0110--up"},Object(a.b)("inlineCode",{parentName:"h3"},"icon.pixmap(width, height, mode?, state?)")," (v0.1.10 & up)"),Object(a.b)("p",null,"Returns a pixmap with the requested size, mode, and state, generating one if necessary. The pixmap might be smaller than requested, but never larger.\n. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qicon.html#pixmap-3"}),"QIcon: pixmap"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"width"),": number,"),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"height"),": number"),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"mode?"),": QIconMode"),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"state?"),": QIconState")),Object(a.b)("h3",{id:"iconismask"},Object(a.b)("inlineCode",{parentName:"h3"},"icon.isMask()")),Object(a.b)("p",null,"Returns true if this icon has been marked as a mask image. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qicon.html#isMask"}),"QIcon: isMask"),"."),Object(a.b)("h3",{id:"iconsetismaskismask"},Object(a.b)("inlineCode",{parentName:"h3"},"icon.setIsMask(isMask)")),Object(a.b)("p",null,"Indicate that this icon is a mask image, and hence can potentially be modified based on where it's displayed. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qicon.html#setIsMask"}),"QIcon: setIsMask"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"isMask"),": boolean")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-key-sequence-6-b-2-ebe.030be1701aa851096d50.js b/content---docs-api-q-key-sequence-6-b-2-ebe.e1775d3e8d629cf9408f.js similarity index 97% rename from content---docs-api-q-key-sequence-6-b-2-ebe.030be1701aa851096d50.js rename to content---docs-api-q-key-sequence-6-b-2-ebe.e1775d3e8d629cf9408f.js index 791f5f33e..f34994cc6 100644 --- a/content---docs-api-q-key-sequence-6-b-2-ebe.030be1701aa851096d50.js +++ b/content---docs-api-q-key-sequence-6-b-2-ebe.e1775d3e8d629cf9408f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{173:function(e,n,t){"use strict";t.d(n,"a",(function(){return i})),t.d(n,"b",(function(){return p}));var r=t(0),a=t.n(r),c=a.a.createContext({}),o=function(e){var n=a.a.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},i=function(e){var n=o(e.components);return a.a.createElement(c.Provider,{value:n},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},u=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,c=e.originalType,i=e.parentName,s=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===n.indexOf(r)&&(t[r]=e[r]);return t}(e,["components","mdxType","originalType","parentName"]),u=o(t),p=r,b=u[i+"."+p]||u[p]||l[p]||c;return t?a.a.createElement(b,Object.assign({},{ref:n},s,{components:t})):a.a.createElement(b,Object.assign({},{ref:n},s))}));function p(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var c=t.length,o=new Array(c);o[0]=u;var i={};for(var l in n)hasOwnProperty.call(n,l)&&(i[l]=n[l]);i.originalType=e,i[s]="string"==typeof e?e:r,o[1]=i;for(var p=2;p=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var o={sidebar_label:"QKeySequence",title:"QKeySequence"},i=[{value:"Example",id:"example",children:[]},{value:"new QKeySequence(sequence?)",id:"new-qkeysequencesequence",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"keySequence.count()",id:"keysequencecount",children:[]}]}],s={rightToc:i},l="wrapper";function u(e){var n=e.components,t=c(e,["components"]);return Object(r.b)(l,a({},s,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"The QKeySequence class encapsulates a key sequence as used by shortcuts. .")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(r.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qkeysequence.html"}),"QKeySequence class"))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"QKeySequence inherits from ",Object(r.b)("a",a({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(r.b)("h3",{id:"example"},"Example"),Object(r.b)("pre",null,Object(r.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QKeySequence } = require("@nodegui/nodegui");\n\nconst keySequence = new QKeySequence(`Ctrl+L`);\n')),Object(r.b)("h3",{id:"new-qkeysequencesequence"},Object(r.b)("inlineCode",{parentName:"h3"},"new QKeySequence(sequence?)")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"sequence")," string (",Object(r.b)("em",{parentName:"li"},"optional"),"). String representation of the key sequence. For example: ",Object(r.b)("inlineCode",{parentName:"li"},"Ctrl+M"))),Object(r.b)("h2",{id:"static-methods"},"Static Methods"),Object(r.b)("p",null,"QKeySequence can access all the static methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(r.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(r.b)("p",null,"QKeySequence can access all the instance properties defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(r.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(r.b)("p",null,"QKeySequence can access all the instance methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/Component"}),"Component"),"\nAdditionally it also has the following instance methods:"),Object(r.b)("h3",{id:"keysequencecount"},Object(r.b)("inlineCode",{parentName:"h3"},"keySequence.count()")),Object(r.b)("p",null,"Returns the number of keys in the key sequence. The maximum is 4. It calls the native method ",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/QKeySequence.html#count"}),"QKeySequence: count"),"."))}u.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{173:function(e,n,t){"use strict";t.d(n,"a",(function(){return i})),t.d(n,"b",(function(){return p}));var r=t(0),a=t.n(r),c=a.a.createContext({}),o=function(e){var n=a.a.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},i=function(e){var n=o(e.components);return a.a.createElement(c.Provider,{value:n},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},u=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,c=e.originalType,i=e.parentName,s=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===n.indexOf(r)&&(t[r]=e[r]);return t}(e,["components","mdxType","originalType","parentName"]),u=o(t),p=r,b=u[i+"."+p]||u[p]||l[p]||c;return t?a.a.createElement(b,Object.assign({},{ref:n},s,{components:t})):a.a.createElement(b,Object.assign({},{ref:n},s))}));function p(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var c=t.length,o=new Array(c);o[0]=u;var i={};for(var l in n)hasOwnProperty.call(n,l)&&(i[l]=n[l]);i.originalType=e,i[s]="string"==typeof e?e:r,o[1]=i;for(var p=2;p=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var o={sidebar_label:"QKeySequence",title:"QKeySequence"},i=[{value:"Example",id:"example",children:[]},{value:"new QKeySequence(sequence?)",id:"new-qkeysequencesequence",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"keySequence.count()",id:"keysequencecount",children:[]}]}],s={rightToc:i},l="wrapper";function u(e){var n=e.components,t=c(e,["components"]);return Object(r.b)(l,a({},s,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"The QKeySequence class encapsulates a key sequence as used by shortcuts. .")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(r.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qkeysequence.html"}),"QKeySequence class"))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"QKeySequence inherits from ",Object(r.b)("a",a({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(r.b)("h3",{id:"example"},"Example"),Object(r.b)("pre",null,Object(r.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QKeySequence } = require("@nodegui/nodegui");\n\nconst keySequence = new QKeySequence(`Ctrl+L`);\n')),Object(r.b)("h3",{id:"new-qkeysequencesequence"},Object(r.b)("inlineCode",{parentName:"h3"},"new QKeySequence(sequence?)")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"sequence")," string (",Object(r.b)("em",{parentName:"li"},"optional"),"). String representation of the key sequence. For example: ",Object(r.b)("inlineCode",{parentName:"li"},"Ctrl+M"))),Object(r.b)("h2",{id:"static-methods"},"Static Methods"),Object(r.b)("p",null,"QKeySequence can access all the static methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(r.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(r.b)("p",null,"QKeySequence can access all the instance properties defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(r.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(r.b)("p",null,"QKeySequence can access all the instance methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/Component"}),"Component"),"\nAdditionally it also has the following instance methods:"),Object(r.b)("h3",{id:"keysequencecount"},Object(r.b)("inlineCode",{parentName:"h3"},"keySequence.count()")),Object(r.b)("p",null,"Returns the number of keys in the key sequence. The maximum is 4. It calls the native method ",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/QKeySequence.html#count"}),"QKeySequence: count"),"."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-label-2-f-9-04b.36c3d2c55db21788f964.js b/content---docs-api-q-label-2-f-9-04b.a222a4cffb59fdbc1ab4.js similarity index 98% rename from content---docs-api-q-label-2-f-9-04b.36c3d2c55db21788f964.js rename to content---docs-api-q-label-2-f-9-04b.a222a4cffb59fdbc1ab4.js index 27e4f8362..fa3157c4d 100644 --- a/content---docs-api-q-label-2-f-9-04b.36c3d2c55db21788f964.js +++ b/content---docs-api-q-label-2-f-9-04b.a222a4cffb59fdbc1ab4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var a=n(0),l=n.n(a),r=l.a.createContext({}),i=function(e){var t=l.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},o=function(e){var t=i(e.components);return l.a.createElement(r.Provider,{value:t},e.children)};var b="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return l.a.createElement(l.a.Fragment,{},t)}},p=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,b=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),s=a,d=p[o+"."+s]||p[s]||c[s]||r;return n?l.a.createElement(d,Object.assign({},{ref:t},b,{components:n})):l.a.createElement(d,Object.assign({},{ref:t},b))}));function s(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=p;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[b]="string"==typeof e?e:a,i[1]=o;for(var s=2;s=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var i={sidebar_label:"QLabel",title:"QLabel"},o=[{value:"Example",id:"example",children:[]},{value:"new QLabel(parent?)",id:"new-qlabelparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"label.pixmap",id:"labelpixmap",children:[]},{value:"label.text",id:"labeltext",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"label.setText(text)",id:"labelsettexttext",children:[]},{value:"label.setWordWrap(on)",id:"labelsetwordwrapon",children:[]},{value:"label.setPixmap(pixMap)",id:"labelsetpixmappixmap",children:[]}]}],b={rightToc:o},c="wrapper";function p(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(c,l({},b,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Create and control text.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",l({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qlabel.html"}),"QLabel class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QLabel")," provides ability to add and manipulate text."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QLabel inherits from ",Object(a.b)("a",l({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",l({parentName:"pre"},{className:"language-javascript"}),'const { QLabel } = require("@nodegui/nodegui");\n\nconst label = new QLabel();\nlabel.setText("Hello");\n')),Object(a.b)("h3",{id:"new-qlabelparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QLabel(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QLabel can access all the static methods defined in ",Object(a.b)("a",l({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QLabel can access all the instance properties defined in ",Object(a.b)("a",l({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance properties:"),Object(a.b)("h3",{id:"labelpixmap"},Object(a.b)("inlineCode",{parentName:"h3"},"label.pixmap")),Object(a.b)("p",null,"The pixmap currently set on this label."),Object(a.b)("h3",{id:"labeltext"},Object(a.b)("inlineCode",{parentName:"h3"},"label.text")),Object(a.b)("p",null,"the current text set on the label."),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QLabel can access all the instance methods defined in ",Object(a.b)("a",l({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"labelsettexttext"},Object(a.b)("inlineCode",{parentName:"h3"},"label.setText(text)")),Object(a.b)("p",null,"Sets the given text to the label."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"text")," string")),Object(a.b)("h3",{id:"labelsetwordwrapon"},Object(a.b)("inlineCode",{parentName:"h3"},"label.setWordWrap(on)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"on")," boolean - If true it sets wordwrap on the label")),Object(a.b)("h3",{id:"labelsetpixmappixmap"},Object(a.b)("inlineCode",{parentName:"h3"},"label.setPixmap(pixMap)")),Object(a.b)("p",null,"Images in the form of a pixmap can be set as the label content"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"pixMap")," ",Object(a.b)("a",l({parentName:"li"},{href:"/docs/api/QPixmap"}),"QPixmap")," - Allows to set image content in the form of a QPixmap on the label")))}p.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var a=n(0),l=n.n(a),r=l.a.createContext({}),i=function(e){var t=l.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},o=function(e){var t=i(e.components);return l.a.createElement(r.Provider,{value:t},e.children)};var b="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return l.a.createElement(l.a.Fragment,{},t)}},p=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,b=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),s=a,d=p[o+"."+s]||p[s]||c[s]||r;return n?l.a.createElement(d,Object.assign({},{ref:t},b,{components:n})):l.a.createElement(d,Object.assign({},{ref:t},b))}));function s(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=p;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[b]="string"==typeof e?e:a,i[1]=o;for(var s=2;s=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var i={sidebar_label:"QLabel",title:"QLabel"},o=[{value:"Example",id:"example",children:[]},{value:"new QLabel(parent?)",id:"new-qlabelparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"label.pixmap",id:"labelpixmap",children:[]},{value:"label.text",id:"labeltext",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"label.setText(text)",id:"labelsettexttext",children:[]},{value:"label.setWordWrap(on)",id:"labelsetwordwrapon",children:[]},{value:"label.setPixmap(pixMap)",id:"labelsetpixmappixmap",children:[]}]}],b={rightToc:o},c="wrapper";function p(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(c,l({},b,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Create and control text.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",l({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qlabel.html"}),"QLabel class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QLabel")," provides ability to add and manipulate text."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QLabel inherits from ",Object(a.b)("a",l({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",l({parentName:"pre"},{className:"language-javascript"}),'const { QLabel } = require("@nodegui/nodegui");\n\nconst label = new QLabel();\nlabel.setText("Hello");\n')),Object(a.b)("h3",{id:"new-qlabelparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QLabel(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QLabel can access all the static methods defined in ",Object(a.b)("a",l({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QLabel can access all the instance properties defined in ",Object(a.b)("a",l({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance properties:"),Object(a.b)("h3",{id:"labelpixmap"},Object(a.b)("inlineCode",{parentName:"h3"},"label.pixmap")),Object(a.b)("p",null,"The pixmap currently set on this label."),Object(a.b)("h3",{id:"labeltext"},Object(a.b)("inlineCode",{parentName:"h3"},"label.text")),Object(a.b)("p",null,"the current text set on the label."),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QLabel can access all the instance methods defined in ",Object(a.b)("a",l({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"labelsettexttext"},Object(a.b)("inlineCode",{parentName:"h3"},"label.setText(text)")),Object(a.b)("p",null,"Sets the given text to the label."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"text")," string")),Object(a.b)("h3",{id:"labelsetwordwrapon"},Object(a.b)("inlineCode",{parentName:"h3"},"label.setWordWrap(on)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"on")," boolean - If true it sets wordwrap on the label")),Object(a.b)("h3",{id:"labelsetpixmappixmap"},Object(a.b)("inlineCode",{parentName:"h3"},"label.setPixmap(pixMap)")),Object(a.b)("p",null,"Images in the form of a pixmap can be set as the label content"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"pixMap")," ",Object(a.b)("a",l({parentName:"li"},{href:"/docs/api/QPixmap"}),"QPixmap")," - Allows to set image content in the form of a QPixmap on the label")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-line-editea-0-53d.fefd53f666fefaddd62a.js b/content---docs-api-q-line-editea-0-53d.2105b986bf0579235eb1.js similarity index 98% rename from content---docs-api-q-line-editea-0-53d.fefd53f666fefaddd62a.js rename to content---docs-api-q-line-editea-0-53d.2105b986bf0579235eb1.js index 1bc17b757..e9c139924 100644 --- a/content---docs-api-q-line-editea-0-53d.fefd53f666fefaddd62a.js +++ b/content---docs-api-q-line-editea-0-53d.2105b986bf0579235eb1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return b}));var i=n(0),a=n.n(i),l=a.a.createContext({}),r=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},d=function(e){var t=r(e.components);return a.a.createElement(l.Provider,{value:t},e.children)};var c="mdxType",o={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},p=Object(i.forwardRef)((function(e,t){var n=e.components,i=e.mdxType,l=e.originalType,d=e.parentName,c=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(n[i]=e[i]);return n}(e,["components","mdxType","originalType","parentName"]),p=r(n),b=i,s=p[d+"."+b]||p[b]||o[b]||l;return n?a.a.createElement(s,Object.assign({},{ref:t},c,{components:n})):a.a.createElement(s,Object.assign({},{ref:t},c))}));function b(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var l=n.length,r=new Array(l);r[0]=p;var d={};for(var o in t)hasOwnProperty.call(t,o)&&(d[o]=t[o]);d.originalType=e,d[c]="string"==typeof e?e:i,r[1]=d;for(var b=2;b=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var r={sidebar_label:"QLineEdit",title:"QLineEdit"},d=[{value:"Example",id:"example",children:[]},{value:"new QLineEdit(parent?)",id:"new-qlineeditparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"lineEdit.placeholderText",id:"lineeditplaceholdertext",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"lineEdit.setText(text)",id:"lineeditsettexttext",children:[]},{value:"lineEdit.setPlaceholderText(text)",id:"lineeditsetplaceholdertexttext",children:[]},{value:"lineEdit.text()",id:"lineedittext",children:[]},{value:"lineEdit.setReadOnly(isReadOnly)",id:"lineeditsetreadonlyisreadonly",children:[]},{value:"lineEdit.clear()",id:"lineeditclear",children:[]}]}],c={rightToc:d},o="wrapper";function p(e){var t=e.components,n=l(e,["components"]);return Object(i.b)(o,a({},c,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Create and control editable text field.")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(i.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qlineedit.html"}),"QLineEdit class"))),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"QLineEdit")," provides ability to add and manipulate native editable text field widgets."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"QLineEdit inherits from ",Object(i.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(i.b)("h3",{id:"example"},"Example"),Object(i.b)("pre",null,Object(i.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QLineEdit } = require("@nodegui/nodegui");\n\nconst lineEdit = new QLineEdit();\n')),Object(i.b)("h3",{id:"new-qlineeditparent"},Object(i.b)("inlineCode",{parentName:"h3"},"new QLineEdit(parent?)")),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(i.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(i.b)("h2",{id:"static-methods"},"Static Methods"),Object(i.b)("p",null,"QLineEdit can access all the static methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(i.b)("p",null,"QLineEdit can access all the instance properties defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance properties:"),Object(i.b)("h3",{id:"lineeditplaceholdertext"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.placeholderText")),Object(i.b)("p",null,"The placeholder text set on the lineEdit."),Object(i.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(i.b)("p",null,"QLineEdit can access all the instance methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(i.b)("h3",{id:"lineeditsettexttext"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.setText(text)")),Object(i.b)("p",null,"Sets the given text to the lineEdit."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"text")," string")),Object(i.b)("h3",{id:"lineeditsetplaceholdertexttext"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.setPlaceholderText(text)")),Object(i.b)("p",null,"Sets the given text to the lineEdit's placeholder."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"text")," string")),Object(i.b)("h3",{id:"lineedittext"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.text()")),Object(i.b)("p",null,"Returns the currently set text from native lineEdit widget."),Object(i.b)("h3",{id:"lineeditsetreadonlyisreadonly"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.setReadOnly(isReadOnly)")),Object(i.b)("p",null,"Sets the lineEdit to be read only. lineEdit property holds whether the line edit is read only."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"isReadOnly")," boolean")),Object(i.b)("h3",{id:"lineeditclear"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.clear()")),Object(i.b)("p",null,"Clears the lineEdit."))}p.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return b}));var i=n(0),a=n.n(i),l=a.a.createContext({}),r=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},d=function(e){var t=r(e.components);return a.a.createElement(l.Provider,{value:t},e.children)};var c="mdxType",o={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},p=Object(i.forwardRef)((function(e,t){var n=e.components,i=e.mdxType,l=e.originalType,d=e.parentName,c=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(n[i]=e[i]);return n}(e,["components","mdxType","originalType","parentName"]),p=r(n),b=i,s=p[d+"."+b]||p[b]||o[b]||l;return n?a.a.createElement(s,Object.assign({},{ref:t},c,{components:n})):a.a.createElement(s,Object.assign({},{ref:t},c))}));function b(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var l=n.length,r=new Array(l);r[0]=p;var d={};for(var o in t)hasOwnProperty.call(t,o)&&(d[o]=t[o]);d.originalType=e,d[c]="string"==typeof e?e:i,r[1]=d;for(var b=2;b=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var r={sidebar_label:"QLineEdit",title:"QLineEdit"},d=[{value:"Example",id:"example",children:[]},{value:"new QLineEdit(parent?)",id:"new-qlineeditparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"lineEdit.placeholderText",id:"lineeditplaceholdertext",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"lineEdit.setText(text)",id:"lineeditsettexttext",children:[]},{value:"lineEdit.setPlaceholderText(text)",id:"lineeditsetplaceholdertexttext",children:[]},{value:"lineEdit.text()",id:"lineedittext",children:[]},{value:"lineEdit.setReadOnly(isReadOnly)",id:"lineeditsetreadonlyisreadonly",children:[]},{value:"lineEdit.clear()",id:"lineeditclear",children:[]}]}],c={rightToc:d},o="wrapper";function p(e){var t=e.components,n=l(e,["components"]);return Object(i.b)(o,a({},c,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Create and control editable text field.")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(i.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qlineedit.html"}),"QLineEdit class"))),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"QLineEdit")," provides ability to add and manipulate native editable text field widgets."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"QLineEdit inherits from ",Object(i.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(i.b)("h3",{id:"example"},"Example"),Object(i.b)("pre",null,Object(i.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QLineEdit } = require("@nodegui/nodegui");\n\nconst lineEdit = new QLineEdit();\n')),Object(i.b)("h3",{id:"new-qlineeditparent"},Object(i.b)("inlineCode",{parentName:"h3"},"new QLineEdit(parent?)")),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(i.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(i.b)("h2",{id:"static-methods"},"Static Methods"),Object(i.b)("p",null,"QLineEdit can access all the static methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(i.b)("p",null,"QLineEdit can access all the instance properties defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance properties:"),Object(i.b)("h3",{id:"lineeditplaceholdertext"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.placeholderText")),Object(i.b)("p",null,"The placeholder text set on the lineEdit."),Object(i.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(i.b)("p",null,"QLineEdit can access all the instance methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(i.b)("h3",{id:"lineeditsettexttext"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.setText(text)")),Object(i.b)("p",null,"Sets the given text to the lineEdit."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"text")," string")),Object(i.b)("h3",{id:"lineeditsetplaceholdertexttext"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.setPlaceholderText(text)")),Object(i.b)("p",null,"Sets the given text to the lineEdit's placeholder."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"text")," string")),Object(i.b)("h3",{id:"lineedittext"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.text()")),Object(i.b)("p",null,"Returns the currently set text from native lineEdit widget."),Object(i.b)("h3",{id:"lineeditsetreadonlyisreadonly"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.setReadOnly(isReadOnly)")),Object(i.b)("p",null,"Sets the lineEdit to be read only. lineEdit property holds whether the line edit is read only."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"isReadOnly")," boolean")),Object(i.b)("h3",{id:"lineeditclear"},Object(i.b)("inlineCode",{parentName:"h3"},"lineEdit.clear()")),Object(i.b)("p",null,"Clears the lineEdit."))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-main-window-0-e-7-299.dfc37db8803910eb1225.js b/content---docs-api-q-main-window-0-e-7-299.dfc37db8803910eb1225.js new file mode 100644 index 000000000..3c3970eab --- /dev/null +++ b/content---docs-api-q-main-window-0-e-7-299.dfc37db8803910eb1225.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{173:function(e,n,t){"use strict";t.d(n,"a",(function(){return d})),t.d(n,"b",(function(){return b}));var i=t(0),a=t.n(i),r=a.a.createContext({}),o=function(e){var n=a.a.useContext(r),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},d=function(e){var n=o(e.components);return a.a.createElement(r.Provider,{value:n},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},s=Object(i.forwardRef)((function(e,n){var t=e.components,i=e.mdxType,r=e.originalType,d=e.parentName,l=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===n.indexOf(i)&&(t[i]=e[i]);return t}(e,["components","mdxType","originalType","parentName"]),s=o(t),b=i,u=s[d+"."+b]||s[b]||c[b]||r;return t?a.a.createElement(u,Object.assign({},{ref:n},l,{components:t})):a.a.createElement(u,Object.assign({},{ref:n},l))}));function b(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var r=t.length,o=new Array(r);o[0]=s;var d={};for(var c in n)hasOwnProperty.call(n,c)&&(d[c]=n[c]);d.originalType=e,d[l]="string"==typeof e?e:i,o[1]=d;for(var b=2;b=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var o={sidebar_label:"QMainWindow",title:"QMainWindow"},d=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"win.layout",id:"winlayout",children:[]},{value:"win.centralWidget",id:"wincentralwidget",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"win.setCentralWidget(widget)",id:"winsetcentralwidgetwidget",children:[]},{value:"win.setMenuBar(menuBar)",id:"winsetmenubarmenubar",children:[]},{value:"win.setMenuWidget(menuWidget)",id:"winsetmenuwidgetmenuwidget",children:[]}]}],l={rightToc:d},c="wrapper";function s(e){var n=e.components,t=r(e,["components"]);return Object(i.b)(c,a({},l,t,{components:n,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Create and control windows.")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(i.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qmainwindow.html"}),"QMainWindow class"))),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"QMainWindow")," provides a main application window. Every widget in NodeGui should be a child/nested child of QMainWindow. QMainWindow in NodeGui is also responsible for FlexLayout calculations of its children."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"QMainWindow inherits from ",Object(i.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(i.b)("h3",{id:"example"},"Example"),Object(i.b)("pre",null,Object(i.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QMainWindow, QWidget } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n\nconst centralWidget = new QWidget();\nwin.setCentralWidget(centralWidget);\n\nwin.show();\n\nglobal.win = win; // prevent\'s gc of win\n')),Object(i.b)("p",null,"QMainWindow needs to have a central widget set before other widgets can be added as a children/nested children.\nOnce a central widget is set you can add children/layout to the central widget."),Object(i.b)("h2",{id:"static-methods"},"Static Methods"),Object(i.b)("p",null,"QMainWindow can access all the static methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(i.b)("p",null,"QMainWindow can access all the instance properties defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("p",null,"Additionally it also has the following instance properties:"),Object(i.b)("h3",{id:"winlayout"},Object(i.b)("inlineCode",{parentName:"h3"},"win.layout")),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"NodeLayout")," representing current layout that is set on the window. If a centralWidget is set then the layout of central widget is returned."),Object(i.b)("h3",{id:"wincentralwidget"},Object(i.b)("inlineCode",{parentName:"h3"},"win.centralWidget")),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"NodeWidget")," representing currently set central widget on the window."),Object(i.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(i.b)("p",null,"QMainWindow can access all the instance methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("p",null,"Additionally it also has the following instance methods:"),Object(i.b)("h3",{id:"winsetcentralwidgetwidget"},Object(i.b)("inlineCode",{parentName:"h3"},"win.setCentralWidget(widget)")),Object(i.b)("p",null,"Sets the given widget to be the main window's central widget."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"widget")," NodeWidget - Any widget that inherits from NodeWidget class.")),Object(i.b)("h3",{id:"winsetmenubarmenubar"},Object(i.b)("inlineCode",{parentName:"h3"},"win.setMenuBar(menuBar)")),Object(i.b)("p",null,"Sets the given menuBar to be the window's menubar widget."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"menuBar")," ",Object(i.b)("a",a({parentName:"li"},{href:"api/QMenuBar"}),"QMenuBar"))),Object(i.b)("h3",{id:"winsetmenuwidgetmenuwidget"},Object(i.b)("inlineCode",{parentName:"h3"},"win.setMenuWidget(menuWidget)")),Object(i.b)("p",null,"Sets the given widget to be the window's menubar widget."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"menuWidget")," NodeWidget")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-main-window-0-e-7-299.e0854f14e4725b528b19.js b/content---docs-api-q-main-window-0-e-7-299.e0854f14e4725b528b19.js deleted file mode 100644 index 6b63fd03d..000000000 --- a/content---docs-api-q-main-window-0-e-7-299.e0854f14e4725b528b19.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{103:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return o})),t.d(n,"rightToc",(function(){return d})),t.d(n,"default",(function(){return s}));t(0);var i=t(173);function a(){return(a=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var o={sidebar_label:"QMainWindow",title:"QMainWindow"},d=[{value:"Example",id:"example",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"win.layout",id:"winlayout",children:[]},{value:"win.centralWidget",id:"wincentralwidget",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"win.setCentralWidget(widget)",id:"winsetcentralwidgetwidget",children:[]},{value:"win.setMenuBar(menuBar)",id:"winsetmenubarmenubar",children:[]},{value:"win.setMenuWidget(menuWidget)",id:"winsetmenuwidgetmenuwidget",children:[]}]}],l={rightToc:d},c="wrapper";function s(e){var n=e.components,t=r(e,["components"]);return Object(i.b)(c,a({},l,t,{components:n,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Create and control windows.")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(i.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qmainwindow.html"}),"QMainWindow class"))),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"QMainWindow")," provides a main application window. Every widget in NodeGui should be a child/nested child of QMainWindow. QMainWindow in NodeGui is also responsible for FlexLayout calculations of its children."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"QMainWindow inherits from ",Object(i.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(i.b)("h3",{id:"example"},"Example"),Object(i.b)("pre",null,Object(i.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QMainWindow, QWidget } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n\nconst centralWidget = new QWidget();\nwin.setCentralWidget(centralWidget);\n\nwin.show();\n\nglobal.win = win; // prevent\'s gc of win\n')),Object(i.b)("p",null,"QMainWindow needs to have a central widget set before other widgets can be added as a children/nested children.\nOnce a central widget is set you can add children/layout to the central widget."),Object(i.b)("h2",{id:"static-methods"},"Static Methods"),Object(i.b)("p",null,"QMainWindow can access all the static methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(i.b)("p",null,"QMainWindow can access all the instance properties defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("p",null,"Additionally it also has the following instance properties:"),Object(i.b)("h3",{id:"winlayout"},Object(i.b)("inlineCode",{parentName:"h3"},"win.layout")),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"NodeLayout")," representing current layout that is set on the window. If a centralWidget is set then the layout of central widget is returned."),Object(i.b)("h3",{id:"wincentralwidget"},Object(i.b)("inlineCode",{parentName:"h3"},"win.centralWidget")),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"NodeWidget")," representing currently set central widget on the window."),Object(i.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(i.b)("p",null,"QMainWindow can access all the instance methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("p",null,"Additionally it also has the following instance methods:"),Object(i.b)("h3",{id:"winsetcentralwidgetwidget"},Object(i.b)("inlineCode",{parentName:"h3"},"win.setCentralWidget(widget)")),Object(i.b)("p",null,"Sets the given widget to be the main window's central widget."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"widget")," NodeWidget - Any widget that inherits from NodeWidget class.")),Object(i.b)("h3",{id:"winsetmenubarmenubar"},Object(i.b)("inlineCode",{parentName:"h3"},"win.setMenuBar(menuBar)")),Object(i.b)("p",null,"Sets the given menuBar to be the window's menubar widget."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"menuBar")," ",Object(i.b)("a",a({parentName:"li"},{href:"api/QMenuBar"}),"QMenuBar"))),Object(i.b)("h3",{id:"winsetmenuwidgetmenuwidget"},Object(i.b)("inlineCode",{parentName:"h3"},"win.setMenuWidget(menuWidget)")),Object(i.b)("p",null,"Sets the given widget to be the window's menubar widget."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"menuWidget")," NodeWidget")))}s.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return d})),t.d(n,"b",(function(){return b}));var i=t(0),a=t.n(i),r=a.a.createContext({}),o=function(e){var n=a.a.useContext(r),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},d=function(e){var n=o(e.components);return a.a.createElement(r.Provider,{value:n},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},s=Object(i.forwardRef)((function(e,n){var t=e.components,i=e.mdxType,r=e.originalType,d=e.parentName,l=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===n.indexOf(i)&&(t[i]=e[i]);return t}(e,["components","mdxType","originalType","parentName"]),s=o(t),b=i,u=s[d+"."+b]||s[b]||c[b]||r;return t?a.a.createElement(u,Object.assign({},{ref:n},l,{components:t})):a.a.createElement(u,Object.assign({},{ref:n},l))}));function b(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var r=t.length,o=new Array(r);o[0]=s;var d={};for(var c in n)hasOwnProperty.call(n,c)&&(d[c]=n[c]);d.originalType=e,d[l]="string"==typeof e?e:i,o[1]=d;for(var b=2;b=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o={sidebar_label:"QMenu",title:"QMenu"},c=[{value:"Example",id:"example",children:[]},{value:"new QMenu(parent?)",id:"new-qmenuparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"menu.setTitle(title)",id:"menusettitletitle",children:[]},{value:"menu.addAction(action)",id:"menuaddactionaction",children:[]}]}],l={rightToc:c},p="wrapper";function d(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(p,i({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",i({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qmenu.html"}),"QMenu class"))),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QMenu inherits from ",Object(a.b)("a",i({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-javascript"}),'const { QMenu } = require("@nodegui/nodegui");\n\nconst menu = new QMenu();\n')),Object(a.b)("h3",{id:"new-qmenuparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QMenu(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QMenu can access all the static methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QMenu can access all the instance properties defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QMenu can access all the instance methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"menusettitletitle"},Object(a.b)("inlineCode",{parentName:"h3"},"menu.setTitle(title)")),Object(a.b)("p",null,"This property holds the title of the menu. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qmenu.html#title-prop"}),"QMenu: setTitle"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"title")," string")),Object(a.b)("h3",{id:"menuaddactionaction"},Object(a.b)("inlineCode",{parentName:"h3"},"menu.addAction(action)")),Object(a.b)("p",null,"Appends the action action to this widget's list of actions. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#addAction"}),"QMenu: addAction"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"action")," ",Object(a.b)("a",i({parentName:"li"},{href:"api/QAction"}),"QAction"),".")))}d.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));var a=n(0),i=n.n(a),r=i.a.createContext({}),o=function(e){var t=i.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=o(e.components);return i.a.createElement(r.Provider,{value:t},e.children)};var l="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,l=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),d=o(n),s=a,u=d[c+"."+s]||d[s]||p[s]||r;return n?i.a.createElement(u,Object.assign({},{ref:t},l,{components:n})):i.a.createElement(u,Object.assign({},{ref:t},l))}));function s(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[l]="string"==typeof e?e:a,o[1]=c;for(var s=2;s=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o={sidebar_label:"QMenu",title:"QMenu"},c=[{value:"Example",id:"example",children:[]},{value:"new QMenu(parent?)",id:"new-qmenuparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"menu.setTitle(title)",id:"menusettitletitle",children:[]},{value:"menu.addAction(action)",id:"menuaddactionaction",children:[]}]}],l={rightToc:c},p="wrapper";function d(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(p,i({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",i({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qmenu.html"}),"QMenu class"))),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QMenu inherits from ",Object(a.b)("a",i({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-javascript"}),'const { QMenu } = require("@nodegui/nodegui");\n\nconst menu = new QMenu();\n')),Object(a.b)("h3",{id:"new-qmenuparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QMenu(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QMenu can access all the static methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QMenu can access all the instance properties defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QMenu can access all the instance methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"menusettitletitle"},Object(a.b)("inlineCode",{parentName:"h3"},"menu.setTitle(title)")),Object(a.b)("p",null,"This property holds the title of the menu. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qmenu.html#title-prop"}),"QMenu: setTitle"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"title")," string")),Object(a.b)("h3",{id:"menuaddactionaction"},Object(a.b)("inlineCode",{parentName:"h3"},"menu.addAction(action)")),Object(a.b)("p",null,"Appends the action action to this widget's list of actions. It calls the native method ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qwidget.html#addAction"}),"QMenu: addAction"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"action")," ",Object(a.b)("a",i({parentName:"li"},{href:"api/QAction"}),"QAction"),".")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-menu-bar-8-d-2-872.06cfac88ec0e61c045e0.js b/content---docs-api-q-menu-bar-8-d-2-872.06cfac88ec0e61c045e0.js new file mode 100644 index 000000000..718978428 --- /dev/null +++ b/content---docs-api-q-menu-bar-8-d-2-872.06cfac88ec0e61c045e0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{173:function(e,n,t){"use strict";t.d(n,"a",(function(){return c})),t.d(n,"b",(function(){return d}));var a=t(0),r=t.n(a),i=r.a.createContext({}),o=function(e){var n=r.a.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},c=function(e){var n=o(e.components);return r.a.createElement(i.Provider,{value:n},e.children)};var u="mdxType",l={inlineCode:"code",wrapper:function(e){var n=e.children;return r.a.createElement(r.a.Fragment,{},n)}},p=Object(a.forwardRef)((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===n.indexOf(a)&&(t[a]=e[a]);return t}(e,["components","mdxType","originalType","parentName"]),p=o(t),d=a,s=p[c+"."+d]||p[d]||l[d]||i;return t?r.a.createElement(s,Object.assign({},{ref:n},u,{components:t})):r.a.createElement(s,Object.assign({},{ref:n},u))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=p;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c[u]="string"==typeof e?e:a,o[1]=c;for(var d=2;d=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var o={sidebar_label:"QMenuBar",title:"QMenuBar"},c=[{value:"Example",id:"example",children:[]},{value:"new QMenuBar(parent?)",id:"new-qmenubarparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"menu.addMenu(menu)",id:"menuaddmenumenu",children:[]},{value:"menu.setNativeMenuBar(nativeMenuBar)",id:"menusetnativemenubarnativemenubar",children:[]}]}],u={rightToc:c},l="wrapper";function p(e){var n=e.components,t=i(e,["components"]);return Object(a.b)(l,r({},u,t,{components:n,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QMenuBar class provides a menu widget for use in menu bars, context menus, and other popup menus.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",r({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qmenu.html"}),"QMenuBar class"))),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QMenuBar inherits from ",Object(a.b)("a",r({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",r({parentName:"pre"},{className:"language-javascript"}),'const { QMenuBar, QMainWindow } = require("@nodegui/nodegui");\nconst win = new QMainWindow();\nconst menu = new QMenuBar();\nconst menuBar = new QMenuBar();\nwin.setMenuBar(menuBar);\nwin.show();\nglobal.win = win;\n')),Object(a.b)("h3",{id:"new-qmenubarparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QMenuBar(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QMenuBar can access all the static methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QMenuBar can access all the instance properties defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QMenuBar can access all the instance methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"menuaddmenumenu"},Object(a.b)("inlineCode",{parentName:"h3"},"menu.addMenu(menu)")),Object(a.b)("p",null,"Appends menu to the menu bar. It calls the native method ",Object(a.b)("a",r({parentName:"p"},{href:"https://doc.qt.io/qt-5/qmenubar.html#addMenu"}),"QMenuBar: addMenu"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"menu")," ",Object(a.b)("a",r({parentName:"li"},{href:"api/QMenu"}),"QMenu"),".")),Object(a.b)("h3",{id:"menusetnativemenubarnativemenubar"},Object(a.b)("inlineCode",{parentName:"h3"},"menu.setNativeMenuBar(nativeMenuBar)")),Object(a.b)("p",null,"This property holds whether or not a menubar will be used as a native menubar on platforms that support it. It calls the native method ",Object(a.b)("a",r({parentName:"p"},{href:"https://doc.qt.io/qt-5/qmenubar.html#nativeMenuBar-prop"}),"QMenuBar: setNativeMenuBar"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"nativeMenuBar")," Boolean.")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-menu-bar-8-d-2-872.fdf8987a4bf88fc8901e.js b/content---docs-api-q-menu-bar-8-d-2-872.fdf8987a4bf88fc8901e.js deleted file mode 100644 index 3bde4f608..000000000 --- a/content---docs-api-q-menu-bar-8-d-2-872.fdf8987a4bf88fc8901e.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{105:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return o})),t.d(n,"rightToc",(function(){return c})),t.d(n,"default",(function(){return p}));t(0);var a=t(173);function r(){return(r=Object.assign||function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var o={sidebar_label:"QMenuBar",title:"QMenuBar"},c=[{value:"Example",id:"example",children:[]},{value:"new QMenuBar(parent?)",id:"new-qmenubarparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"menu.addMenu(menu)",id:"menuaddmenumenu",children:[]},{value:"menu.setNativeMenuBar(nativeMenuBar)",id:"menusetnativemenubarnativemenubar",children:[]}]}],u={rightToc:c},l="wrapper";function p(e){var n=e.components,t=i(e,["components"]);return Object(a.b)(l,r({},u,t,{components:n,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QMenuBar class provides a menu widget for use in menu bars, context menus, and other popup menus.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",r({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qmenu.html"}),"QMenuBar class"))),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QMenuBar inherits from ",Object(a.b)("a",r({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",r({parentName:"pre"},{className:"language-javascript"}),'const { QMenuBar, QMainWindow } = require("@nodegui/nodegui");\nconst win = new QMainWindow();\nconst menu = new QMenuBar();\nconst menuBar = new QMenuBar();\nwin.setMenuBar(menuBar);\nwin.show();\nglobal.win = win;\n')),Object(a.b)("h3",{id:"new-qmenubarparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QMenuBar(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QMenuBar can access all the static methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QMenuBar can access all the instance properties defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QMenuBar can access all the instance methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"menuaddmenumenu"},Object(a.b)("inlineCode",{parentName:"h3"},"menu.addMenu(menu)")),Object(a.b)("p",null,"Appends menu to the menu bar. It calls the native method ",Object(a.b)("a",r({parentName:"p"},{href:"https://doc.qt.io/qt-5/qmenubar.html#addMenu"}),"QMenuBar: addMenu"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"menu")," ",Object(a.b)("a",r({parentName:"li"},{href:"api/QMenu"}),"QMenu"),".")),Object(a.b)("h3",{id:"menusetnativemenubarnativemenubar"},Object(a.b)("inlineCode",{parentName:"h3"},"menu.setNativeMenuBar(nativeMenuBar)")),Object(a.b)("p",null,"This property holds whether or not a menubar will be used as a native menubar on platforms that support it. It calls the native method ",Object(a.b)("a",r({parentName:"p"},{href:"https://doc.qt.io/qt-5/qmenubar.html#nativeMenuBar-prop"}),"QMenuBar: setNativeMenuBar"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"nativeMenuBar")," Boolean.")))}p.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return c})),t.d(n,"b",(function(){return d}));var a=t(0),r=t.n(a),i=r.a.createContext({}),o=function(e){var n=r.a.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},c=function(e){var n=o(e.components);return r.a.createElement(i.Provider,{value:n},e.children)};var u="mdxType",l={inlineCode:"code",wrapper:function(e){var n=e.children;return r.a.createElement(r.a.Fragment,{},n)}},p=Object(a.forwardRef)((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===n.indexOf(a)&&(t[a]=e[a]);return t}(e,["components","mdxType","originalType","parentName"]),p=o(t),d=a,s=p[c+"."+d]||p[d]||l[d]||i;return t?r.a.createElement(s,Object.assign({},{ref:n},u,{components:t})):r.a.createElement(s,Object.assign({},{ref:n},u))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=p;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c[u]="string"==typeof e?e:a,o[1]=c;for(var d=2;d=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o={sidebar_label:"QPixmap",title:"QPixmap"},p=[{value:"Example",id:"example",children:[]},{value:"new QPixmap(imageUrl?)",id:"new-qpixmapimageurl",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"pixMap.load(imageUrl)",id:"pixmaploadimageurl",children:[]}]}],l={rightToc:p},c="wrapper";function m(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(c,i({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QPixmap class helps hold an image in the form of off-screen image representation.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",i({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qpixmap.html"}),"QPixmap class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QPixmap")," provides ability to store an image in the memory."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QPixmap inherits from ",Object(a.b)("a",i({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-javascript"}),'const { QPixmap } = require("@nodegui/nodegui");\n\nconst imageUrl = "path/to/png";\nconst pixMap = new QPixmap(imageUrl);\n')),Object(a.b)("h3",{id:"new-qpixmapimageurl"},Object(a.b)("inlineCode",{parentName:"h3"},"new QPixmap(imageUrl?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"imageUrl")," string (",Object(a.b)("em",{parentName:"li"},"optional"),"). Absolute path of the image that needs to be loaded in the memory.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QPixmap can access all the static methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QPixmap can access all the instance properties defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QPixmap can access all the instance methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"pixmaploadimageurl"},Object(a.b)("inlineCode",{parentName:"h3"},"pixMap.load(imageUrl)")),Object(a.b)("p",null,"loads an image from the url into memory as a Pixmap.\nreturns true if load was successful otherwise returns false."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"imageUrl")," string (",Object(a.b)("em",{parentName:"li"},"optional"),"). Absolute path of the image that needs to be loaded in the memory.")),Object(a.b)("h4",{id:"pixmapsavefilename-format"},Object(a.b)("inlineCode",{parentName:"h4"},"pixMap.save(fileName, format)")),Object(a.b)("p",null,"Saves the pixmap to the file with the given fileName using the specified image file format and quality factor. Returns ",Object(a.b)("inlineCode",{parentName:"p"},"true")," if successful; otherwise returns false."),Object(a.b)("p",null,"If format is 0, an image format will be chosen from fileName's suffix."),Object(a.b)("p",null,"See also ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qpixmap.html#reading-and-writing-image-files"}),"Reading and Writing Image Files."),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"fileName")," string."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"format")," string. (",Object(a.b)("em",{parentName:"li"},"optional"),").")),Object(a.b)("h4",{id:"pixmapscaledwidth-height-aspectratiomode"},Object(a.b)("inlineCode",{parentName:"h4"},"pixMap.scaled(width, height, aspectRatioMode?)")),Object(a.b)("p",null,"Scales the pixmap to provided height and width with respect to aspectRatioMode.\nThis method doesnt mutate this pixmap and rather returns a new pixmap with new height and width."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"width")," number. Width in pixels for new pixmap."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"height")," number. Height in pixels for new pixmap."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"aspectRatioMode")," AspectRatioMode (",Object(a.b)("em",{parentName:"li"},"optional"),"). Specifies how scaling should happen. ",Object(a.b)("a",i({parentName:"li"},{href:"/docs/api/QtEnums"}),"AspectRatio is an enum from Qt"))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-api-q-pixmap-8-dd-cb2.9c5d57a238adc65ab809.js b/content---docs-api-q-pixmap-8-dd-cb2.9c5d57a238adc65ab809.js deleted file mode 100644 index c69f0beba..000000000 --- a/content---docs-api-q-pixmap-8-dd-cb2.9c5d57a238adc65ab809.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{101:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"rightToc",(function(){return p})),n.d(t,"default",(function(){return m}));n(0);var a=n(173);function i(){return(i=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o={sidebar_label:"QPixmap",title:"QPixmap"},p=[{value:"Example",id:"example",children:[]},{value:"new QPixmap(imageUrl?)",id:"new-qpixmapimageurl",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"pixMap.load(imageUrl)",id:"pixmaploadimageurl",children:[]}]}],l={rightToc:p},c="wrapper";function m(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(c,i({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"The QPixmap class helps hold an image in the form of off-screen image representation.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",i({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qpixmap.html"}),"QPixmap class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QPixmap")," provides ability to store an image in the memory."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QPixmap inherits from ",Object(a.b)("a",i({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-javascript"}),'const { QPixmap } = require("@nodegui/nodegui");\n\nconst imageUrl = "path/to/png";\nconst pixMap = new QPixmap(imageUrl);\n')),Object(a.b)("h3",{id:"new-qpixmapimageurl"},Object(a.b)("inlineCode",{parentName:"h3"},"new QPixmap(imageUrl?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"imageUrl")," string (",Object(a.b)("em",{parentName:"li"},"optional"),"). Absolute path of the image that needs to be loaded in the memory.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QPixmap can access all the static methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QPixmap can access all the instance properties defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QPixmap can access all the instance methods defined in ",Object(a.b)("a",i({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"pixmaploadimageurl"},Object(a.b)("inlineCode",{parentName:"h3"},"pixMap.load(imageUrl)")),Object(a.b)("p",null,"loads an image from the url into memory as a Pixmap.\nreturns true if load was successful otherwise returns false."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"imageUrl")," string (",Object(a.b)("em",{parentName:"li"},"optional"),"). Absolute path of the image that needs to be loaded in the memory.")),Object(a.b)("h4",{id:"pixmapsavefilename-format"},Object(a.b)("inlineCode",{parentName:"h4"},"pixMap.save(fileName, format)")),Object(a.b)("p",null,"Saves the pixmap to the file with the given fileName using the specified image file format and quality factor. Returns ",Object(a.b)("inlineCode",{parentName:"p"},"true")," if successful; otherwise returns false."),Object(a.b)("p",null,"If format is 0, an image format will be chosen from fileName's suffix."),Object(a.b)("p",null,"See also ",Object(a.b)("a",i({parentName:"p"},{href:"https://doc.qt.io/qt-5/qpixmap.html#reading-and-writing-image-files"}),"Reading and Writing Image Files."),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"fileName")," string."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"format")," string. (",Object(a.b)("em",{parentName:"li"},"optional"),").")),Object(a.b)("h4",{id:"pixmapscaledwidth-height-aspectratiomode"},Object(a.b)("inlineCode",{parentName:"h4"},"pixMap.scaled(width, height, aspectRatioMode?)")),Object(a.b)("p",null,"Scales the pixmap to provided height and width with respect to aspectRatioMode.\nThis method doesnt mutate this pixmap and rather returns a new pixmap with new height and width."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"width")," number. Width in pixels for new pixmap."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"height")," number. Height in pixels for new pixmap."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"aspectRatioMode")," AspectRatioMode (",Object(a.b)("em",{parentName:"li"},"optional"),"). Specifies how scaling should happen. ",Object(a.b)("a",i({parentName:"li"},{href:"/docs/api/QtEnums"}),"AspectRatio is an enum from Qt"))))}m.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return s}));var a=n(0),i=n.n(a),r=i.a.createContext({}),o=function(e){var t=i.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},p=function(e){var t=o(e.components);return i.a.createElement(r.Provider,{value:t},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,p=e.parentName,l=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),m=o(n),s=a,b=m[p+"."+s]||m[s]||c[s]||r;return n?i.a.createElement(b,Object.assign({},{ref:t},l,{components:n})):i.a.createElement(b,Object.assign({},{ref:t},l))}));function s(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=m;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p[l]="string"==typeof e?e:a,o[1]=p;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var d={sidebar_label:"QPlainTextEdit",title:"QPlainTextEdit"},r=[{value:"Example",id:"example",children:[]},{value:"new QPlainTextEdit(parent?)",id:"new-qplaintexteditparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"plainTextEdit.placeholderText",id:"plaintexteditplaceholdertext",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"plainTextEdit.setPlainText(text)",id:"plaintexteditsetplaintexttext",children:[]},{value:"plainTextEdit.setPlaceholderText(text)",id:"plaintexteditsetplaceholdertexttext",children:[]},{value:"plainTextEdit.toPlainText()",id:"plaintextedittoplaintext",children:[]},{value:"plainTextEdit.setReadOnly(isReadOnly)",id:"plaintexteditsetreadonlyisreadonly",children:[]},{value:"plainTextEdit.clear()",id:"plaintexteditclear",children:[]},{value:"plainTextEdit.setWordWrapMode(mode)",id:"plaintexteditsetwordwrapmodemode",children:[]},{value:"plainTextEdit.wordWrapMode()",id:"plaintexteditwordwrapmode",children:[]},{value:"plainTextEdit.setLineWrapMode(mode)",id:"plaintexteditsetlinewrapmodemode",children:[]},{value:"plainTextEdit.lineWrapMode()",id:"plaintexteditlinewrapmode",children:[]}]}],p={rightToc:r},o="wrapper";function c(e){var t=e.components,n=l(e,["components"]);return Object(i.b)(o,a({},p,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Used to edit and display plain text.")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(i.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html"}),"QPlainTextEdit class"))),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"QPlainTextEdit")," provides ability to add and manipulate native editable text field widgets."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"QPlainTextEdit inherits from ",Object(i.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(i.b)("h3",{id:"example"},"Example"),Object(i.b)("pre",null,Object(i.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QPlainTextEdit } = require("@nodegui/nodegui");\n\nconst plainTextEdit = new QPlainTextEdit();\n')),Object(i.b)("h3",{id:"new-qplaintexteditparent"},Object(i.b)("inlineCode",{parentName:"h3"},"new QPlainTextEdit(parent?)")),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(i.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(i.b)("h2",{id:"static-methods"},"Static Methods"),Object(i.b)("p",null,"QPlainTextEdit can access all the static methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(i.b)("p",null,"QPlainTextEdit can access all the instance properties defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),"."),Object(i.b)("h3",{id:"plaintexteditplaceholdertext"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.placeholderText")),Object(i.b)("p",null,"The placeholder text set on the plainTextEdit."),Object(i.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(i.b)("p",null,"QPlainTextEdit can access all the instance methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),"."),Object(i.b)("h3",{id:"plaintexteditsetplaintexttext"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.setPlainText(text)")),Object(i.b)("p",null,"Sets the given text to the plainTextEdit. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#setPlainText"}),"QPlainTextEdit: setPlainText"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"text")," string")),Object(i.b)("h3",{id:"plaintexteditsetplaceholdertexttext"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.setPlaceholderText(text)")),Object(i.b)("p",null,"Sets the given text to the plainTextEdit's placeholder."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"text")," string")),Object(i.b)("h3",{id:"plaintextedittoplaintext"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.toPlainText()")),Object(i.b)("p",null,"Returns the text of the text edit as plain text. ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#toPlainText"}),"QPlainTextEdit: toPlainText"),"."),Object(i.b)("h3",{id:"plaintexteditsetreadonlyisreadonly"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.setReadOnly(isReadOnly)")),Object(i.b)("p",null,"Sets the plainTextEdit to be read only. ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#readOnly-prop"}),"QPlainTextEdit: isReadOnly"),"."),Object(i.b)("h3",{id:"plaintexteditclear"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.clear()")),Object(i.b)("p",null,"Deletes all the text in the text edit.",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#clear"}),"QPlainTextEdit: clear"),"."),Object(i.b)("h3",{id:"plaintexteditsetwordwrapmodemode"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.setWordWrapMode(mode)")),Object(i.b)("p",null,"This property holds the mode QPlainTextEdit will use when wrapping text by words.",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#wordWrapMode-prop"}),"QPlainTextEdit: setWordWrapMode"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"mode: QTextOptionWrapMode")),Object(i.b)("h3",{id:"plaintexteditwordwrapmode"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.wordWrapMode()")),Object(i.b)("p",null,"returns word wrap mode. ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#wordWrapMode-prop"}),"QPlainTextEdit: wordWrapMode"),"."),Object(i.b)("h3",{id:"plaintexteditsetlinewrapmodemode"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.setLineWrapMode(mode)")),Object(i.b)("p",null,"This property holds the line wrap mode. ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#lineWrapMode-prop"}),"QPlainTextEdit: setLineWrapMode"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"mode: LineWrapMode")),Object(i.b)("h3",{id:"plaintexteditlinewrapmode"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.lineWrapMode()")),Object(i.b)("p",null,"returns line wrap mode. ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#lineWrapMode-prop"}),"QPlainTextEdit: setLineWrapMode"),"."))}c.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return b}));var i=n(0),a=n.n(i),l=a.a.createContext({}),d=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=d(e.components);return a.a.createElement(l.Provider,{value:t},e.children)};var p="mdxType",o={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},c=Object(i.forwardRef)((function(e,t){var n=e.components,i=e.mdxType,l=e.originalType,r=e.parentName,p=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(n[i]=e[i]);return n}(e,["components","mdxType","originalType","parentName"]),c=d(n),b=i,s=c[r+"."+b]||c[b]||o[b]||l;return n?a.a.createElement(s,Object.assign({},{ref:t},p,{components:n})):a.a.createElement(s,Object.assign({},{ref:t},p))}));function b(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var l=n.length,d=new Array(l);d[0]=c;var r={};for(var o in t)hasOwnProperty.call(t,o)&&(r[o]=t[o]);r.originalType=e,r[p]="string"==typeof e?e:i,d[1]=r;for(var b=2;b=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var d={sidebar_label:"QPlainTextEdit",title:"QPlainTextEdit"},r=[{value:"Example",id:"example",children:[]},{value:"new QPlainTextEdit(parent?)",id:"new-qplaintexteditparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[{value:"plainTextEdit.placeholderText",id:"plaintexteditplaceholdertext",children:[]}]},{value:"Instance Methods",id:"instance-methods",children:[{value:"plainTextEdit.setPlainText(text)",id:"plaintexteditsetplaintexttext",children:[]},{value:"plainTextEdit.setPlaceholderText(text)",id:"plaintexteditsetplaceholdertexttext",children:[]},{value:"plainTextEdit.toPlainText()",id:"plaintextedittoplaintext",children:[]},{value:"plainTextEdit.setReadOnly(isReadOnly)",id:"plaintexteditsetreadonlyisreadonly",children:[]},{value:"plainTextEdit.clear()",id:"plaintexteditclear",children:[]},{value:"plainTextEdit.setWordWrapMode(mode)",id:"plaintexteditsetwordwrapmodemode",children:[]},{value:"plainTextEdit.wordWrapMode()",id:"plaintexteditwordwrapmode",children:[]},{value:"plainTextEdit.setLineWrapMode(mode)",id:"plaintexteditsetlinewrapmodemode",children:[]},{value:"plainTextEdit.lineWrapMode()",id:"plaintexteditlinewrapmode",children:[]}]}],p={rightToc:r},o="wrapper";function c(e){var t=e.components,n=l(e,["components"]);return Object(i.b)(o,a({},p,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Used to edit and display plain text.")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(i.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html"}),"QPlainTextEdit class"))),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"QPlainTextEdit")," provides ability to add and manipulate native editable text field widgets."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"QPlainTextEdit inherits from ",Object(i.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(i.b)("h3",{id:"example"},"Example"),Object(i.b)("pre",null,Object(i.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QPlainTextEdit } = require("@nodegui/nodegui");\n\nconst plainTextEdit = new QPlainTextEdit();\n')),Object(i.b)("h3",{id:"new-qplaintexteditparent"},Object(i.b)("inlineCode",{parentName:"h3"},"new QPlainTextEdit(parent?)")),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(i.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(i.b)("h2",{id:"static-methods"},"Static Methods"),Object(i.b)("p",null,"QPlainTextEdit can access all the static methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(i.b)("p",null,"QPlainTextEdit can access all the instance properties defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),"."),Object(i.b)("h3",{id:"plaintexteditplaceholdertext"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.placeholderText")),Object(i.b)("p",null,"The placeholder text set on the plainTextEdit."),Object(i.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(i.b)("p",null,"QPlainTextEdit can access all the instance methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),"."),Object(i.b)("h3",{id:"plaintexteditsetplaintexttext"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.setPlainText(text)")),Object(i.b)("p",null,"Sets the given text to the plainTextEdit. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#setPlainText"}),"QPlainTextEdit: setPlainText"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"text")," string")),Object(i.b)("h3",{id:"plaintexteditsetplaceholdertexttext"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.setPlaceholderText(text)")),Object(i.b)("p",null,"Sets the given text to the plainTextEdit's placeholder."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"text")," string")),Object(i.b)("h3",{id:"plaintextedittoplaintext"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.toPlainText()")),Object(i.b)("p",null,"Returns the text of the text edit as plain text. ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#toPlainText"}),"QPlainTextEdit: toPlainText"),"."),Object(i.b)("h3",{id:"plaintexteditsetreadonlyisreadonly"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.setReadOnly(isReadOnly)")),Object(i.b)("p",null,"Sets the plainTextEdit to be read only. ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#readOnly-prop"}),"QPlainTextEdit: isReadOnly"),"."),Object(i.b)("h3",{id:"plaintexteditclear"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.clear()")),Object(i.b)("p",null,"Deletes all the text in the text edit.",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#clear"}),"QPlainTextEdit: clear"),"."),Object(i.b)("h3",{id:"plaintexteditsetwordwrapmodemode"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.setWordWrapMode(mode)")),Object(i.b)("p",null,"This property holds the mode QPlainTextEdit will use when wrapping text by words.",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#wordWrapMode-prop"}),"QPlainTextEdit: setWordWrapMode"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"mode: QTextOptionWrapMode")),Object(i.b)("h3",{id:"plaintexteditwordwrapmode"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.wordWrapMode()")),Object(i.b)("p",null,"returns word wrap mode. ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#wordWrapMode-prop"}),"QPlainTextEdit: wordWrapMode"),"."),Object(i.b)("h3",{id:"plaintexteditsetlinewrapmodemode"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.setLineWrapMode(mode)")),Object(i.b)("p",null,"This property holds the line wrap mode. ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#lineWrapMode-prop"}),"QPlainTextEdit: setLineWrapMode"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"mode: LineWrapMode")),Object(i.b)("h3",{id:"plaintexteditlinewrapmode"},Object(i.b)("inlineCode",{parentName:"h3"},"plainTextEdit.lineWrapMode()")),Object(i.b)("p",null,"returns line wrap mode. ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qplaintextedit.html#lineWrapMode-prop"}),"QPlainTextEdit: setLineWrapMode"),"."))}c.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return b}));var i=n(0),a=n.n(i),l=a.a.createContext({}),d=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=d(e.components);return a.a.createElement(l.Provider,{value:t},e.children)};var p="mdxType",o={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},c=Object(i.forwardRef)((function(e,t){var n=e.components,i=e.mdxType,l=e.originalType,r=e.parentName,p=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(n[i]=e[i]);return n}(e,["components","mdxType","originalType","parentName"]),c=d(n),b=i,s=c[r+"."+b]||c[b]||o[b]||l;return n?a.a.createElement(s,Object.assign({},{ref:t},p,{components:n})):a.a.createElement(s,Object.assign({},{ref:t},p))}));function b(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var l=n.length,d=new Array(l);d[0]=c;var r={};for(var o in t)hasOwnProperty.call(t,o)&&(r[o]=t[o]);r.originalType=e,r[p]="string"==typeof e?e:i,d[1]=r;for(var b=2;b=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s={sidebar_label:"QProgressBar",title:"QProgressBar"},o=[{value:"Example",id:"example",children:[]},{value:"new QProgressBar(parent?)",id:"new-qprogressbarparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"progressBar.setValue(value)",id:"progressbarsetvaluevalue",children:[]},{value:"progressBar.setMaximum(max)",id:"progressbarsetmaximummax",children:[]},{value:"progressBar.setMinimum(min)",id:"progressbarsetminimummin",children:[]},{value:"progressBar.setOrientation(orientation)",id:"progressbarsetorientationorientation",children:[]},{value:"progressBar.value()",id:"progressbarvalue",children:[]}]}],l={rightToc:o},p="wrapper";function c(e){var t=e.components,r=i(e,["components"]);return Object(a.b)(p,n({},l,r,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Create and control progress bar widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",n({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qprogressbar.html"}),"QProgressBar class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QProgressBar")," provides ability to add and manipulate native progress bar widgets."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QProgressBar inherits from ",Object(a.b)("a",n({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",n({parentName:"pre"},{className:"language-javascript"}),'const { QProgressBar } = require("@nodegui/nodegui");\n\nconst progressBar = new QProgressBar();\n')),Object(a.b)("h3",{id:"new-qprogressbarparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QProgressBar(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QProgressBar can access all the static methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QProgressBar can access all the instance properties defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QProgressBar can access all the instance methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"progressbarsetvaluevalue"},Object(a.b)("inlineCode",{parentName:"h3"},"progressBar.setValue(value)")),Object(a.b)("p",null,"Sets the current value of the progressBar. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#value-prop"}),"QProgressBar: setValue"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"value")," number - Set the value as current value")),Object(a.b)("h3",{id:"progressbarsetmaximummax"},Object(a.b)("inlineCode",{parentName:"h3"},"progressBar.setMaximum(max)")),Object(a.b)("p",null,"Sets the max value of the progressBar. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#maximum-prop"}),"QProgressBar: setMaximum"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"max")," number - Set the value as max value of the progress bar.")),Object(a.b)("h3",{id:"progressbarsetminimummin"},Object(a.b)("inlineCode",{parentName:"h3"},"progressBar.setMinimum(min)")),Object(a.b)("p",null,"Sets the min value of the progressBar. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#minimum-prop"}),"QProgressBar: setMinimum"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"min")," number - Set the value as min value of the progress bar.")),Object(a.b)("h3",{id:"progressbarsetorientationorientation"},Object(a.b)("inlineCode",{parentName:"h3"},"progressBar.setOrientation(orientation)")),Object(a.b)("p",null,"Sets the orientation of the progressBar. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#orientation-prop"}),"QProgressBar: setOrientation"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"orientation")," Orientation - Specifies visual orientation of the progress bar. ",Object(a.b)("a",n({parentName:"li"},{href:"/docs/api/QtEnums"}),"Orientation is an enum from Qt"))),Object(a.b)("h3",{id:"progressbarvalue"},Object(a.b)("inlineCode",{parentName:"h3"},"progressBar.value()")),Object(a.b)("p",null,"Returns the current value (Number) of the progressBar. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#value-prop"}),"QProgressBar: value"),"."))}c.isMDXComponent=!0},173:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return b}));var a=r(0),n=r.n(a),i=n.a.createContext({}),s=function(e){var t=n.a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):Object.assign({},t,e)),r},o=function(e){var t=s(e.components);return n.a.createElement(i.Provider,{value:t},e.children)};var l="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},c=Object(a.forwardRef)((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,l=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(r[a]=e[a]);return r}(e,["components","mdxType","originalType","parentName"]),c=s(r),b=a,u=c[o+"."+b]||c[b]||p[b]||i;return r?n.a.createElement(u,Object.assign({},{ref:t},l,{components:r})):n.a.createElement(u,Object.assign({},{ref:t},l))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,s=new Array(i);s[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[l]="string"==typeof e?e:a,s[1]=o;for(var b=2;b=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s={sidebar_label:"QProgressBar",title:"QProgressBar"},o=[{value:"Example",id:"example",children:[]},{value:"new QProgressBar(parent?)",id:"new-qprogressbarparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"progressBar.setValue(value)",id:"progressbarsetvaluevalue",children:[]},{value:"progressBar.setMaximum(max)",id:"progressbarsetmaximummax",children:[]},{value:"progressBar.setMinimum(min)",id:"progressbarsetminimummin",children:[]},{value:"progressBar.setOrientation(orientation)",id:"progressbarsetorientationorientation",children:[]},{value:"progressBar.value()",id:"progressbarvalue",children:[]}]}],l={rightToc:o},p="wrapper";function c(e){var t=e.components,r=i(e,["components"]);return Object(a.b)(p,n({},l,r,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Create and control progress bar widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",n({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qprogressbar.html"}),"QProgressBar class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QProgressBar")," provides ability to add and manipulate native progress bar widgets."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QProgressBar inherits from ",Object(a.b)("a",n({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",n({parentName:"pre"},{className:"language-javascript"}),'const { QProgressBar } = require("@nodegui/nodegui");\n\nconst progressBar = new QProgressBar();\n')),Object(a.b)("h3",{id:"new-qprogressbarparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QProgressBar(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QProgressBar can access all the static methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QProgressBar can access all the instance properties defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QProgressBar can access all the instance methods defined in ",Object(a.b)("a",n({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"progressbarsetvaluevalue"},Object(a.b)("inlineCode",{parentName:"h3"},"progressBar.setValue(value)")),Object(a.b)("p",null,"Sets the current value of the progressBar. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#value-prop"}),"QProgressBar: setValue"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"value")," number - Set the value as current value")),Object(a.b)("h3",{id:"progressbarsetmaximummax"},Object(a.b)("inlineCode",{parentName:"h3"},"progressBar.setMaximum(max)")),Object(a.b)("p",null,"Sets the max value of the progressBar. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#maximum-prop"}),"QProgressBar: setMaximum"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"max")," number - Set the value as max value of the progress bar.")),Object(a.b)("h3",{id:"progressbarsetminimummin"},Object(a.b)("inlineCode",{parentName:"h3"},"progressBar.setMinimum(min)")),Object(a.b)("p",null,"Sets the min value of the progressBar. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#minimum-prop"}),"QProgressBar: setMinimum"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"min")," number - Set the value as min value of the progress bar.")),Object(a.b)("h3",{id:"progressbarsetorientationorientation"},Object(a.b)("inlineCode",{parentName:"h3"},"progressBar.setOrientation(orientation)")),Object(a.b)("p",null,"Sets the orientation of the progressBar. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#orientation-prop"}),"QProgressBar: setOrientation"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"orientation")," Orientation - Specifies visual orientation of the progress bar. ",Object(a.b)("a",n({parentName:"li"},{href:"/docs/api/QtEnums"}),"Orientation is an enum from Qt"))),Object(a.b)("h3",{id:"progressbarvalue"},Object(a.b)("inlineCode",{parentName:"h3"},"progressBar.value()")),Object(a.b)("p",null,"Returns the current value (Number) of the progressBar. It calls the native method ",Object(a.b)("a",n({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#value-prop"}),"QProgressBar: value"),"."))}c.isMDXComponent=!0},173:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return b}));var a=r(0),n=r.n(a),i=n.a.createContext({}),s=function(e){var t=n.a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):Object.assign({},t,e)),r},o=function(e){var t=s(e.components);return n.a.createElement(i.Provider,{value:t},e.children)};var l="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},c=Object(a.forwardRef)((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,l=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(r[a]=e[a]);return r}(e,["components","mdxType","originalType","parentName"]),c=s(r),b=a,u=c[o+"."+b]||c[b]||p[b]||i;return r?n.a.createElement(u,Object.assign({},{ref:t},l,{components:r})):n.a.createElement(u,Object.assign({},{ref:t},l))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,s=new Array(i);s[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[l]="string"==typeof e?e:a,s[1]=o;for(var b=2;b=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={sidebar_label:"QPushButton",title:"QPushButton"},c=[{value:"Example",id:"example",children:[]},{value:"new QPushButton(parent?)",id:"new-qpushbuttonparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"button.setText(text)",id:"buttonsettexttext",children:[]},{value:"button.setFlat(isFlat)",id:"buttonsetflatisflat",children:[]},{value:"button.setIcon(icon)",id:"buttonseticonicon",children:[]}]}],l={rightToc:c},b="wrapper";function s(e){var t=e.components,n=o(e,["components"]);return Object(a.b)(b,r({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Create and control buttons.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",r({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qpushbutton.html"}),"QPushButton class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QPushButton")," provides ability to add and manipulate native button widgets."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QPushButton inherits from ",Object(a.b)("a",r({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",r({parentName:"pre"},{className:"language-javascript"}),'const { QPushButton } = require("@nodegui/nodegui");\n\nconst button = new QPushButton();\nbutton.setText("Hello");\n')),Object(a.b)("h3",{id:"new-qpushbuttonparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QPushButton(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QPushButton can access all the static methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QPushButton can access all the instance properties defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QPushButton can access all the instance methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"buttonsettexttext"},Object(a.b)("inlineCode",{parentName:"h3"},"button.setText(text)")),Object(a.b)("p",null,"Sets the given text to the button."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"text")," string")),Object(a.b)("h3",{id:"buttonsetflatisflat"},Object(a.b)("inlineCode",{parentName:"h3"},"button.setFlat(isFlat)")),Object(a.b)("p",null,"Sets whether the button border is raised."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"isFlat")," boolean")),Object(a.b)("h3",{id:"buttonseticonicon"},Object(a.b)("inlineCode",{parentName:"h3"},"button.setIcon(icon)")),Object(a.b)("p",null,"Sets an icon in the button."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"icon")," QIcon")))}s.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var a=n(0),r=n.n(a),o=r.a.createContext({}),i=function(e){var t=r.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return r.a.createElement(o.Provider,{value:t},e.children)};var l="mdxType",b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},s=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,l=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),s=i(n),u=a,p=s[c+"."+u]||s[u]||b[u]||o;return n?r.a.createElement(p,Object.assign({},{ref:t},l,{components:n})):r.a.createElement(p,Object.assign({},{ref:t},l))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=s;var c={};for(var b in t)hasOwnProperty.call(t,b)&&(c[b]=t[b]);c.originalType=e,c[l]="string"==typeof e?e:a,i[1]=c;for(var u=2;u=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={sidebar_label:"QPushButton",title:"QPushButton"},c=[{value:"Example",id:"example",children:[]},{value:"new QPushButton(parent?)",id:"new-qpushbuttonparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"button.setText(text)",id:"buttonsettexttext",children:[]},{value:"button.setFlat(isFlat)",id:"buttonsetflatisflat",children:[]},{value:"button.setIcon(icon)",id:"buttonseticonicon",children:[]}]}],l={rightToc:c},b="wrapper";function s(e){var t=e.components,n=o(e,["components"]);return Object(a.b)(b,r({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Create and control buttons.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",r({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qpushbutton.html"}),"QPushButton class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QPushButton")," provides ability to add and manipulate native button widgets."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QPushButton inherits from ",Object(a.b)("a",r({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",r({parentName:"pre"},{className:"language-javascript"}),'const { QPushButton } = require("@nodegui/nodegui");\n\nconst button = new QPushButton();\nbutton.setText("Hello");\n')),Object(a.b)("h3",{id:"new-qpushbuttonparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QPushButton(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QPushButton can access all the static methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QPushButton can access all the instance properties defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QPushButton can access all the instance methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"buttonsettexttext"},Object(a.b)("inlineCode",{parentName:"h3"},"button.setText(text)")),Object(a.b)("p",null,"Sets the given text to the button."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"text")," string")),Object(a.b)("h3",{id:"buttonsetflatisflat"},Object(a.b)("inlineCode",{parentName:"h3"},"button.setFlat(isFlat)")),Object(a.b)("p",null,"Sets whether the button border is raised."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"isFlat")," boolean")),Object(a.b)("h3",{id:"buttonseticonicon"},Object(a.b)("inlineCode",{parentName:"h3"},"button.setIcon(icon)")),Object(a.b)("p",null,"Sets an icon in the button."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"icon")," QIcon")))}s.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var a=n(0),r=n.n(a),o=r.a.createContext({}),i=function(e){var t=r.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return r.a.createElement(o.Provider,{value:t},e.children)};var l="mdxType",b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},s=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,l=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),s=i(n),u=a,p=s[c+"."+u]||s[u]||b[u]||o;return n?r.a.createElement(p,Object.assign({},{ref:t},l,{components:n})):r.a.createElement(p,Object.assign({},{ref:t},l))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=s;var c={};for(var b in t)hasOwnProperty.call(t,b)&&(c[b]=t[b]);c.originalType=e,c[l]="string"==typeof e?e:a,i[1]=c;for(var u=2;u=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={sidebar_label:"QRadioButton",title:"QRadioButton"},c=[{value:"Example",id:"example",children:[]},{value:"new QRadioButton(parent?)",id:"new-qradiobuttonparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"radioButton.setText(text)",id:"radiobuttonsettexttext",children:[]}]}],d={rightToc:c},l="wrapper";function p(e){var t=e.components,n=o(e,["components"]);return Object(a.b)(l,r({},d,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Create and control radio button.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",r({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qradiobutton.html"}),"QRadioButton class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QRadioButton")," provides ability to add and manipulate native radio button widgets."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QRadioButton inherits from ",Object(a.b)("a",r({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",r({parentName:"pre"},{className:"language-javascript"}),'const { QRadioButton } = require("@nodegui/nodegui");\n\nconst radioButton = new QRadioButton();\nradioButton.setText("Hello");\n')),Object(a.b)("h3",{id:"new-qradiobuttonparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QRadioButton(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QRadioButton can access all the static methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QRadioButton can access all the instance properties defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QRadioButton can access all the instance methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"radiobuttonsettexttext"},Object(a.b)("inlineCode",{parentName:"h3"},"radioButton.setText(text)")),Object(a.b)("p",null,"Sets the given text to the radioButton."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"text")," string")))}p.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));var a=n(0),r=n.n(a),o=r.a.createContext({}),i=function(e){var t=r.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return r.a.createElement(o.Provider,{value:t},e.children)};var d="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,d=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),s=a,u=p[c+"."+s]||p[s]||l[s]||o;return n?r.a.createElement(u,Object.assign({},{ref:t},d,{components:n})):r.a.createElement(u,Object.assign({},{ref:t},d))}));function s(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:a,i[1]=c;for(var s=2;s=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={sidebar_label:"QRadioButton",title:"QRadioButton"},c=[{value:"Example",id:"example",children:[]},{value:"new QRadioButton(parent?)",id:"new-qradiobuttonparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"radioButton.setText(text)",id:"radiobuttonsettexttext",children:[]}]}],d={rightToc:c},l="wrapper";function p(e){var t=e.components,n=o(e,["components"]);return Object(a.b)(l,r({},d,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Create and control radio button.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",r({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qradiobutton.html"}),"QRadioButton class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QRadioButton")," provides ability to add and manipulate native radio button widgets."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QRadioButton inherits from ",Object(a.b)("a",r({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",r({parentName:"pre"},{className:"language-javascript"}),'const { QRadioButton } = require("@nodegui/nodegui");\n\nconst radioButton = new QRadioButton();\nradioButton.setText("Hello");\n')),Object(a.b)("h3",{id:"new-qradiobuttonparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QRadioButton(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QRadioButton can access all the static methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QRadioButton can access all the instance properties defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QRadioButton can access all the instance methods defined in ",Object(a.b)("a",r({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"radiobuttonsettexttext"},Object(a.b)("inlineCode",{parentName:"h3"},"radioButton.setText(text)")),Object(a.b)("p",null,"Sets the given text to the radioButton."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"text")," string")))}p.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));var a=n(0),r=n.n(a),o=r.a.createContext({}),i=function(e){var t=r.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return r.a.createElement(o.Provider,{value:t},e.children)};var d="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,d=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),s=a,u=p[c+"."+s]||p[s]||l[s]||o;return n?r.a.createElement(u,Object.assign({},{ref:t},d,{components:n})):r.a.createElement(u,Object.assign({},{ref:t},d))}));function s(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:a,i[1]=c;for(var s=2;s=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c={sidebar_label:"QScrollArea",title:"QScrollArea"},o=[{value:"Example",id:"example",children:[]},{value:"new QScrollArea(parent?)",id:"new-qscrollareaparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"scrollArea.setWidget(widget)",id:"scrollareasetwidgetwidget",children:[]}]}],i={rightToc:o},s="wrapper";function p(e){var t=e.components,r=l(e,["components"]);return Object(n.b)(s,a({},i,r,{components:t,mdxType:"MDXLayout"}),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"A ",Object(n.b)("inlineCode",{parentName:"p"},"QScrollArea")," provides a scrolling view onto another widget.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(n.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qscrollarea.html"}),"QScrollArea class"))),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"QScrollArea inherits from ",Object(n.b)("a",a({parentName:"strong"},{href:"/docs/api/QAbstractScrollArea"}),"QAbstractScrollArea"))),Object(n.b)("h3",{id:"example"},"Example"),Object(n.b)("pre",null,Object(n.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QScrollArea } = require("@nodegui/nodegui");\n\nconst scrollArea = new QScrollArea();\nscrollArea.setInlineStyle("flex: 1; width:\'100%\';");\n\nconst imageLabel = new QLabel();\nconst pixmap = new QPixmap(\n path.resolve(__dirname, "../extras/assets/kitchen.png")\n);\nimageLabel.setPixmap(pixmap);\n\nscrollArea.setWidget(imageLabel);\n')),Object(n.b)("h3",{id:"new-qscrollareaparent"},Object(n.b)("inlineCode",{parentName:"h3"},"new QScrollArea(parent?)")),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(n.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(n.b)("h2",{id:"static-methods"},"Static Methods"),Object(n.b)("p",null,"QScrollArea can access all the static methods defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/QAbstractScrollArea"}),"QAbstractScrollArea")),Object(n.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(n.b)("p",null,"QScrollArea can access all the instance properties defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/QAbstractScrollArea"}),"QAbstractScrollArea")),Object(n.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(n.b)("p",null,"QScrollArea can access all the instance methods defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/QAbstractScrollArea"}),"QAbstractScrollArea"),". Additionally it also has the following instance methods:"),Object(n.b)("h3",{id:"scrollareasetwidgetwidget"},Object(n.b)("inlineCode",{parentName:"h3"},"scrollArea.setWidget(widget)")),Object(n.b)("p",null,"Sets the scroll area's widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qscrollarea.html#setWidget"}),"QScrollArea: setWidget"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"widget")," NodeWidget - Any widget you want to enclose in a scroll area.")))}p.isMDXComponent=!0},173:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return d}));var n=r(0),a=r.n(n),l=a.a.createContext({}),c=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):Object.assign({},t,e)),r},o=function(e){var t=c(e.components);return a.a.createElement(l.Provider,{value:t},e.children)};var i="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},p=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,l=e.originalType,o=e.parentName,i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(r[n]=e[n]);return r}(e,["components","mdxType","originalType","parentName"]),p=c(r),d=n,b=p[o+"."+d]||p[d]||s[d]||l;return r?a.a.createElement(b,Object.assign({},{ref:t},i,{components:r})):a.a.createElement(b,Object.assign({},{ref:t},i))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=r.length,c=new Array(l);c[0]=p;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[i]="string"==typeof e?e:n,c[1]=o;for(var d=2;d=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c={sidebar_label:"QScrollArea",title:"QScrollArea"},o=[{value:"Example",id:"example",children:[]},{value:"new QScrollArea(parent?)",id:"new-qscrollareaparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"scrollArea.setWidget(widget)",id:"scrollareasetwidgetwidget",children:[]}]}],i={rightToc:o},s="wrapper";function p(e){var t=e.components,r=l(e,["components"]);return Object(n.b)(s,a({},i,r,{components:t,mdxType:"MDXLayout"}),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"A ",Object(n.b)("inlineCode",{parentName:"p"},"QScrollArea")," provides a scrolling view onto another widget.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(n.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qscrollarea.html"}),"QScrollArea class"))),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"QScrollArea inherits from ",Object(n.b)("a",a({parentName:"strong"},{href:"/docs/api/QAbstractScrollArea"}),"QAbstractScrollArea"))),Object(n.b)("h3",{id:"example"},"Example"),Object(n.b)("pre",null,Object(n.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QScrollArea } = require("@nodegui/nodegui");\n\nconst scrollArea = new QScrollArea();\nscrollArea.setInlineStyle("flex: 1; width:\'100%\';");\n\nconst imageLabel = new QLabel();\nconst pixmap = new QPixmap(\n path.resolve(__dirname, "../extras/assets/kitchen.png")\n);\nimageLabel.setPixmap(pixmap);\n\nscrollArea.setWidget(imageLabel);\n')),Object(n.b)("h3",{id:"new-qscrollareaparent"},Object(n.b)("inlineCode",{parentName:"h3"},"new QScrollArea(parent?)")),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(n.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(n.b)("h2",{id:"static-methods"},"Static Methods"),Object(n.b)("p",null,"QScrollArea can access all the static methods defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/QAbstractScrollArea"}),"QAbstractScrollArea")),Object(n.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(n.b)("p",null,"QScrollArea can access all the instance properties defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/QAbstractScrollArea"}),"QAbstractScrollArea")),Object(n.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(n.b)("p",null,"QScrollArea can access all the instance methods defined in ",Object(n.b)("a",a({parentName:"p"},{href:"/docs/api/QAbstractScrollArea"}),"QAbstractScrollArea"),". Additionally it also has the following instance methods:"),Object(n.b)("h3",{id:"scrollareasetwidgetwidget"},Object(n.b)("inlineCode",{parentName:"h3"},"scrollArea.setWidget(widget)")),Object(n.b)("p",null,"Sets the scroll area's widget. It calls the native method ",Object(n.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qscrollarea.html#setWidget"}),"QScrollArea: setWidget"),"."),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("inlineCode",{parentName:"li"},"widget")," NodeWidget - Any widget you want to enclose in a scroll area.")))}p.isMDXComponent=!0},173:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return d}));var n=r(0),a=r.n(n),l=a.a.createContext({}),c=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):Object.assign({},t,e)),r},o=function(e){var t=c(e.components);return a.a.createElement(l.Provider,{value:t},e.children)};var i="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},p=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,l=e.originalType,o=e.parentName,i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(r[n]=e[n]);return r}(e,["components","mdxType","originalType","parentName"]),p=c(r),d=n,b=p[o+"."+d]||p[d]||s[d]||l;return r?a.a.createElement(b,Object.assign({},{ref:t},i,{components:r})):a.a.createElement(b,Object.assign({},{ref:t},i))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=r.length,c=new Array(l);c[0]=p;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[i]="string"==typeof e?e:n,c[1]=o;for(var d=2;d=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o={sidebar_label:"QShortcut",title:"QShortcut"},i=[{value:"Example",id:"example",children:[]},{value:"new QShortcut(parent)",id:"new-qshortcutparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"shortcut.setEnabled(enabled)",id:"shortcutsetenabledenabled",children:[]},{value:"shortcut.setAutoRepeat(on)",id:"shortcutsetautorepeaton",children:[]},{value:"shortcut.setKey(keySequence)",id:"shortcutsetkeykeysequence",children:[]},{value:"shortcut.setContext(contextEnum)",id:"shortcutsetcontextcontextenum",children:[]}]}],s={rightToc:i},l="wrapper";function u(e){var t=e.components,n=c(e,["components"]);return Object(r.b)(l,a({},s,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"The QShortcut class is used to create keyboard shortcuts.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(r.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qshortcut.html"}),"QShortcut class"))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"QShortcut inherits from ",Object(r.b)("a",a({parentName:"strong"},{href:"/docs/api/EventWidget"}),"EventWidget"))),Object(r.b)("h3",{id:"example"},"Example"),Object(r.b)("pre",null,Object(r.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QShortcut, QKeySequence, QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\nconst shortcut = new QShortcut(win);\nshortcut.setKey(new QKeySequence("Ctrl+M"));\nshortcut.setEnabled(true);\nshortcut.addEventListener(QShortcutEvents.activated, () => {\n console.log("Shortcut Activated");\n});\n\nwin.show();\nglobal.win = win;\nglobal.shortcut = shortcut;\n')),Object(r.b)("h3",{id:"new-qshortcutparent"},Object(r.b)("inlineCode",{parentName:"h3"},"new QShortcut(parent)")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget. Any widget inheriting from NodeWidget can be passed as a parent. This will make this shortcut bind to the parent widget.")),Object(r.b)("h2",{id:"static-methods"},"Static Methods"),Object(r.b)("p",null,"QShortcut can access all the static methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(r.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(r.b)("p",null,"QShortcut can access all the instance properties defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(r.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(r.b)("p",null,"QShortcut can access all the instance methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget"),". Additionally it also has the following instance methods:"),Object(r.b)("h3",{id:"shortcutsetenabledenabled"},Object(r.b)("inlineCode",{parentName:"h3"},"shortcut.setEnabled(enabled)")),Object(r.b)("p",null,"This property holds whether the shortcut is enabled. It calls the native method ",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qshortcut.html#enabled-prop"}),"QShortcut: setEnabled"),"."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"enabled")," - Boolean")),Object(r.b)("h3",{id:"shortcutsetautorepeaton"},Object(r.b)("inlineCode",{parentName:"h3"},"shortcut.setAutoRepeat(on)")),Object(r.b)("p",null,"This property holds whether the shortcut can auto repeat. It calls the native method ",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qshortcut.html#autoRepeat-prop"}),"QShortcut: setAutoRepeat"),"."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"on")," - Boolean")),Object(r.b)("h3",{id:"shortcutsetkeykeysequence"},Object(r.b)("inlineCode",{parentName:"h3"},"shortcut.setKey(keySequence)")),Object(r.b)("p",null,"This property holds the shortcut's key sequence. It calls the native method ",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qshortcut.html#key-prop"}),"QShortcut: setKey"),"."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"keySequence")," ",Object(r.b)("a",a({parentName:"li"},{href:"/docs/api/QKeySequence"}),"QKeySequence"))),Object(r.b)("h3",{id:"shortcutsetcontextcontextenum"},Object(r.b)("inlineCode",{parentName:"h3"},"shortcut.setContext(contextEnum)")),Object(r.b)("p",null,"This property holds the context in which the shortcut is valid. It calls the native method ",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qshortcut.html#context-prop"}),"QShortcut: setContext"),"."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"contextEnum")," - ShortcutContext enum.")))}u.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return h}));var r=n(0),a=n.n(r),c=a.a.createContext({}),o=function(e){var t=a.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},i=function(e){var t=o(e.components);return a.a.createElement(c.Provider,{value:t},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},u=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,c=e.originalType,i=e.parentName,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["components","mdxType","originalType","parentName"]),u=o(n),h=r,p=u[i+"."+h]||u[h]||l[h]||c;return n?a.a.createElement(p,Object.assign({},{ref:t},s,{components:n})):a.a.createElement(p,Object.assign({},{ref:t},s))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var c=n.length,o=new Array(c);o[0]=u;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[s]="string"==typeof e?e:r,o[1]=i;for(var h=2;h=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o={sidebar_label:"QShortcut",title:"QShortcut"},i=[{value:"Example",id:"example",children:[]},{value:"new QShortcut(parent)",id:"new-qshortcutparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"shortcut.setEnabled(enabled)",id:"shortcutsetenabledenabled",children:[]},{value:"shortcut.setAutoRepeat(on)",id:"shortcutsetautorepeaton",children:[]},{value:"shortcut.setKey(keySequence)",id:"shortcutsetkeykeysequence",children:[]},{value:"shortcut.setContext(contextEnum)",id:"shortcutsetcontextcontextenum",children:[]}]}],s={rightToc:i},l="wrapper";function u(e){var t=e.components,n=c(e,["components"]);return Object(r.b)(l,a({},s,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"The QShortcut class is used to create keyboard shortcuts.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(r.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qshortcut.html"}),"QShortcut class"))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"QShortcut inherits from ",Object(r.b)("a",a({parentName:"strong"},{href:"/docs/api/EventWidget"}),"EventWidget"))),Object(r.b)("h3",{id:"example"},"Example"),Object(r.b)("pre",null,Object(r.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QShortcut, QKeySequence, QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\nconst shortcut = new QShortcut(win);\nshortcut.setKey(new QKeySequence("Ctrl+M"));\nshortcut.setEnabled(true);\nshortcut.addEventListener(QShortcutEvents.activated, () => {\n console.log("Shortcut Activated");\n});\n\nwin.show();\nglobal.win = win;\nglobal.shortcut = shortcut;\n')),Object(r.b)("h3",{id:"new-qshortcutparent"},Object(r.b)("inlineCode",{parentName:"h3"},"new QShortcut(parent)")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget. Any widget inheriting from NodeWidget can be passed as a parent. This will make this shortcut bind to the parent widget.")),Object(r.b)("h2",{id:"static-methods"},"Static Methods"),Object(r.b)("p",null,"QShortcut can access all the static methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(r.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(r.b)("p",null,"QShortcut can access all the instance properties defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(r.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(r.b)("p",null,"QShortcut can access all the instance methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget"),". Additionally it also has the following instance methods:"),Object(r.b)("h3",{id:"shortcutsetenabledenabled"},Object(r.b)("inlineCode",{parentName:"h3"},"shortcut.setEnabled(enabled)")),Object(r.b)("p",null,"This property holds whether the shortcut is enabled. It calls the native method ",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qshortcut.html#enabled-prop"}),"QShortcut: setEnabled"),"."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"enabled")," - Boolean")),Object(r.b)("h3",{id:"shortcutsetautorepeaton"},Object(r.b)("inlineCode",{parentName:"h3"},"shortcut.setAutoRepeat(on)")),Object(r.b)("p",null,"This property holds whether the shortcut can auto repeat. It calls the native method ",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qshortcut.html#autoRepeat-prop"}),"QShortcut: setAutoRepeat"),"."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"on")," - Boolean")),Object(r.b)("h3",{id:"shortcutsetkeykeysequence"},Object(r.b)("inlineCode",{parentName:"h3"},"shortcut.setKey(keySequence)")),Object(r.b)("p",null,"This property holds the shortcut's key sequence. It calls the native method ",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qshortcut.html#key-prop"}),"QShortcut: setKey"),"."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"keySequence")," ",Object(r.b)("a",a({parentName:"li"},{href:"/docs/api/QKeySequence"}),"QKeySequence"))),Object(r.b)("h3",{id:"shortcutsetcontextcontextenum"},Object(r.b)("inlineCode",{parentName:"h3"},"shortcut.setContext(contextEnum)")),Object(r.b)("p",null,"This property holds the context in which the shortcut is valid. It calls the native method ",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qshortcut.html#context-prop"}),"QShortcut: setContext"),"."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"contextEnum")," - ShortcutContext enum.")))}u.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return h}));var r=n(0),a=n.n(r),c=a.a.createContext({}),o=function(e){var t=a.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},i=function(e){var t=o(e.components);return a.a.createElement(c.Provider,{value:t},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},u=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,c=e.originalType,i=e.parentName,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["components","mdxType","originalType","parentName"]),u=o(n),h=r,p=u[i+"."+h]||u[h]||l[h]||c;return n?a.a.createElement(p,Object.assign({},{ref:t},s,{components:n})):a.a.createElement(p,Object.assign({},{ref:t},s))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var c=n.length,o=new Array(c);o[0]=u;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[s]="string"==typeof e?e:r,o[1]=i;for(var h=2;h=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p={sidebar_label:"QSpinBox",title:"QSpinBox"},r=[{value:"Example",id:"example",children:[]},{value:"new QSpinBox(parent?)",id:"new-qspinboxparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"spinBox.setValue(val)",id:"spinboxsetvalueval",children:[]},{value:"spinBox.setRange(minimum, maximum)",id:"spinboxsetrangeminimum-maximum",children:[]},{value:"spinBox.setPrefix(prefix)",id:"spinboxsetprefixprefix",children:[]},{value:"spinBox.setSuffix(suffix)",id:"spinboxsetsuffixsuffix",children:[]},{value:"spinBox.setSingleStep(val)",id:"spinboxsetsinglestepval",children:[]},{value:"spinBox.cleanText()",id:"spinboxcleantext",children:[]},{value:"spinBox.minimum()",id:"spinboxminimum",children:[]},{value:"spinBox.maximum()",id:"spinboxmaximum",children:[]},{value:"spinBox.value()",id:"spinboxvalue",children:[]}]}],l={rightToc:r},s="wrapper";function c(e){var t=e.components,n=o(e,["components"]);return Object(i.b)(s,a({},l,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Create and control spin box widgets.")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(i.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qspinbox.html"}),"QSpinBox class"))),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"QSpinBox")," provides ability to add and manipulate native spin box widgets."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"QSpinBox inherits from ",Object(i.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(i.b)("h3",{id:"example"},"Example"),Object(i.b)("pre",null,Object(i.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QSpinBox } = require("@nodegui/nodegui");\n\nconst spinBox = new QSpinBox();\n')),Object(i.b)("h3",{id:"new-qspinboxparent"},Object(i.b)("inlineCode",{parentName:"h3"},"new QSpinBox(parent?)")),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(i.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(i.b)("h2",{id:"static-methods"},"Static Methods"),Object(i.b)("p",null,"QSpinBox can access all the static methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(i.b)("p",null,"QSpinBox can access all the instance properties defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(i.b)("p",null,"QSpinBox can access all the instance methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(i.b)("h3",{id:"spinboxsetvalueval"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.setValue(val)")),Object(i.b)("p",null,"Sets the current value of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#value-prop"}),"QSpinBox: setValue"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"val")," number - Set the value as current value")),Object(i.b)("h3",{id:"spinboxsetrangeminimum-maximum"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.setRange(minimum, maximum)")),Object(i.b)("p",null,"Sets the min/max value of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#setRange"}),"QSpinBox: setRange"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"max")," number - Set the value as max value of the progress bar.")),Object(i.b)("h3",{id:"spinboxsetprefixprefix"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.setPrefix(prefix)")),Object(i.b)("p",null,"Sets the prefix of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#prefix-prop"}),"QSpinBox: setPrefix"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"prefix")," string - Specifies prefix content shows before the spinBox value. ",Object(i.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"Prefix is an enum from Qt"))),Object(i.b)("h3",{id:"spinboxsetsuffixsuffix"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.setSuffix(suffix)")),Object(i.b)("p",null,"Sets the suffix of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#suffix-prop"}),"QSpinBox: setSuffix"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"suffix")," string - Specifies suffix content shows after the spinBox value. ",Object(i.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"Suffix is an enum from Qt"))),Object(i.b)("h3",{id:"spinboxsetsinglestepval"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.setSingleStep(val)")),Object(i.b)("p",null,"Sets the single step value of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#singleStep-prop"}),"QSpinBox: setSingleStep"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"val")," number - Specifies amount value changes with each step. ",Object(i.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"Suffix is an enum from Qt"))),Object(i.b)("h3",{id:"spinboxcleantext"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.cleanText()")),Object(i.b)("p",null,"Returns the text content (String) of the spinBox excluding any prefix, suffix, or leading or trailing whitespace. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#minimum-prop"}),"QSpinBox: value"),"."),Object(i.b)("h3",{id:"spinboxminimum"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.minimum()")),Object(i.b)("p",null,"Returns the minimum value (Number) of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#minimum-prop"}),"QSpinBox: value"),"."),Object(i.b)("h3",{id:"spinboxmaximum"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.maximum()")),Object(i.b)("p",null,"Returns the maximum value (Number) of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#maximum-prop"}),"QSpinBox: value"),"."),Object(i.b)("h3",{id:"spinboxvalue"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.value()")),Object(i.b)("p",null,"Returns the current value (Number) of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#value-prop"}),"QSpinBox: value"),"."))}c.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return b}));var i=n(0),a=n.n(i),o=a.a.createContext({}),p=function(e){var t=a.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=p(e.components);return a.a.createElement(o.Provider,{value:t},e.children)};var l="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},c=Object(i.forwardRef)((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,r=e.parentName,l=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(n[i]=e[i]);return n}(e,["components","mdxType","originalType","parentName"]),c=p(n),b=i,u=c[r+"."+b]||c[b]||s[b]||o;return n?a.a.createElement(u,Object.assign({},{ref:t},l,{components:n})):a.a.createElement(u,Object.assign({},{ref:t},l))}));function b(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,p=new Array(o);p[0]=c;var r={};for(var s in t)hasOwnProperty.call(t,s)&&(r[s]=t[s]);r.originalType=e,r[l]="string"==typeof e?e:i,p[1]=r;for(var b=2;b=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p={sidebar_label:"QSpinBox",title:"QSpinBox"},r=[{value:"Example",id:"example",children:[]},{value:"new QSpinBox(parent?)",id:"new-qspinboxparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"spinBox.setValue(val)",id:"spinboxsetvalueval",children:[]},{value:"spinBox.setRange(minimum, maximum)",id:"spinboxsetrangeminimum-maximum",children:[]},{value:"spinBox.setPrefix(prefix)",id:"spinboxsetprefixprefix",children:[]},{value:"spinBox.setSuffix(suffix)",id:"spinboxsetsuffixsuffix",children:[]},{value:"spinBox.setSingleStep(val)",id:"spinboxsetsinglestepval",children:[]},{value:"spinBox.cleanText()",id:"spinboxcleantext",children:[]},{value:"spinBox.minimum()",id:"spinboxminimum",children:[]},{value:"spinBox.maximum()",id:"spinboxmaximum",children:[]},{value:"spinBox.value()",id:"spinboxvalue",children:[]}]}],l={rightToc:r},s="wrapper";function c(e){var t=e.components,n=o(e,["components"]);return Object(i.b)(s,a({},l,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Create and control spin box widgets.")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(i.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qspinbox.html"}),"QSpinBox class"))),Object(i.b)("p",null,"A ",Object(i.b)("inlineCode",{parentName:"p"},"QSpinBox")," provides ability to add and manipulate native spin box widgets."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"QSpinBox inherits from ",Object(i.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(i.b)("h3",{id:"example"},"Example"),Object(i.b)("pre",null,Object(i.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QSpinBox } = require("@nodegui/nodegui");\n\nconst spinBox = new QSpinBox();\n')),Object(i.b)("h3",{id:"new-qspinboxparent"},Object(i.b)("inlineCode",{parentName:"h3"},"new QSpinBox(parent?)")),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(i.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(i.b)("h2",{id:"static-methods"},"Static Methods"),Object(i.b)("p",null,"QSpinBox can access all the static methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(i.b)("p",null,"QSpinBox can access all the instance properties defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(i.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(i.b)("p",null,"QSpinBox can access all the instance methods defined in ",Object(i.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget"),". Additionally it also has the following instance methods:"),Object(i.b)("h3",{id:"spinboxsetvalueval"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.setValue(val)")),Object(i.b)("p",null,"Sets the current value of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#value-prop"}),"QSpinBox: setValue"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"val")," number - Set the value as current value")),Object(i.b)("h3",{id:"spinboxsetrangeminimum-maximum"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.setRange(minimum, maximum)")),Object(i.b)("p",null,"Sets the min/max value of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#setRange"}),"QSpinBox: setRange"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"max")," number - Set the value as max value of the progress bar.")),Object(i.b)("h3",{id:"spinboxsetprefixprefix"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.setPrefix(prefix)")),Object(i.b)("p",null,"Sets the prefix of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#prefix-prop"}),"QSpinBox: setPrefix"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"prefix")," string - Specifies prefix content shows before the spinBox value. ",Object(i.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"Prefix is an enum from Qt"))),Object(i.b)("h3",{id:"spinboxsetsuffixsuffix"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.setSuffix(suffix)")),Object(i.b)("p",null,"Sets the suffix of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#suffix-prop"}),"QSpinBox: setSuffix"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"suffix")," string - Specifies suffix content shows after the spinBox value. ",Object(i.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"Suffix is an enum from Qt"))),Object(i.b)("h3",{id:"spinboxsetsinglestepval"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.setSingleStep(val)")),Object(i.b)("p",null,"Sets the single step value of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#singleStep-prop"}),"QSpinBox: setSingleStep"),"."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"val")," number - Specifies amount value changes with each step. ",Object(i.b)("a",a({parentName:"li"},{href:"/docs/api/QtEnums"}),"Suffix is an enum from Qt"))),Object(i.b)("h3",{id:"spinboxcleantext"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.cleanText()")),Object(i.b)("p",null,"Returns the text content (String) of the spinBox excluding any prefix, suffix, or leading or trailing whitespace. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#minimum-prop"}),"QSpinBox: value"),"."),Object(i.b)("h3",{id:"spinboxminimum"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.minimum()")),Object(i.b)("p",null,"Returns the minimum value (Number) of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#minimum-prop"}),"QSpinBox: value"),"."),Object(i.b)("h3",{id:"spinboxmaximum"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.maximum()")),Object(i.b)("p",null,"Returns the maximum value (Number) of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#maximum-prop"}),"QSpinBox: value"),"."),Object(i.b)("h3",{id:"spinboxvalue"},Object(i.b)("inlineCode",{parentName:"h3"},"spinBox.value()")),Object(i.b)("p",null,"Returns the current value (Number) of the spinBox. It calls the native method ",Object(i.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qspinbox.html#value-prop"}),"QSpinBox: value"),"."))}c.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return b}));var i=n(0),a=n.n(i),o=a.a.createContext({}),p=function(e){var t=a.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=p(e.components);return a.a.createElement(o.Provider,{value:t},e.children)};var l="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},c=Object(i.forwardRef)((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,r=e.parentName,l=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(n[i]=e[i]);return n}(e,["components","mdxType","originalType","parentName"]),c=p(n),b=i,u=c[r+"."+b]||c[b]||s[b]||o;return n?a.a.createElement(u,Object.assign({},{ref:t},l,{components:n})):a.a.createElement(u,Object.assign({},{ref:t},l))}));function b(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,p=new Array(o);p[0]=c;var r={};for(var s in t)hasOwnProperty.call(t,s)&&(r[s]=t[s]);r.originalType=e,r[l]="string"==typeof e?e:i,p[1]=r;for(var b=2;b=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={sidebar_label:"QSystemTrayIcon",title:"QSystemTrayIcon"},c=[{value:"Example",id:"example",children:[]},{value:"new QSystemTrayIcon(parent?)",id:"new-qsystemtrayiconparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"trayIcon.show()",id:"trayiconshow",children:[]},{value:"trayIcon.hide()",id:"trayiconhide",children:[]},{value:"trayIcon.setIcon(icon)",id:"trayiconseticonicon",children:[]},{value:"trayIcon.isVisible()",id:"trayiconisvisible",children:[]},{value:"trayIcon.setToolTip(toolTip)",id:"trayiconsettooltiptooltip",children:[]},{value:"trayIcon.setContextMenu(contextMenu)",id:"trayiconsetcontextmenucontextmenu",children:[]}]}],s={rightToc:c},l="wrapper";function p(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(l,o({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Create and control system tray icon.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",o({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html"}),"QSystemTrayIcon class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QSystemTrayIcon")," provides ability to add and manipulate native system tray icon."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QSystemTrayIcon inherits from ",Object(a.b)("a",o({parentName:"strong"},{href:"/docs/api/EventWidget"}),"EventWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const { QSystemTrayIcon, QIcon } = require("@nodegui/nodegui");\nconst trayIcon = new QIcon(\n resolve(__dirname, "some/image/file.png");\n);\nconst tray = new QSystemTrayIcon();\ntray.show();\n\nglobal.tray = tray; // prevents garbage collection of tray\n')),Object(a.b)("h3",{id:"new-qsystemtrayiconparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QSystemTrayIcon(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QSystemTrayIcon can access all the static methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QSystemTrayIcon can access all the instance properties defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QSystemTrayIcon can access all the instance methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"trayiconshow"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.show()")),Object(a.b)("p",null,"Shows the icon in the system tray icon. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#show"}),"QSystemTrayIcon: show"),"."),Object(a.b)("h3",{id:"trayiconhide"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.hide()")),Object(a.b)("p",null,"Hides the system tray icon. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#hide"}),"QSystemTrayIcon: hide"),"."),Object(a.b)("h3",{id:"trayiconseticonicon"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.setIcon(icon)")),Object(a.b)("p",null,"Sets the icon of system tray. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#icon-prop"}),"QSystemTrayIcon: setIcon"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"icon")," ",Object(a.b)("a",o({parentName:"li"},{href:"/docs/api/QIcon"}),"QIcon"))),Object(a.b)("h3",{id:"trayiconisvisible"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.isVisible()")),Object(a.b)("p",null,"Returns the visibility of icon. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#visible-prop"}),"QSystemTrayIcon: setIcon"),"."),Object(a.b)("h3",{id:"trayiconsettooltiptooltip"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.setToolTip(toolTip)")),Object(a.b)("p",null,"Sets the tooltip of system tray. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#toolTip-prop"}),"QSystemTrayIcon: setToolTip"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"toolTip")," string.")),Object(a.b)("h3",{id:"trayiconsetcontextmenucontextmenu"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.setContextMenu(contextMenu)")),Object(a.b)("p",null,"Sets the specified menu to be the context menu for the system tray icon. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#setContextMenu"}),"QSystemTrayIcon: setIcon"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"contextMenu")," ",Object(a.b)("a",o({parentName:"li"},{href:"/docs/api/QMenu"}),"QMenu"))))}p.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return b}));var a=n(0),o=n.n(a),r=o.a.createContext({}),i=function(e){var t=o.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return o.a.createElement(r.Provider,{value:t},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},p=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),b=a,d=p[c+"."+b]||p[b]||l[b]||r;return n?o.a.createElement(d,Object.assign({},{ref:t},s,{components:n})):o.a.createElement(d,Object.assign({},{ref:t},s))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:a,i[1]=c;for(var b=2;b=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={sidebar_label:"QSystemTrayIcon",title:"QSystemTrayIcon"},c=[{value:"Example",id:"example",children:[]},{value:"new QSystemTrayIcon(parent?)",id:"new-qsystemtrayiconparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"trayIcon.show()",id:"trayiconshow",children:[]},{value:"trayIcon.hide()",id:"trayiconhide",children:[]},{value:"trayIcon.setIcon(icon)",id:"trayiconseticonicon",children:[]},{value:"trayIcon.isVisible()",id:"trayiconisvisible",children:[]},{value:"trayIcon.setToolTip(toolTip)",id:"trayiconsettooltiptooltip",children:[]},{value:"trayIcon.setContextMenu(contextMenu)",id:"trayiconsetcontextmenucontextmenu",children:[]}]}],s={rightToc:c},l="wrapper";function p(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(l,o({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Create and control system tray icon.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(a.b)("a",o({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html"}),"QSystemTrayIcon class"))),Object(a.b)("p",null,"A ",Object(a.b)("inlineCode",{parentName:"p"},"QSystemTrayIcon")," provides ability to add and manipulate native system tray icon."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"QSystemTrayIcon inherits from ",Object(a.b)("a",o({parentName:"strong"},{href:"/docs/api/EventWidget"}),"EventWidget"))),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const { QSystemTrayIcon, QIcon } = require("@nodegui/nodegui");\nconst trayIcon = new QIcon(\n resolve(__dirname, "some/image/file.png");\n);\nconst tray = new QSystemTrayIcon();\ntray.show();\n\nglobal.tray = tray; // prevents garbage collection of tray\n')),Object(a.b)("h3",{id:"new-qsystemtrayiconparent"},Object(a.b)("inlineCode",{parentName:"h3"},"new QSystemTrayIcon(parent?)")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(a.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"QSystemTrayIcon can access all the static methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"QSystemTrayIcon can access all the instance properties defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"QSystemTrayIcon can access all the instance methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/EventWidget"}),"EventWidget"),". Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"trayiconshow"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.show()")),Object(a.b)("p",null,"Shows the icon in the system tray icon. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#show"}),"QSystemTrayIcon: show"),"."),Object(a.b)("h3",{id:"trayiconhide"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.hide()")),Object(a.b)("p",null,"Hides the system tray icon. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#hide"}),"QSystemTrayIcon: hide"),"."),Object(a.b)("h3",{id:"trayiconseticonicon"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.setIcon(icon)")),Object(a.b)("p",null,"Sets the icon of system tray. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#icon-prop"}),"QSystemTrayIcon: setIcon"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"icon")," ",Object(a.b)("a",o({parentName:"li"},{href:"/docs/api/QIcon"}),"QIcon"))),Object(a.b)("h3",{id:"trayiconisvisible"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.isVisible()")),Object(a.b)("p",null,"Returns the visibility of icon. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#visible-prop"}),"QSystemTrayIcon: setIcon"),"."),Object(a.b)("h3",{id:"trayiconsettooltiptooltip"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.setToolTip(toolTip)")),Object(a.b)("p",null,"Sets the tooltip of system tray. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#toolTip-prop"}),"QSystemTrayIcon: setToolTip"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"toolTip")," string.")),Object(a.b)("h3",{id:"trayiconsetcontextmenucontextmenu"},Object(a.b)("inlineCode",{parentName:"h3"},"trayIcon.setContextMenu(contextMenu)")),Object(a.b)("p",null,"Sets the specified menu to be the context menu for the system tray icon. It calls the native method ",Object(a.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/qsystemtrayicon.html#setContextMenu"}),"QSystemTrayIcon: setIcon"),"."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"contextMenu")," ",Object(a.b)("a",o({parentName:"li"},{href:"/docs/api/QMenu"}),"QMenu"))))}p.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return b}));var a=n(0),o=n.n(a),r=o.a.createContext({}),i=function(e){var t=o.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return o.a.createElement(r.Provider,{value:t},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},p=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),b=a,d=p[c+"."+b]||p[b]||l[b]||r;return n?o.a.createElement(d,Object.assign({},{ref:t},s,{components:n})):o.a.createElement(d,Object.assign({},{ref:t},s))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:a,i[1]=c;for(var b=2;b=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i={sidebar_label:"QTabWidget",title:"QTabWidget"},c=[],p={rightToc:c},u="wrapper";function l(e){var n=e.components,r=o(e,["components"]);return Object(t.b)(u,a({},p,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"Will be available from NodeGUI v0.1.10 and up"))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return c})),r.d(n,"b",(function(){return f}));var t=r(0),a=r.n(t),o=a.a.createContext({}),i=function(e){var n=a.a.useContext(o),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},c=function(e){var n=i(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,o=e.originalType,c=e.parentName,p=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=i(r),f=t,s=l[c+"."+f]||l[f]||u[f]||o;return r?a.a.createElement(s,Object.assign({},{ref:n},p,{components:r})):a.a.createElement(s,Object.assign({},{ref:n},p))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var o=r.length,i=new Array(o);i[0]=l;var c={};for(var u in n)hasOwnProperty.call(n,u)&&(c[u]=n[u]);c.originalType=e,c[p]="string"==typeof e?e:t,i[1]=c;for(var f=2;f=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i={sidebar_label:"QTabWidget",title:"QTabWidget"},c=[],p={rightToc:c},u="wrapper";function l(e){var n=e.components,r=o(e,["components"]);return Object(t.b)(u,a({},p,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"Will be available from NodeGUI v0.1.10 and up"))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return c})),r.d(n,"b",(function(){return f}));var t=r(0),a=r.n(t),o=a.a.createContext({}),i=function(e){var n=a.a.useContext(o),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},c=function(e){var n=i(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,o=e.originalType,c=e.parentName,p=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=i(r),f=t,s=l[c+"."+f]||l[f]||u[f]||o;return r?a.a.createElement(s,Object.assign({},{ref:n},p,{components:r})):a.a.createElement(s,Object.assign({},{ref:n},p))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var o=r.length,i=new Array(o);i[0]=l;var c={};for(var u in n)hasOwnProperty.call(n,u)&&(c[u]=n[u]);c.originalType=e,c[p]="string"==typeof e?e:t,i[1]=c;for(var f=2;f=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o={sidebar_label:"QWidget",title:"QWidget"},c=[{value:"Example",id:"example",children:[]},{value:"new QWidget(parent?)",id:"new-qwidgetparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[]}],d={rightToc:c},p="wrapper";function l(e){var t=e.components,n=i(e,["components"]);return Object(r.b)(p,a({},d,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Create and control views.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(r.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qwidget.html"}),"QWidget class"))),Object(r.b)("p",null,"A ",Object(r.b)("inlineCode",{parentName:"p"},"QWidget")," can be used to encapsulate other widgets and provide structure. It functions similar to a ",Object(r.b)("inlineCode",{parentName:"p"},"div")," in the web world."),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"QWidget inherits from ",Object(r.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(r.b)("h3",{id:"example"},"Example"),Object(r.b)("pre",null,Object(r.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nview.setObjectName("container"); //Similar to setting `id` on the web\nview.setLayout(new FlexLayout());\n')),Object(r.b)("h3",{id:"new-qwidgetparent"},Object(r.b)("inlineCode",{parentName:"h3"},"new QWidget(parent?)")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(r.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(r.b)("h2",{id:"static-methods"},"Static Methods"),Object(r.b)("p",null,"QWidget can access all the static methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(r.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(r.b)("p",null,"QWidget can access all the instance properties defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(r.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(r.b)("p",null,"QWidget can access all the instance methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")))}l.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));var r=n(0),a=n.n(r),i=a.a.createContext({}),o=function(e){var t=a.a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=o(e.components);return a.a.createElement(i.Provider,{value:t},e.children)};var d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},l=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["components","mdxType","originalType","parentName"]),l=o(n),s=r,b=l[c+"."+s]||l[s]||p[s]||i;return n?a.a.createElement(b,Object.assign({},{ref:t},d,{components:n})):a.a.createElement(b,Object.assign({},{ref:t},d))}));function s(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=l;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[d]="string"==typeof e?e:r,o[1]=c;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o={sidebar_label:"QWidget",title:"QWidget"},c=[{value:"Example",id:"example",children:[]},{value:"new QWidget(parent?)",id:"new-qwidgetparent",children:[]},{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[]}],d={rightToc:c},p="wrapper";function l(e){var t=e.components,n=i(e,["components"]);return Object(r.b)(p,a({},d,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Create and control views.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"This class is a JS wrapper around Qt's ",Object(r.b)("a",a({parentName:"strong"},{href:"https://doc.qt.io/qt-5/qwidget.html"}),"QWidget class"))),Object(r.b)("p",null,"A ",Object(r.b)("inlineCode",{parentName:"p"},"QWidget")," can be used to encapsulate other widgets and provide structure. It functions similar to a ",Object(r.b)("inlineCode",{parentName:"p"},"div")," in the web world."),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"QWidget inherits from ",Object(r.b)("a",a({parentName:"strong"},{href:"/docs/api/NodeWidget"}),"NodeWidget"))),Object(r.b)("h3",{id:"example"},"Example"),Object(r.b)("pre",null,Object(r.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nview.setObjectName("container"); //Similar to setting `id` on the web\nview.setLayout(new FlexLayout());\n')),Object(r.b)("h3",{id:"new-qwidgetparent"},Object(r.b)("inlineCode",{parentName:"h3"},"new QWidget(parent?)")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"parent")," NodeWidget (",Object(r.b)("em",{parentName:"li"},"optional"),"). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.")),Object(r.b)("h2",{id:"static-methods"},"Static Methods"),Object(r.b)("p",null,"QWidget can access all the static methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(r.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(r.b)("p",null,"QWidget can access all the instance properties defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")),Object(r.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(r.b)("p",null,"QWidget can access all the instance methods defined in ",Object(r.b)("a",a({parentName:"p"},{href:"/docs/api/NodeWidget"}),"NodeWidget")))}l.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));var r=n(0),a=n.n(r),i=a.a.createContext({}),o=function(e){var t=a.a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=o(e.components);return a.a.createElement(i.Provider,{value:t},e.children)};var d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},l=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["components","mdxType","originalType","parentName"]),l=o(n),s=r,b=l[c+"."+s]||l[s]||p[s]||i;return n?a.a.createElement(b,Object.assign({},{ref:t},d,{components:n})):a.a.createElement(b,Object.assign({},{ref:t},d))}));function s(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=l;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[d]="string"==typeof e?e:r,o[1]=c;for(var s=2;s=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var i={sidebar_label:"Qt Enums",title:"Qt Enums"},c=[{value:"Enums from Qt",id:"enums-from-qt",children:[{value:"Example",id:"example",children:[]}]}],u={rightToc:c},l="wrapper";function p(e){var n=e.components,t=o(e,["components"]);return Object(r.b)(l,a({},u,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("h2",{id:"enums-from-qt"},"Enums from Qt"),Object(r.b)("p",null,"For a complete list of Enums that we can use from Javascript see file"),Object(r.b)("p",null,"Qt enums: ",Object(r.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/nodegui/blob/master/src/lib/QtEnums/index.ts"}),Object(r.b)("inlineCode",{parentName:"a"},"src/lib/QtEnums/index.ts"))," in the NodeGui repo."),Object(r.b)("p",null,"All the enums in this file can be imported directly from ",Object(r.b)("inlineCode",{parentName:"p"},"@nodegui/@nodegui"),"."),Object(r.b)("h3",{id:"example"},"Example"),Object(r.b)("pre",null,Object(r.b)("code",a({parentName:"pre"},{className:"language-js"}),'import { AspectRatioMode } from "@nodegui/nodegui";\n')))}p.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return c})),t.d(n,"b",(function(){return s}));var r=t(0),a=t.n(r),o=a.a.createContext({}),i=function(e){var n=a.a.useContext(o),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},c=function(e){var n=i(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var u="mdxType",l={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},p=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,u=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===n.indexOf(r)&&(t[r]=e[r]);return t}(e,["components","mdxType","originalType","parentName"]),p=i(t),s=r,m=p[c+"."+s]||p[s]||l[s]||o;return t?a.a.createElement(m,Object.assign({},{ref:n},u,{components:t})):a.a.createElement(m,Object.assign({},{ref:n},u))}));function s(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=p;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c[u]="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var i={sidebar_label:"Qt Enums",title:"Qt Enums"},c=[{value:"Enums from Qt",id:"enums-from-qt",children:[{value:"Example",id:"example",children:[]}]}],u={rightToc:c},l="wrapper";function p(e){var n=e.components,t=o(e,["components"]);return Object(r.b)(l,a({},u,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("h2",{id:"enums-from-qt"},"Enums from Qt"),Object(r.b)("p",null,"For a complete list of Enums that we can use from Javascript see file"),Object(r.b)("p",null,"Qt enums: ",Object(r.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/nodegui/blob/master/src/lib/QtEnums/index.ts"}),Object(r.b)("inlineCode",{parentName:"a"},"src/lib/QtEnums/index.ts"))," in the NodeGui repo."),Object(r.b)("p",null,"All the enums in this file can be imported directly from ",Object(r.b)("inlineCode",{parentName:"p"},"@nodegui/@nodegui"),"."),Object(r.b)("h3",{id:"example"},"Example"),Object(r.b)("pre",null,Object(r.b)("code",a({parentName:"pre"},{className:"language-js"}),'import { AspectRatioMode } from "@nodegui/nodegui";\n')))}p.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return c})),t.d(n,"b",(function(){return s}));var r=t(0),a=t.n(r),o=a.a.createContext({}),i=function(e){var n=a.a.useContext(o),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},c=function(e){var n=i(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var u="mdxType",l={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},p=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,u=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===n.indexOf(r)&&(t[r]=e[r]);return t}(e,["components","mdxType","originalType","parentName"]),p=i(t),s=r,m=p[c+"."+s]||p[s]||l[s]||o;return t?a.a.createElement(m,Object.assign({},{ref:n},u,{components:t})):a.a.createElement(m,Object.assign({},{ref:n},u))}));function s(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=p;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c[u]="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i={sidebar_label:"Synopsis",title:"Synopsis"},l=[{value:"Destructuring assignment",id:"destructuring-assignment",children:[]}],s={rightToc:l},c="wrapper";function u(e){var n=e.components,t=a(e,["components"]);return Object(r.b)(c,o({},s,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"How to use Node.js and NodeGui's APIs.")),Object(r.b)("p",null,"All of ",Object(r.b)("a",o({parentName:"p"},{href:"https://nodejs.org/api/"}),"Node.js's built-in modules")," are available in\nNodeGui. Also, third-party node modules that are known to work with Node.Js are fully supported as well (including\nthe native node modules)."),Object(r.b)("p",null,"Apart from Node.Js ecosystem, NodeGui also provides some extra built-in widget and modules for developing native\ndesktop applications. So, you can think of NodeGui as NodeJs + Gui Widgets powered by Qt."),Object(r.b)("p",null,"The app script is like a normal Node.js script:"),Object(r.b)("pre",null,Object(r.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const { QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n\nwin.show();\n\nglobal.win = win; // To prevent win from being garbage collected.\n')),Object(r.b)("p",null,"To run your app, read ",Object(r.b)("a",o({parentName:"p"},{href:"/docs/guides/tutorial"}),"Run your app"),"."),Object(r.b)("h2",{id:"destructuring-assignment"},"Destructuring assignment"),Object(r.b)("p",null,"You can use\n",Object(r.b)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment"}),"destructuring assignment")," to make it easier to use\nbuilt-in modules."),Object(r.b)("pre",null,Object(r.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const {\n QMainWindow,\n QWidget,\n QLabel,\n FlexLayout\n} = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n\nconst centralWidget = new QWidget();\ncentralWidget.setObjectName("myroot");\nconst rootLayout = new FlexLayout();\ncentralWidget.setLayout(rootLayout);\n\nconst label = new QLabel();\nlabel.setInlineStyle("font-size: 16px; font-weight: bold;");\nlabel.setText("Hello World");\n\nrootLayout.addWidget(label);\nwin.setCentralWidget(centralWidget);\nwin.setStyleSheet(\n `\n #myroot {\n background-color: #009688;\n }\n `\n);\nwin.show();\n\nglobal.win = win;\n')))}u.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return l})),t.d(n,"b",(function(){return p}));var r=t(0),o=t.n(r),a=o.a.createContext({}),i=function(e){var n=o.a.useContext(a),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},l=function(e){var n=i(e.components);return o.a.createElement(a.Provider,{value:n},e.children)};var s="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},u=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,s=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===n.indexOf(r)&&(t[r]=e[r]);return t}(e,["components","mdxType","originalType","parentName"]),u=i(t),p=r,d=u[l+"."+p]||u[p]||c[p]||a;return t?o.a.createElement(d,Object.assign({},{ref:n},s,{components:t})):o.a.createElement(d,Object.assign({},{ref:n},s))}));function p(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,i=new Array(a);i[0]=u;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l[s]="string"==typeof e?e:r,i[1]=l;for(var p=2;p=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i={sidebar_label:"Synopsis",title:"Synopsis"},l=[{value:"Destructuring assignment",id:"destructuring-assignment",children:[]}],s={rightToc:l},c="wrapper";function u(e){var n=e.components,t=a(e,["components"]);return Object(r.b)(c,o({},s,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"How to use Node.js and NodeGui's APIs.")),Object(r.b)("p",null,"All of ",Object(r.b)("a",o({parentName:"p"},{href:"https://nodejs.org/api/"}),"Node.js's built-in modules")," are available in\nNodeGui. Also, third-party node modules that are known to work with Node.Js are fully supported as well (including\nthe native node modules)."),Object(r.b)("p",null,"Apart from Node.Js ecosystem, NodeGui also provides some extra built-in widget and modules for developing native\ndesktop applications. So, you can think of NodeGui as NodeJs + Gui Widgets powered by Qt."),Object(r.b)("p",null,"The app script is like a normal Node.js script:"),Object(r.b)("pre",null,Object(r.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const { QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n\nwin.show();\n\nglobal.win = win; // To prevent win from being garbage collected.\n')),Object(r.b)("p",null,"To run your app, read ",Object(r.b)("a",o({parentName:"p"},{href:"/docs/guides/tutorial"}),"Run your app"),"."),Object(r.b)("h2",{id:"destructuring-assignment"},"Destructuring assignment"),Object(r.b)("p",null,"You can use\n",Object(r.b)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment"}),"destructuring assignment")," to make it easier to use\nbuilt-in modules."),Object(r.b)("pre",null,Object(r.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const {\n QMainWindow,\n QWidget,\n QLabel,\n FlexLayout\n} = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n\nconst centralWidget = new QWidget();\ncentralWidget.setObjectName("myroot");\nconst rootLayout = new FlexLayout();\ncentralWidget.setLayout(rootLayout);\n\nconst label = new QLabel();\nlabel.setInlineStyle("font-size: 16px; font-weight: bold;");\nlabel.setText("Hello World");\n\nrootLayout.addWidget(label);\nwin.setCentralWidget(centralWidget);\nwin.setStyleSheet(\n `\n #myroot {\n background-color: #009688;\n }\n `\n);\nwin.show();\n\nglobal.win = win;\n')))}u.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return l})),t.d(n,"b",(function(){return p}));var r=t(0),o=t.n(r),a=o.a.createContext({}),i=function(e){var n=o.a.useContext(a),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},l=function(e){var n=i(e.components);return o.a.createElement(a.Provider,{value:n},e.children)};var s="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},u=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,s=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===n.indexOf(r)&&(t[r]=e[r]);return t}(e,["components","mdxType","originalType","parentName"]),u=i(t),p=r,d=u[l+"."+p]||u[p]||c[p]||a;return t?o.a.createElement(d,Object.assign({},{ref:n},s,{components:t})):o.a.createElement(d,Object.assign({},{ref:n},s))}));function p(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,i=new Array(a);i[0]=u;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l[s]="string"==typeof e?e:r,i[1]=l;for(var p=2;p=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={sidebar_label:"YogaWidget",title:"YogaWidget"},c=[{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"widget.getFlexNode()",id:"widgetgetflexnode",children:[]}]}],s={rightToc:c},l="wrapper";function d(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(l,o({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Abstract class to add common functionality related to Flex layout to all Widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class implements methods related to flex layout required to be present in all widgets")),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"YogaWidget")," is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities related to flex layout to all widget's easily. We implement flex layout using a library called ",Object(a.b)("a",o({parentName:"p"},{href:"https://github.com/facebook/yoga"}),"Yoga"),". As part of yoga every widget needs to store its own flex properties such as alignItems, flexDirection etc. This is done with the help of YogaWidget."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"YogaWidget is the base class for EventWidget which means all widgets inherit it aswell. It inherits from another abstract class ",Object(a.b)("a",o({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const { QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\n// getFlexNode is a method from YogaWidget\nconst flexNode = view.getFlexNode();\n')),Object(a.b)("p",null,"YogaWidget helps in storing all flex properties of a widget."),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"YogaWidget can access all the static methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"YogaWidget can access all the instance properties defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"YogaWidget can access all the instance methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"widgetgetflexnode"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.getFlexNode()")),Object(a.b)("p",null,"Returns a native reference to the flex node used in c++ instance for the widget. This is not a regular javascript object and hence no methods or properties can be accessed from it. It exists so that we pass around a widgets flex node to layouts, etc."))}d.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return p}));var a=n(0),o=n.n(a),r=o.a.createContext({}),i=function(e){var t=o.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return o.a.createElement(r.Provider,{value:t},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),d=i(n),p=a,u=d[c+"."+p]||d[p]||l[p]||r;return n?o.a.createElement(u,Object.assign({},{ref:t},s,{components:n})):o.a.createElement(u,Object.assign({},{ref:t},s))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:a,i[1]=c;for(var p=2;p=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={sidebar_label:"YogaWidget",title:"YogaWidget"},c=[{value:"Static Methods",id:"static-methods",children:[]},{value:"Instance Properties",id:"instance-properties",children:[]},{value:"Instance Methods",id:"instance-methods",children:[{value:"widget.getFlexNode()",id:"widgetgetflexnode",children:[]}]}],s={rightToc:c},l="wrapper";function d(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(l,o({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"Abstract class to add common functionality related to Flex layout to all Widgets.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"This class implements methods related to flex layout required to be present in all widgets")),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"YogaWidget")," is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities related to flex layout to all widget's easily. We implement flex layout using a library called ",Object(a.b)("a",o({parentName:"p"},{href:"https://github.com/facebook/yoga"}),"Yoga"),". As part of yoga every widget needs to store its own flex properties such as alignItems, flexDirection etc. This is done with the help of YogaWidget."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"YogaWidget is the base class for EventWidget which means all widgets inherit it aswell. It inherits from another abstract class ",Object(a.b)("a",o({parentName:"strong"},{href:"/docs/api/Component"}),"Component"))),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const { QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\n// getFlexNode is a method from YogaWidget\nconst flexNode = view.getFlexNode();\n')),Object(a.b)("p",null,"YogaWidget helps in storing all flex properties of a widget."),Object(a.b)("h2",{id:"static-methods"},"Static Methods"),Object(a.b)("p",null,"YogaWidget can access all the static methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-properties"},"Instance Properties"),Object(a.b)("p",null,"YogaWidget can access all the instance properties defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("h2",{id:"instance-methods"},"Instance Methods"),Object(a.b)("p",null,"YogaWidget can access all the instance methods defined in ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/Component"}),"Component")),Object(a.b)("p",null,"Additionally it also has the following instance methods:"),Object(a.b)("h3",{id:"widgetgetflexnode"},Object(a.b)("inlineCode",{parentName:"h3"},"widget.getFlexNode()")),Object(a.b)("p",null,"Returns a native reference to the flex node used in c++ instance for the widget. This is not a regular javascript object and hence no methods or properties can be accessed from it. It exists so that we pass around a widgets flex node to layouts, etc."))}d.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return p}));var a=n(0),o=n.n(a),r=o.a.createContext({}),i=function(e){var t=o.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return o.a.createElement(r.Provider,{value:t},e.children)};var s="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),d=i(n),p=a,u=d[c+"."+p]||d[p]||l[p]||r;return n?o.a.createElement(u,Object.assign({},{ref:t},s,{components:n})):o.a.createElement(u,Object.assign({},{ref:t},s))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:a,i[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i={},c=[],l={rightToc:c},u="wrapper";function p(e){var t=e.components,n=o(e,["components"]);return Object(r.b)(u,a({},l,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("h1",{id:"common-errors"},"Common errors"),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Segmentation fault:")," Segmentation fault occurs when you access a Pointer that is pointing to an invalid memory address. One major reason for this can be that JS garbage collector would have garbage collected the addon generated value and you try accessing it after a while. This is mostly the case if you see seg fault happening randomly after some time of startup.")),Object(r.b)("li",{parentName:"ol"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Widget not visible in Flex layout")," Widget might have gotten zero height/width. This can occur if yoga was not able to get the default height/width of the widget. Make sure you have implemented",Object(r.b)("br",{parentName:"p"}),"\n",Object(r.b)("inlineCode",{parentName:"p"},"YGNodeSetMeasureFunc(this->instance->getFlexNode(), &extrautils::measureQtWidget);"),"\nif its a leaf node widget(doesnt contain any children)."))))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-development-common-errorsf-15-a5b.cb1e79ec83f7fabe18b4.js b/content---docs-development-common-errorsf-15-a5b.cb1e79ec83f7fabe18b4.js new file mode 100644 index 000000000..9d68ac117 --- /dev/null +++ b/content---docs-development-common-errorsf-15-a5b.cb1e79ec83f7fabe18b4.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{155:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"rightToc",(function(){return c})),n.d(t,"default",(function(){return p}));n(0);var r=n(173);function a(){return(a=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i={},c=[],l={rightToc:c},u="wrapper";function p(e){var t=e.components,n=o(e,["components"]);return Object(r.b)(u,a({},l,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("h1",{id:"common-errors"},"Common errors"),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Segmentation fault:")," Segmentation fault occurs when you access a Pointer that is pointing to an invalid memory address. One major reason for this can be that JS garbage collector would have garbage collected the addon generated value and you try accessing it after a while. This is mostly the case if you see seg fault happening randomly after some time of startup.")),Object(r.b)("li",{parentName:"ol"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Widget not visible in Flex layout")," Widget might have gotten zero height/width. This can occur if yoga was not able to get the default height/width of the widget. Make sure you have implemented",Object(r.b)("br",{parentName:"p"}),"\n",Object(r.b)("inlineCode",{parentName:"p"},"YGNodeSetMeasureFunc(this->instance->getFlexNode(), &extrautils::measureQtWidget);"),"\nif its a leaf node widget(doesnt contain any children)."))))}p.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));var r=n(0),a=n.n(r),o=a.a.createContext({}),i=function(e){var t=a.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},c=function(e){var t=i(e.components);return a.a.createElement(o.Provider,{value:t},e.children)};var l="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},p=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),s=r,f=p[c+"."+s]||p[s]||u[s]||o;return n?a.a.createElement(f,Object.assign({},{ref:t},l,{components:n})):a.a.createElement(f,Object.assign({},{ref:t},l))}));function s(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=p;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c[l]="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c={},i=[{value:"Debugging JS",id:"debugging-js",children:[]},{value:"Debugging C++",id:"debugging-c",children:[]}],u={rightToc:i},d="wrapper";function p(e){var n=e.components,t=o(e,["components"]);return Object(r.b)(d,a({},u,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("h1",{id:"debugging"},"debugging"),Object(r.b)("h2",{id:"debugging-js"},"Debugging JS"),Object(r.b)("p",null,"// TODO"),Object(r.b)("h2",{id:"debugging-c"},"Debugging C++"),Object(r.b)("p",null,Object(r.b)("a",a({parentName:"p"},{href:"https://medium.com/@atulanand94/debugging-nodejs-c-addons-using-vs-code-27e9940fc3ad"}),"https://medium.com/@atulanand94/debugging-nodejs-c-addons-using-vs-code-27e9940fc3ad")),Object(r.b)("p",null,Object(r.b)("a",a({parentName:"p"},{href:"https://medium.com/cameron-nokes/how-to-debug-native-node-addons-in-mac-osx-66f69f81afcb"}),"https://medium.com/cameron-nokes/how-to-debug-native-node-addons-in-mac-osx-66f69f81afcb")))}p.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{173:function(e,n,t){"use strict";t.d(n,"a",(function(){return i})),t.d(n,"b",(function(){return g}));var r=t(0),a=t.n(r),o=a.a.createContext({}),c=function(e){var n=a.a.useContext(o),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},i=function(e){var n=c(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var u="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},p=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,u=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===n.indexOf(r)&&(t[r]=e[r]);return t}(e,["components","mdxType","originalType","parentName"]),p=c(t),g=r,s=p[i+"."+g]||p[g]||d[g]||o;return t?a.a.createElement(s,Object.assign({},{ref:n},u,{components:t})):a.a.createElement(s,Object.assign({},{ref:n},u))}));function g(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,c=new Array(o);c[0]=p;var i={};for(var d in n)hasOwnProperty.call(n,d)&&(i[d]=n[d]);i.originalType=e,i[u]="string"==typeof e?e:r,c[1]=i;for(var g=2;g=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c={},i=[{value:"Debugging JS",id:"debugging-js",children:[]},{value:"Debugging C++",id:"debugging-c",children:[]}],u={rightToc:i},d="wrapper";function p(e){var n=e.components,t=o(e,["components"]);return Object(r.b)(d,a({},u,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("h1",{id:"debugging"},"debugging"),Object(r.b)("h2",{id:"debugging-js"},"Debugging JS"),Object(r.b)("p",null,"// TODO"),Object(r.b)("h2",{id:"debugging-c"},"Debugging C++"),Object(r.b)("p",null,Object(r.b)("a",a({parentName:"p"},{href:"https://medium.com/@atulanand94/debugging-nodejs-c-addons-using-vs-code-27e9940fc3ad"}),"https://medium.com/@atulanand94/debugging-nodejs-c-addons-using-vs-code-27e9940fc3ad")),Object(r.b)("p",null,Object(r.b)("a",a({parentName:"p"},{href:"https://medium.com/cameron-nokes/how-to-debug-native-node-addons-in-mac-osx-66f69f81afcb"}),"https://medium.com/cameron-nokes/how-to-debug-native-node-addons-in-mac-osx-66f69f81afcb")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-development-getting-started-139-387.9789bece43bb79d98058.js b/content---docs-development-getting-started-139-387.c6e8d2bbfc2d32220f5c.js similarity index 99% rename from content---docs-development-getting-started-139-387.9789bece43bb79d98058.js rename to content---docs-development-getting-started-139-387.c6e8d2bbfc2d32220f5c.js index b865ca949..e365c95d7 100644 --- a/content---docs-development-getting-started-139-387.9789bece43bb79d98058.js +++ b/content---docs-development-getting-started-139-387.c6e8d2bbfc2d32220f5c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return p}));var a=n(0),i=n.n(a),o=i.a.createContext({}),r=function(e){var t=i.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},l=function(e){var t=r(e.components);return i.a.createElement(o.Provider,{value:t},e.children)};var s="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},c=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),c=r(n),p=a,b=c[l+"."+p]||c[p]||d[p]||o;return n?i.a.createElement(b,Object.assign({},{ref:t},s,{components:n})):i.a.createElement(b,Object.assign({},{ref:t},s))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,r=new Array(o);r[0]=c;var l={};for(var d in t)hasOwnProperty.call(t,d)&&(l[d]=t[d]);l.originalType=e,l[s]="string"==typeof e?e:a,r[1]=l;for(var p=2;p=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var r={},l=[{value:"Getting started",id:"getting-started",children:[]},{value:"Code Structure",id:"code-structure",children:[]},{value:"Wrapping a widget",id:"wrapping-a-widget",children:[]},{value:"Learning Materials",id:"learning-materials",children:[]}],s={rightToc:l},d="wrapper";function c(e){var t=e.components,n=o(e,["components"]);return Object(a.b)(d,i({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h2",{id:"getting-started"},"Getting started"),Object(a.b)("p",null,"This library aims to be a nodejs addon which can export Qt Widgets to the Javascript world. By doing so one can develop fully fledged cross platform native GUI applications using only Javascript."),Object(a.b)("p",null,"The library depends on ",Object(a.b)("inlineCode",{parentName:"p"},"qode")," which is a lightly modified version of NodeJS. The slight modification was needed to make it work with this addon. In essense, we will do ",Object(a.b)("inlineCode",{parentName:"p"},"qode your_file.js")," instead of ",Object(a.b)("inlineCode",{parentName:"p"},"node your_file.js"),"."),Object(a.b)("p",null,"Qode is inspired by this post by ",Object(a.b)("a",i({parentName:"p"},{href:"https://github.com/zcbenz"}),"Cheng Zhao"),": ",Object(a.b)("a",i({parentName:"p"},{href:"https://electronjs.org/blog/electron-internals-node-integration"}),"https://electronjs.org/blog/electron-internals-node-integration")),Object(a.b)("p",null,"This library does not modify Qt in any way and only use it as it is. This library also dynamically links to Qt. So it needs Qt libs to be installed in your system to work (This is done to keep in compliance with open source LGPL license of Qt). We can think of exporting the required libs later."),Object(a.b)("h2",{id:"code-structure"},"Code Structure"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{}),".\n├── binding.gyp\n├── config\n├── demo.ts\n├── package.json\n├── src\n│   ├── cpp <-- C++ source code\n│   └── lib <-- Typescript source code\n├── tsconfig.json\n└── yarn.lock\n")),Object(a.b)("p",null,"The main folder is ",Object(a.b)("inlineCode",{parentName:"p"},"src"),". It contains"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"cpp")," : This folder contains all the C++ source code. Basically all the wrapper code using NAPI to export Qt Widgets and other helper functions to Javascript."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"lib")," : This folder contains all the Typescript code of the library. This is used to add additonal helper methods and types to exported addon.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Detailed version:")),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{}),".\n├── binding.gyp\n├── config\n│   ├── application.gypi\n│   ├── common.gypi\n│   └── yoga.gypi\n├── demo.ts\n├── package.json\n├── src\n│   ├── cpp\n│   │   ├── Extras\n│   │   ├── QtGui <------ All exported classes found inside Qts Gui dynamic library\n│   │   ├── QtWidgets <------ All exported classes found inside Qts Widgets dynamic library\n│   │   ├── core\n│   │   └── main.cpp\n│   └── lib\n│   ├── QtGui\n│   ├── QtWidgets\n│   └── core\n├── tsconfig.json\n└── yarn.lock\n\n")),Object(a.b)("p",null,"First step to seeing how everything works is to take a look at ",Object(a.b)("inlineCode",{parentName:"p"},"demo.ts")," file. This file is basically like a Kitchen application showcasing all the exported widgets currently with the library."),Object(a.b)("p",null,"Make sure you have read how to write native NodeJS Addons blog first. ",Object(a.b)("a",i({parentName:"p"},{href:"https://medium.com/@atulanand94/beginners-guide-to-writing-nodejs-addons-using-c-and-n-api-node-addon-api-9b3b718a9a7f"}),"https://medium.com/@atulanand94/beginners-guide-to-writing-nodejs-addons-using-c-and-n-api-node-addon-api-9b3b718a9a7f")),Object(a.b)("p",null,"Once you have done that check out ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/main.cpp")," and ",Object(a.b)("inlineCode",{parentName:"p"},"config/application.gypi")," to see the list of exported C++ classes."),Object(a.b)("p",null,"Then maybe you can take a look at ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/QtWidgets/QLabel/qlabel_wrap.h"),". This will show you how to wrap a simple Qt Widget.\nCheck the corresponding JS file for the addon here ",Object(a.b)("inlineCode",{parentName:"p"},"src/lib/QtWidgets/QLabel/index.ts"),"."),Object(a.b)("h2",{id:"wrapping-a-widget"},"Wrapping a widget"),Object(a.b)("p",null,"Create wrappers for each and every Qt class that you will use with N-API (using node-addon-api since it is c++) and export it onto JS side."),Object(a.b)("p",null,"Taking the example of QLabel, if you look inside the directory ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/QtWidgets/QLabel"),", you should see:"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{}),"├── QLabel\n│   ├── nlabel.cpp\n│   ├── nlabel.h <---- Extended QLabel\n│   ├── nlabel_moc.cpp <--- Autogenerated file by qt moc.\n│   ├── qlabel_wrap.cpp\n│   └── qlabel_wrap.h <--- Wrapper file\n")),Object(a.b)("p",null,"The idea is :"),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"We will first extend QLabel class to form NLabel. NLabel is basically QLabel with some extra methods and variables. More on it below."),Object(a.b)("li",{parentName:"ol"},"Then we will use NLabel and wrap it using NAPI and export it to JS side. This is what qlabel_wrap does.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"NLabel"),": Since NLabel has inherited from QLabel we can treat is as QLabel with extra methods and properties. Primary reason to extend QLabel to create NLabel is to add support for Event listeners and CSS styling using Flex.\nSo if you take a look at NLabel you will see, it inherits from QLabel and NodeWidget. NodeWidget inturn inherits from YogaWidget and EventWidget. Event widget adds event handling support. YogaWidget is a class that contains the magic that enables a regular Qt Widget to have Yoga node. A Yoga node is an instance used by yoga library to calculate a widgets position on the screen. Yoga is a library that will layout the widget on the screen. To do so we will specify the flex properties like alignitems, justify content, margin, paddings etc on the Yoga node of the widget. Apart from adding yoga node, YogaWidget adds support for specifying those yoga properties via Qt's stylesheet. (This is done by using Q_PROPERTY). To make this work we need to use something called as Q_OBJECT inside the class which is a C++ macro. Q_OBJECT will be expanded to relevant code by the compiler. In Qt whenever we add Q_OBJECT to a header file, we need to use a pre compiler called Qt MOC (Meta Object Compiler). The way we use it is"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{}),"moc headername.h -o headername_moc.cpp --include // example : ../../core/YogaWidget/yogawidget.h\n")),Object(a.b)("p",null,"So for nlabel I would run it as:"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{}),"moc nlabel.h -o nlabel_moc.cpp --include ../../core/YogaWidget/yogawidget.h\n")),Object(a.b)("p",null,"This will run moc on ",Object(a.b)("inlineCode",{parentName:"p"},"headername.h")," and generate ",Object(a.b)("inlineCode",{parentName:"p"},"headername_moc.cpp"),". We will include ",Object(a.b)("inlineCode",{parentName:"p"},"headername_moc.cpp")," in ",Object(a.b)("inlineCode",{parentName:"p"},"config/moc.gypi"),". If you dont do this. Then it will give a symbol not found error."),Object(a.b)("p",null,"I hope QLabel's example is enough for now. For more examples and inspirations we can take a look at other wrapped widgets."),Object(a.b)("h2",{id:"learning-materials"},"Learning Materials"),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Beginners guide to NodeJS Addon - ",Object(a.b)("a",i({parentName:"li"},{href:"https://medium.com/@atulanand94/beginners-guide-to-writing-nodejs-addons-using-c-and-n-api-node-addon-api-9b3b718a9a7f"}),"https://medium.com/@atulanand94/beginners-guide-to-writing-nodejs-addons-using-c-and-n-api-node-addon-api-9b3b718a9a7f")),Object(a.b)("li",{parentName:"ol"},"First read this: N-API in nodejs docs"),Object(a.b)("li",{parentName:"ol"},Object(a.b)("a",i({parentName:"li"},{href:"https://www.youtube.com/watch?v=-Oniup60Afs&feature=youtu.be"}),"https://www.youtube.com/watch?v=-Oniup60Afs&feature=youtu.be")),Object(a.b)("li",{parentName:"ol"},"See samples at ",Object(a.b)("a",i({parentName:"li"},{href:"https://github.com/nodejs/abi-stable-node-addon-examples/"}),"https://github.com/nodejs/abi-stable-node-addon-examples/"),"\n4.1. You can see the readme of ",Object(a.b)("a",i({parentName:"li"},{href:"https://github.com/nodejs/node-addon-api.git/"}),"https://github.com/nodejs/node-addon-api.git/")),Object(a.b)("li",{parentName:"ol"},"See node-qt implementation. It is implemented in Nan (explained in video)."),Object(a.b)("li",{parentName:"ol"},"Now try to match the implementation in node-qt and convert to N-API using examples from samples."),Object(a.b)("li",{parentName:"ol"},"Implementations not in node-qt need to be done with effort.")))}c.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return p}));var a=n(0),i=n.n(a),o=i.a.createContext({}),r=function(e){var t=i.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},l=function(e){var t=r(e.components);return i.a.createElement(o.Provider,{value:t},e.children)};var s="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},c=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),c=r(n),p=a,b=c[l+"."+p]||c[p]||d[p]||o;return n?i.a.createElement(b,Object.assign({},{ref:t},s,{components:n})):i.a.createElement(b,Object.assign({},{ref:t},s))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,r=new Array(o);r[0]=c;var l={};for(var d in t)hasOwnProperty.call(t,d)&&(l[d]=t[d]);l.originalType=e,l[s]="string"==typeof e?e:a,r[1]=l;for(var p=2;p=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var r={},l=[{value:"Getting started",id:"getting-started",children:[]},{value:"Code Structure",id:"code-structure",children:[]},{value:"Wrapping a widget",id:"wrapping-a-widget",children:[]},{value:"Learning Materials",id:"learning-materials",children:[]}],s={rightToc:l},d="wrapper";function c(e){var t=e.components,n=o(e,["components"]);return Object(a.b)(d,i({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h2",{id:"getting-started"},"Getting started"),Object(a.b)("p",null,"This library aims to be a nodejs addon which can export Qt Widgets to the Javascript world. By doing so one can develop fully fledged cross platform native GUI applications using only Javascript."),Object(a.b)("p",null,"The library depends on ",Object(a.b)("inlineCode",{parentName:"p"},"qode")," which is a lightly modified version of NodeJS. The slight modification was needed to make it work with this addon. In essense, we will do ",Object(a.b)("inlineCode",{parentName:"p"},"qode your_file.js")," instead of ",Object(a.b)("inlineCode",{parentName:"p"},"node your_file.js"),"."),Object(a.b)("p",null,"Qode is inspired by this post by ",Object(a.b)("a",i({parentName:"p"},{href:"https://github.com/zcbenz"}),"Cheng Zhao"),": ",Object(a.b)("a",i({parentName:"p"},{href:"https://electronjs.org/blog/electron-internals-node-integration"}),"https://electronjs.org/blog/electron-internals-node-integration")),Object(a.b)("p",null,"This library does not modify Qt in any way and only use it as it is. This library also dynamically links to Qt. So it needs Qt libs to be installed in your system to work (This is done to keep in compliance with open source LGPL license of Qt). We can think of exporting the required libs later."),Object(a.b)("h2",{id:"code-structure"},"Code Structure"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{}),".\n├── binding.gyp\n├── config\n├── demo.ts\n├── package.json\n├── src\n│   ├── cpp <-- C++ source code\n│   └── lib <-- Typescript source code\n├── tsconfig.json\n└── yarn.lock\n")),Object(a.b)("p",null,"The main folder is ",Object(a.b)("inlineCode",{parentName:"p"},"src"),". It contains"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"cpp")," : This folder contains all the C++ source code. Basically all the wrapper code using NAPI to export Qt Widgets and other helper functions to Javascript."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"lib")," : This folder contains all the Typescript code of the library. This is used to add additonal helper methods and types to exported addon.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Detailed version:")),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{}),".\n├── binding.gyp\n├── config\n│   ├── application.gypi\n│   ├── common.gypi\n│   └── yoga.gypi\n├── demo.ts\n├── package.json\n├── src\n│   ├── cpp\n│   │   ├── Extras\n│   │   ├── QtGui <------ All exported classes found inside Qts Gui dynamic library\n│   │   ├── QtWidgets <------ All exported classes found inside Qts Widgets dynamic library\n│   │   ├── core\n│   │   └── main.cpp\n│   └── lib\n│   ├── QtGui\n│   ├── QtWidgets\n│   └── core\n├── tsconfig.json\n└── yarn.lock\n\n")),Object(a.b)("p",null,"First step to seeing how everything works is to take a look at ",Object(a.b)("inlineCode",{parentName:"p"},"demo.ts")," file. This file is basically like a Kitchen application showcasing all the exported widgets currently with the library."),Object(a.b)("p",null,"Make sure you have read how to write native NodeJS Addons blog first. ",Object(a.b)("a",i({parentName:"p"},{href:"https://medium.com/@atulanand94/beginners-guide-to-writing-nodejs-addons-using-c-and-n-api-node-addon-api-9b3b718a9a7f"}),"https://medium.com/@atulanand94/beginners-guide-to-writing-nodejs-addons-using-c-and-n-api-node-addon-api-9b3b718a9a7f")),Object(a.b)("p",null,"Once you have done that check out ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/main.cpp")," and ",Object(a.b)("inlineCode",{parentName:"p"},"config/application.gypi")," to see the list of exported C++ classes."),Object(a.b)("p",null,"Then maybe you can take a look at ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/QtWidgets/QLabel/qlabel_wrap.h"),". This will show you how to wrap a simple Qt Widget.\nCheck the corresponding JS file for the addon here ",Object(a.b)("inlineCode",{parentName:"p"},"src/lib/QtWidgets/QLabel/index.ts"),"."),Object(a.b)("h2",{id:"wrapping-a-widget"},"Wrapping a widget"),Object(a.b)("p",null,"Create wrappers for each and every Qt class that you will use with N-API (using node-addon-api since it is c++) and export it onto JS side."),Object(a.b)("p",null,"Taking the example of QLabel, if you look inside the directory ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/QtWidgets/QLabel"),", you should see:"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{}),"├── QLabel\n│   ├── nlabel.cpp\n│   ├── nlabel.h <---- Extended QLabel\n│   ├── nlabel_moc.cpp <--- Autogenerated file by qt moc.\n│   ├── qlabel_wrap.cpp\n│   └── qlabel_wrap.h <--- Wrapper file\n")),Object(a.b)("p",null,"The idea is :"),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"We will first extend QLabel class to form NLabel. NLabel is basically QLabel with some extra methods and variables. More on it below."),Object(a.b)("li",{parentName:"ol"},"Then we will use NLabel and wrap it using NAPI and export it to JS side. This is what qlabel_wrap does.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"NLabel"),": Since NLabel has inherited from QLabel we can treat is as QLabel with extra methods and properties. Primary reason to extend QLabel to create NLabel is to add support for Event listeners and CSS styling using Flex.\nSo if you take a look at NLabel you will see, it inherits from QLabel and NodeWidget. NodeWidget inturn inherits from YogaWidget and EventWidget. Event widget adds event handling support. YogaWidget is a class that contains the magic that enables a regular Qt Widget to have Yoga node. A Yoga node is an instance used by yoga library to calculate a widgets position on the screen. Yoga is a library that will layout the widget on the screen. To do so we will specify the flex properties like alignitems, justify content, margin, paddings etc on the Yoga node of the widget. Apart from adding yoga node, YogaWidget adds support for specifying those yoga properties via Qt's stylesheet. (This is done by using Q_PROPERTY). To make this work we need to use something called as Q_OBJECT inside the class which is a C++ macro. Q_OBJECT will be expanded to relevant code by the compiler. In Qt whenever we add Q_OBJECT to a header file, we need to use a pre compiler called Qt MOC (Meta Object Compiler). The way we use it is"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{}),"moc headername.h -o headername_moc.cpp --include // example : ../../core/YogaWidget/yogawidget.h\n")),Object(a.b)("p",null,"So for nlabel I would run it as:"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{}),"moc nlabel.h -o nlabel_moc.cpp --include ../../core/YogaWidget/yogawidget.h\n")),Object(a.b)("p",null,"This will run moc on ",Object(a.b)("inlineCode",{parentName:"p"},"headername.h")," and generate ",Object(a.b)("inlineCode",{parentName:"p"},"headername_moc.cpp"),". We will include ",Object(a.b)("inlineCode",{parentName:"p"},"headername_moc.cpp")," in ",Object(a.b)("inlineCode",{parentName:"p"},"config/moc.gypi"),". If you dont do this. Then it will give a symbol not found error."),Object(a.b)("p",null,"I hope QLabel's example is enough for now. For more examples and inspirations we can take a look at other wrapped widgets."),Object(a.b)("h2",{id:"learning-materials"},"Learning Materials"),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Beginners guide to NodeJS Addon - ",Object(a.b)("a",i({parentName:"li"},{href:"https://medium.com/@atulanand94/beginners-guide-to-writing-nodejs-addons-using-c-and-n-api-node-addon-api-9b3b718a9a7f"}),"https://medium.com/@atulanand94/beginners-guide-to-writing-nodejs-addons-using-c-and-n-api-node-addon-api-9b3b718a9a7f")),Object(a.b)("li",{parentName:"ol"},"First read this: N-API in nodejs docs"),Object(a.b)("li",{parentName:"ol"},Object(a.b)("a",i({parentName:"li"},{href:"https://www.youtube.com/watch?v=-Oniup60Afs&feature=youtu.be"}),"https://www.youtube.com/watch?v=-Oniup60Afs&feature=youtu.be")),Object(a.b)("li",{parentName:"ol"},"See samples at ",Object(a.b)("a",i({parentName:"li"},{href:"https://github.com/nodejs/abi-stable-node-addon-examples/"}),"https://github.com/nodejs/abi-stable-node-addon-examples/"),"\n4.1. You can see the readme of ",Object(a.b)("a",i({parentName:"li"},{href:"https://github.com/nodejs/node-addon-api.git/"}),"https://github.com/nodejs/node-addon-api.git/")),Object(a.b)("li",{parentName:"ol"},"See node-qt implementation. It is implemented in Nan (explained in video)."),Object(a.b)("li",{parentName:"ol"},"Now try to match the implementation in node-qt and convert to N-API using examples from samples."),Object(a.b)("li",{parentName:"ol"},"Implementations not in node-qt need to be done with effort.")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-development-readme-149-437.88d3682f8536e933a815.js b/content---docs-development-readme-149-437.88d3682f8536e933a815.js deleted file mode 100644 index 1983fcfe5..000000000 --- a/content---docs-development-readme-149-437.88d3682f8536e933a815.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return b}));var r=n(0),a=n.n(r),o=a.a.createContext({}),i=function(e){var t=a.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},p=function(e){var t=i(e.components);return a.a.createElement(o.Provider,{value:t},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},u=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["components","mdxType","originalType","parentName"]),u=i(n),b=r,s=u[p+"."+b]||u[b]||c[b]||o;return n?a.a.createElement(s,Object.assign({},{ref:t},l,{components:n})):a.a.createElement(s,Object.assign({},{ref:t},l))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=u;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p[l]="string"==typeof e?e:r,i[1]=p;for(var b=2;b=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i={},p=[],l={rightToc:p},c="wrapper";function u(e){var t=e.components,n=o(e,["components"]);return Object(r.b)(c,a({},l,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("h1",{id:"contributors-guide"},"Contributor's guide"),Object(r.b)("p",null,"This guide is for everyone who want's to contribute to the development of NodeGui."),Object(r.b)("p",null,"Please make sure you have read the ",Object(r.b)("a",a({parentName:"p"},{href:"/"}),"User's guides")," before reading this guide."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/setting-up"}),"Setting up the NodeGui Contributor's Environment"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/setting-up#macosx"}),"Setting up macOS")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/setting-up#windows"}),"Setting up Windows")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/setting-up#linux"}),"Setting up Linux")))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/getting-started"}),"Getting started"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/getting-started#Code-Structure"}),"Code Structure")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/getting-started#Wrapping-a-widget"}),"Wrapping a widget: TLDR version")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/getting-started#Learning-Materials"}),"Learning Materials")))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/styling"}),"Styling"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/styling#painting"}),"Painting")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/styling#layout"}),"Layout")))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/signal_and_event_handling"}),"Signal and Event Handling")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/debugging"}),"Debugging")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/common_errors"}),"Common Errors")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/wrapping_widgets"}),"Wrapping a Widget: Detailed"))),Object(r.b)("h1",{id:"where-to-start-or-how-can-you-help"},"Where to start or How can you help?"),Object(r.b)("p",null," You can follow the contributors guide above to get a gist."),Object(r.b)("p",null," It is fairly straightforward to get started. I would start with a project of my own and start adding missing functionalities."),Object(r.b)("p",null," Or simply put I would recommend you start by adding an unexported method to an existing widget."),Object(r.b)("p",null," ",Object(r.b)("strong",{parentName:"p"},"For example:")),Object(r.b)("p",null," You could add the corresponding Qt method to QProgressbar\n",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#textVisible-prop"}),"https://doc.qt.io/qt-5/qprogressbar.html#textVisible-prop")," to get a grip on it."),Object(r.b)("p",null," This PR can be used as a guide"),Object(r.b)("p",null," ",Object(r.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/nodegui/issues/36"}),"https://github.com/nodegui/nodegui/issues/36")),Object(r.b)("p",null," ",Object(r.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/nodegui/pull/39"}),"https://github.com/nodegui/nodegui/pull/39")),Object(r.b)("p",null," You can also take a look at few bugs or the issue board here to know what you can pick up if you are out of ideas."),Object(r.b)("p",null," ",Object(r.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/nodegui/projects/"}),"https://github.com/nodegui/nodegui/projects/")),Object(r.b)("p",null," ",Object(r.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/react-nodegui/projects/"}),"https://github.com/nodegui/react-nodegui/projects/")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-development-readme-149-437.ae3386a3246a5a4e2dbb.js b/content---docs-development-readme-149-437.ae3386a3246a5a4e2dbb.js new file mode 100644 index 000000000..8a6676d5b --- /dev/null +++ b/content---docs-development-readme-149-437.ae3386a3246a5a4e2dbb.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{159:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"rightToc",(function(){return p})),n.d(t,"default",(function(){return u}));n(0);var r=n(173);function a(){return(a=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i={},p=[],l={rightToc:p},c="wrapper";function u(e){var t=e.components,n=o(e,["components"]);return Object(r.b)(c,a({},l,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("h1",{id:"contributors-guide"},"Contributor's guide"),Object(r.b)("p",null,"This guide is for everyone who want's to contribute to the development of NodeGui."),Object(r.b)("p",null,"Please make sure you have read the ",Object(r.b)("a",a({parentName:"p"},{href:"/"}),"User's guides")," before reading this guide."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/setting-up"}),"Setting up the NodeGui Contributor's Environment"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/setting-up#macosx"}),"Setting up macOS")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/setting-up#windows"}),"Setting up Windows")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/setting-up#linux"}),"Setting up Linux")))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/getting-started"}),"Getting started"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/getting-started#Code-Structure"}),"Code Structure")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/getting-started#Wrapping-a-widget"}),"Wrapping a widget: TLDR version")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/getting-started#Learning-Materials"}),"Learning Materials")))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/styling"}),"Styling"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/styling#painting"}),"Painting")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/styling#layout"}),"Layout")))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/signal_and_event_handling"}),"Signal and Event Handling")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/debugging"}),"Debugging")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/common_errors"}),"Common Errors")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",a({parentName:"li"},{href:"/docs/development/wrapping_widgets"}),"Wrapping a Widget: Detailed"))),Object(r.b)("h1",{id:"where-to-start-or-how-can-you-help"},"Where to start or How can you help?"),Object(r.b)("p",null," You can follow the contributors guide above to get a gist."),Object(r.b)("p",null," It is fairly straightforward to get started. I would start with a project of my own and start adding missing functionalities."),Object(r.b)("p",null," Or simply put I would recommend you start by adding an unexported method to an existing widget."),Object(r.b)("p",null," ",Object(r.b)("strong",{parentName:"p"},"For example:")),Object(r.b)("p",null," You could add the corresponding Qt method to QProgressbar\n",Object(r.b)("a",a({parentName:"p"},{href:"https://doc.qt.io/qt-5/qprogressbar.html#textVisible-prop"}),"https://doc.qt.io/qt-5/qprogressbar.html#textVisible-prop")," to get a grip on it."),Object(r.b)("p",null," This PR can be used as a guide"),Object(r.b)("p",null," ",Object(r.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/nodegui/issues/36"}),"https://github.com/nodegui/nodegui/issues/36")),Object(r.b)("p",null," ",Object(r.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/nodegui/pull/39"}),"https://github.com/nodegui/nodegui/pull/39")),Object(r.b)("p",null," You can also take a look at few bugs or the issue board here to know what you can pick up if you are out of ideas."),Object(r.b)("p",null," ",Object(r.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/nodegui/projects/"}),"https://github.com/nodegui/nodegui/projects/")),Object(r.b)("p",null," ",Object(r.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/react-nodegui/projects/"}),"https://github.com/nodegui/react-nodegui/projects/")))}u.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return b}));var r=n(0),a=n.n(r),o=a.a.createContext({}),i=function(e){var t=a.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},p=function(e){var t=i(e.components);return a.a.createElement(o.Provider,{value:t},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},u=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["components","mdxType","originalType","parentName"]),u=i(n),b=r,s=u[p+"."+b]||u[b]||c[b]||o;return n?a.a.createElement(s,Object.assign({},{ref:t},l,{components:n})):a.a.createElement(s,Object.assign({},{ref:t},l))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=u;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p[l]="string"==typeof e?e:r,i[1]=p;for(var b=2;b=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={},l=[{value:"Development setup and getting started",id:"development-setup-and-getting-started",children:[{value:"MacOSX:",id:"macosx",children:[]},{value:"Windows:",id:"windows",children:[]},{value:"Linux:",id:"linux",children:[]},{value:"Common:",id:"common",children:[]}]}],c={rightToc:l},p="wrapper";function b(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(p,o({},c,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h1",{id:"setup-project-for-development"},"Setup project for development"),Object(a.b)("h2",{id:"development-setup-and-getting-started"},"Development setup and getting started"),Object(a.b)("p",null,"Make sure you follow the setup guide of ",Object(a.b)("a",o({parentName:"p"},{href:"https://github.com/nodegui/qode"}),"Qode")," so that you have a build environment ready for Qode."),Object(a.b)("h3",{id:"macosx"},"MacOSX:"),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Requirements")),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Node version: > 11"),Object(a.b)("li",{parentName:"ol"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(a.b)("a",o({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(a.b)("li",{parentName:"ol"},"Make, GCC v7"),Object(a.b)("li",{parentName:"ol"},"Qt (",Object(a.b)("em",{parentName:"li"},"Optional"),"): Make sure you followed the setup instructions from ",Object(a.b)("a",o({parentName:"li"},{href:"https://github.com/nodegui/qode"}),"Qode"))),Object(a.b)("h3",{id:"windows"},"Windows:"),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Requirements")),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Node version: > 11"),Object(a.b)("li",{parentName:"ol"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(a.b)("a",o({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(a.b)("li",{parentName:"ol"},"Visual Studio Community 2017"),Object(a.b)("li",{parentName:"ol"},"Powershell"),Object(a.b)("li",{parentName:"ol"},"Qt (",Object(a.b)("em",{parentName:"li"},"Optional"),"): Make sure you followed the setup instructions from ",Object(a.b)("a",o({parentName:"li"},{href:"https://github.com/nodegui/qode"}),"Qode"))),Object(a.b)("h3",{id:"linux"},"Linux:"),Object(a.b)("p",null,"Supported versions: Ubuntu 17.10 and up"),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Requirements")),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Node version: > 11"),Object(a.b)("li",{parentName:"ol"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(a.b)("a",o({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(a.b)("li",{parentName:"ol"},"Make, GCC v7, pkg-config"),Object(a.b)("li",{parentName:"ol"},"Qt (",Object(a.b)("em",{parentName:"li"},"Optional"),"): Make sure you followed the setup instructions from ",Object(a.b)("a",o({parentName:"li"},{href:"https://github.com/nodegui/qode"}),"Qode"))),Object(a.b)("p",null,"On Ubuntu: ",Object(a.b)("inlineCode",{parentName:"p"},"$ sudo apt-get install pkg-config build-essentials")," should install everything except Qt5."),Object(a.b)("p",null,"Note: If you are using your own version of Qt make sure to"),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},'export PKG_CONFIG_PATH="/5.13.0/gcc_64/lib/pkgconfig"')),Object(a.b)("h3",{id:"common"},"Common:"),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Once you have setup the platform specific stuff as mentioned above, follow these:"),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"git clone")," this repo."),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"yarn install")),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"yarn build:addon")),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"yarn dev"))),Object(a.b)("p",null,"If you want to run with your own version of Qt make sure to pass qt_home_dir variable when building addon."),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"npm run rebuild:addon [--qt_home_dir=/path/to/qt]")))}b.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var a=n(0),o=n.n(a),r=o.a.createContext({}),i=function(e){var t=o.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},l=function(e){var t=i(e.components);return o.a.createElement(r.Provider,{value:t},e.children)};var c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,c=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),b=i(n),u=a,s=b[l+"."+u]||b[u]||p[u]||r;return n?o.a.createElement(s,Object.assign({},{ref:t},c,{components:n})):o.a.createElement(s,Object.assign({},{ref:t},c))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=b;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var u=2;u=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={},l=[{value:"Development setup and getting started",id:"development-setup-and-getting-started",children:[{value:"MacOSX:",id:"macosx",children:[]},{value:"Windows:",id:"windows",children:[]},{value:"Linux:",id:"linux",children:[]},{value:"Common:",id:"common",children:[]}]}],c={rightToc:l},p="wrapper";function b(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(p,o({},c,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h1",{id:"setup-project-for-development"},"Setup project for development"),Object(a.b)("h2",{id:"development-setup-and-getting-started"},"Development setup and getting started"),Object(a.b)("p",null,"Make sure you follow the setup guide of ",Object(a.b)("a",o({parentName:"p"},{href:"https://github.com/nodegui/qode"}),"Qode")," so that you have a build environment ready for Qode."),Object(a.b)("h3",{id:"macosx"},"MacOSX:"),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Requirements")),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Node version: > 11"),Object(a.b)("li",{parentName:"ol"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(a.b)("a",o({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(a.b)("li",{parentName:"ol"},"Make, GCC v7"),Object(a.b)("li",{parentName:"ol"},"Qt (",Object(a.b)("em",{parentName:"li"},"Optional"),"): Make sure you followed the setup instructions from ",Object(a.b)("a",o({parentName:"li"},{href:"https://github.com/nodegui/qode"}),"Qode"))),Object(a.b)("h3",{id:"windows"},"Windows:"),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Requirements")),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Node version: > 11"),Object(a.b)("li",{parentName:"ol"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(a.b)("a",o({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(a.b)("li",{parentName:"ol"},"Visual Studio Community 2017"),Object(a.b)("li",{parentName:"ol"},"Powershell"),Object(a.b)("li",{parentName:"ol"},"Qt (",Object(a.b)("em",{parentName:"li"},"Optional"),"): Make sure you followed the setup instructions from ",Object(a.b)("a",o({parentName:"li"},{href:"https://github.com/nodegui/qode"}),"Qode"))),Object(a.b)("h3",{id:"linux"},"Linux:"),Object(a.b)("p",null,"Supported versions: Ubuntu 17.10 and up"),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Requirements")),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Node version: > 11"),Object(a.b)("li",{parentName:"ol"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(a.b)("a",o({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(a.b)("li",{parentName:"ol"},"Make, GCC v7, pkg-config"),Object(a.b)("li",{parentName:"ol"},"Qt (",Object(a.b)("em",{parentName:"li"},"Optional"),"): Make sure you followed the setup instructions from ",Object(a.b)("a",o({parentName:"li"},{href:"https://github.com/nodegui/qode"}),"Qode"))),Object(a.b)("p",null,"On Ubuntu: ",Object(a.b)("inlineCode",{parentName:"p"},"$ sudo apt-get install pkg-config build-essentials")," should install everything except Qt5."),Object(a.b)("p",null,"Note: If you are using your own version of Qt make sure to"),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},'export PKG_CONFIG_PATH="/5.13.0/gcc_64/lib/pkgconfig"')),Object(a.b)("h3",{id:"common"},"Common:"),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Once you have setup the platform specific stuff as mentioned above, follow these:"),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"git clone")," this repo."),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"yarn install")),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"yarn build:addon")),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"yarn dev"))),Object(a.b)("p",null,"If you want to run with your own version of Qt make sure to pass qt_home_dir variable when building addon."),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"npm run rebuild:addon [--qt_home_dir=/path/to/qt]")))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-development-signal-and-event-handling-7-d-4-f3f.8f1478c9222a4363963f.js b/content---docs-development-signal-and-event-handling-7-d-4-f3f.49f8d18d02694764da59.js similarity index 99% rename from content---docs-development-signal-and-event-handling-7-d-4-f3f.8f1478c9222a4363963f.js rename to content---docs-development-signal-and-event-handling-7-d-4-f3f.49f8d18d02694764da59.js index d24a64cf9..9db86cb2c 100644 --- a/content---docs-development-signal-and-event-handling-7-d-4-f3f.8f1478c9222a4363963f.js +++ b/content---docs-development-signal-and-event-handling-7-d-4-f3f.49f8d18d02694764da59.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return p}));var i=n(0),o=n.n(i),a=o.a.createContext({}),s=function(e){var t=o.a.useContext(a),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=s(e.components);return o.a.createElement(a.Provider,{value:t},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(i.forwardRef)((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,r=e.parentName,l=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(n[i]=e[i]);return n}(e,["components","mdxType","originalType","parentName"]),d=s(n),p=i,u=d[r+"."+p]||d[p]||c[p]||a;return n?o.a.createElement(u,Object.assign({},{ref:t},l,{components:n})):o.a.createElement(u,Object.assign({},{ref:t},l))}));function p(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,s=new Array(a);s[0]=d;var r={};for(var c in t)hasOwnProperty.call(t,c)&&(r[c]=t[c]);r.originalType=e,r[l]="string"==typeof e?e:i,s[1]=r;for(var p=2;p=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s={},r=[],l={rightToc:r},c="wrapper";function d(e){var t=e.components,n=a(e,["components"]);return Object(i.b)(c,o({},l,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h1",{id:"event-handling"},"Event handling"),Object(i.b)("p",null,"In Qt you can respond to an external event like a key press via event handling. Events always are processed by the event loop. Alongside events Qt also has a concept of Signals/Slots. Signals and slots are used to primarily communicate between widgets (more precisely QObjects). So the most common way of interacting between Qt Widgets is done through signals/slots. (More details here: ",Object(i.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/signalsandslots.html"}),"https://doc.qt.io/qt-5/signalsandslots.html"),"). Hence we would be implementing support for both events and signals."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Technicals:")),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},'An event is a message encapsulated in a class (QEvent) which is processed in an event loop and dispatched to a recipient that can either accept the message or pass it along to others to process. They are usually created in response to external system events like mouse clicks.\nSignals and Slots are a convenient way for QObjects to communicate with one another and are more similar to callback functions. In most circumstances, when a "signal" is emitted, any slot function connected to it is called directly. The exception is when signals and slots cross thread boundaries. In this case, the signal will essentially be converted into an event.')),Object(i.b)("h1",{id:"implementing-signal-handling"},"Implementing Signal handling"),Object(i.b)("p",null,"In Qt signals and slots are used to communicate between different qt widgets. So they can be used to implement things like\nonClick, onHover etc."),Object(i.b)("p",null,"The way Qt Signals work is explained here:"),Object(i.b)("p",null,Object(i.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/signalsandslots.html"}),"https://doc.qt.io/qt-5/signalsandslots.html")),Object(i.b)("p",null,"The way you use them in Qt for a PushButton is explained here:\n",Object(i.b)("a",o({parentName:"p"},{href:"https://wiki.qt.io/How_to_Use_QPushButton#Signals"}),"https://wiki.qt.io/How_to_Use_QPushButton#Signals")),Object(i.b)("h1",{id:"adding-signalevent-handling-support-to-a-nodewidget"},"Adding signal/event handling support to a NodeWidget"),Object(i.b)("p",null,"We will take the example of PushButton"),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Javascript")),Object(i.b)("p",null,"Steps:"),Object(i.b)("p",null,"The widget should inherit from ",Object(i.b)("inlineCode",{parentName:"p"},"NodeWidget"),". NodeWidget inherits from EventWidget internally. EventWidget constructor needs native object while initialising. So arrange your code such that native object gets initialised before calling ",Object(i.b)("inlineCode",{parentName:"p"},"super(native)"),"."),Object(i.b)("p",null,"EventWidget adds ",Object(i.b)("inlineCode",{parentName:"p"},"addEventListener")," method to the widget which can be called\nlike this:"),Object(i.b)("pre",null,Object(i.b)("code",o({parentName:"pre"},{className:"language-js"}),'button.addEventListener("clicked", () => {\n console.log("clicked");\n});\n')),Object(i.b)("p",null,"To help the user know what all signals/events are supported, export an enum like ",Object(i.b)("inlineCode",{parentName:"p"},"QPushButtonEvents")," as shown below."),Object(i.b)("p",null,"So the user can then use it as below:"),Object(i.b)("pre",null,Object(i.b)("code",o({parentName:"pre"},{className:"language-js"}),'button.addEventListener(QPushButtonEvents.clicked, () => {\n console.log("clicked");\n});\n')),Object(i.b)("p",null,"Example:"),Object(i.b)("pre",null,Object(i.b)("code",o({parentName:"pre"},{className:"language-js"}),'import addon from "../../core/addon";\nimport { NodeWidget } from "../../QtGui/QWidget";\nimport { BaseWidgetEvents } from "../../core/EventWidget";\n\nexport const QPushButtonEvents = Object.freeze({\n ...BaseWidgetEvents,\n clicked: "clicked",\n pressed: "pressed",\n released: "released",\n toggled: "toggled"\n});\n\nexport class QPushButton extends NodeWidget {\n native: NativeElement;\n constructor(parent?: NodeWidget) {\n let native;\n if (parent) {\n native = new addon.QPushButton(parent.native);\n } else {\n native = new addon.QPushButton();\n }\n super(native);\n this.parent = parent;\n this.native = native;\n // bind member functions\n this.setText.bind(this);\n }\n\n setText(text: string | number) {\n this.native.setText(`${text}`);\n }\n}\n')),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"C++")),Object(i.b)("p",null,"Steps:"),Object(i.b)("ol",null,Object(i.b)("li",{parentName:"ol"},Object(i.b)("inlineCode",{parentName:"li"},"NPushButton"))),Object(i.b)("p",null,"Inherit from both QPushButton and NodeWidget. Make sure you have added NODEWIDGET_IMPLEMENTATIONS macro. This adds a crucial method for events support. It will override ",Object(i.b)("inlineCode",{parentName:"p"},"event(QEvent *)")," method of QPushbutton so that nodejs can listen to the events of this widget. This makes sure we convert all the QEvent's of this widget to an event for the nodejs event emitter."),Object(i.b)("p",null,"Also make sure to connect all the signals of the widgets to the event emitter instance from NodeJS. This way we kindof convert the signal to a simple nodejs event."),Object(i.b)("pre",null,Object(i.b)("code",o({parentName:"pre"},{className:"language-cpp"}),'#pragma once\n\n#include \n#include "src/cpp/core/NodeWidget/nodewidget.h"\n#include "napi.h"\n\nclass NPushButton: public QPushButton, public NodeWidget\n{\n NODEWIDGET_IMPLEMENTATIONS(QPushButton)\npublic:\n using QPushButton::QPushButton; //inherit all constructors of QPushButton\n\n // override this method and implement all signals here\n void connectWidgetSignalsToEventEmitter() {\n // Qt Connects: Implement all signal connects here\n QObject::connect(this, &QPushButton::clicked, [=](bool checked) {\n Napi::Env env = this->emitOnNode.Env();\n Napi::HandleScope scope(env);\n this->emitOnNode.Call({ Napi::String::New(env, "clicked"), Napi::Value::From(env, checked) });\n });\n QObject::connect(this, &QPushButton::released, [=]() {\n Napi::Env env = this->emitOnNode.Env();\n Napi::HandleScope scope(env);\n this->emitOnNode.Call({ Napi::String::New(env, "released") });\n });\n QObject::connect(this, &QPushButton::pressed, [=]() {\n Napi::Env env = this->emitOnNode.Env();\n Napi::HandleScope scope(env);\n this->emitOnNode.Call({ Napi::String::New(env, "pressed") });\n });\n QObject::connect(this, &QPushButton::toggled, [=](bool checked) {\n Napi::Env env = this->emitOnNode.Env();\n Napi::HandleScope scope(env);\n this->emitOnNode.Call({ Napi::String::New(env, "toggled"), Napi::Value::From(env, checked) });\n });\n }\n};\n\n')),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Additional")),Object(i.b)("p",null,"Make sure ",Object(i.b)("inlineCode",{parentName:"p"},"npushbutton.h")," is added to ",Object(i.b)("inlineCode",{parentName:"p"},"config/moc.json"),".\nAnd run ",Object(i.b)("inlineCode",{parentName:"p"},"npm run automoc")," before running ",Object(i.b)("inlineCode",{parentName:"p"},"npm run build:addon")),Object(i.b)("p",null,"We need to run Qt's MOC (Meta Object Compiler) on the file whenever we use Q_OBJECT in a class or use QObject::connect. This is so that Qt can expand the macros and add necessary implementations to our class."),Object(i.b)("h1",{id:"how-does-it-work-"},"How does it work ?"),Object(i.b)("ol",null,Object(i.b)("li",{parentName:"ol"},"On JS side for each widget instance we create an instance of NodeJS's Event Emitter. This is done by the class ",Object(i.b)("inlineCode",{parentName:"li"},"EventWidget")," from which ",Object(i.b)("inlineCode",{parentName:"li"},"NodeWidget")," inherits"),Object(i.b)("li",{parentName:"ol"},"We send this event emiiter's ",Object(i.b)("inlineCode",{parentName:"li"},"emit")," function to the C++ side by calling ",Object(i.b)("inlineCode",{parentName:"li"},"initNodeEventEmitter")," method and store a pointer to the event emitter's emit function using ",Object(i.b)("inlineCode",{parentName:"li"},"emitOnNode"),". initNodeEventEmitter function is added by a macro from EventWidget (c++). You can find the initNodeEventEmitter method with the event widget macros."),Object(i.b)("li",{parentName:"ol"},"We setup Qt's connect method for all the signals that we want to listen to and call the emitOnNode (which is actually emit from Event emitter) whenever a signal arrives. This is done manually on every widget by overriding the method ",Object(i.b)("inlineCode",{parentName:"li"},"connectWidgetSignalsToEventEmitter"),". Check ",Object(i.b)("inlineCode",{parentName:"li"},"npushbutton.h")," for details. This takes care of all the signals of the widgets. Now to export all qt events of the widget, we had overriden the widgets ",Object(i.b)("inlineCode",{parentName:"li"},"event(Event*)")," method to listen to events received by the widget and send it to the event emitter. This is done inside the EVENTWIDGET_IMPLEMENTATIONS macro")))}d.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return p}));var i=n(0),o=n.n(i),a=o.a.createContext({}),s=function(e){var t=o.a.useContext(a),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=s(e.components);return o.a.createElement(a.Provider,{value:t},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(i.forwardRef)((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,r=e.parentName,l=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(n[i]=e[i]);return n}(e,["components","mdxType","originalType","parentName"]),d=s(n),p=i,u=d[r+"."+p]||d[p]||c[p]||a;return n?o.a.createElement(u,Object.assign({},{ref:t},l,{components:n})):o.a.createElement(u,Object.assign({},{ref:t},l))}));function p(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,s=new Array(a);s[0]=d;var r={};for(var c in t)hasOwnProperty.call(t,c)&&(r[c]=t[c]);r.originalType=e,r[l]="string"==typeof e?e:i,s[1]=r;for(var p=2;p=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s={},r=[],l={rightToc:r},c="wrapper";function d(e){var t=e.components,n=a(e,["components"]);return Object(i.b)(c,o({},l,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h1",{id:"event-handling"},"Event handling"),Object(i.b)("p",null,"In Qt you can respond to an external event like a key press via event handling. Events always are processed by the event loop. Alongside events Qt also has a concept of Signals/Slots. Signals and slots are used to primarily communicate between widgets (more precisely QObjects). So the most common way of interacting between Qt Widgets is done through signals/slots. (More details here: ",Object(i.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/signalsandslots.html"}),"https://doc.qt.io/qt-5/signalsandslots.html"),"). Hence we would be implementing support for both events and signals."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Technicals:")),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},'An event is a message encapsulated in a class (QEvent) which is processed in an event loop and dispatched to a recipient that can either accept the message or pass it along to others to process. They are usually created in response to external system events like mouse clicks.\nSignals and Slots are a convenient way for QObjects to communicate with one another and are more similar to callback functions. In most circumstances, when a "signal" is emitted, any slot function connected to it is called directly. The exception is when signals and slots cross thread boundaries. In this case, the signal will essentially be converted into an event.')),Object(i.b)("h1",{id:"implementing-signal-handling"},"Implementing Signal handling"),Object(i.b)("p",null,"In Qt signals and slots are used to communicate between different qt widgets. So they can be used to implement things like\nonClick, onHover etc."),Object(i.b)("p",null,"The way Qt Signals work is explained here:"),Object(i.b)("p",null,Object(i.b)("a",o({parentName:"p"},{href:"https://doc.qt.io/qt-5/signalsandslots.html"}),"https://doc.qt.io/qt-5/signalsandslots.html")),Object(i.b)("p",null,"The way you use them in Qt for a PushButton is explained here:\n",Object(i.b)("a",o({parentName:"p"},{href:"https://wiki.qt.io/How_to_Use_QPushButton#Signals"}),"https://wiki.qt.io/How_to_Use_QPushButton#Signals")),Object(i.b)("h1",{id:"adding-signalevent-handling-support-to-a-nodewidget"},"Adding signal/event handling support to a NodeWidget"),Object(i.b)("p",null,"We will take the example of PushButton"),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Javascript")),Object(i.b)("p",null,"Steps:"),Object(i.b)("p",null,"The widget should inherit from ",Object(i.b)("inlineCode",{parentName:"p"},"NodeWidget"),". NodeWidget inherits from EventWidget internally. EventWidget constructor needs native object while initialising. So arrange your code such that native object gets initialised before calling ",Object(i.b)("inlineCode",{parentName:"p"},"super(native)"),"."),Object(i.b)("p",null,"EventWidget adds ",Object(i.b)("inlineCode",{parentName:"p"},"addEventListener")," method to the widget which can be called\nlike this:"),Object(i.b)("pre",null,Object(i.b)("code",o({parentName:"pre"},{className:"language-js"}),'button.addEventListener("clicked", () => {\n console.log("clicked");\n});\n')),Object(i.b)("p",null,"To help the user know what all signals/events are supported, export an enum like ",Object(i.b)("inlineCode",{parentName:"p"},"QPushButtonEvents")," as shown below."),Object(i.b)("p",null,"So the user can then use it as below:"),Object(i.b)("pre",null,Object(i.b)("code",o({parentName:"pre"},{className:"language-js"}),'button.addEventListener(QPushButtonEvents.clicked, () => {\n console.log("clicked");\n});\n')),Object(i.b)("p",null,"Example:"),Object(i.b)("pre",null,Object(i.b)("code",o({parentName:"pre"},{className:"language-js"}),'import addon from "../../core/addon";\nimport { NodeWidget } from "../../QtGui/QWidget";\nimport { BaseWidgetEvents } from "../../core/EventWidget";\n\nexport const QPushButtonEvents = Object.freeze({\n ...BaseWidgetEvents,\n clicked: "clicked",\n pressed: "pressed",\n released: "released",\n toggled: "toggled"\n});\n\nexport class QPushButton extends NodeWidget {\n native: NativeElement;\n constructor(parent?: NodeWidget) {\n let native;\n if (parent) {\n native = new addon.QPushButton(parent.native);\n } else {\n native = new addon.QPushButton();\n }\n super(native);\n this.parent = parent;\n this.native = native;\n // bind member functions\n this.setText.bind(this);\n }\n\n setText(text: string | number) {\n this.native.setText(`${text}`);\n }\n}\n')),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"C++")),Object(i.b)("p",null,"Steps:"),Object(i.b)("ol",null,Object(i.b)("li",{parentName:"ol"},Object(i.b)("inlineCode",{parentName:"li"},"NPushButton"))),Object(i.b)("p",null,"Inherit from both QPushButton and NodeWidget. Make sure you have added NODEWIDGET_IMPLEMENTATIONS macro. This adds a crucial method for events support. It will override ",Object(i.b)("inlineCode",{parentName:"p"},"event(QEvent *)")," method of QPushbutton so that nodejs can listen to the events of this widget. This makes sure we convert all the QEvent's of this widget to an event for the nodejs event emitter."),Object(i.b)("p",null,"Also make sure to connect all the signals of the widgets to the event emitter instance from NodeJS. This way we kindof convert the signal to a simple nodejs event."),Object(i.b)("pre",null,Object(i.b)("code",o({parentName:"pre"},{className:"language-cpp"}),'#pragma once\n\n#include \n#include "src/cpp/core/NodeWidget/nodewidget.h"\n#include "napi.h"\n\nclass NPushButton: public QPushButton, public NodeWidget\n{\n NODEWIDGET_IMPLEMENTATIONS(QPushButton)\npublic:\n using QPushButton::QPushButton; //inherit all constructors of QPushButton\n\n // override this method and implement all signals here\n void connectWidgetSignalsToEventEmitter() {\n // Qt Connects: Implement all signal connects here\n QObject::connect(this, &QPushButton::clicked, [=](bool checked) {\n Napi::Env env = this->emitOnNode.Env();\n Napi::HandleScope scope(env);\n this->emitOnNode.Call({ Napi::String::New(env, "clicked"), Napi::Value::From(env, checked) });\n });\n QObject::connect(this, &QPushButton::released, [=]() {\n Napi::Env env = this->emitOnNode.Env();\n Napi::HandleScope scope(env);\n this->emitOnNode.Call({ Napi::String::New(env, "released") });\n });\n QObject::connect(this, &QPushButton::pressed, [=]() {\n Napi::Env env = this->emitOnNode.Env();\n Napi::HandleScope scope(env);\n this->emitOnNode.Call({ Napi::String::New(env, "pressed") });\n });\n QObject::connect(this, &QPushButton::toggled, [=](bool checked) {\n Napi::Env env = this->emitOnNode.Env();\n Napi::HandleScope scope(env);\n this->emitOnNode.Call({ Napi::String::New(env, "toggled"), Napi::Value::From(env, checked) });\n });\n }\n};\n\n')),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Additional")),Object(i.b)("p",null,"Make sure ",Object(i.b)("inlineCode",{parentName:"p"},"npushbutton.h")," is added to ",Object(i.b)("inlineCode",{parentName:"p"},"config/moc.json"),".\nAnd run ",Object(i.b)("inlineCode",{parentName:"p"},"npm run automoc")," before running ",Object(i.b)("inlineCode",{parentName:"p"},"npm run build:addon")),Object(i.b)("p",null,"We need to run Qt's MOC (Meta Object Compiler) on the file whenever we use Q_OBJECT in a class or use QObject::connect. This is so that Qt can expand the macros and add necessary implementations to our class."),Object(i.b)("h1",{id:"how-does-it-work-"},"How does it work ?"),Object(i.b)("ol",null,Object(i.b)("li",{parentName:"ol"},"On JS side for each widget instance we create an instance of NodeJS's Event Emitter. This is done by the class ",Object(i.b)("inlineCode",{parentName:"li"},"EventWidget")," from which ",Object(i.b)("inlineCode",{parentName:"li"},"NodeWidget")," inherits"),Object(i.b)("li",{parentName:"ol"},"We send this event emiiter's ",Object(i.b)("inlineCode",{parentName:"li"},"emit")," function to the C++ side by calling ",Object(i.b)("inlineCode",{parentName:"li"},"initNodeEventEmitter")," method and store a pointer to the event emitter's emit function using ",Object(i.b)("inlineCode",{parentName:"li"},"emitOnNode"),". initNodeEventEmitter function is added by a macro from EventWidget (c++). You can find the initNodeEventEmitter method with the event widget macros."),Object(i.b)("li",{parentName:"ol"},"We setup Qt's connect method for all the signals that we want to listen to and call the emitOnNode (which is actually emit from Event emitter) whenever a signal arrives. This is done manually on every widget by overriding the method ",Object(i.b)("inlineCode",{parentName:"li"},"connectWidgetSignalsToEventEmitter"),". Check ",Object(i.b)("inlineCode",{parentName:"li"},"npushbutton.h")," for details. This takes care of all the signals of the widgets. Now to export all qt events of the widget, we had overriden the widgets ",Object(i.b)("inlineCode",{parentName:"li"},"event(Event*)")," method to listen to events received by the widget and send it to the event emitter. This is done inside the EVENTWIDGET_IMPLEMENTATIONS macro")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-development-styling-293-cad.7a035f4c17a4f8b41e6d.js b/content---docs-development-styling-293-cad.4a8b2b2aed4392cce082.js similarity index 99% rename from content---docs-development-styling-293-cad.7a035f4c17a4f8b41e6d.js rename to content---docs-development-styling-293-cad.4a8b2b2aed4392cce082.js index 0d21d7717..f11320bf3 100644 --- a/content---docs-development-styling-293-cad.7a035f4c17a4f8b41e6d.js +++ b/content---docs-development-styling-293-cad.4a8b2b2aed4392cce082.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return p}));var a=n(0),i=n.n(a),o=i.a.createContext({}),l=function(e){var t=i.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=l(e.components);return i.a.createElement(o.Provider,{value:t},e.children)};var s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,r=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),d=l(n),p=a,b=d[r+"."+p]||d[p]||c[p]||o;return n?i.a.createElement(b,Object.assign({},{ref:t},s,{components:n})):i.a.createElement(b,Object.assign({},{ref:t},s))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var r={};for(var c in t)hasOwnProperty.call(t,c)&&(r[c]=t[c]);r.originalType=e,r[s]="string"==typeof e?e:a,l[1]=r;for(var p=2;p=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l={},r=[{value:"Painting",id:"painting",children:[]},{value:"Layout",id:"layout",children:[{value:"Implementation",id:"implementation",children:[]},{value:"FlexItem",id:"flexitem",children:[]},{value:"YogaWidget",id:"yogawidget",children:[]},{value:"NodeWidget",id:"nodewidget",children:[]}]}],s={rightToc:r},c="wrapper";function d(e){var t=e.components,n=o(e,["components"]);return Object(a.b)(c,i({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h1",{id:"how-styling-works"},"How styling works?"),Object(a.b)("p",null,"There are two parts to styling."),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Layout"),Object(a.b)("li",{parentName:"ol"},"Painting : Colors, text color, etc")),Object(a.b)("h2",{id:"painting"},"Painting"),Object(a.b)("p",null,"The regular styles such as text color, font-size, font weight etc are achieved using Qt's stylesheet.\nWe just call Qt's setStyleSheet method on the native widget and pass in the styles as a string."),Object(a.b)("p",null,"This method is implemented as part of ",Object(a.b)("inlineCode",{parentName:"p"},"QWIDGET_WRAPPED_METHODS_DECLARATION")," in ",Object(a.b)("inlineCode",{parentName:"p"},"qwidget_macro.h"),".\nSo all widgets using this macro will get the setStyleSheet method."),Object(a.b)("h2",{id:"layout"},"Layout"),Object(a.b)("p",null,"Layouting is basically positioning widgets on the screen. It takes into account everything from margins, paddings, positions etc. Our main focus will be Flex layouting. For flex layout we are using yoga library from facebook. This is the same library used by React Native. Before looking at flaxlayout in this libarary I recommend browsing Yoga's C API doc here: ",Object(a.b)("inlineCode",{parentName:"p"},"deps/yoga/doc.md")),Object(a.b)("p",null,"In case ",Object(a.b)("inlineCode",{parentName:"p"},"nodegui"),". I have implemented a custom Qt layout by extending ",Object(a.b)("inlineCode",{parentName:"p"},"QLayout"),", hence Qt is able to take over automagically when window is resized or any other layouting event occurs.\nYou can find the implementation at ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/core/FlexLayout/flexlayout.h"),"."),Object(a.b)("p",null,"The c++ api provided by this custom layout looks like this:"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-cpp"})," // FlexLayout is a custom Layout built for QT. This layout will be used to layout qt widgets using facebook's yoga library.\n // Thus giving ability to layout Qt Widgets using Flexbox.\n // Usage:\n QWidget *container = new QWidget();\n YGNodeRef root = YGNodeNew();\n YGNodeRef child1 = YGNodeNew();\n YGNodeRef child2 = YGNodeNew();\n FlexLayout * flayout = new FlexLayout(container,root);\n// or FlexLayout * flayout = new FlexLayout(container);\n// or FlexLayout *flayout = new FlexLayout();\n\n flayout->addWidget(btn1, child1);\n flayout->addWidget(btn2, child2);\n\n")),Object(a.b)("p",null,"This layout is exported to Javascript side via ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/core/FlexLayout/flexlayout_wrap.h")),Object(a.b)("p",null,"The JS Api looks like this:"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-js"}),'const view = new QWidget(rootView);\n\nconst flayout = new FlexLayout(); // Create layout\nflayout.setFlexNode(view.getFlexNode()); // Set widget\'s flex as layout\'s flex node.\n\nview.setLayout(flayout); // set layout as view\'s layout\n\nconst label = new QLabel(view);\nlabel.setText("Hello12321");\n\nconst label2 = new QLabel(view);\nlabel2.setText("SECOND LABEL");\n\nflayout.addWidget(label2, label2.getFlexNode()); // Add child to layout\nflayout.addWidget(label, label.getFlexNode()); // Add child to layout\n')),Object(a.b)("h3",{id:"implementation"},"Implementation"),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},Object(a.b)("p",{parentName:"li"},"Every widget that wants to use flex layout should extend from ",Object(a.b)("inlineCode",{parentName:"p"},"flexItem")," found at ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/core/FlexLayout/flexitem.h"),".\nFor example, see ",Object(a.b)("inlineCode",{parentName:"p"},"nlabel.h")," at ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/QtWidgets/QLabel/nlabel.h")),Object(a.b)("p",{parentName:"li"},"NLabel inherits from ",Object(a.b)("inlineCode",{parentName:"p"},"NodeWidget")," which inherits from ",Object(a.b)("inlineCode",{parentName:"p"},"YogaWidget")," which inturn inherits from ",Object(a.b)("inlineCode",{parentName:"p"},"FlexItem")),Object(a.b)("ul",{parentName:"li"},Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"FlexItem")," adds a YogaNode to every widget."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"YogaWidget")," adds Yoga specific q-properties to the widget, which is useful to assign yoga properties via qstylesheet. More on this below."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"NodeWidget")," adds layout support via ",Object(a.b)("inlineCode",{parentName:"li"},"YogaWidget")," and event handling support via ",Object(a.b)("inlineCode",{parentName:"li"},"EventWidget"))))),Object(a.b)("h3",{id:"flexitem"},"FlexItem"),Object(a.b)("p",null,"FlexItem : ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/core/FlexLayout/flexitem.h")," add flexnode to each widget.\nFlexItem adds methods like getFlexNode."),Object(a.b)("h3",{id:"yogawidget"},"YogaWidget"),Object(a.b)("p",null,"Qt StyleSheet allows you to specify style properties just like in web. You could specify font-size, margin, padding, etc. Qt StyleSheet also allows custom style properties via Qt's q-property system."),Object(a.b)("p",null,"So in order to enable yoga based properties like alignItems, justifyContent, flex, etc via qt's stylesheet we\ndeclare and define q properties for each of those custom properties we want.\nThis allows us to use something like:"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-js"}),"view.setStyleSheet(`\n background-color:green;\n qproperty-flex: 1;\n qproperty-alignItems: 'center';\n`);\n")),Object(a.b)("p",null,"Notice ",Object(a.b)("inlineCode",{parentName:"p"},"qproperty-")," prefix? These are the custom q-properties we defined in ",Object(a.b)("inlineCode",{parentName:"p"},"YogaWidget.h"),". We do not need to prefix ",Object(a.b)("inlineCode",{parentName:"p"},"qproperty-")," if a stylehsheet string is passed through ",Object(a.b)("inlineCode",{parentName:"p"},"StyleSheet.create()"),". StyleSheet.create has an autoprefixer which will do the right thing."),Object(a.b)("h3",{id:"nodewidget"},"NodeWidget"),Object(a.b)("p",null,"Every widget we implement should inherit from NodeWidget. This helps us add all the properties we want in the widgets via a single class. NodeWidget is the class that contains properties and methods shared by all widgets. This class allows us to add features to all widgets easily."))}d.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return p}));var a=n(0),i=n.n(a),o=i.a.createContext({}),l=function(e){var t=i.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=l(e.components);return i.a.createElement(o.Provider,{value:t},e.children)};var s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,r=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),d=l(n),p=a,b=d[r+"."+p]||d[p]||c[p]||o;return n?i.a.createElement(b,Object.assign({},{ref:t},s,{components:n})):i.a.createElement(b,Object.assign({},{ref:t},s))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var r={};for(var c in t)hasOwnProperty.call(t,c)&&(r[c]=t[c]);r.originalType=e,r[s]="string"==typeof e?e:a,l[1]=r;for(var p=2;p=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l={},r=[{value:"Painting",id:"painting",children:[]},{value:"Layout",id:"layout",children:[{value:"Implementation",id:"implementation",children:[]},{value:"FlexItem",id:"flexitem",children:[]},{value:"YogaWidget",id:"yogawidget",children:[]},{value:"NodeWidget",id:"nodewidget",children:[]}]}],s={rightToc:r},c="wrapper";function d(e){var t=e.components,n=o(e,["components"]);return Object(a.b)(c,i({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h1",{id:"how-styling-works"},"How styling works?"),Object(a.b)("p",null,"There are two parts to styling."),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Layout"),Object(a.b)("li",{parentName:"ol"},"Painting : Colors, text color, etc")),Object(a.b)("h2",{id:"painting"},"Painting"),Object(a.b)("p",null,"The regular styles such as text color, font-size, font weight etc are achieved using Qt's stylesheet.\nWe just call Qt's setStyleSheet method on the native widget and pass in the styles as a string."),Object(a.b)("p",null,"This method is implemented as part of ",Object(a.b)("inlineCode",{parentName:"p"},"QWIDGET_WRAPPED_METHODS_DECLARATION")," in ",Object(a.b)("inlineCode",{parentName:"p"},"qwidget_macro.h"),".\nSo all widgets using this macro will get the setStyleSheet method."),Object(a.b)("h2",{id:"layout"},"Layout"),Object(a.b)("p",null,"Layouting is basically positioning widgets on the screen. It takes into account everything from margins, paddings, positions etc. Our main focus will be Flex layouting. For flex layout we are using yoga library from facebook. This is the same library used by React Native. Before looking at flaxlayout in this libarary I recommend browsing Yoga's C API doc here: ",Object(a.b)("inlineCode",{parentName:"p"},"deps/yoga/doc.md")),Object(a.b)("p",null,"In case ",Object(a.b)("inlineCode",{parentName:"p"},"nodegui"),". I have implemented a custom Qt layout by extending ",Object(a.b)("inlineCode",{parentName:"p"},"QLayout"),", hence Qt is able to take over automagically when window is resized or any other layouting event occurs.\nYou can find the implementation at ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/core/FlexLayout/flexlayout.h"),"."),Object(a.b)("p",null,"The c++ api provided by this custom layout looks like this:"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-cpp"})," // FlexLayout is a custom Layout built for QT. This layout will be used to layout qt widgets using facebook's yoga library.\n // Thus giving ability to layout Qt Widgets using Flexbox.\n // Usage:\n QWidget *container = new QWidget();\n YGNodeRef root = YGNodeNew();\n YGNodeRef child1 = YGNodeNew();\n YGNodeRef child2 = YGNodeNew();\n FlexLayout * flayout = new FlexLayout(container,root);\n// or FlexLayout * flayout = new FlexLayout(container);\n// or FlexLayout *flayout = new FlexLayout();\n\n flayout->addWidget(btn1, child1);\n flayout->addWidget(btn2, child2);\n\n")),Object(a.b)("p",null,"This layout is exported to Javascript side via ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/core/FlexLayout/flexlayout_wrap.h")),Object(a.b)("p",null,"The JS Api looks like this:"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-js"}),'const view = new QWidget(rootView);\n\nconst flayout = new FlexLayout(); // Create layout\nflayout.setFlexNode(view.getFlexNode()); // Set widget\'s flex as layout\'s flex node.\n\nview.setLayout(flayout); // set layout as view\'s layout\n\nconst label = new QLabel(view);\nlabel.setText("Hello12321");\n\nconst label2 = new QLabel(view);\nlabel2.setText("SECOND LABEL");\n\nflayout.addWidget(label2, label2.getFlexNode()); // Add child to layout\nflayout.addWidget(label, label.getFlexNode()); // Add child to layout\n')),Object(a.b)("h3",{id:"implementation"},"Implementation"),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},Object(a.b)("p",{parentName:"li"},"Every widget that wants to use flex layout should extend from ",Object(a.b)("inlineCode",{parentName:"p"},"flexItem")," found at ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/core/FlexLayout/flexitem.h"),".\nFor example, see ",Object(a.b)("inlineCode",{parentName:"p"},"nlabel.h")," at ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/QtWidgets/QLabel/nlabel.h")),Object(a.b)("p",{parentName:"li"},"NLabel inherits from ",Object(a.b)("inlineCode",{parentName:"p"},"NodeWidget")," which inherits from ",Object(a.b)("inlineCode",{parentName:"p"},"YogaWidget")," which inturn inherits from ",Object(a.b)("inlineCode",{parentName:"p"},"FlexItem")),Object(a.b)("ul",{parentName:"li"},Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"FlexItem")," adds a YogaNode to every widget."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"YogaWidget")," adds Yoga specific q-properties to the widget, which is useful to assign yoga properties via qstylesheet. More on this below."),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"NodeWidget")," adds layout support via ",Object(a.b)("inlineCode",{parentName:"li"},"YogaWidget")," and event handling support via ",Object(a.b)("inlineCode",{parentName:"li"},"EventWidget"))))),Object(a.b)("h3",{id:"flexitem"},"FlexItem"),Object(a.b)("p",null,"FlexItem : ",Object(a.b)("inlineCode",{parentName:"p"},"src/cpp/core/FlexLayout/flexitem.h")," add flexnode to each widget.\nFlexItem adds methods like getFlexNode."),Object(a.b)("h3",{id:"yogawidget"},"YogaWidget"),Object(a.b)("p",null,"Qt StyleSheet allows you to specify style properties just like in web. You could specify font-size, margin, padding, etc. Qt StyleSheet also allows custom style properties via Qt's q-property system."),Object(a.b)("p",null,"So in order to enable yoga based properties like alignItems, justifyContent, flex, etc via qt's stylesheet we\ndeclare and define q properties for each of those custom properties we want.\nThis allows us to use something like:"),Object(a.b)("pre",null,Object(a.b)("code",i({parentName:"pre"},{className:"language-js"}),"view.setStyleSheet(`\n background-color:green;\n qproperty-flex: 1;\n qproperty-alignItems: 'center';\n`);\n")),Object(a.b)("p",null,"Notice ",Object(a.b)("inlineCode",{parentName:"p"},"qproperty-")," prefix? These are the custom q-properties we defined in ",Object(a.b)("inlineCode",{parentName:"p"},"YogaWidget.h"),". We do not need to prefix ",Object(a.b)("inlineCode",{parentName:"p"},"qproperty-")," if a stylehsheet string is passed through ",Object(a.b)("inlineCode",{parentName:"p"},"StyleSheet.create()"),". StyleSheet.create has an autoprefixer which will do the right thing."),Object(a.b)("h3",{id:"nodewidget"},"NodeWidget"),Object(a.b)("p",null,"Every widget we implement should inherit from NodeWidget. This helps us add all the properties we want in the widgets via a single class. NodeWidget is the class that contains properties and methods shared by all widgets. This class allows us to add features to all widgets easily."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-development-wrapping-widgets-84-b-538.d89aa40f77ccea2817e5.js b/content---docs-development-wrapping-widgets-84-b-538.ee884707b55dee4704c9.js similarity index 95% rename from content---docs-development-wrapping-widgets-84-b-538.d89aa40f77ccea2817e5.js rename to content---docs-development-wrapping-widgets-84-b-538.ee884707b55dee4704c9.js index d72bc77ce..020a839f1 100644 --- a/content---docs-development-wrapping-widgets-84-b-538.d89aa40f77ccea2817e5.js +++ b/content---docs-development-wrapping-widgets-84-b-538.ee884707b55dee4704c9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{173:function(e,n,r){"use strict";r.d(n,"a",(function(){return c})),r.d(n,"b",(function(){return l}));var t=r(0),o=r.n(t),a=o.a.createContext({}),i=function(e){var n=o.a.useContext(a),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},c=function(e){var n=i(e.components);return o.a.createElement(a.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},f=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,a=e.originalType,c=e.parentName,p=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),f=i(r),l=t,s=f[c+"."+l]||f[l]||u[l]||a;return r?o.a.createElement(s,Object.assign({},{ref:n},p,{components:r})):o.a.createElement(s,Object.assign({},{ref:n},p))}));function l(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var a=r.length,i=new Array(a);i[0]=f;var c={};for(var u in n)hasOwnProperty.call(n,u)&&(c[u]=n[u]);c.originalType=e,c[p]="string"==typeof e?e:t,i[1]=c;for(var l=2;l=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i={},c=[],p={rightToc:c},u="wrapper";function f(e){var n=e.components,r=a(e,["components"]);return Object(t.b)(u,o({},p,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("h1",{id:"exporting-a-new-method-from-a-widget"},"Exporting a new method from a widget"),Object(t.b)("h1",{id:"exporting-a-new-widget-from-scratch"},"Exporting a new widget from scratch"))}f.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{173:function(e,n,r){"use strict";r.d(n,"a",(function(){return c})),r.d(n,"b",(function(){return l}));var t=r(0),o=r.n(t),a=o.a.createContext({}),i=function(e){var n=o.a.useContext(a),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},c=function(e){var n=i(e.components);return o.a.createElement(a.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},f=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,a=e.originalType,c=e.parentName,p=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),f=i(r),l=t,s=f[c+"."+l]||f[l]||u[l]||a;return r?o.a.createElement(s,Object.assign({},{ref:n},p,{components:r})):o.a.createElement(s,Object.assign({},{ref:n},p))}));function l(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var a=r.length,i=new Array(a);i[0]=f;var c={};for(var u in n)hasOwnProperty.call(n,u)&&(c[u]=n[u]);c.originalType=e,c[p]="string"==typeof e?e:t,i[1]=c;for(var l=2;l=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i={},c=[],p={rightToc:c},u="wrapper";function f(e){var n=e.components,r=a(e,["components"]);return Object(t.b)(u,o({},p,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("h1",{id:"exporting-a-new-method-from-a-widget"},"Exporting a new method from a widget"),Object(t.b)("h1",{id:"exporting-a-new-widget-from-scratch"},"Exporting a new widget from scratch"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-doc-1-b-2-f-e80.155f26d0e2515ddecad7.js b/content---docs-doc-1-b-2-f-e80.ddd073b1341446b818e6.js similarity index 99% rename from content---docs-doc-1-b-2-f-e80.155f26d0e2515ddecad7.js rename to content---docs-doc-1-b-2-f-e80.ddd073b1341446b818e6.js index 9c353a3cf..fde115f83 100644 --- a/content---docs-doc-1-b-2-f-e80.155f26d0e2515ddecad7.js +++ b/content---docs-doc-1-b-2-f-e80.ddd073b1341446b818e6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{173:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return p}));var n=a(0),r=a.n(n),l=r.a.createContext({}),b=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):Object.assign({},t,e)),a},i=function(e){var t=b(e.components);return r.a.createElement(l.Provider,{value:t},e.children)};var o="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},s=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,o=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(a[n]=e[n]);return a}(e,["components","mdxType","originalType","parentName"]),s=b(a),p=n,u=s[i+"."+p]||s[p]||c[p]||l;return a?r.a.createElement(u,Object.assign({},{ref:t},o,{components:a})):r.a.createElement(u,Object.assign({},{ref:t},o))}));function p(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,b=new Array(l);b[0]=s;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[o]="string"==typeof e?e:n,b[1]=i;for(var p=2;p=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var b={id:"doc1",title:"Style Guide",sidebar_label:"Style Guide"},i=[{value:"Markdown Syntax",id:"markdown-syntax",children:[]},{value:"Headers",id:"headers",children:[]},{value:"H2 - Create the best documentation",id:"h2---create-the-best-documentation",children:[{value:"H3 - Create the best documentation",id:"h3---create-the-best-documentation",children:[]}]},{value:"Emphasis",id:"emphasis",children:[]},{value:"Lists",id:"lists",children:[]},{value:"Links",id:"links",children:[]},{value:"Images",id:"images",children:[]},{value:"Code",id:"code",children:[]},{value:"Tables",id:"tables",children:[]},{value:"Blockquotes",id:"blockquotes",children:[]},{value:"Inline HTML",id:"inline-html",children:[]},{value:"Line Breaks",id:"line-breaks",children:[]}],o={rightToc:i},c="wrapper";function s(e){var t=e.components,a=l(e,["components"]);return Object(n.b)(c,r({},o,a,{components:t,mdxType:"MDXLayout"}),Object(n.b)("p",null,"You can write content using ",Object(n.b)("a",r({parentName:"p"},{href:"https://github.github.com/gfm/"}),"GitHub-flavored Markdown syntax"),"."),Object(n.b)("h2",{id:"markdown-syntax"},"Markdown Syntax"),Object(n.b)("p",null,"To serve as an example page when styling markdown based Docusaurus sites."),Object(n.b)("h2",{id:"headers"},"Headers"),Object(n.b)("h1",{id:"h1---create-the-best-documentation"},"H1 - Create the best documentation"),Object(n.b)("h2",{id:"h2---create-the-best-documentation"},"H2 - Create the best documentation"),Object(n.b)("h3",{id:"h3---create-the-best-documentation"},"H3 - Create the best documentation"),Object(n.b)("h4",{id:"h4---create-the-best-documentation"},"H4 - Create the best documentation"),Object(n.b)("h5",{id:"h5---create-the-best-documentation"},"H5 - Create the best documentation"),Object(n.b)("h6",{id:"h6---create-the-best-documentation"},"H6 - Create the best documentation"),Object(n.b)("hr",null),Object(n.b)("h2",{id:"emphasis"},"Emphasis"),Object(n.b)("p",null,"Emphasis, aka italics, with ",Object(n.b)("em",{parentName:"p"},"asterisks")," or ",Object(n.b)("em",{parentName:"p"},"underscores"),"."),Object(n.b)("p",null,"Strong emphasis, aka bold, with ",Object(n.b)("strong",{parentName:"p"},"asterisks")," or ",Object(n.b)("strong",{parentName:"p"},"underscores"),"."),Object(n.b)("p",null,"Combined emphasis with ",Object(n.b)("strong",{parentName:"p"},"asterisks and ",Object(n.b)("em",{parentName:"strong"},"underscores")),"."),Object(n.b)("p",null,"Strikethrough uses two tildes. ",Object(n.b)("del",{parentName:"p"},"Scratch this.")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"lists"},"Lists"),Object(n.b)("ol",null,Object(n.b)("li",{parentName:"ol"},"First ordered list item"),Object(n.b)("li",{parentName:"ol"},"Another item ⋅⋅","*"," Unordered sub-list."),Object(n.b)("li",{parentName:"ol"},"Actual numbers don't matter, just that it's a number ⋅⋅1. Ordered sub-list"),Object(n.b)("li",{parentName:"ol"},"And another item.")),Object(n.b)("p",null,"⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown)."),Object(n.b)("p",null,"⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅ ⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅ ⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)"),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Unordered list can use asterisks")),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Or minuses")),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Or pluses")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"links"},"Links"),Object(n.b)("p",null,Object(n.b)("a",r({parentName:"p"},{href:"https://www.google.com"}),"I'm an inline-style link")),Object(n.b)("p",null,Object(n.b)("a",r({parentName:"p"},{href:"https://www.google.com",title:"Google's Homepage"}),"I'm an inline-style link with title")),Object(n.b)("p",null,Object(n.b)("a",r({parentName:"p"},{href:"https://www.mozilla.org"}),"I'm a reference-style link")),Object(n.b)("p",null,Object(n.b)("a",r({parentName:"p"},{href:"../blob/master/LICENSE"}),"I'm a relative reference to a repository file")),Object(n.b)("p",null,Object(n.b)("a",r({parentName:"p"},{href:"http://slashdot.org"}),"You can use numbers for reference-style link definitions")),Object(n.b)("p",null,"Or leave it empty and use the ",Object(n.b)("a",r({parentName:"p"},{href:"http://www.reddit.com"}),"link text itself"),"."),Object(n.b)("p",null,"URLs and URLs in angle brackets will automatically get turned into links. ",Object(n.b)("a",r({parentName:"p"},{href:"http://www.example.com"}),"http://www.example.com")," or ",Object(n.b)("a",r({parentName:"p"},{href:"http://www.example.com"}),"http://www.example.com")," and sometimes example.com (but not on Github, for example)."),Object(n.b)("p",null,"Some text to show that the reference links can follow later."),Object(n.b)("hr",null),Object(n.b)("h2",{id:"images"},"Images"),Object(n.b)("p",null,"Here's our logo (hover to see the title text):"),Object(n.b)("p",null,"Inline-style: ",Object(n.b)("img",r({parentName:"p"},{src:"https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png",alt:"alt text",title:"Logo Title Text 1"}))),Object(n.b)("p",null,"Reference-style: ",Object(n.b)("img",r({parentName:"p"},{src:"https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png",alt:"alt text",title:"Logo Title Text 2"}))),Object(n.b)("hr",null),Object(n.b)("h2",{id:"code"},"Code"),Object(n.b)("pre",null,Object(n.b)("code",r({parentName:"pre"},{className:"language-javascript"}),"var s = 'JavaScript syntax highlighting';\nalert(s);\n")),Object(n.b)("pre",null,Object(n.b)("code",r({parentName:"pre"},{className:"language-python"}),'s = "Python syntax highlighting"\nprint s\n')),Object(n.b)("pre",null,Object(n.b)("code",r({parentName:"pre"},{}),"No language indicated, so no syntax highlighting.\nBut let's throw in a tag.\n")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"tables"},"Tables"),Object(n.b)("p",null,"Colons can be used to align columns."),Object(n.b)("table",null,Object(n.b)("thead",{parentName:"table"},Object(n.b)("tr",{parentName:"thead"},Object(n.b)("th",r({parentName:"tr"},{align:null}),"Tables"),Object(n.b)("th",r({parentName:"tr"},{align:"center"}),"Are"),Object(n.b)("th",r({parentName:"tr"},{align:"right"}),"Cool"))),Object(n.b)("tbody",{parentName:"table"},Object(n.b)("tr",{parentName:"tbody"},Object(n.b)("td",r({parentName:"tr"},{align:null}),"col 3 is"),Object(n.b)("td",r({parentName:"tr"},{align:"center"}),"right-aligned"),Object(n.b)("td",r({parentName:"tr"},{align:"right"}),"$1600")),Object(n.b)("tr",{parentName:"tbody"},Object(n.b)("td",r({parentName:"tr"},{align:null}),"col 2 is"),Object(n.b)("td",r({parentName:"tr"},{align:"center"}),"centered"),Object(n.b)("td",r({parentName:"tr"},{align:"right"}),"$12")),Object(n.b)("tr",{parentName:"tbody"},Object(n.b)("td",r({parentName:"tr"},{align:null}),"zebra stripes"),Object(n.b)("td",r({parentName:"tr"},{align:"center"}),"are neat"),Object(n.b)("td",r({parentName:"tr"},{align:"right"}),"$1")))),Object(n.b)("p",null,"There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown."),Object(n.b)("table",null,Object(n.b)("thead",{parentName:"table"},Object(n.b)("tr",{parentName:"thead"},Object(n.b)("th",r({parentName:"tr"},{align:null}),"Markdown"),Object(n.b)("th",r({parentName:"tr"},{align:null}),"Less"),Object(n.b)("th",r({parentName:"tr"},{align:null}),"Pretty"))),Object(n.b)("tbody",{parentName:"table"},Object(n.b)("tr",{parentName:"tbody"},Object(n.b)("td",r({parentName:"tr"},{align:null}),Object(n.b)("em",{parentName:"td"},"Still")),Object(n.b)("td",r({parentName:"tr"},{align:null}),Object(n.b)("inlineCode",{parentName:"td"},"renders")),Object(n.b)("td",r({parentName:"tr"},{align:null}),Object(n.b)("strong",{parentName:"td"},"nicely"))),Object(n.b)("tr",{parentName:"tbody"},Object(n.b)("td",r({parentName:"tr"},{align:null}),"1"),Object(n.b)("td",r({parentName:"tr"},{align:null}),"2"),Object(n.b)("td",r({parentName:"tr"},{align:null}),"3")))),Object(n.b)("hr",null),Object(n.b)("h2",{id:"blockquotes"},"Blockquotes"),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.")),Object(n.b)("p",null,"Quote break."),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can ",Object(n.b)("em",{parentName:"p"},"put")," ",Object(n.b)("strong",{parentName:"p"},"Markdown")," into a blockquote.")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"inline-html"},"Inline HTML"),Object(n.b)("dl",null,Object(n.b)("dt",null,"Definition list"),Object(n.b)("dd",null,"Is something people use sometimes."),Object(n.b)("dt",null,"Markdown in HTML"),Object(n.b)("dd",null,"Does *not* work **very** well. Use HTML ",Object(n.b)("em",null,"tags"),".")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"line-breaks"},"Line Breaks"),Object(n.b)("p",null,"Here's a line for us to start with."),Object(n.b)("p",null,"This line is separated from the one above by two newlines, so it will be a ",Object(n.b)("em",{parentName:"p"},"separate paragraph"),"."),Object(n.b)("p",null,"This line is also a separate paragraph, but... This line is only separated by a single newline, so it's a separate line in the ",Object(n.b)("em",{parentName:"p"},"same paragraph"),"."))}s.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{173:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return p}));var n=a(0),r=a.n(n),l=r.a.createContext({}),b=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):Object.assign({},t,e)),a},i=function(e){var t=b(e.components);return r.a.createElement(l.Provider,{value:t},e.children)};var o="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},s=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,o=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(a[n]=e[n]);return a}(e,["components","mdxType","originalType","parentName"]),s=b(a),p=n,u=s[i+"."+p]||s[p]||c[p]||l;return a?r.a.createElement(u,Object.assign({},{ref:t},o,{components:a})):r.a.createElement(u,Object.assign({},{ref:t},o))}));function p(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,b=new Array(l);b[0]=s;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[o]="string"==typeof e?e:n,b[1]=i;for(var p=2;p=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var b={id:"doc1",title:"Style Guide",sidebar_label:"Style Guide"},i=[{value:"Markdown Syntax",id:"markdown-syntax",children:[]},{value:"Headers",id:"headers",children:[]},{value:"H2 - Create the best documentation",id:"h2---create-the-best-documentation",children:[{value:"H3 - Create the best documentation",id:"h3---create-the-best-documentation",children:[]}]},{value:"Emphasis",id:"emphasis",children:[]},{value:"Lists",id:"lists",children:[]},{value:"Links",id:"links",children:[]},{value:"Images",id:"images",children:[]},{value:"Code",id:"code",children:[]},{value:"Tables",id:"tables",children:[]},{value:"Blockquotes",id:"blockquotes",children:[]},{value:"Inline HTML",id:"inline-html",children:[]},{value:"Line Breaks",id:"line-breaks",children:[]}],o={rightToc:i},c="wrapper";function s(e){var t=e.components,a=l(e,["components"]);return Object(n.b)(c,r({},o,a,{components:t,mdxType:"MDXLayout"}),Object(n.b)("p",null,"You can write content using ",Object(n.b)("a",r({parentName:"p"},{href:"https://github.github.com/gfm/"}),"GitHub-flavored Markdown syntax"),"."),Object(n.b)("h2",{id:"markdown-syntax"},"Markdown Syntax"),Object(n.b)("p",null,"To serve as an example page when styling markdown based Docusaurus sites."),Object(n.b)("h2",{id:"headers"},"Headers"),Object(n.b)("h1",{id:"h1---create-the-best-documentation"},"H1 - Create the best documentation"),Object(n.b)("h2",{id:"h2---create-the-best-documentation"},"H2 - Create the best documentation"),Object(n.b)("h3",{id:"h3---create-the-best-documentation"},"H3 - Create the best documentation"),Object(n.b)("h4",{id:"h4---create-the-best-documentation"},"H4 - Create the best documentation"),Object(n.b)("h5",{id:"h5---create-the-best-documentation"},"H5 - Create the best documentation"),Object(n.b)("h6",{id:"h6---create-the-best-documentation"},"H6 - Create the best documentation"),Object(n.b)("hr",null),Object(n.b)("h2",{id:"emphasis"},"Emphasis"),Object(n.b)("p",null,"Emphasis, aka italics, with ",Object(n.b)("em",{parentName:"p"},"asterisks")," or ",Object(n.b)("em",{parentName:"p"},"underscores"),"."),Object(n.b)("p",null,"Strong emphasis, aka bold, with ",Object(n.b)("strong",{parentName:"p"},"asterisks")," or ",Object(n.b)("strong",{parentName:"p"},"underscores"),"."),Object(n.b)("p",null,"Combined emphasis with ",Object(n.b)("strong",{parentName:"p"},"asterisks and ",Object(n.b)("em",{parentName:"strong"},"underscores")),"."),Object(n.b)("p",null,"Strikethrough uses two tildes. ",Object(n.b)("del",{parentName:"p"},"Scratch this.")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"lists"},"Lists"),Object(n.b)("ol",null,Object(n.b)("li",{parentName:"ol"},"First ordered list item"),Object(n.b)("li",{parentName:"ol"},"Another item ⋅⋅","*"," Unordered sub-list."),Object(n.b)("li",{parentName:"ol"},"Actual numbers don't matter, just that it's a number ⋅⋅1. Ordered sub-list"),Object(n.b)("li",{parentName:"ol"},"And another item.")),Object(n.b)("p",null,"⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown)."),Object(n.b)("p",null,"⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅ ⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅ ⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)"),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Unordered list can use asterisks")),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Or minuses")),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Or pluses")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"links"},"Links"),Object(n.b)("p",null,Object(n.b)("a",r({parentName:"p"},{href:"https://www.google.com"}),"I'm an inline-style link")),Object(n.b)("p",null,Object(n.b)("a",r({parentName:"p"},{href:"https://www.google.com",title:"Google's Homepage"}),"I'm an inline-style link with title")),Object(n.b)("p",null,Object(n.b)("a",r({parentName:"p"},{href:"https://www.mozilla.org"}),"I'm a reference-style link")),Object(n.b)("p",null,Object(n.b)("a",r({parentName:"p"},{href:"../blob/master/LICENSE"}),"I'm a relative reference to a repository file")),Object(n.b)("p",null,Object(n.b)("a",r({parentName:"p"},{href:"http://slashdot.org"}),"You can use numbers for reference-style link definitions")),Object(n.b)("p",null,"Or leave it empty and use the ",Object(n.b)("a",r({parentName:"p"},{href:"http://www.reddit.com"}),"link text itself"),"."),Object(n.b)("p",null,"URLs and URLs in angle brackets will automatically get turned into links. ",Object(n.b)("a",r({parentName:"p"},{href:"http://www.example.com"}),"http://www.example.com")," or ",Object(n.b)("a",r({parentName:"p"},{href:"http://www.example.com"}),"http://www.example.com")," and sometimes example.com (but not on Github, for example)."),Object(n.b)("p",null,"Some text to show that the reference links can follow later."),Object(n.b)("hr",null),Object(n.b)("h2",{id:"images"},"Images"),Object(n.b)("p",null,"Here's our logo (hover to see the title text):"),Object(n.b)("p",null,"Inline-style: ",Object(n.b)("img",r({parentName:"p"},{src:"https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png",alt:"alt text",title:"Logo Title Text 1"}))),Object(n.b)("p",null,"Reference-style: ",Object(n.b)("img",r({parentName:"p"},{src:"https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png",alt:"alt text",title:"Logo Title Text 2"}))),Object(n.b)("hr",null),Object(n.b)("h2",{id:"code"},"Code"),Object(n.b)("pre",null,Object(n.b)("code",r({parentName:"pre"},{className:"language-javascript"}),"var s = 'JavaScript syntax highlighting';\nalert(s);\n")),Object(n.b)("pre",null,Object(n.b)("code",r({parentName:"pre"},{className:"language-python"}),'s = "Python syntax highlighting"\nprint s\n')),Object(n.b)("pre",null,Object(n.b)("code",r({parentName:"pre"},{}),"No language indicated, so no syntax highlighting.\nBut let's throw in a tag.\n")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"tables"},"Tables"),Object(n.b)("p",null,"Colons can be used to align columns."),Object(n.b)("table",null,Object(n.b)("thead",{parentName:"table"},Object(n.b)("tr",{parentName:"thead"},Object(n.b)("th",r({parentName:"tr"},{align:null}),"Tables"),Object(n.b)("th",r({parentName:"tr"},{align:"center"}),"Are"),Object(n.b)("th",r({parentName:"tr"},{align:"right"}),"Cool"))),Object(n.b)("tbody",{parentName:"table"},Object(n.b)("tr",{parentName:"tbody"},Object(n.b)("td",r({parentName:"tr"},{align:null}),"col 3 is"),Object(n.b)("td",r({parentName:"tr"},{align:"center"}),"right-aligned"),Object(n.b)("td",r({parentName:"tr"},{align:"right"}),"$1600")),Object(n.b)("tr",{parentName:"tbody"},Object(n.b)("td",r({parentName:"tr"},{align:null}),"col 2 is"),Object(n.b)("td",r({parentName:"tr"},{align:"center"}),"centered"),Object(n.b)("td",r({parentName:"tr"},{align:"right"}),"$12")),Object(n.b)("tr",{parentName:"tbody"},Object(n.b)("td",r({parentName:"tr"},{align:null}),"zebra stripes"),Object(n.b)("td",r({parentName:"tr"},{align:"center"}),"are neat"),Object(n.b)("td",r({parentName:"tr"},{align:"right"}),"$1")))),Object(n.b)("p",null,"There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown."),Object(n.b)("table",null,Object(n.b)("thead",{parentName:"table"},Object(n.b)("tr",{parentName:"thead"},Object(n.b)("th",r({parentName:"tr"},{align:null}),"Markdown"),Object(n.b)("th",r({parentName:"tr"},{align:null}),"Less"),Object(n.b)("th",r({parentName:"tr"},{align:null}),"Pretty"))),Object(n.b)("tbody",{parentName:"table"},Object(n.b)("tr",{parentName:"tbody"},Object(n.b)("td",r({parentName:"tr"},{align:null}),Object(n.b)("em",{parentName:"td"},"Still")),Object(n.b)("td",r({parentName:"tr"},{align:null}),Object(n.b)("inlineCode",{parentName:"td"},"renders")),Object(n.b)("td",r({parentName:"tr"},{align:null}),Object(n.b)("strong",{parentName:"td"},"nicely"))),Object(n.b)("tr",{parentName:"tbody"},Object(n.b)("td",r({parentName:"tr"},{align:null}),"1"),Object(n.b)("td",r({parentName:"tr"},{align:null}),"2"),Object(n.b)("td",r({parentName:"tr"},{align:null}),"3")))),Object(n.b)("hr",null),Object(n.b)("h2",{id:"blockquotes"},"Blockquotes"),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.")),Object(n.b)("p",null,"Quote break."),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can ",Object(n.b)("em",{parentName:"p"},"put")," ",Object(n.b)("strong",{parentName:"p"},"Markdown")," into a blockquote.")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"inline-html"},"Inline HTML"),Object(n.b)("dl",null,Object(n.b)("dt",null,"Definition list"),Object(n.b)("dd",null,"Is something people use sometimes."),Object(n.b)("dt",null,"Markdown in HTML"),Object(n.b)("dd",null,"Does *not* work **very** well. Use HTML ",Object(n.b)("em",null,"tags"),".")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"line-breaks"},"Line Breaks"),Object(n.b)("p",null,"Here's a line for us to start with."),Object(n.b)("p",null,"This line is separated from the one above by two newlines, so it will be a ",Object(n.b)("em",{parentName:"p"},"separate paragraph"),"."),Object(n.b)("p",null,"This line is also a separate paragraph, but... This line is only separated by a single newline, so it's a separate line in the ",Object(n.b)("em",{parentName:"p"},"same paragraph"),"."))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-faq-048-db5.5525c687cb63aa66b087.js b/content---docs-faq-048-db5.308d32219777536fd0c1.js similarity index 98% rename from content---docs-faq-048-db5.5525c687cb63aa66b087.js rename to content---docs-faq-048-db5.308d32219777536fd0c1.js index 1aa797a13..160e2c789 100644 --- a/content---docs-faq-048-db5.5525c687cb63aa66b087.js +++ b/content---docs-faq-048-db5.308d32219777536fd0c1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return d}));var a=n(0),r=n.n(a),i=r.a.createContext({}),o=function(e){var t=r.a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},s=function(e){var t=o(e.components);return r.a.createElement(i.Provider,{value:t},e.children)};var l="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},c=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,l=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),c=o(n),d=a,u=c[s+"."+d]||c[d]||p[d]||i;return n?r.a.createElement(u,Object.assign({},{ref:t},l,{components:n})):r.a.createElement(u,Object.assign({},{ref:t},l))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=c;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[l]="string"==typeof e?e:a,o[1]=s;for(var d=2;d=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o={title:"FAQ",sidebar_label:"FAQ"},s=[{value:"Why am I having trouble installing Qode?",id:"why-am-i-having-trouble-installing-qode",children:[]},{value:"Javascript widgets are missing methods and properties as compared to QT widget?",id:"javascript-widgets-are-missing-methods-and-properties-as-compared-to-qt-widget",children:[]},{value:"When will Qode upgrade to latest Node.js / Qt version?",id:"when-will-qode-upgrade-to-latest-nodejs--qt-version",children:[]},{value:"My app's window/widgets/tray disappeared after a few minutes.",id:"my-apps-windowwidgetstray-disappeared-after-a-few-minutes",children:[]}],l={rightToc:s},p="wrapper";function c(e){var t=e.components,n=i(e,["components"]);return Object(a.b)(p,r({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h2",{id:"why-am-i-having-trouble-installing-qode"},"Why am I having trouble installing Qode?"),Object(a.b)("p",null,"When running ",Object(a.b)("inlineCode",{parentName:"p"},"npm install @nodegui/qode"),", some users occasionally encounter\ninstallation errors."),Object(a.b)("p",null,"In almost all cases, these errors are the result of network problems and not\nactual issues with the ",Object(a.b)("inlineCode",{parentName:"p"},"@nodegui/qode")," npm package. Errors like ",Object(a.b)("inlineCode",{parentName:"p"},"ELIFECYCLE"),",\n",Object(a.b)("inlineCode",{parentName:"p"},"EAI_AGAIN"),", ",Object(a.b)("inlineCode",{parentName:"p"},"ECONNRESET"),", and ",Object(a.b)("inlineCode",{parentName:"p"},"ETIMEDOUT")," are all indications of such\nnetwork problems. The best resolution is to try switching networks, or\nwait a bit and try installing again."),Object(a.b)("p",null,"You can also attempt to download Qode directly from\n",Object(a.b)("a",r({parentName:"p"},{href:"https://github.com/nodegui/qode/releases"}),"nodegui/qode/releases"),"\nif installing via ",Object(a.b)("inlineCode",{parentName:"p"},"npm")," is failing."),Object(a.b)("h2",{id:"javascript-widgets-are-missing-methods-and-properties-as-compared-to-qt-widget"},"Javascript widgets are missing methods and properties as compared to QT widget?"),Object(a.b)("p",null,"As you would have noticed, the list of methods and properties are less compared to what is present in the Qt's corresponding widget class. This is because we havent written wrappers for them yet. You can help add more methods by following the development guide for contributors. Overtime this gap would reduce."),Object(a.b)("h2",{id:"when-will-qode-upgrade-to-latest-nodejs--qt-version"},"When will Qode upgrade to latest Node.js / Qt version?"),Object(a.b)("p",null,"When a new version of Node.js/Qt gets released, we usually wait for about a month\nbefore upgrading the one in Qode. So we can avoid getting affected by bugs\nintroduced in new Node.js/Qt versions, which happens very often."),Object(a.b)("h2",{id:"my-apps-windowwidgetstray-disappeared-after-a-few-minutes"},"My app's window/widgets/tray disappeared after a few minutes."),Object(a.b)("p",null,"This happens when the variable which is used to store the window/tray gets\ngarbage collected."),Object(a.b)("p",null,"If you encounter this problem, the following articles may prove helpful:"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("a",r({parentName:"li"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management"}),"Memory Management")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("a",r({parentName:"li"},{href:"https://msdn.microsoft.com/library/bzt2dkta(v=vs.94).aspx"}),"Variable Scope"))),Object(a.b)("p",null,"If you want a quick fix, you can make the variables global by changing your\ncode from this:"),Object(a.b)("pre",null,Object(a.b)("code",r({parentName:"pre"},{className:"language-javascript"}),'const { QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nview.setObjectName("container");\nview.setLayout(new FlexLayout());\n')),Object(a.b)("p",null,"to this:"),Object(a.b)("pre",null,Object(a.b)("code",r({parentName:"pre"},{className:"language-javascript"}),'const { QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nview.setObjectName("container");\nview.setLayout(new FlexLayout());\n\nglobal.view = view; //prevent GC\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{173:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return d}));var a=n(0),r=n.n(a),i=r.a.createContext({}),o=function(e){var t=r.a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},s=function(e){var t=o(e.components);return r.a.createElement(i.Provider,{value:t},e.children)};var l="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},c=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,l=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),c=o(n),d=a,u=c[s+"."+d]||c[d]||p[d]||i;return n?r.a.createElement(u,Object.assign({},{ref:t},l,{components:n})):r.a.createElement(u,Object.assign({},{ref:t},l))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=c;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[l]="string"==typeof e?e:a,o[1]=s;for(var d=2;d=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o={title:"FAQ",sidebar_label:"FAQ"},s=[{value:"Why am I having trouble installing Qode?",id:"why-am-i-having-trouble-installing-qode",children:[]},{value:"Javascript widgets are missing methods and properties as compared to QT widget?",id:"javascript-widgets-are-missing-methods-and-properties-as-compared-to-qt-widget",children:[]},{value:"When will Qode upgrade to latest Node.js / Qt version?",id:"when-will-qode-upgrade-to-latest-nodejs--qt-version",children:[]},{value:"My app's window/widgets/tray disappeared after a few minutes.",id:"my-apps-windowwidgetstray-disappeared-after-a-few-minutes",children:[]}],l={rightToc:s},p="wrapper";function c(e){var t=e.components,n=i(e,["components"]);return Object(a.b)(p,r({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h2",{id:"why-am-i-having-trouble-installing-qode"},"Why am I having trouble installing Qode?"),Object(a.b)("p",null,"When running ",Object(a.b)("inlineCode",{parentName:"p"},"npm install @nodegui/qode"),", some users occasionally encounter\ninstallation errors."),Object(a.b)("p",null,"In almost all cases, these errors are the result of network problems and not\nactual issues with the ",Object(a.b)("inlineCode",{parentName:"p"},"@nodegui/qode")," npm package. Errors like ",Object(a.b)("inlineCode",{parentName:"p"},"ELIFECYCLE"),",\n",Object(a.b)("inlineCode",{parentName:"p"},"EAI_AGAIN"),", ",Object(a.b)("inlineCode",{parentName:"p"},"ECONNRESET"),", and ",Object(a.b)("inlineCode",{parentName:"p"},"ETIMEDOUT")," are all indications of such\nnetwork problems. The best resolution is to try switching networks, or\nwait a bit and try installing again."),Object(a.b)("p",null,"You can also attempt to download Qode directly from\n",Object(a.b)("a",r({parentName:"p"},{href:"https://github.com/nodegui/qode/releases"}),"nodegui/qode/releases"),"\nif installing via ",Object(a.b)("inlineCode",{parentName:"p"},"npm")," is failing."),Object(a.b)("h2",{id:"javascript-widgets-are-missing-methods-and-properties-as-compared-to-qt-widget"},"Javascript widgets are missing methods and properties as compared to QT widget?"),Object(a.b)("p",null,"As you would have noticed, the list of methods and properties are less compared to what is present in the Qt's corresponding widget class. This is because we havent written wrappers for them yet. You can help add more methods by following the development guide for contributors. Overtime this gap would reduce."),Object(a.b)("h2",{id:"when-will-qode-upgrade-to-latest-nodejs--qt-version"},"When will Qode upgrade to latest Node.js / Qt version?"),Object(a.b)("p",null,"When a new version of Node.js/Qt gets released, we usually wait for about a month\nbefore upgrading the one in Qode. So we can avoid getting affected by bugs\nintroduced in new Node.js/Qt versions, which happens very often."),Object(a.b)("h2",{id:"my-apps-windowwidgetstray-disappeared-after-a-few-minutes"},"My app's window/widgets/tray disappeared after a few minutes."),Object(a.b)("p",null,"This happens when the variable which is used to store the window/tray gets\ngarbage collected."),Object(a.b)("p",null,"If you encounter this problem, the following articles may prove helpful:"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("a",r({parentName:"li"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management"}),"Memory Management")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("a",r({parentName:"li"},{href:"https://msdn.microsoft.com/library/bzt2dkta(v=vs.94).aspx"}),"Variable Scope"))),Object(a.b)("p",null,"If you want a quick fix, you can make the variables global by changing your\ncode from this:"),Object(a.b)("pre",null,Object(a.b)("code",r({parentName:"pre"},{className:"language-javascript"}),'const { QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nview.setObjectName("container");\nview.setLayout(new FlexLayout());\n')),Object(a.b)("p",null,"to this:"),Object(a.b)("pre",null,Object(a.b)("code",r({parentName:"pre"},{className:"language-javascript"}),'const { QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nview.setObjectName("container");\nview.setLayout(new FlexLayout());\n\nglobal.view = view; //prevent GC\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/content---docs-guides-custom-nodegui-native-plugin-632-9db.95323b60cd95d318e46d.js b/content---docs-guides-custom-nodegui-native-plugin-632-9db.69e4f9d5cf0b7d406d30.js similarity index 96% rename from content---docs-guides-custom-nodegui-native-plugin-632-9db.95323b60cd95d318e46d.js rename to content---docs-guides-custom-nodegui-native-plugin-632-9db.69e4f9d5cf0b7d406d30.js index 55eae6752..564c55137 100644 --- a/content---docs-guides-custom-nodegui-native-plugin-632-9db.95323b60cd95d318e46d.js +++ b/content---docs-guides-custom-nodegui-native-plugin-632-9db.69e4f9d5cf0b7d406d30.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{141:function(e,n,r){"use strict";r.r(n),r.d(n,"frontMatter",(function(){return i})),r.d(n,"rightToc",(function(){return c})),r.d(n,"default",(function(){return l}));r(0);var t=r(173);function o(){return(o=Object.assign||function(e){for(var n=1;n=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i={sidebar_label:"Custom NodeGui Plugin",title:"Custom NodeGui Plugin"},c=[],u={rightToc:c},p="wrapper";function l(e){var n=e.components,r=a(e,["components"]);return Object(t.b)(p,o({},u,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"WIP"))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return c})),r.d(n,"b",(function(){return f}));var t=r(0),o=r.n(t),a=o.a.createContext({}),i=function(e){var n=o.a.useContext(a),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},c=function(e){var n=i(e.components);return o.a.createElement(a.Provider,{value:n},e.children)};var u="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,a=e.originalType,c=e.parentName,u=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=i(r),f=t,s=l[c+"."+f]||l[f]||p[f]||a;return r?o.a.createElement(s,Object.assign({},{ref:n},u,{components:r})):o.a.createElement(s,Object.assign({},{ref:n},u))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var a=r.length,i=new Array(a);i[0]=l;var c={};for(var p in n)hasOwnProperty.call(n,p)&&(c[p]=n[p]);c.originalType=e,c[u]="string"==typeof e?e:t,i[1]=c;for(var f=2;f=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i={sidebar_label:"Custom NodeGui Plugin",title:"Custom NodeGui Plugin"},c=[],u={rightToc:c},p="wrapper";function l(e){var n=e.components,r=a(e,["components"]);return Object(t.b)(p,o({},u,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"WIP"))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return c})),r.d(n,"b",(function(){return f}));var t=r(0),o=r.n(t),a=o.a.createContext({}),i=function(e){var n=o.a.useContext(a),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},c=function(e){var n=i(e.components);return o.a.createElement(a.Provider,{value:n},e.children)};var u="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,a=e.originalType,c=e.parentName,u=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=i(r),f=t,s=l[c+"."+f]||l[f]||p[f]||a;return r?o.a.createElement(s,Object.assign({},{ref:n},u,{components:r})):o.a.createElement(s,Object.assign({},{ref:n},u))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var a=r.length,i=new Array(a);i[0]=l;var c={};for(var p in n)hasOwnProperty.call(n,p)&&(c[p]=n[p]);c.originalType=e,c[u]="string"==typeof e?e:t,i[1]=c;for(var f=2;f=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var i={sidebar_label:"Debugging in VSCode",title:"Debugging in VSCode"},c=[],p={rightToc:c},u="wrapper";function l(e){var n=e.components,t=o(e,["components"]);return Object(r.b)(u,a({},p,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Open a NodeGui project in VSCode.")),Object(r.b)("pre",{parentName:"li"},Object(r.b)("code",a({parentName:"pre"},{className:"language-sh"}),"$ git clone git@github.com:nodegui/nodegui-starter.git\n$ code nodegui-starter\n"))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Add a file ",Object(r.b)("inlineCode",{parentName:"strong"},".vscode/launch.json")," with the following configuration:")),Object(r.b)("pre",{parentName:"li"},Object(r.b)("code",a({parentName:"pre"},{className:"language-json"}),'{\n "version": "0.2.0",\n "configurations": [\n {\n "name": "Debug Qode Process",\n "type": "node",\n "request": "launch",\n "cwd": "${workspaceRoot}",\n "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/qode",\n "windows": {\n "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/qode.exe"\n },\n "args": ["./dist/index.js"],\n "outputCapture": "std"\n }\n ]\n}\n')),Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Tip"),": You could also configure a preLaunchTask for building typescript before launching the debugger everytime.")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Debugging")),Object(r.b)("p",{parentName:"li"},"Set some breakpoints in ",Object(r.b)("inlineCode",{parentName:"p"},"index.js"),", and start debugging in the ",Object(r.b)("a",a({parentName:"p"},{href:"https://code.visualstudio.com/docs/editor/debugging"}),"Debug View"),". You should be able to hit the breakpoints."))))}l.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return c})),t.d(n,"b",(function(){return b}));var r=t(0),a=t.n(r),o=a.a.createContext({}),i=function(e){var n=a.a.useContext(o),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},c=function(e){var n=i(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},l=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,p=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===n.indexOf(r)&&(t[r]=e[r]);return t}(e,["components","mdxType","originalType","parentName"]),l=i(t),b=r,s=l[c+"."+b]||l[b]||u[b]||o;return t?a.a.createElement(s,Object.assign({},{ref:n},p,{components:t})):a.a.createElement(s,Object.assign({},{ref:n},p))}));function b(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=l;var c={};for(var u in n)hasOwnProperty.call(n,u)&&(c[u]=n[u]);c.originalType=e,c[p]="string"==typeof e?e:r,i[1]=c;for(var b=2;b=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var i={sidebar_label:"Debugging in VSCode",title:"Debugging in VSCode"},c=[],p={rightToc:c},u="wrapper";function l(e){var n=e.components,t=o(e,["components"]);return Object(r.b)(u,a({},p,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Open a NodeGui project in VSCode.")),Object(r.b)("pre",{parentName:"li"},Object(r.b)("code",a({parentName:"pre"},{className:"language-sh"}),"$ git clone git@github.com:nodegui/nodegui-starter.git\n$ code nodegui-starter\n"))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Add a file ",Object(r.b)("inlineCode",{parentName:"strong"},".vscode/launch.json")," with the following configuration:")),Object(r.b)("pre",{parentName:"li"},Object(r.b)("code",a({parentName:"pre"},{className:"language-json"}),'{\n "version": "0.2.0",\n "configurations": [\n {\n "name": "Debug Qode Process",\n "type": "node",\n "request": "launch",\n "cwd": "${workspaceRoot}",\n "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/qode",\n "windows": {\n "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/qode.exe"\n },\n "args": ["./dist/index.js"],\n "outputCapture": "std"\n }\n ]\n}\n')),Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Tip"),": You could also configure a preLaunchTask for building typescript before launching the debugger everytime.")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"Debugging")),Object(r.b)("p",{parentName:"li"},"Set some breakpoints in ",Object(r.b)("inlineCode",{parentName:"p"},"index.js"),", and start debugging in the ",Object(r.b)("a",a({parentName:"p"},{href:"https://code.visualstudio.com/docs/editor/debugging"}),"Debug View"),". You should be able to hit the breakpoints."))))}l.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return c})),t.d(n,"b",(function(){return b}));var r=t(0),a=t.n(r),o=a.a.createContext({}),i=function(e){var n=a.a.useContext(o),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},c=function(e){var n=i(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},l=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,p=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===n.indexOf(r)&&(t[r]=e[r]);return t}(e,["components","mdxType","originalType","parentName"]),l=i(t),b=r,s=l[c+"."+b]||l[b]||u[b]||o;return t?a.a.createElement(s,Object.assign({},{ref:n},p,{components:t})):a.a.createElement(s,Object.assign({},{ref:n},p))}));function b(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=l;var c={};for(var u in n)hasOwnProperty.call(n,u)&&(c[u]=n[u]);c.originalType=e,c[p]="string"==typeof e?e:r,i[1]=c;for(var b=2;b=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var a={sidebar_label:"Debugging",title:"Debugging"},c=[{value:"Application Debugging",id:"application-debugging",children:[]},{value:"Debugging Qode process",id:"debugging-qode-process",children:[{value:"Command Line Switches",id:"command-line-switches",children:[]},{value:"External Debuggers",id:"external-debuggers",children:[]}]}],p={rightToc:c},l="wrapper";function u(e){var n=e.components,t=i(e,["components"]);return Object(o.b)(l,r({},p,t,{components:n,mdxType:"MDXLayout"}),Object(o.b)("h2",{id:"application-debugging"},"Application Debugging"),Object(o.b)("p",null,"Whenever your NodeGui application is not behaving the way you wanted it to,\nan array of debugging tools might help you find coding errors, performance\nbottlenecks, or optimization opportunities."),Object(o.b)("p",null,"Since a NodeGui application runs on Qode. And Qode is essentially NodeJs. We can consider a NodeGui app as a regular NodeJs app. Hence, you can use any debugging tool that you use with NodeJs\nOne of the most popular ways of debugging a NodeJs app is by making use of the ",Object(o.b)("a",r({parentName:"p"},{href:"https://nodejs.org/en/docs/inspector/"}),"Chromium Developer Tools"),"."),Object(o.b)("p",null,"Google offers ",Object(o.b)("a",r({parentName:"p"},{href:"https://developer.chrome.com/devtools"}),"excellent documentation for their developer tools"),".\nWe recommend that you make yourself familiar with them - they are usually one\nof the most powerful utilities in any NodeGui Developer's tool belt."),Object(o.b)("h2",{id:"debugging-qode-process"},"Debugging Qode process"),Object(o.b)("p",null,"To debug JavaScript that's executed in the Qode/Node process you will need to use an external debugger and\nlaunch Qode with the ",Object(o.b)("inlineCode",{parentName:"p"},"--inspect")," or ",Object(o.b)("inlineCode",{parentName:"p"},"--inspect-brk")," switch. Once you run it you can open up Chrome and visit ",Object(o.b)("inlineCode",{parentName:"p"},"chrome://inspect")," where you should see your app listed."),Object(o.b)("h3",{id:"command-line-switches"},"Command Line Switches"),Object(o.b)("p",null,"Use one of the following command line switches to enable debugging of the process:"),Object(o.b)("h4",{id:"--inspectport"},Object(o.b)("inlineCode",{parentName:"h4"},"--inspect=[port]")),Object(o.b)("p",null,"Qode will listen for V8 inspector protocol messages on the specified ",Object(o.b)("inlineCode",{parentName:"p"},"port"),",\nan external debugger will need to connect on this port. The default ",Object(o.b)("inlineCode",{parentName:"p"},"port")," is\n",Object(o.b)("inlineCode",{parentName:"p"},"9229"),"."),Object(o.b)("pre",null,Object(o.b)("code",r({parentName:"pre"},{className:"language-shell"}),"qode --inspect=9229 your/app\n")),Object(o.b)("h4",{id:"--inspect-brkport"},Object(o.b)("inlineCode",{parentName:"h4"},"--inspect-brk=[port]")),Object(o.b)("p",null,"Like ",Object(o.b)("inlineCode",{parentName:"p"},"--inspect")," but pauses execution on the first line of JavaScript."),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Note")),Object(o.b)("p",null,"If you are using the official boilerplate ",Object(o.b)("inlineCode",{parentName:"p"},"nodegui-starter"),", then you can achieve this by running"),Object(o.b)("pre",null,Object(o.b)("code",r({parentName:"pre"},{}),"npm run debug\n")),Object(o.b)("h3",{id:"external-debuggers"},"External Debuggers"),Object(o.b)("p",null,"You will need to use a debugger that supports the V8 inspector protocol."),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Connect Chrome by visiting ",Object(o.b)("inlineCode",{parentName:"li"},"chrome://inspect")," and selecting to inspect the\nlaunched NodeGui app present there."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("a",r({parentName:"li"},{href:"/docs/guides/debugging-in-vscode"}),"Debugging the NodeGui app in VSCode"))))}u.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return c})),t.d(n,"b",(function(){return s}));var o=t(0),r=t.n(o),i=r.a.createContext({}),a=function(e){var n=r.a.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},c=function(e){var n=a(e.components);return r.a.createElement(i.Provider,{value:n},e.children)};var p="mdxType",l={inlineCode:"code",wrapper:function(e){var n=e.children;return r.a.createElement(r.a.Fragment,{},n)}},u=Object(o.forwardRef)((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===n.indexOf(o)&&(t[o]=e[o]);return t}(e,["components","mdxType","originalType","parentName"]),u=a(t),s=o,b=u[c+"."+s]||u[s]||l[s]||i;return t?r.a.createElement(b,Object.assign({},{ref:n},p,{components:t})):r.a.createElement(b,Object.assign({},{ref:n},p))}));function s(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=u;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c[p]="string"==typeof e?e:o,a[1]=c;for(var s=2;s=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var a={sidebar_label:"Debugging",title:"Debugging"},c=[{value:"Application Debugging",id:"application-debugging",children:[]},{value:"Debugging Qode process",id:"debugging-qode-process",children:[{value:"Command Line Switches",id:"command-line-switches",children:[]},{value:"External Debuggers",id:"external-debuggers",children:[]}]}],p={rightToc:c},l="wrapper";function u(e){var n=e.components,t=i(e,["components"]);return Object(o.b)(l,r({},p,t,{components:n,mdxType:"MDXLayout"}),Object(o.b)("h2",{id:"application-debugging"},"Application Debugging"),Object(o.b)("p",null,"Whenever your NodeGui application is not behaving the way you wanted it to,\nan array of debugging tools might help you find coding errors, performance\nbottlenecks, or optimization opportunities."),Object(o.b)("p",null,"Since a NodeGui application runs on Qode. And Qode is essentially NodeJs. We can consider a NodeGui app as a regular NodeJs app. Hence, you can use any debugging tool that you use with NodeJs\nOne of the most popular ways of debugging a NodeJs app is by making use of the ",Object(o.b)("a",r({parentName:"p"},{href:"https://nodejs.org/en/docs/inspector/"}),"Chromium Developer Tools"),"."),Object(o.b)("p",null,"Google offers ",Object(o.b)("a",r({parentName:"p"},{href:"https://developer.chrome.com/devtools"}),"excellent documentation for their developer tools"),".\nWe recommend that you make yourself familiar with them - they are usually one\nof the most powerful utilities in any NodeGui Developer's tool belt."),Object(o.b)("h2",{id:"debugging-qode-process"},"Debugging Qode process"),Object(o.b)("p",null,"To debug JavaScript that's executed in the Qode/Node process you will need to use an external debugger and\nlaunch Qode with the ",Object(o.b)("inlineCode",{parentName:"p"},"--inspect")," or ",Object(o.b)("inlineCode",{parentName:"p"},"--inspect-brk")," switch. Once you run it you can open up Chrome and visit ",Object(o.b)("inlineCode",{parentName:"p"},"chrome://inspect")," where you should see your app listed."),Object(o.b)("h3",{id:"command-line-switches"},"Command Line Switches"),Object(o.b)("p",null,"Use one of the following command line switches to enable debugging of the process:"),Object(o.b)("h4",{id:"--inspectport"},Object(o.b)("inlineCode",{parentName:"h4"},"--inspect=[port]")),Object(o.b)("p",null,"Qode will listen for V8 inspector protocol messages on the specified ",Object(o.b)("inlineCode",{parentName:"p"},"port"),",\nan external debugger will need to connect on this port. The default ",Object(o.b)("inlineCode",{parentName:"p"},"port")," is\n",Object(o.b)("inlineCode",{parentName:"p"},"9229"),"."),Object(o.b)("pre",null,Object(o.b)("code",r({parentName:"pre"},{className:"language-shell"}),"qode --inspect=9229 your/app\n")),Object(o.b)("h4",{id:"--inspect-brkport"},Object(o.b)("inlineCode",{parentName:"h4"},"--inspect-brk=[port]")),Object(o.b)("p",null,"Like ",Object(o.b)("inlineCode",{parentName:"p"},"--inspect")," but pauses execution on the first line of JavaScript."),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Note")),Object(o.b)("p",null,"If you are using the official boilerplate ",Object(o.b)("inlineCode",{parentName:"p"},"nodegui-starter"),", then you can achieve this by running"),Object(o.b)("pre",null,Object(o.b)("code",r({parentName:"pre"},{}),"npm run debug\n")),Object(o.b)("h3",{id:"external-debuggers"},"External Debuggers"),Object(o.b)("p",null,"You will need to use a debugger that supports the V8 inspector protocol."),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Connect Chrome by visiting ",Object(o.b)("inlineCode",{parentName:"li"},"chrome://inspect")," and selecting to inspect the\nlaunched NodeGui app present there."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("a",r({parentName:"li"},{href:"/docs/guides/debugging-in-vscode"}),"Debugging the NodeGui app in VSCode"))))}u.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return c})),t.d(n,"b",(function(){return s}));var o=t(0),r=t.n(o),i=r.a.createContext({}),a=function(e){var n=r.a.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},c=function(e){var n=a(e.components);return r.a.createElement(i.Provider,{value:n},e.children)};var p="mdxType",l={inlineCode:"code",wrapper:function(e){var n=e.children;return r.a.createElement(r.a.Fragment,{},n)}},u=Object(o.forwardRef)((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===n.indexOf(o)&&(t[o]=e[o]);return t}(e,["components","mdxType","originalType","parentName"]),u=a(t),s=o,b=u[c+"."+s]||u[s]||l[s]||i;return t?r.a.createElement(b,Object.assign({},{ref:n},p,{components:t})):r.a.createElement(b,Object.assign({},{ref:n},p))}));function s(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=u;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c[p]="string"==typeof e?e:o,a[1]=c;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i={sidebar_label:"Getting started",title:"Getting started"},l=[{value:"Developer environment",id:"developer-environment",children:[{value:"Setting up on macOS",id:"setting-up-on-macos",children:[]},{value:"Setting up on Windows",id:"setting-up-on-windows",children:[]},{value:"Setting up on Linux",id:"setting-up-on-linux",children:[]},{value:"A Good Editor",id:"a-good-editor",children:[]},{value:"Hello World",id:"hello-world",children:[]},{value:"Now what?",id:"now-what",children:[]}]}],s={rightToc:l},u="wrapper";function p(e){var t=e.components,n=r(e,["components"]);return Object(o.b)(u,a({},s,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"NodeGui enables you to create desktop applications with JavaScript. You could see it\nas a lightly modified variant of the Node.js runtime that is focused on desktop applications\ninstead of web servers."),Object(o.b)("p",null,"NodeGui is also an efficient JavaScript binding to a cross platform graphical user interface\n(GUI) library ",Object(o.b)("inlineCode",{parentName:"p"},"Qt"),". Qt is one of the most mature and efficient library for building desktop applications.\nThis enabled NodeGui to be extrememly memory and CPU efficient as compared to other popular Javascript Desktop GUI solutions. A hello world app built with NodeGui runs on less than 20Mb of memory."),Object(o.b)("h2",{id:"developer-environment"},"Developer environment"),Object(o.b)("p",null,"To turn your operating system into an environment capable of building desktop apps with NodeGui, you would need Node.js, npm,a code editor of your choice, and a rudimentary understanding of your operating system's command line client."),Object(o.b)("p",null,"Along with these, there are a few operating system dependent instructions that are listed below."),Object(o.b)("h3",{id:"setting-up-on-macos"},"Setting up on macOS"),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Requirements:")),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"NodeGui supports macOS 10.10 (Yosemite) and up. NodeGui currently only supports 64bit OS."),Object(o.b)("li",{parentName:"ul"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(o.b)("a",a({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(o.b)("li",{parentName:"ul"},"Make, GCC v7"),Object(o.b)("li",{parentName:"ul"},"Currently supported Node.Js versions are 12.x and up.")),Object(o.b)("p",null,"We strongly suggest you use some kind of version manager for Node.Js. This would allow you to switch to any version of nodejs quite easily. We recommend ",Object(o.b)("inlineCode",{parentName:"p"},"nvm"),": ",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/nvm-sh/nvm"}),"https://github.com/nvm-sh/nvm")),Object(o.b)("p",null,"Confirm that both ",Object(o.b)("inlineCode",{parentName:"p"},"node")," and ",Object(o.b)("inlineCode",{parentName:"p"},"npm")," are available by running:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-sh"}),"# This command should print the version of Node.js\nnode -v\n\n# This command should print the version of npm\nnpm -v\n")),Object(o.b)("p",null,"If both commands printed a version number, you are all set! Before you get\nstarted, you might want to install a ",Object(o.b)("a",a({parentName:"p"},{href:"#a-good-editor"}),"code editor")," suited\nfor JavaScript development."),Object(o.b)("h3",{id:"setting-up-on-windows"},"Setting up on Windows"),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"NodeGui supports Windows 7 and later versions – attempting to develop NodeGui\napplications on earlier versions of Windows might not work. NodeGui currently only supports 64bit OS.")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Requirements:")),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Visual studio 2017 and up."),Object(o.b)("li",{parentName:"ul"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(o.b)("a",a({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(o.b)("li",{parentName:"ul"},"Currently supported Node.Js versions are 12.x and up.")),Object(o.b)("p",null,"We strongly suggest you use some kind of version manager for Node.Js. This would allow you to switch to any version of nodejs quite easily."),Object(o.b)("p",null,"We strongly recommend Powershell as preferred terminal in Windows."),Object(o.b)("p",null,"Confirm that both ",Object(o.b)("inlineCode",{parentName:"p"},"node")," and ",Object(o.b)("inlineCode",{parentName:"p"},"npm")," are available by running:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-powershell"}),"# This command should print the version of Node.js\nnode -v\n\n# This command should print the version of npm\nnpm -v\n")),Object(o.b)("p",null,"If both commands printed a version number, you are all set! Before you get\nstarted, you might want to install a ",Object(o.b)("a",a({parentName:"p"},{href:"#a-good-editor"}),"code editor")," suited\nfor JavaScript development."),Object(o.b)("h3",{id:"setting-up-on-linux"},"Setting up on Linux"),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"NodeGui currently supports Ubuntu 16.04 and Debian 10 and up. Although other Linux distributions can also be easily supported. NodeGui currently only supports 64bit OS.")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Requirements:")),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Make, GCC v7"),Object(o.b)("li",{parentName:"ul"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(o.b)("a",a({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(o.b)("li",{parentName:"ul"},"Currently supported Node.Js versions are 12.x and up."),Object(o.b)("li",{parentName:"ul"},"On Ubuntu and Ubuntu-based distros it is advisable to run ",Object(o.b)("inlineCode",{parentName:"li"},"sudo apt-get update"),", followed by ",Object(o.b)("inlineCode",{parentName:"li"},"sudo apt-get install pkg-config build-essential"))),Object(o.b)("p",null,"We strongly suggest you use some kind of version manager for Node.Js. This would allow you to switch to any version of nodejs quite easily. We recommend ",Object(o.b)("inlineCode",{parentName:"p"},"nvm"),": ",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/nvm-sh/nvm"}),"https://github.com/nvm-sh/nvm")),Object(o.b)("p",null,"Confirm that both ",Object(o.b)("inlineCode",{parentName:"p"},"node")," and ",Object(o.b)("inlineCode",{parentName:"p"},"npm")," are available by running:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-sh"}),"# This command should print the version of Node.js\nnode -v\n\n# This command should print the version of npm\nnpm -v\n")),Object(o.b)("p",null,"If both commands printed a version number, you are all set! Before you get\nstarted, you might want to install a ",Object(o.b)("a",a({parentName:"p"},{href:"#a-good-editor"}),"code editor")," suited\nfor JavaScript development."),Object(o.b)("h3",{id:"a-good-editor"},"A Good Editor"),Object(o.b)("p",null,"We might suggest two free popular editors:\nGitHub's ",Object(o.b)("a",a({parentName:"p"},{href:"https://atom.io/"}),"Atom")," and Microsoft's ",Object(o.b)("a",a({parentName:"p"},{href:"https://code.visualstudio.com/"}),"Visual Studio Code"),". Both of\nthem have excellent JavaScript support."),Object(o.b)("p",null,"If you are one of the many developers with a strong preference, know that\nvirtually all code editors and IDEs these days support JavaScript."),Object(o.b)("h3",{id:"hello-world"},"Hello World"),Object(o.b)("p",null,"Clone and run the code in this tutorial by using the\n",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/nodegui-starter"}),Object(o.b)("inlineCode",{parentName:"a"},"nodegui/nodegui-starter"))," repository."),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Note"),": Running this requires ",Object(o.b)("a",a({parentName:"p"},{href:"https://git-scm.com"}),"Git")," and ",Object(o.b)("a",a({parentName:"p"},{href:"https://www.npmjs.com/"}),"npm"),"."),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-sh"})," git clone https://github.com/nodegui/nodegui-starter\n\n cd nodegui-starter\n\n npm install\n\n npm start\n")),Object(o.b)("p",null,"That's it!"),Object(o.b)("p",null,"Congratulations! You've successfully run and modified your first NodeGui app."),Object(o.b)("h3",{id:"now-what"},"Now what?"),Object(o.b)("p",null,"If you're curious to learn more about NodeGui, continue on to the ",Object(o.b)("a",a({parentName:"p"},{href:"/docs/guides/tutorial"}),"tutorial"),"."))}p.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var o=n(0),a=n.n(o),r=a.a.createContext({}),i=function(e){var t=a.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},l=function(e){var t=i(e.components);return a.a.createElement(r.Provider,{value:t},e.children)};var s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},p=Object(o.forwardRef)((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,s=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===t.indexOf(o)&&(n[o]=e[o]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),c=o,d=p[l+"."+c]||p[c]||u[c]||r;return n?a.a.createElement(d,Object.assign({},{ref:t},s,{components:n})):a.a.createElement(d,Object.assign({},{ref:t},s))}));function c(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=p;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[s]="string"==typeof e?e:o,i[1]=l;for(var c=2;c=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i={sidebar_label:"Getting started",title:"Getting started"},l=[{value:"Developer environment",id:"developer-environment",children:[{value:"Setting up on macOS",id:"setting-up-on-macos",children:[]},{value:"Setting up on Windows",id:"setting-up-on-windows",children:[]},{value:"Setting up on Linux",id:"setting-up-on-linux",children:[]},{value:"A Good Editor",id:"a-good-editor",children:[]},{value:"Hello World",id:"hello-world",children:[]},{value:"Now what?",id:"now-what",children:[]}]}],s={rightToc:l},u="wrapper";function p(e){var t=e.components,n=r(e,["components"]);return Object(o.b)(u,a({},s,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"NodeGui enables you to create desktop applications with JavaScript. You could see it\nas a lightly modified variant of the Node.js runtime that is focused on desktop applications\ninstead of web servers."),Object(o.b)("p",null,"NodeGui is also an efficient JavaScript binding to a cross platform graphical user interface\n(GUI) library ",Object(o.b)("inlineCode",{parentName:"p"},"Qt"),". Qt is one of the most mature and efficient library for building desktop applications.\nThis enabled NodeGui to be extrememly memory and CPU efficient as compared to other popular Javascript Desktop GUI solutions. A hello world app built with NodeGui runs on less than 20Mb of memory."),Object(o.b)("h2",{id:"developer-environment"},"Developer environment"),Object(o.b)("p",null,"To turn your operating system into an environment capable of building desktop apps with NodeGui, you would need Node.js, npm,a code editor of your choice, and a rudimentary understanding of your operating system's command line client."),Object(o.b)("p",null,"Along with these, there are a few operating system dependent instructions that are listed below."),Object(o.b)("h3",{id:"setting-up-on-macos"},"Setting up on macOS"),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Requirements:")),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"NodeGui supports macOS 10.10 (Yosemite) and up. NodeGui currently only supports 64bit OS."),Object(o.b)("li",{parentName:"ul"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(o.b)("a",a({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(o.b)("li",{parentName:"ul"},"Make, GCC v7"),Object(o.b)("li",{parentName:"ul"},"Currently supported Node.Js versions are 12.x and up.")),Object(o.b)("p",null,"We strongly suggest you use some kind of version manager for Node.Js. This would allow you to switch to any version of nodejs quite easily. We recommend ",Object(o.b)("inlineCode",{parentName:"p"},"nvm"),": ",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/nvm-sh/nvm"}),"https://github.com/nvm-sh/nvm")),Object(o.b)("p",null,"Confirm that both ",Object(o.b)("inlineCode",{parentName:"p"},"node")," and ",Object(o.b)("inlineCode",{parentName:"p"},"npm")," are available by running:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-sh"}),"# This command should print the version of Node.js\nnode -v\n\n# This command should print the version of npm\nnpm -v\n")),Object(o.b)("p",null,"If both commands printed a version number, you are all set! Before you get\nstarted, you might want to install a ",Object(o.b)("a",a({parentName:"p"},{href:"#a-good-editor"}),"code editor")," suited\nfor JavaScript development."),Object(o.b)("h3",{id:"setting-up-on-windows"},"Setting up on Windows"),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"NodeGui supports Windows 7 and later versions – attempting to develop NodeGui\napplications on earlier versions of Windows might not work. NodeGui currently only supports 64bit OS.")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Requirements:")),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Visual studio 2017 and up."),Object(o.b)("li",{parentName:"ul"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(o.b)("a",a({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(o.b)("li",{parentName:"ul"},"Currently supported Node.Js versions are 12.x and up.")),Object(o.b)("p",null,"We strongly suggest you use some kind of version manager for Node.Js. This would allow you to switch to any version of nodejs quite easily."),Object(o.b)("p",null,"We strongly recommend Powershell as preferred terminal in Windows."),Object(o.b)("p",null,"Confirm that both ",Object(o.b)("inlineCode",{parentName:"p"},"node")," and ",Object(o.b)("inlineCode",{parentName:"p"},"npm")," are available by running:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-powershell"}),"# This command should print the version of Node.js\nnode -v\n\n# This command should print the version of npm\nnpm -v\n")),Object(o.b)("p",null,"If both commands printed a version number, you are all set! Before you get\nstarted, you might want to install a ",Object(o.b)("a",a({parentName:"p"},{href:"#a-good-editor"}),"code editor")," suited\nfor JavaScript development."),Object(o.b)("h3",{id:"setting-up-on-linux"},"Setting up on Linux"),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"NodeGui currently supports Ubuntu 16.04 and Debian 10 and up. Although other Linux distributions can also be easily supported. NodeGui currently only supports 64bit OS.")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Requirements:")),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Make, GCC v7"),Object(o.b)("li",{parentName:"ul"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(o.b)("a",a({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(o.b)("li",{parentName:"ul"},"Currently supported Node.Js versions are 12.x and up."),Object(o.b)("li",{parentName:"ul"},"On Ubuntu and Ubuntu-based distros it is advisable to run ",Object(o.b)("inlineCode",{parentName:"li"},"sudo apt-get update"),", followed by ",Object(o.b)("inlineCode",{parentName:"li"},"sudo apt-get install pkg-config build-essential"))),Object(o.b)("p",null,"We strongly suggest you use some kind of version manager for Node.Js. This would allow you to switch to any version of nodejs quite easily. We recommend ",Object(o.b)("inlineCode",{parentName:"p"},"nvm"),": ",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/nvm-sh/nvm"}),"https://github.com/nvm-sh/nvm")),Object(o.b)("p",null,"Confirm that both ",Object(o.b)("inlineCode",{parentName:"p"},"node")," and ",Object(o.b)("inlineCode",{parentName:"p"},"npm")," are available by running:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-sh"}),"# This command should print the version of Node.js\nnode -v\n\n# This command should print the version of npm\nnpm -v\n")),Object(o.b)("p",null,"If both commands printed a version number, you are all set! Before you get\nstarted, you might want to install a ",Object(o.b)("a",a({parentName:"p"},{href:"#a-good-editor"}),"code editor")," suited\nfor JavaScript development."),Object(o.b)("h3",{id:"a-good-editor"},"A Good Editor"),Object(o.b)("p",null,"We might suggest two free popular editors:\nGitHub's ",Object(o.b)("a",a({parentName:"p"},{href:"https://atom.io/"}),"Atom")," and Microsoft's ",Object(o.b)("a",a({parentName:"p"},{href:"https://code.visualstudio.com/"}),"Visual Studio Code"),". Both of\nthem have excellent JavaScript support."),Object(o.b)("p",null,"If you are one of the many developers with a strong preference, know that\nvirtually all code editors and IDEs these days support JavaScript."),Object(o.b)("h3",{id:"hello-world"},"Hello World"),Object(o.b)("p",null,"Clone and run the code in this tutorial by using the\n",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/nodegui-starter"}),Object(o.b)("inlineCode",{parentName:"a"},"nodegui/nodegui-starter"))," repository."),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Note"),": Running this requires ",Object(o.b)("a",a({parentName:"p"},{href:"https://git-scm.com"}),"Git")," and ",Object(o.b)("a",a({parentName:"p"},{href:"https://www.npmjs.com/"}),"npm"),"."),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-sh"}),"\ngit clone https://github.com/nodegui/nodegui-starter\n\ncd nodegui-starter\n\nnpm install\n\nnpm start\n\n")),Object(o.b)("p",null,"That's it!"),Object(o.b)("p",null,"Congratulations! You've successfully run and modified your first NodeGui app."),Object(o.b)("h3",{id:"now-what"},"Now what?"),Object(o.b)("p",null,"If you're curious to learn more about NodeGui, continue on to the ",Object(o.b)("a",a({parentName:"p"},{href:"/docs/guides/tutorial"}),"tutorial"),"."))}p.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var o=n(0),a=n.n(o),r=a.a.createContext({}),i=function(e){var t=a.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},l=function(e){var t=i(e.components);return a.a.createElement(r.Provider,{value:t},e.children)};var s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},p=Object(o.forwardRef)((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,s=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===t.indexOf(o)&&(n[o]=e[o]);return n}(e,["components","mdxType","originalType","parentName"]),p=i(n),c=o,d=p[l+"."+c]||p[c]||u[c]||r;return n?a.a.createElement(d,Object.assign({},{ref:t},s,{components:n})):a.a.createElement(d,Object.assign({},{ref:t},s))}));function c(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=p;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[s]="string"==typeof e?e:o,i[1]=l;for(var c=2;c=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c={sidebar_label:"Handle Events",title:"Handle Events"},i=[],p={rightToc:i},u="wrapper";function l(e){var n=e.components,r=o(e,["components"]);return Object(t.b)(u,a({},p,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"WIP"))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return i})),r.d(n,"b",(function(){return f}));var t=r(0),a=r.n(t),o=a.a.createContext({}),c=function(e){var n=a.a.useContext(o),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},i=function(e){var n=c(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,o=e.originalType,i=e.parentName,p=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=c(r),f=t,s=l[i+"."+f]||l[f]||u[f]||o;return r?a.a.createElement(s,Object.assign({},{ref:n},p,{components:r})):a.a.createElement(s,Object.assign({},{ref:n},p))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var o=r.length,c=new Array(o);c[0]=l;var i={};for(var u in n)hasOwnProperty.call(n,u)&&(i[u]=n[u]);i.originalType=e,i[p]="string"==typeof e?e:t,c[1]=i;for(var f=2;f=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c={sidebar_label:"Handle Events",title:"Handle Events"},i=[],p={rightToc:i},u="wrapper";function l(e){var n=e.components,r=o(e,["components"]);return Object(t.b)(u,a({},p,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"WIP"))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return i})),r.d(n,"b",(function(){return f}));var t=r(0),a=r.n(t),o=a.a.createContext({}),c=function(e){var n=a.a.useContext(o),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},i=function(e){var n=c(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,o=e.originalType,i=e.parentName,p=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=c(r),f=t,s=l[i+"."+f]||l[f]||u[f]||o;return r?a.a.createElement(s,Object.assign({},{ref:n},p,{components:r})):a.a.createElement(s,Object.assign({},{ref:n},p))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var o=r.length,c=new Array(o);c[0]=l;var i={};for(var u in n)hasOwnProperty.call(n,u)&&(i[u]=n[u]);i.originalType=e,i[p]="string"==typeof e?e:t,c[1]=i;for(var f=2;f=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c={sidebar_label:"Images",title:"Images"},i=[],p={rightToc:i},u="wrapper";function l(e){var n=e.components,r=o(e,["components"]);return Object(t.b)(u,a({},p,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"WIP"))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return i})),r.d(n,"b",(function(){return f}));var t=r(0),a=r.n(t),o=a.a.createContext({}),c=function(e){var n=a.a.useContext(o),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},i=function(e){var n=c(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,o=e.originalType,i=e.parentName,p=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=c(r),f=t,s=l[i+"."+f]||l[f]||u[f]||o;return r?a.a.createElement(s,Object.assign({},{ref:n},p,{components:r})):a.a.createElement(s,Object.assign({},{ref:n},p))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var o=r.length,c=new Array(o);c[0]=l;var i={};for(var u in n)hasOwnProperty.call(n,u)&&(i[u]=n[u]);i.originalType=e,i[p]="string"==typeof e?e:t,c[1]=i;for(var f=2;f=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c={sidebar_label:"Images",title:"Images"},i=[],p={rightToc:i},u="wrapper";function l(e){var n=e.components,r=o(e,["components"]);return Object(t.b)(u,a({},p,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"WIP"))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return i})),r.d(n,"b",(function(){return f}));var t=r(0),a=r.n(t),o=a.a.createContext({}),c=function(e){var n=a.a.useContext(o),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},i=function(e){var n=c(e.components);return a.a.createElement(o.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,o=e.originalType,i=e.parentName,p=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=c(r),f=t,s=l[i+"."+f]||l[f]||u[f]||o;return r?a.a.createElement(s,Object.assign({},{ref:n},p,{components:r})):a.a.createElement(s,Object.assign({},{ref:n},p))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var o=r.length,c=new Array(o);c[0]=l;var i={};for(var u in n)hasOwnProperty.call(n,u)&&(i[u]=n[u]);i.originalType=e,i[p]="string"==typeof e?e:t,c[1]=i;for(var f=2;f=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l={sidebar_label:"Layout",title:"Layout"},r=[{value:"Fixed Dimensions",id:"fixed-dimensions",children:[]},{value:"Dynamic Layouts",id:"dynamic-layouts",children:[]},{value:"FlexLayout",id:"flexlayout",children:[{value:"Example:",id:"example",children:[]},{value:"TLDR",id:"tldr",children:[]}]},{value:"Conclusion",id:"conclusion",children:[]}],s={rightToc:r},c="wrapper";function u(e){var t=e.components,n=i(e,["components"]);return Object(a.b)(c,o({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("p",null,"NodeGui uses a layout system to automatically arrange child widgets within a widget to ensure that they make good use of the available space."),Object(a.b)("h2",{id:"fixed-dimensions"},"Fixed Dimensions"),Object(a.b)("p",null,"A widget's height and width determine its size on the screen. The simplest way to set the dimensions of a widget is by adding a fixed width and height to style. Setting dimensions this way is common for widgets that should always render at exactly the same size, regardless of screen dimensions."),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'\nconst { QMainWindow, QWidget } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\nconst view = new QWidget(win);\n\nview.setInlineStyle("width:50px; height:30px; background-color: yellow;");\n\nwin.show();\n(global as any).win = win;\n\n')),Object(a.b)("h2",{id:"dynamic-layouts"},"Dynamic Layouts"),Object(a.b)("p",null,"Dynamic layouts automatically position and resize widgets when the amount of space available for them changes, ensuring that they are consistently arranged and that the user interface as a whole remains usable."),Object(a.b)("p",null,"NodeGui currently supports the following layouts at the moment:"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},"FlexLayout"),Object(a.b)("li",{parentName:"ul"},"QGridLayout")),Object(a.b)("p",null,Object(a.b)("em",{parentName:"p"},"More layouts will be added as time goes on. You can also add layouts yourself by creating custom native plugins for NodeGui usng the ",Object(a.b)("a",o({parentName:"em"},{href:"/docs/guides/custom-nodegui-native-plugin"}),"Custom Native Plugin API."))),Object(a.b)("h2",{id:"flexlayout"},"FlexLayout"),Object(a.b)("p",null,"Use FlexLayout to have the children expand and shrink dynamically based on available space. Normally you will use ",Object(a.b)("inlineCode",{parentName:"p"},"flex: 1"),", which tells a widget to fill all available space, shared evenly amongst other widgets with the same parent. The larger the flex given, the higher the ratio of space a component will take compared to its siblings."),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"A widget can only expand to fill available space if its parent has dimensions greater than 0. If a parent does not have either a fixed width and height or flex, the parent will have dimensions of 0 and the flex children will not be visible.")),Object(a.b)("p",null,"Flexbox is designed to provide a consistent layout on different screen sizes. You will normally use a combination of flexDirection, alignItems, and justifyContent to achieve the right layout."),Object(a.b)("h3",{id:"example"},"Example:"),Object(a.b)("p",null,"Lets say you want to build a UI that has a parent view which has two child widgets. One a label with text Hello and another a view with background color white. Now you want the label to occupy 1/3 of the available space while the white colored child view to occupy the remaining 2/3 space."),Object(a.b)("img",{src:"/img/docs/flex-layout-1.png",alt:"flex layout example 1",style:{maxWidth:700,width:"100%"}}),Object(a.b)("p",null,"The code for that would look something like this:"),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'let { QLabel, FlexLayout, QWidget, QMainWindow } = require("@nodegui/nodegui");\n\n// Create a root view and assign a flex layout to it.\nconst rootView = new QWidget();\nrootView.setLayout(new FlexLayout());\nrootView.setObjectName("rootView");\n\n// Create two widgets - one label and one view\nconst label = new QLabel();\nlabel.setText("Hello");\nlabel.setObjectName("label");\n\nconst view = new QWidget();\nview.setObjectName("view");\n\n// Now tell rootView layout that the label and the other view are its children\nrootView.layout.addWidget(label);\nrootView.layout.addWidget(view);\n\n// Tell FlexLayout how you want children of rootView to be poisitioned\nrootView.setStyleSheet(`\n #rootView{\n flex: 1;\n background-color: blue;\n }\n #label {\n flex: 1;\n color: white;\n background-color: green;\n }\n #view {\n flex: 3;\n background-color: white;\n }\n`);\n\nconst win = new QMainWindow();\nwin.setCentralWidget(rootView);\nwin.show();\nglobal.win = win;\n')),Object(a.b)("h3",{id:"tldr"},"TLDR"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},"First step is to set a layout on the parent widget. You can do this using the widget's ",Object(a.b)("inlineCode",{parentName:"p"},"setLayout")," method. Here we are using FlexLayout.")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},"For a layout to work you must let the layout know which widgets are the children and how to lay them on the available screen space within the parent widget. You do this using a layout's ",Object(a.b)("inlineCode",{parentName:"p"},"addWidget")," method. In the case of FlexLayout you will specify properties by setting flex properties on the parent and child widgets."))),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"To know more on how FlexBox layout works in depth you can visit: ",Object(a.b)("a",o({parentName:"p"},{href:"https://facebook.github.io/react-native/docs/0.60/flexbox"}),"https://facebook.github.io/react-native/docs/0.60/flexbox"),"."),Object(a.b)("p",{parentName:"blockquote"},"NodeGui uses the same library that React Native uses underneath for FlexBox (",Object(a.b)("a",o({parentName:"p"},{href:"https://github.com/facebook/yoga"}),"Yoga"),").")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},"You can specify layout properties via inline styles also.")),Object(a.b)("h2",{id:"conclusion"},"Conclusion"),Object(a.b)("p",null,"The primary layout in NodeGui is the Flexbox layout. Flexbox layout can be controlled via stylesheet just as in web. So both paint and layout properties are available at the same place."),Object(a.b)("p",null,"NodeGui will also try to support other available layouts in Qt. But, If you need a special layout that Qt/NodeGui doesnt yet support you can always create a ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/guides/custom-nodegui-native-plugin"}),"native plugin for NodeGui")," and use Qt's APIs to create one. In fact, Qt doesnt have a FlexLayout built in, FlexLayout is actually a custom Qt layout written with the help of Yoga library."))}u.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return d}));var a=n(0),o=n.n(a),i=o.a.createContext({}),l=function(e){var t=o.a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=l(e.components);return o.a.createElement(i.Provider,{value:t},e.children)};var s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),u=l(n),d=a,b=u[r+"."+d]||u[d]||c[d]||i;return n?o.a.createElement(b,Object.assign({},{ref:t},s,{components:n})):o.a.createElement(b,Object.assign({},{ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=u;var r={};for(var c in t)hasOwnProperty.call(t,c)&&(r[c]=t[c]);r.originalType=e,r[s]="string"==typeof e?e:a,l[1]=r;for(var d=2;d=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l={sidebar_label:"Layout",title:"Layout"},r=[{value:"Fixed Dimensions",id:"fixed-dimensions",children:[]},{value:"Dynamic Layouts",id:"dynamic-layouts",children:[]},{value:"FlexLayout",id:"flexlayout",children:[{value:"Example:",id:"example",children:[]},{value:"TLDR",id:"tldr",children:[]}]},{value:"Conclusion",id:"conclusion",children:[]}],s={rightToc:r},c="wrapper";function u(e){var t=e.components,n=i(e,["components"]);return Object(a.b)(c,o({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("p",null,"NodeGui uses a layout system to automatically arrange child widgets within a widget to ensure that they make good use of the available space."),Object(a.b)("h2",{id:"fixed-dimensions"},"Fixed Dimensions"),Object(a.b)("p",null,"A widget's height and width determine its size on the screen. The simplest way to set the dimensions of a widget is by adding a fixed width and height to style. Setting dimensions this way is common for widgets that should always render at exactly the same size, regardless of screen dimensions."),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'\nconst { QMainWindow, QWidget } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\nconst view = new QWidget(win);\n\nview.setInlineStyle("width:50px; height:30px; background-color: yellow;");\n\nwin.show();\n(global as any).win = win;\n\n')),Object(a.b)("h2",{id:"dynamic-layouts"},"Dynamic Layouts"),Object(a.b)("p",null,"Dynamic layouts automatically position and resize widgets when the amount of space available for them changes, ensuring that they are consistently arranged and that the user interface as a whole remains usable."),Object(a.b)("p",null,"NodeGui currently supports the following layouts at the moment:"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},"FlexLayout"),Object(a.b)("li",{parentName:"ul"},"QGridLayout")),Object(a.b)("p",null,Object(a.b)("em",{parentName:"p"},"More layouts will be added as time goes on. You can also add layouts yourself by creating custom native plugins for NodeGui usng the ",Object(a.b)("a",o({parentName:"em"},{href:"/docs/guides/custom-nodegui-native-plugin"}),"Custom Native Plugin API."))),Object(a.b)("h2",{id:"flexlayout"},"FlexLayout"),Object(a.b)("p",null,"Use FlexLayout to have the children expand and shrink dynamically based on available space. Normally you will use ",Object(a.b)("inlineCode",{parentName:"p"},"flex: 1"),", which tells a widget to fill all available space, shared evenly amongst other widgets with the same parent. The larger the flex given, the higher the ratio of space a component will take compared to its siblings."),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"A widget can only expand to fill available space if its parent has dimensions greater than 0. If a parent does not have either a fixed width and height or flex, the parent will have dimensions of 0 and the flex children will not be visible.")),Object(a.b)("p",null,"Flexbox is designed to provide a consistent layout on different screen sizes. You will normally use a combination of flexDirection, alignItems, and justifyContent to achieve the right layout."),Object(a.b)("h3",{id:"example"},"Example:"),Object(a.b)("p",null,"Lets say you want to build a UI that has a parent view which has two child widgets. One a label with text Hello and another a view with background color white. Now you want the label to occupy 1/3 of the available space while the white colored child view to occupy the remaining 2/3 space."),Object(a.b)("img",{src:"/img/docs/flex-layout-1.png",alt:"flex layout example 1",style:{maxWidth:700,width:"100%"}}),Object(a.b)("p",null,"The code for that would look something like this:"),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'let { QLabel, FlexLayout, QWidget, QMainWindow } = require("@nodegui/nodegui");\n\n// Create a root view and assign a flex layout to it.\nconst rootView = new QWidget();\nrootView.setLayout(new FlexLayout());\nrootView.setObjectName("rootView");\n\n// Create two widgets - one label and one view\nconst label = new QLabel();\nlabel.setText("Hello");\nlabel.setObjectName("label");\n\nconst view = new QWidget();\nview.setObjectName("view");\n\n// Now tell rootView layout that the label and the other view are its children\nrootView.layout.addWidget(label);\nrootView.layout.addWidget(view);\n\n// Tell FlexLayout how you want children of rootView to be poisitioned\nrootView.setStyleSheet(`\n #rootView{\n flex: 1;\n background-color: blue;\n }\n #label {\n flex: 1;\n color: white;\n background-color: green;\n }\n #view {\n flex: 3;\n background-color: white;\n }\n`);\n\nconst win = new QMainWindow();\nwin.setCentralWidget(rootView);\nwin.show();\nglobal.win = win;\n')),Object(a.b)("h3",{id:"tldr"},"TLDR"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},"First step is to set a layout on the parent widget. You can do this using the widget's ",Object(a.b)("inlineCode",{parentName:"p"},"setLayout")," method. Here we are using FlexLayout.")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("p",{parentName:"li"},"For a layout to work you must let the layout know which widgets are the children and how to lay them on the available screen space within the parent widget. You do this using a layout's ",Object(a.b)("inlineCode",{parentName:"p"},"addWidget")," method. In the case of FlexLayout you will specify properties by setting flex properties on the parent and child widgets."))),Object(a.b)("blockquote",null,Object(a.b)("p",{parentName:"blockquote"},"To know more on how FlexBox layout works in depth you can visit: ",Object(a.b)("a",o({parentName:"p"},{href:"https://facebook.github.io/react-native/docs/0.60/flexbox"}),"https://facebook.github.io/react-native/docs/0.60/flexbox"),"."),Object(a.b)("p",{parentName:"blockquote"},"NodeGui uses the same library that React Native uses underneath for FlexBox (",Object(a.b)("a",o({parentName:"p"},{href:"https://github.com/facebook/yoga"}),"Yoga"),").")),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},"You can specify layout properties via inline styles also.")),Object(a.b)("h2",{id:"conclusion"},"Conclusion"),Object(a.b)("p",null,"The primary layout in NodeGui is the Flexbox layout. Flexbox layout can be controlled via stylesheet just as in web. So both paint and layout properties are available at the same place."),Object(a.b)("p",null,"NodeGui will also try to support other available layouts in Qt. But, If you need a special layout that Qt/NodeGui doesnt yet support you can always create a ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/guides/custom-nodegui-native-plugin"}),"native plugin for NodeGui")," and use Qt's APIs to create one. In fact, Qt doesnt have a FlexLayout built in, FlexLayout is actually a custom Qt layout written with the help of Yoga library."))}u.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return d}));var a=n(0),o=n.n(a),i=o.a.createContext({}),l=function(e){var t=o.a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},r=function(e){var t=l(e.components);return o.a.createElement(i.Provider,{value:t},e.children)};var s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),u=l(n),d=a,b=u[r+"."+d]||u[d]||c[d]||i;return n?o.a.createElement(b,Object.assign({},{ref:t},s,{components:n})):o.a.createElement(b,Object.assign({},{ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=u;var r={};for(var c in t)hasOwnProperty.call(t,c)&&(r[c]=t[c]);r.originalType=e,r[s]="string"==typeof e?e:a,l[1]=r;for(var d=2;d=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c={sidebar_label:"Networking",title:"Networking"},i=[],p={rightToc:i},u="wrapper";function l(e){var n=e.components,r=a(e,["components"]);return Object(t.b)(u,o({},p,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"WIP"))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return i})),r.d(n,"b",(function(){return f}));var t=r(0),o=r.n(t),a=o.a.createContext({}),c=function(e){var n=o.a.useContext(a),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},i=function(e){var n=c(e.components);return o.a.createElement(a.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,a=e.originalType,i=e.parentName,p=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=c(r),f=t,s=l[i+"."+f]||l[f]||u[f]||a;return r?o.a.createElement(s,Object.assign({},{ref:n},p,{components:r})):o.a.createElement(s,Object.assign({},{ref:n},p))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var a=r.length,c=new Array(a);c[0]=l;var i={};for(var u in n)hasOwnProperty.call(n,u)&&(i[u]=n[u]);i.originalType=e,i[p]="string"==typeof e?e:t,c[1]=i;for(var f=2;f=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c={sidebar_label:"Networking",title:"Networking"},i=[],p={rightToc:i},u="wrapper";function l(e){var n=e.components,r=a(e,["components"]);return Object(t.b)(u,o({},p,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"WIP"))}l.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return i})),r.d(n,"b",(function(){return f}));var t=r(0),o=r.n(t),a=o.a.createContext({}),c=function(e){var n=o.a.useContext(a),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},i=function(e){var n=c(e.components);return o.a.createElement(a.Provider,{value:n},e.children)};var p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},l=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,a=e.originalType,i=e.parentName,p=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),l=c(r),f=t,s=l[i+"."+f]||l[f]||u[f]||a;return r?o.a.createElement(s,Object.assign({},{ref:n},p,{components:r})):o.a.createElement(s,Object.assign({},{ref:n},p))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var a=r.length,c=new Array(a);c[0]=l;var i={};for(var u in n)hasOwnProperty.call(n,u)&&(i[u]=n[u]);i.originalType=e,i[p]="string"==typeof e?e:t,c[1]=i;for(var f=2;f=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var i={sidebar_label:"Architecture",title:"Architecture"},s=[{value:"Qode",id:"qode",children:[]},{value:"Using NodeGui APIs",id:"using-nodegui-apis",children:[]},{value:"Using Nodejs APIs",id:"using-nodejs-apis",children:[]}],l={rightToc:s},c="wrapper";function d(e){var n=e.components,t=r(e,["components"]);return Object(o.b)(c,a({},l,t,{components:n,mdxType:"MDXLayout"}),Object(o.b)("p",null,"By looking at how NodeGui works internally, we would get a clear picture on why the APIs are designed the way they are."),Object(o.b)("h2",{id:"qode"},"Qode"),Object(o.b)("p",null,"NodeGui uses Qt for creating Windows and other UI elements. Hence it exports thin wrappers of native C++ widgets from Qt into Javascript world. Now, every Qt application needs to initialize an instance of ",Object(o.b)("inlineCode",{parentName:"p"},"QApplication")," before creating widgets. The way we do it in C++ Qt application is (dont worry if it doesnt make sense right now):"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-cpp"}),' #include \n #include \n\n int main(int argc, char *argv[])\n {\n QApplication app(argc, argv); // Important\n\n QPushButton hello("Hello world!");\n hello.resize(100, 30);\n hello.show();\n\n return app.exec(); // Important\n }\n')),Object(o.b)("p",null,"Like many Gui libraries Qt uses an event/message loop to handle events from widgets. Hence, when we call ",Object(o.b)("inlineCode",{parentName:"p"},"app.exec()")," Qt starts its message loop and blocks on that line. This is all good when there is only one message loop in the entire app. But since we want to use Qt with NodeJS and NodeJs has its own event loop, we cannot run both Qt and NodeJs on the same thread easily."),Object(o.b)("p",null,"Then following questions arise:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"What if we run Qt on a separate thread?")," : No this is not possible since Qt has a requirement that it needs to run on the main thread."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"What if we run Node on a separate thread?")," : This would mean we need to build a complex bridge between Node and Qt threads to make them communicate. A strict no no.")),Object(o.b)("p",null,"So in order to make both NodeJs and Qt work together we need to find a way to merge these two event loops into one. This is achieved by a custom NodeJs binary we call as ",Object(o.b)("inlineCode",{parentName:"p"},"Qode"),"."),Object(o.b)("p",null,"Qode is a lightly modified fork of Node.js that merges Node's event loop with Qt's event loop. The idea of merging event loops is inspired by Electron and ",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/yue"}),"other")," Gui libraries developed by ",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/zcbenz"}),"zcbenz (Cheng Zhao)"),". It has been detailed in a post here: ",Object(o.b)("a",a({parentName:"p"},{href:"https://electronjs.org/blog/electron-internals-node-integration"}),"Electron internals"),". Hence, we reused the logic from electron to achieve smooth integration between Qt and NodeJs."),Object(o.b)("p",null,"The idea is to release a corresponding Qode binary for every NodeJs version that comes out after Node v12.6.\nThe source code of Qode can be found ",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/qode"}),"here"),"."),Object(o.b)("p",null,Object(o.b)("em",{parentName:"p"},"*","PS: Qode is a fork of ",Object(o.b)("a",a({parentName:"em"},{href:"https://github.com/yue/yode"}),"Yode"))),Object(o.b)("h2",{id:"using-nodegui-apis"},"Using NodeGui APIs"),Object(o.b)("p",null,"NodeGui offers a number of APIs that support the development of a desktop\napplication. You'd access NodeGui's APIs by requiring its included module:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'require("@nodegui/nodegui");\n')),Object(o.b)("p",null,"A window in NodeGui is for instance created using the ",Object(o.b)("inlineCode",{parentName:"p"},"QMainWindow"),"\nclass."),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n')),Object(o.b)("h2",{id:"using-nodejs-apis"},"Using Nodejs APIs"),Object(o.b)("p",null,"NodeGui exposes full access to Node.js. This has two important implications:"),Object(o.b)("ol",null,Object(o.b)("li",{parentName:"ol"},"All APIs available in Node.js are available in NodeGui. Calling the\nfollowing code from an NodeGui app works:")),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-javascript"}),"const fs = require(\"fs\");\n\nconst root = fs.readdirSync(\"/\");\n\n// This will print all files at the root-level of the disk,\n// either '/' or 'C:\\'.\nconsole.log(root);\n")),Object(o.b)("ol",{start:2},Object(o.b)("li",{parentName:"ol"},"You can use Node.js modules in your application. Pick your favorite npm\nmodule. npm offers currently the world's biggest repository of open-source\ncode – the ability to use well-maintained and tested code that used to be\nreserved for server applications is one of the key features of NodeGui.")),Object(o.b)("p",null,"As an example, to use the official AWS SDK in your application, you'd first\ninstall it as a dependency:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-sh"}),"npm install --save aws-sdk\n")),Object(o.b)("p",null,"Then, in your NodeGui app, require and use the module as if you were\nbuilding a Node.js application:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'// A ready-to-use S3 Client\nconst S3 = require("aws-sdk/clients/s3");\n')),Object(o.b)("p",null,"There is one important caveat: Native Node.js modules (that is, modules that\nrequire compilation of native code before they can be used) will need to be\ncompiled with Qode or a compatible Node version to be used with NodeGui."),Object(o.b)("p",null,"The vast majority of Node.js modules are ",Object(o.b)("em",{parentName:"p"},"not")," native. Only 400 out of the\n~650.000 modules are native. However, if you do need native modules, please\nconsult ",Object(o.b)("a",a({parentName:"p"},{href:"/docs/guides/using-native-node-modules"}),"this guide on how to recompile them for NodeGui"),"."))}d.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return s})),t.d(n,"b",(function(){return p}));var o=t(0),a=t.n(o),r=a.a.createContext({}),i=function(e){var n=a.a.useContext(r),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},s=function(e){var n=i(e.components);return a.a.createElement(r.Provider,{value:n},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},d=Object(o.forwardRef)((function(e,n){var t=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,l=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===n.indexOf(o)&&(t[o]=e[o]);return t}(e,["components","mdxType","originalType","parentName"]),d=i(t),p=o,u=d[s+"."+p]||d[p]||c[p]||r;return t?a.a.createElement(u,Object.assign({},{ref:n},l,{components:t})):a.a.createElement(u,Object.assign({},{ref:n},l))}));function p(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var r=t.length,i=new Array(r);i[0]=d;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s[l]="string"==typeof e?e:o,i[1]=s;for(var p=2;p=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var i={sidebar_label:"Architecture",title:"Architecture"},s=[{value:"Qode",id:"qode",children:[]},{value:"Using NodeGui APIs",id:"using-nodegui-apis",children:[]},{value:"Using Nodejs APIs",id:"using-nodejs-apis",children:[]}],l={rightToc:s},c="wrapper";function d(e){var n=e.components,t=r(e,["components"]);return Object(o.b)(c,a({},l,t,{components:n,mdxType:"MDXLayout"}),Object(o.b)("p",null,"By looking at how NodeGui works internally, we would get a clear picture on why the APIs are designed the way they are."),Object(o.b)("h2",{id:"qode"},"Qode"),Object(o.b)("p",null,"NodeGui uses Qt for creating Windows and other UI elements. Hence it exports thin wrappers of native C++ widgets from Qt into Javascript world. Now, every Qt application needs to initialize an instance of ",Object(o.b)("inlineCode",{parentName:"p"},"QApplication")," before creating widgets. The way we do it in C++ Qt application is (dont worry if it doesnt make sense right now):"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-cpp"}),' #include \n #include \n\n int main(int argc, char *argv[])\n {\n QApplication app(argc, argv); // Important\n\n QPushButton hello("Hello world!");\n hello.resize(100, 30);\n hello.show();\n\n return app.exec(); // Important\n }\n')),Object(o.b)("p",null,"Like many Gui libraries Qt uses an event/message loop to handle events from widgets. Hence, when we call ",Object(o.b)("inlineCode",{parentName:"p"},"app.exec()")," Qt starts its message loop and blocks on that line. This is all good when there is only one message loop in the entire app. But since we want to use Qt with NodeJS and NodeJs has its own event loop, we cannot run both Qt and NodeJs on the same thread easily."),Object(o.b)("p",null,"Then following questions arise:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"What if we run Qt on a separate thread?")," : No this is not possible since Qt has a requirement that it needs to run on the main thread."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"What if we run Node on a separate thread?")," : This would mean we need to build a complex bridge between Node and Qt threads to make them communicate. A strict no no.")),Object(o.b)("p",null,"So in order to make both NodeJs and Qt work together we need to find a way to merge these two event loops into one. This is achieved by a custom NodeJs binary we call as ",Object(o.b)("inlineCode",{parentName:"p"},"Qode"),"."),Object(o.b)("p",null,"Qode is a lightly modified fork of Node.js that merges Node's event loop with Qt's event loop. The idea of merging event loops is inspired by Electron and ",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/yue"}),"other")," Gui libraries developed by ",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/zcbenz"}),"zcbenz (Cheng Zhao)"),". It has been detailed in a post here: ",Object(o.b)("a",a({parentName:"p"},{href:"https://electronjs.org/blog/electron-internals-node-integration"}),"Electron internals"),". Hence, we reused the logic from electron to achieve smooth integration between Qt and NodeJs."),Object(o.b)("p",null,"The idea is to release a corresponding Qode binary for every NodeJs version that comes out after Node v12.6.\nThe source code of Qode can be found ",Object(o.b)("a",a({parentName:"p"},{href:"https://github.com/nodegui/qode"}),"here"),"."),Object(o.b)("p",null,Object(o.b)("em",{parentName:"p"},"*","PS: Qode is a fork of ",Object(o.b)("a",a({parentName:"em"},{href:"https://github.com/yue/yode"}),"Yode"))),Object(o.b)("h2",{id:"using-nodegui-apis"},"Using NodeGui APIs"),Object(o.b)("p",null,"NodeGui offers a number of APIs that support the development of a desktop\napplication. You'd access NodeGui's APIs by requiring its included module:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'require("@nodegui/nodegui");\n')),Object(o.b)("p",null,"A window in NodeGui is for instance created using the ",Object(o.b)("inlineCode",{parentName:"p"},"QMainWindow"),"\nclass."),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'const { QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n')),Object(o.b)("h2",{id:"using-nodejs-apis"},"Using Nodejs APIs"),Object(o.b)("p",null,"NodeGui exposes full access to Node.js. This has two important implications:"),Object(o.b)("ol",null,Object(o.b)("li",{parentName:"ol"},"All APIs available in Node.js are available in NodeGui. Calling the\nfollowing code from an NodeGui app works:")),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-javascript"}),"const fs = require(\"fs\");\n\nconst root = fs.readdirSync(\"/\");\n\n// This will print all files at the root-level of the disk,\n// either '/' or 'C:\\'.\nconsole.log(root);\n")),Object(o.b)("ol",{start:2},Object(o.b)("li",{parentName:"ol"},"You can use Node.js modules in your application. Pick your favorite npm\nmodule. npm offers currently the world's biggest repository of open-source\ncode – the ability to use well-maintained and tested code that used to be\nreserved for server applications is one of the key features of NodeGui.")),Object(o.b)("p",null,"As an example, to use the official AWS SDK in your application, you'd first\ninstall it as a dependency:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-sh"}),"npm install --save aws-sdk\n")),Object(o.b)("p",null,"Then, in your NodeGui app, require and use the module as if you were\nbuilding a Node.js application:"),Object(o.b)("pre",null,Object(o.b)("code",a({parentName:"pre"},{className:"language-javascript"}),'// A ready-to-use S3 Client\nconst S3 = require("aws-sdk/clients/s3");\n')),Object(o.b)("p",null,"There is one important caveat: Native Node.js modules (that is, modules that\nrequire compilation of native code before they can be used) will need to be\ncompiled with Qode or a compatible Node version to be used with NodeGui."),Object(o.b)("p",null,"The vast majority of Node.js modules are ",Object(o.b)("em",{parentName:"p"},"not")," native. Only 400 out of the\n~650.000 modules are native. However, if you do need native modules, please\nconsult ",Object(o.b)("a",a({parentName:"p"},{href:"/docs/guides/using-native-node-modules"}),"this guide on how to recompile them for NodeGui"),"."))}d.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return s})),t.d(n,"b",(function(){return p}));var o=t(0),a=t.n(o),r=a.a.createContext({}),i=function(e){var n=a.a.useContext(r),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},s=function(e){var n=i(e.components);return a.a.createElement(r.Provider,{value:n},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},d=Object(o.forwardRef)((function(e,n){var t=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,l=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===n.indexOf(o)&&(t[o]=e[o]);return t}(e,["components","mdxType","originalType","parentName"]),d=i(t),p=o,u=d[s+"."+p]||d[p]||c[p]||r;return t?a.a.createElement(u,Object.assign({},{ref:n},l,{components:t})):a.a.createElement(u,Object.assign({},{ref:n},l))}));function p(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var r=t.length,i=new Array(r);i[0]=d;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s[l]="string"==typeof e?e:o,i[1]=s;for(var p=2;p=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c={sidebar_label:"Scroll View",title:"Scroll View"},i=[],l={rightToc:i},p="wrapper";function u(e){var n=e.components,r=a(e,["components"]);return Object(t.b)(p,o({},l,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"WIP"))}u.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return i})),r.d(n,"b",(function(){return f}));var t=r(0),o=r.n(t),a=o.a.createContext({}),c=function(e){var n=o.a.useContext(a),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},i=function(e){var n=c(e.components);return o.a.createElement(a.Provider,{value:n},e.children)};var l="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},u=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,a=e.originalType,i=e.parentName,l=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),u=c(r),f=t,s=u[i+"."+f]||u[f]||p[f]||a;return r?o.a.createElement(s,Object.assign({},{ref:n},l,{components:r})):o.a.createElement(s,Object.assign({},{ref:n},l))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var a=r.length,c=new Array(a);c[0]=u;var i={};for(var p in n)hasOwnProperty.call(n,p)&&(i[p]=n[p]);i.originalType=e,i[l]="string"==typeof e?e:t,c[1]=i;for(var f=2;f=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c={sidebar_label:"Scroll View",title:"Scroll View"},i=[],l={rightToc:i},p="wrapper";function u(e){var n=e.components,r=a(e,["components"]);return Object(t.b)(p,o({},l,r,{components:n,mdxType:"MDXLayout"}),Object(t.b)("p",null,"WIP"))}u.isMDXComponent=!0},173:function(e,n,r){"use strict";r.d(n,"a",(function(){return i})),r.d(n,"b",(function(){return f}));var t=r(0),o=r.n(t),a=o.a.createContext({}),c=function(e){var n=o.a.useContext(a),r=n;return e&&(r="function"==typeof e?e(n):Object.assign({},n,e)),r},i=function(e){var n=c(e.components);return o.a.createElement(a.Provider,{value:n},e.children)};var l="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},u=Object(t.forwardRef)((function(e,n){var r=e.components,t=e.mdxType,a=e.originalType,i=e.parentName,l=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&-1===n.indexOf(t)&&(r[t]=e[t]);return r}(e,["components","mdxType","originalType","parentName"]),u=c(r),f=t,s=u[i+"."+f]||u[f]||p[f]||a;return r?o.a.createElement(s,Object.assign({},{ref:n},l,{components:r})):o.a.createElement(s,Object.assign({},{ref:n},l))}));function f(e,n){var r=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var a=r.length,c=new Array(a);c[0]=u;var i={};for(var p in n)hasOwnProperty.call(n,p)&&(i[p]=n[p]);i.originalType=e,i[l]="string"==typeof e?e:t,c[1]=i;for(var f=2;f=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var a={sidebar_label:"Styling",title:"Styling"},i=[{value:"Overview",id:"overview",children:[]},{value:"Global styles",id:"global-styles",children:[]},{value:"Inline styles",id:"inline-styles",children:[]},{value:"Selectors",id:"selectors",children:[]},{value:"Pseudo states",id:"pseudo-states",children:[]},{value:"Cascading",id:"cascading",children:[]},{value:"Properties",id:"properties",children:[]},{value:"Supported properties",id:"supported-properties",children:[]},{value:"Advanced usage (Setting QObject Properties)",id:"advanced-usage-setting-qobject-properties",children:[]}],r={rightToc:i},c="wrapper";function p(e){var t=e.components,n=l(e,["components"]);return Object(o.b)(c,s({},r,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"With NodeGui, you can style a widget to your needs. If you are familiar with CSS in the web world you would feel right at home. All widgets have a method ",Object(o.b)("inlineCode",{parentName:"p"},"setInlineStyle")," for setting inline styles for the respective widget. The style names and values usually match how CSS works on the web."),Object(o.b)("p",null,"Here's an example:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-js"}),'const { QLabel, QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n\nconst label = new QLabel(win);\nlabel.setText("Hello world");\nlabel.setInlineStyle("color: green; background-color: white;");\n\nwin.show();\nglobal.win = win;\n')),Object(o.b)("h2",{id:"overview"},"Overview"),Object(o.b)("p",null,"NodeGui makes use of ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html"}),"Qt's stylesheet")," for styling. Qt Style Sheet terminology and syntactic rules are almost identical to those of HTML CSS. Additionally, NodeGui adds support for layout using flex properties like align-items, justify-content, etc. Flexbox layout support is added using ",Object(o.b)("a",s({parentName:"p"},{href:"https://github.com/facebook/yoga"}),"facebook's yoga library"),"."),Object(o.b)("p",null,"You would write your style properties in a string and pass it to the NodeGui widgets either via global styles or inline styles (similar to how it works in the web)."),Object(o.b)("h2",{id:"global-styles"},"Global styles"),Object(o.b)("p",null,"Lets take a look at an example:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-js"}),'const { QLabel, FlexLayout, QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nview.setObjectName("rootView");\nview.setLayout(new FlexLayout());\n\nconst label = new QLabel();\nlabel.setObjectName("helloLabel");\nlabel.setText("Hello");\n\nconst label2 = new QLabel();\nlabel2.setObjectName("worldLabel");\nlabel2.setText("World");\n\nview.layout.addWidget(label);\nview.layout.addWidget(label2);\n\nview.setStyleSheet(`\n #helloLabel {\n color: red;\n padding: 10px;\n }\n #worldLabel {\n color: green;\n padding: 10px;\n }\n #rootView {\n background-color: black;\n }\n`);\nview.show();\n(global as any).view = view;\n\n')),Object(o.b)("p",null,"In the case of global stylesheet you can define all your style properties in a stylesheet string and the tell the root view or window to set it as a stylsheet for it and its child widgets. The only difference here from web is that you can set a stylesheet on a widget at any level in the whole tree of widgets, the stylesheet will affect the widget and its children."),Object(o.b)("p",null,"In the above example, in order to reference a widget in a stylesheet we will assign it a ",Object(o.b)("inlineCode",{parentName:"p"},"objectName")," using setObjectName instance method. Think of objectName as something similar to an ",Object(o.b)("inlineCode",{parentName:"p"},"id")," in the case of web. Now using the objectName you could reference the widget in the stylesheet and set style properties on them. Do not worry about the layout stuff that is going on here, that will be covered in the next section."),Object(o.b)("p",null,"Global stylesheet really becomes powerful when you use things like pseudo-selectors (hover, checked, etc). It also has helps in implementing cascaded styles which allow you to style a group of widgets at once. We will see more about these features below."),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"More details on all the features and the syntax can be found here: ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html"}),"https://doc.qt.io/qt-5/stylesheet-syntax.html"))),Object(o.b)("h2",{id:"inline-styles"},"Inline styles"),Object(o.b)("p",null,"Lets look at this example again:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-js"}),'const { QLabel, QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n\nconst label = new QLabel(win);\nlabel.setText("Hello world");\nlabel.setInlineStyle("color: green; background-color: white;");\n\nwin.show();\nglobal.win = win;\n')),Object(o.b)("p",null,"In most cases it would be easier to style the widgets inline. NodeGui supports inline styling using ",Object(o.b)("inlineCode",{parentName:"p"},"setInlineStyle")," instance method. Inline styles will only affect the widget to which the style is applied to and is often easier to understand and manage. All properties you use in the global stylesheet are available in inline styles as well."),Object(o.b)("h2",{id:"selectors"},"Selectors"),Object(o.b)("p",null,"NodeGui style sheets support all the selectors defined in CSS2.\nSome examples include:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-css"}),"* {\n color: blue;\n}\n\nQPushButton {\n padding: 10px;\n}\n\n#okButton {\n margin: 10px;\n}\n\n#mainView > QPushButton {\n margin: 10px;\n}\n")),Object(o.b)("p",null,"To see a complete list of selectors see here: ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html#selector-types"}),"https://doc.qt.io/qt-5/stylesheet-syntax.html#selector-types")),Object(o.b)("h2",{id:"pseudo-states"},"Pseudo states"),Object(o.b)("p",null,"Like in the web, you can style your widget based on its state. An example would be, you might want the color of the button text to be red when its hovered upon. These are possible with pseudo states. Pseudo-states appear at the end of the selector, with a colon (:) in between."),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-css"}),"#okButton:hover {\n color: red;\n}\n")),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"More details here : ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html#pseudo-states"}),"https://doc.qt.io/qt-5/stylesheet-syntax.html#pseudo-states"))),Object(o.b)("h2",{id:"cascading"},"Cascading"),Object(o.b)("p",null,"Style sheets can be set on the parent widgets and on child widgets. An arbitrary widget's effective style sheet is obtained by merging the style sheets set on the widget's ancestors (parent, grandparent, etc.)."),Object(o.b)("p",null,"When conflicts arise, the widget's own inline style sheet is always preferred to any inherited style sheet, irrespective of the specificity of the conflicting rules. Likewise, the parent widget's style sheet is preferred to the grandparent's, etc."),Object(o.b)("p",null,"The behaviour is similar to what we see on the web."),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"For more in depth examples see here: ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html#cascading"}),"https://doc.qt.io/qt-5/stylesheet-syntax.html#cascading"))),Object(o.b)("h2",{id:"properties"},"Properties"),Object(o.b)("p",null,"NodeGui style sheets is a css string."),Object(o.b)("p",null,"For example:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{}),"const textStyle = `\n color: 'green';\n padding: 12;\n height: '100%';\n`;\n\n")),Object(o.b)("p",null,"Here if you look carefully, you would notice that there are some differences in the way we write style properties as compared to web.\nThe quotes you see around ",Object(o.b)("inlineCode",{parentName:"p"},"'green'")," and ",Object(o.b)("inlineCode",{parentName:"p"},"'100%'")," are necessary so that Qt doesnt interpret them as numbers.\nSo the rule of thumb is that any integer based property like margin, border, etc can be written without quotes while any string property, it is better to surround them with quotes. PS: Qt does recognise some string based properties without quotes also."),Object(o.b)("h2",{id:"supported-properties"},"Supported properties"),Object(o.b)("p",null,"Since we are not running inside a web browser, there are few differences in the properties you could use in NodeGui vs in web."),Object(o.b)("p",null,"The complete list is detailed here: ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-reference.html#list-of-properties"}),"https://doc.qt.io/qt-5/stylesheet-reference.html#list-of-properties")),Object(o.b)("p",null,"Apart from the properties listed in the link, NodeGui also supports layout properties related to Flex. You can use all flex properties such as align-items, justify-content, flex, etc on all widgets. ",Object(o.b)("a",s({parentName:"p"},{href:"/docs/guides/layout"}),"The layout styling will be coverted in more detail in the section: Layout.")),Object(o.b)("h2",{id:"advanced-usage-setting-qobject-properties"},"Advanced usage (Setting QObject Properties)"),Object(o.b)("p",null,"In Qt, every widget has certain properties set on them using something called as ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/qobject.html#Q_PROPERTY"}),"Q_PROPERTY"),". There are many q-properties that are defined on each widget already. You can also define custom qproperties in the native C++ code yourself too. What does it have to do with styling ? The thing is some of these properties can be altered using qt stylesheet. In Qt's terminology, these properties are called designable properties."),Object(o.b)("p",null,"For example:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-css"}),"MyLabel {\n qproperty-alignment: AlignCenter;\n}\nMyGroupBox {\n qproperty-titlecolor: rgb(100, 200, 100);\n}\nQPushButton {\n qproperty-iconsize: 20px 20px;\n}\n")),Object(o.b)("p",null,'You can discover these properties by following Qt\'s documentation or by running a simple google search like "center text in QLabel using stylesheet in Qt". These are advanced properties and in practice will come in use rarely but its good to know.'),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"More details : ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html#setting-qobject-properties"}),"https://doc.qt.io/qt-5/stylesheet-syntax.html#setting-qobject-properties"))),Object(o.b)("hr",null),Object(o.b)("p",null,"In this section, we mostly covered the paint properties in the NodeGui stylesheet. The next section would cover on how you can use flex to layout your widgets with stylesheet."))}p.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return b}));var o=n(0),s=n.n(o),l=s.a.createContext({}),a=function(e){var t=s.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},i=function(e){var t=a(e.components);return s.a.createElement(l.Provider,{value:t},e.children)};var r="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return s.a.createElement(s.a.Fragment,{},t)}},p=Object(o.forwardRef)((function(e,t){var n=e.components,o=e.mdxType,l=e.originalType,i=e.parentName,r=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===t.indexOf(o)&&(n[o]=e[o]);return n}(e,["components","mdxType","originalType","parentName"]),p=a(n),b=o,d=p[i+"."+b]||p[b]||c[b]||l;return n?s.a.createElement(d,Object.assign({},{ref:t},r,{components:n})):s.a.createElement(d,Object.assign({},{ref:t},r))}));function b(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var l=n.length,a=new Array(l);a[0]=p;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[r]="string"==typeof e?e:o,a[1]=i;for(var b=2;b=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var a={sidebar_label:"Styling",title:"Styling"},i=[{value:"Overview",id:"overview",children:[]},{value:"Global styles",id:"global-styles",children:[]},{value:"Inline styles",id:"inline-styles",children:[]},{value:"Selectors",id:"selectors",children:[]},{value:"Pseudo states",id:"pseudo-states",children:[]},{value:"Cascading",id:"cascading",children:[]},{value:"Properties",id:"properties",children:[]},{value:"Supported properties",id:"supported-properties",children:[]},{value:"Advanced usage (Setting QObject Properties)",id:"advanced-usage-setting-qobject-properties",children:[]}],r={rightToc:i},c="wrapper";function p(e){var t=e.components,n=l(e,["components"]);return Object(o.b)(c,s({},r,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"With NodeGui, you can style a widget to your needs. If you are familiar with CSS in the web world you would feel right at home. All widgets have a method ",Object(o.b)("inlineCode",{parentName:"p"},"setInlineStyle")," for setting inline styles for the respective widget. The style names and values usually match how CSS works on the web."),Object(o.b)("p",null,"Here's an example:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-js"}),'const { QLabel, QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n\nconst label = new QLabel(win);\nlabel.setText("Hello world");\nlabel.setInlineStyle("color: green; background-color: white;");\n\nwin.show();\nglobal.win = win;\n')),Object(o.b)("h2",{id:"overview"},"Overview"),Object(o.b)("p",null,"NodeGui makes use of ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html"}),"Qt's stylesheet")," for styling. Qt Style Sheet terminology and syntactic rules are almost identical to those of HTML CSS. Additionally, NodeGui adds support for layout using flex properties like align-items, justify-content, etc. Flexbox layout support is added using ",Object(o.b)("a",s({parentName:"p"},{href:"https://github.com/facebook/yoga"}),"facebook's yoga library"),"."),Object(o.b)("p",null,"You would write your style properties in a string and pass it to the NodeGui widgets either via global styles or inline styles (similar to how it works in the web)."),Object(o.b)("h2",{id:"global-styles"},"Global styles"),Object(o.b)("p",null,"Lets take a look at an example:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-js"}),'const { QLabel, FlexLayout, QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nview.setObjectName("rootView");\nview.setLayout(new FlexLayout());\n\nconst label = new QLabel();\nlabel.setObjectName("helloLabel");\nlabel.setText("Hello");\n\nconst label2 = new QLabel();\nlabel2.setObjectName("worldLabel");\nlabel2.setText("World");\n\nview.layout.addWidget(label);\nview.layout.addWidget(label2);\n\nview.setStyleSheet(`\n #helloLabel {\n color: red;\n padding: 10px;\n }\n #worldLabel {\n color: green;\n padding: 10px;\n }\n #rootView {\n background-color: black;\n }\n`);\nview.show();\n(global as any).view = view;\n\n')),Object(o.b)("p",null,"In the case of global stylesheet you can define all your style properties in a stylesheet string and the tell the root view or window to set it as a stylsheet for it and its child widgets. The only difference here from web is that you can set a stylesheet on a widget at any level in the whole tree of widgets, the stylesheet will affect the widget and its children."),Object(o.b)("p",null,"In the above example, in order to reference a widget in a stylesheet we will assign it a ",Object(o.b)("inlineCode",{parentName:"p"},"objectName")," using setObjectName instance method. Think of objectName as something similar to an ",Object(o.b)("inlineCode",{parentName:"p"},"id")," in the case of web. Now using the objectName you could reference the widget in the stylesheet and set style properties on them. Do not worry about the layout stuff that is going on here, that will be covered in the next section."),Object(o.b)("p",null,"Global stylesheet really becomes powerful when you use things like pseudo-selectors (hover, checked, etc). It also has helps in implementing cascaded styles which allow you to style a group of widgets at once. We will see more about these features below."),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"More details on all the features and the syntax can be found here: ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html"}),"https://doc.qt.io/qt-5/stylesheet-syntax.html"))),Object(o.b)("h2",{id:"inline-styles"},"Inline styles"),Object(o.b)("p",null,"Lets look at this example again:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-js"}),'const { QLabel, QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\n\nconst label = new QLabel(win);\nlabel.setText("Hello world");\nlabel.setInlineStyle("color: green; background-color: white;");\n\nwin.show();\nglobal.win = win;\n')),Object(o.b)("p",null,"In most cases it would be easier to style the widgets inline. NodeGui supports inline styling using ",Object(o.b)("inlineCode",{parentName:"p"},"setInlineStyle")," instance method. Inline styles will only affect the widget to which the style is applied to and is often easier to understand and manage. All properties you use in the global stylesheet are available in inline styles as well."),Object(o.b)("h2",{id:"selectors"},"Selectors"),Object(o.b)("p",null,"NodeGui style sheets support all the selectors defined in CSS2.\nSome examples include:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-css"}),"* {\n color: blue;\n}\n\nQPushButton {\n padding: 10px;\n}\n\n#okButton {\n margin: 10px;\n}\n\n#mainView > QPushButton {\n margin: 10px;\n}\n")),Object(o.b)("p",null,"To see a complete list of selectors see here: ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html#selector-types"}),"https://doc.qt.io/qt-5/stylesheet-syntax.html#selector-types")),Object(o.b)("h2",{id:"pseudo-states"},"Pseudo states"),Object(o.b)("p",null,"Like in the web, you can style your widget based on its state. An example would be, you might want the color of the button text to be red when its hovered upon. These are possible with pseudo states. Pseudo-states appear at the end of the selector, with a colon (:) in between."),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-css"}),"#okButton:hover {\n color: red;\n}\n")),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"More details here : ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html#pseudo-states"}),"https://doc.qt.io/qt-5/stylesheet-syntax.html#pseudo-states"))),Object(o.b)("h2",{id:"cascading"},"Cascading"),Object(o.b)("p",null,"Style sheets can be set on the parent widgets and on child widgets. An arbitrary widget's effective style sheet is obtained by merging the style sheets set on the widget's ancestors (parent, grandparent, etc.)."),Object(o.b)("p",null,"When conflicts arise, the widget's own inline style sheet is always preferred to any inherited style sheet, irrespective of the specificity of the conflicting rules. Likewise, the parent widget's style sheet is preferred to the grandparent's, etc."),Object(o.b)("p",null,"The behaviour is similar to what we see on the web."),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"For more in depth examples see here: ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html#cascading"}),"https://doc.qt.io/qt-5/stylesheet-syntax.html#cascading"))),Object(o.b)("h2",{id:"properties"},"Properties"),Object(o.b)("p",null,"NodeGui style sheets is a css string."),Object(o.b)("p",null,"For example:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{}),"const textStyle = `\n color: 'green';\n padding: 12;\n height: '100%';\n`;\n\n")),Object(o.b)("p",null,"Here if you look carefully, you would notice that there are some differences in the way we write style properties as compared to web.\nThe quotes you see around ",Object(o.b)("inlineCode",{parentName:"p"},"'green'")," and ",Object(o.b)("inlineCode",{parentName:"p"},"'100%'")," are necessary so that Qt doesnt interpret them as numbers.\nSo the rule of thumb is that any integer based property like margin, border, etc can be written without quotes while any string property, it is better to surround them with quotes. PS: Qt does recognise some string based properties without quotes also."),Object(o.b)("h2",{id:"supported-properties"},"Supported properties"),Object(o.b)("p",null,"Since we are not running inside a web browser, there are few differences in the properties you could use in NodeGui vs in web."),Object(o.b)("p",null,"The complete list is detailed here: ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-reference.html#list-of-properties"}),"https://doc.qt.io/qt-5/stylesheet-reference.html#list-of-properties")),Object(o.b)("p",null,"Apart from the properties listed in the link, NodeGui also supports layout properties related to Flex. You can use all flex properties such as align-items, justify-content, flex, etc on all widgets. ",Object(o.b)("a",s({parentName:"p"},{href:"/docs/guides/layout"}),"The layout styling will be coverted in more detail in the section: Layout.")),Object(o.b)("h2",{id:"advanced-usage-setting-qobject-properties"},"Advanced usage (Setting QObject Properties)"),Object(o.b)("p",null,"In Qt, every widget has certain properties set on them using something called as ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/qobject.html#Q_PROPERTY"}),"Q_PROPERTY"),". There are many q-properties that are defined on each widget already. You can also define custom qproperties in the native C++ code yourself too. What does it have to do with styling ? The thing is some of these properties can be altered using qt stylesheet. In Qt's terminology, these properties are called designable properties."),Object(o.b)("p",null,"For example:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{className:"language-css"}),"MyLabel {\n qproperty-alignment: AlignCenter;\n}\nMyGroupBox {\n qproperty-titlecolor: rgb(100, 200, 100);\n}\nQPushButton {\n qproperty-iconsize: 20px 20px;\n}\n")),Object(o.b)("p",null,'You can discover these properties by following Qt\'s documentation or by running a simple google search like "center text in QLabel using stylesheet in Qt". These are advanced properties and in practice will come in use rarely but its good to know.'),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"More details : ",Object(o.b)("a",s({parentName:"p"},{href:"https://doc.qt.io/qt-5/stylesheet-syntax.html#setting-qobject-properties"}),"https://doc.qt.io/qt-5/stylesheet-syntax.html#setting-qobject-properties"))),Object(o.b)("hr",null),Object(o.b)("p",null,"In this section, we mostly covered the paint properties in the NodeGui stylesheet. The next section would cover on how you can use flex to layout your widgets with stylesheet."))}p.isMDXComponent=!0},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return b}));var o=n(0),s=n.n(o),l=s.a.createContext({}),a=function(e){var t=s.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},i=function(e){var t=a(e.components);return s.a.createElement(l.Provider,{value:t},e.children)};var r="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return s.a.createElement(s.a.Fragment,{},t)}},p=Object(o.forwardRef)((function(e,t){var n=e.components,o=e.mdxType,l=e.originalType,i=e.parentName,r=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===t.indexOf(o)&&(n[o]=e[o]);return n}(e,["components","mdxType","originalType","parentName"]),p=a(n),b=o,d=p[i+"."+b]||p[b]||c[b]||l;return n?s.a.createElement(d,Object.assign({},{ref:t},r,{components:n})):s.a.createElement(d,Object.assign({},{ref:t},r))}));function b(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var l=n.length,a=new Array(l);a[0]=p;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[r]="string"==typeof e?e:o,a[1]=i;for(var b=2;b=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var r={sidebar_label:"Learn the Basics",title:"Learn the Basics"},s=[{value:"NodeGui development in a nutshell",id:"nodegui-development-in-a-nutshell",children:[]},{value:"What's going on here?",id:"whats-going-on-here",children:[]},{value:"Trying out the starter project",id:"trying-out-the-starter-project",children:[]},{value:"What else other than a basic window?",id:"what-else-other-than-a-basic-window",children:[]}],l={rightToc:s},c="wrapper";function u(e){var n=e.components,t=i(e,["components"]);return Object(a.b)(c,o({},l,t,{components:n,mdxType:"MDXLayout"}),Object(a.b)("p",null,"NodeGui uses native components instead of web based components as building blocks. So to understand the basic structure of a NodeGui app, you need to be familiar with Javascript or Typescript. This tutorial is aimed at everyone who has some web experience with web development."),Object(a.b)("h2",{id:"nodegui-development-in-a-nutshell"},"NodeGui development in a nutshell"),Object(a.b)("p",null,"As far as development is concerned, an NodeGui application is essentially a Node.js application. The starting point is a ",Object(a.b)("inlineCode",{parentName:"p"},"package.json")," that is identical to that of a Node.js module. A most basic NodeGui app would have the following\nfolder structure:"),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-text"}),"your-app/\n├── package.json\n├── index.js\n")),Object(a.b)("p",null,"All APIs and features found in NodeGui are accessible through the ",Object(a.b)("inlineCode",{parentName:"p"},"@nodegui/nodegui")," module, which can be required like any other Node.js module. Additionally you have access to all Node.js apis and node modules."),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'require("@nodegui/nodegui");\n')),Object(a.b)("p",null,"The ",Object(a.b)("inlineCode",{parentName:"p"},"@nodegui/nodegui")," module exports features in namespaces. As an example, a window can be created\nusing the ",Object(a.b)("inlineCode",{parentName:"p"},"QMainWindow")," class. A simple ",Object(a.b)("inlineCode",{parentName:"p"},"main.js")," file might open a window:"),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const { QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\nwin.show();\n\nglobal.win = win; // To prevent win from being garbage collected.\n')),Object(a.b)("p",null,"The ",Object(a.b)("inlineCode",{parentName:"p"},"index.js")," should create windows and handle all the system events your\napplication might encounter."),Object(a.b)("h2",{id:"whats-going-on-here"},"What's going on here?"),Object(a.b)("p",null,"Firstly, we are running a regular Node.js app. This means that we are not running in a browser environment. The window you see is actually a native widget created by Qt. QMainWindow is essentially a lightweight javascript wrapper over Qt's QMainWindow. Hence every method you call on QMainWindow instance is actually affecting a native window widget. This is very light weight as compared to browser based solutions and hence is more closer to the Operating system.s"),Object(a.b)("h2",{id:"trying-out-the-starter-project"},"Trying out the starter project"),Object(a.b)("p",null,"Clone and run the code by using the\n",Object(a.b)("a",o({parentName:"p"},{href:"https://github.com/nodegui/nodegui-starter"}),Object(a.b)("inlineCode",{parentName:"a"},"nodegui/nodegui-starter"))," repository."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Note"),": Running this requires ",Object(a.b)("a",o({parentName:"p"},{href:"https://git-scm.com"}),"Git")," and ",Object(a.b)("a",o({parentName:"p"},{href:"https://www.npmjs.com/"}),"npm"),"."),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-sh"})," git clone https://github.com/nodegui/nodegui-starter\n\n cd nodegui-starter\n\n npm install\n\n npm start\n")),Object(a.b)("h2",{id:"what-else-other-than-a-basic-window"},"What else other than a basic window?"),Object(a.b)("p",null,"NodeGui has support for basic widgets like QWidget (similar to div), QCheckBox, QPushButton and many more.\nYou can take a look at the list of native widgets that NodeGui currently supports here : ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/QWidget"}),"Native widgets in NodeGui"),".\nWith time more widgets and APIs will be added to NodeGui. Apart from modules in NodeGui, you also have access to the entire node modules ecosystem. Thus, any node module that you can use with Node.js, can be used with NodeGui. This makes it extremely powerful."),Object(a.b)("p",null,"Fine, I want something more custom and beautiful than just native looking widgets. What do I do?"),Object(a.b)("p",null,"To make things more beautiful, you will have to ",Object(a.b)("a",o({parentName:"p"},{href:"styling"}),"learn about styling"),". Lets take a look at that next."))}u.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return s})),t.d(n,"b",(function(){return d}));var a=t(0),o=t.n(a),i=o.a.createContext({}),r=function(e){var n=o.a.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},s=function(e){var n=r(e.components);return o.a.createElement(i.Provider,{value:n},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},u=Object(a.forwardRef)((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,l=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===n.indexOf(a)&&(t[a]=e[a]);return t}(e,["components","mdxType","originalType","parentName"]),u=r(t),d=a,p=u[s+"."+d]||u[d]||c[d]||i;return t?o.a.createElement(p,Object.assign({},{ref:n},l,{components:t})):o.a.createElement(p,Object.assign({},{ref:n},l))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,r=new Array(i);r[0]=u;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s[l]="string"==typeof e?e:a,r[1]=s;for(var d=2;d=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var r={sidebar_label:"Learn the Basics",title:"Learn the Basics"},s=[{value:"NodeGui development in a nutshell",id:"nodegui-development-in-a-nutshell",children:[]},{value:"What's going on here?",id:"whats-going-on-here",children:[]},{value:"Trying out the starter project",id:"trying-out-the-starter-project",children:[]},{value:"What else other than a basic window?",id:"what-else-other-than-a-basic-window",children:[]}],l={rightToc:s},c="wrapper";function u(e){var n=e.components,t=i(e,["components"]);return Object(a.b)(c,o({},l,t,{components:n,mdxType:"MDXLayout"}),Object(a.b)("p",null,"NodeGui uses native components instead of web based components as building blocks. So to understand the basic structure of a NodeGui app, you need to be familiar with Javascript or Typescript. This tutorial is aimed at everyone who has some web experience with web development."),Object(a.b)("h2",{id:"nodegui-development-in-a-nutshell"},"NodeGui development in a nutshell"),Object(a.b)("p",null,"As far as development is concerned, an NodeGui application is essentially a Node.js application. The starting point is a ",Object(a.b)("inlineCode",{parentName:"p"},"package.json")," that is identical to that of a Node.js module. A most basic NodeGui app would have the following\nfolder structure:"),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-text"}),"your-app/\n├── package.json\n├── index.js\n")),Object(a.b)("p",null,"All APIs and features found in NodeGui are accessible through the ",Object(a.b)("inlineCode",{parentName:"p"},"@nodegui/nodegui")," module, which can be required like any other Node.js module. Additionally you have access to all Node.js apis and node modules."),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'require("@nodegui/nodegui");\n')),Object(a.b)("p",null,"The ",Object(a.b)("inlineCode",{parentName:"p"},"@nodegui/nodegui")," module exports features in namespaces. As an example, a window can be created\nusing the ",Object(a.b)("inlineCode",{parentName:"p"},"QMainWindow")," class. A simple ",Object(a.b)("inlineCode",{parentName:"p"},"main.js")," file might open a window:"),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-javascript"}),'const { QMainWindow } = require("@nodegui/nodegui");\n\nconst win = new QMainWindow();\nwin.show();\n\nglobal.win = win; // To prevent win from being garbage collected.\n')),Object(a.b)("p",null,"The ",Object(a.b)("inlineCode",{parentName:"p"},"index.js")," should create windows and handle all the system events your\napplication might encounter."),Object(a.b)("h2",{id:"whats-going-on-here"},"What's going on here?"),Object(a.b)("p",null,"Firstly, we are running a regular Node.js app. This means that we are not running in a browser environment. The window you see is actually a native widget created by Qt. QMainWindow is essentially a lightweight javascript wrapper over Qt's QMainWindow. Hence every method you call on QMainWindow instance is actually affecting a native window widget. This is very light weight as compared to browser based solutions and hence is more closer to the Operating system.s"),Object(a.b)("h2",{id:"trying-out-the-starter-project"},"Trying out the starter project"),Object(a.b)("p",null,"Clone and run the code by using the\n",Object(a.b)("a",o({parentName:"p"},{href:"https://github.com/nodegui/nodegui-starter"}),Object(a.b)("inlineCode",{parentName:"a"},"nodegui/nodegui-starter"))," repository."),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Note"),": Running this requires ",Object(a.b)("a",o({parentName:"p"},{href:"https://git-scm.com"}),"Git")," and ",Object(a.b)("a",o({parentName:"p"},{href:"https://www.npmjs.com/"}),"npm"),"."),Object(a.b)("pre",null,Object(a.b)("code",o({parentName:"pre"},{className:"language-sh"}),"\ngit clone https://github.com/nodegui/nodegui-starter\n\ncd nodegui-starter\n\nnpm install\n\nnpm start\n")),Object(a.b)("h2",{id:"what-else-other-than-a-basic-window"},"What else other than a basic window?"),Object(a.b)("p",null,"NodeGui has support for basic widgets like QWidget (similar to div), QCheckBox, QPushButton and many more.\nYou can take a look at the list of native widgets that NodeGui currently supports here : ",Object(a.b)("a",o({parentName:"p"},{href:"/docs/api/QWidget"}),"Native widgets in NodeGui"),".\nWith time more widgets and APIs will be added to NodeGui. Apart from modules in NodeGui, you also have access to the entire node modules ecosystem. Thus, any node module that you can use with Node.js, can be used with NodeGui. This makes it extremely powerful."),Object(a.b)("p",null,"Fine, I want something more custom and beautiful than just native looking widgets. What do I do?"),Object(a.b)("p",null,"To make things more beautiful, you will have to ",Object(a.b)("a",o({parentName:"p"},{href:"styling"}),"learn about styling"),". Lets take a look at that next."))}u.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return s})),t.d(n,"b",(function(){return d}));var a=t(0),o=t.n(a),i=o.a.createContext({}),r=function(e){var n=o.a.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},s=function(e){var n=r(e.components);return o.a.createElement(i.Provider,{value:n},e.children)};var l="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},u=Object(a.forwardRef)((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,l=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===n.indexOf(a)&&(t[a]=e[a]);return t}(e,["components","mdxType","originalType","parentName"]),u=r(t),d=a,p=u[s+"."+d]||u[d]||c[d]||i;return t?o.a.createElement(p,Object.assign({},{ref:n},l,{components:t})):o.a.createElement(p,Object.assign({},{ref:n},l))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,r=new Array(i);r[0]=u;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s[l]="string"==typeof e?e:a,r[1]=s;for(var d=2;d=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i={sidebar_label:"Native Node Modules",title:"Using native Node Modules"},l=[{value:"How to install native modules",id:"how-to-install-native-modules",children:[]},{value:"Troubleshooting",id:"troubleshooting",children:[]},{value:"Modules that rely on node-pre-gyp",id:"modules-that-rely-on-node-pre-gyp",children:[]}],u={rightToc:l},d="wrapper";function s(e){var n=e.components,t=a(e,["components"]);return Object(o.b)(d,r({},u,t,{components:n,mdxType:"MDXLayout"}),Object(o.b)("p",null,"Native Node modules are supported by NodeGui, but since NodeGui is very\nlikely to use a different V8 version from the Node binary installed on your\nsystem, the modules you use will need to be recompiled for NodeGui's node/v8 version. Otherwise,\nyou will get the following class of error when you try to run your app:"),Object(o.b)("pre",null,Object(o.b)("code",r({parentName:"pre"},{className:"language-sh"}),"Error: The module '/path/to/native/module.node'\nwas compiled against a different Node.js version using\nNODE_MODULE_VERSION $XYZ. This version of Node.js requires\nNODE_MODULE_VERSION $ABC. Please try re-compiling or re-installing\nthe module (for instance, using `npm rebuild` or `npm install`).\n")),Object(o.b)("h2",{id:"how-to-install-native-modules"},"How to install native modules"),Object(o.b)("p",null,"To compile native Node modules against a build of NodeGui that doesn't\nmatch a public release, instruct ",Object(o.b)("inlineCode",{parentName:"p"},"npm")," to use the version of Qode (NodeJs) you have bundled\nwith your custom build."),Object(o.b)("pre",null,Object(o.b)("code",r({parentName:"pre"},{className:"language-sh"}),"npm rebuild --nodedir=/path/to/nodegui/vendor/qode\n")),Object(o.b)("p",null,"or"),Object(o.b)("pre",null,Object(o.b)("code",r({parentName:"pre"},{className:"language-sh"}),"qode /path/to/npm rebuild\n")),Object(o.b)("h2",{id:"troubleshooting"},"Troubleshooting"),Object(o.b)("p",null,"If you installed a native module and found it was not working, you need to check\nthe following things:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"When in doubt, rebuild native modules with qode first."),Object(o.b)("li",{parentName:"ul"},"Make sure the native module is compatible with the target platform and\narchitecture for your NodeGui app."),Object(o.b)("li",{parentName:"ul"},"After you upgrade NodeGui, you usually need to rebuild the modules.")),Object(o.b)("h2",{id:"modules-that-rely-on-node-pre-gyp"},"Modules that rely on ",Object(o.b)("inlineCode",{parentName:"h2"},"node-pre-gyp")),Object(o.b)("p",null,"The ",Object(o.b)("a",r({parentName:"p"},{href:"https://github.com/mapbox/node-pre-gyp"}),Object(o.b)("inlineCode",{parentName:"a"},"node-pre-gyp")," tool")," provides a way to deploy native Node\nmodules with prebuilt binaries, and many popular modules are using it."),Object(o.b)("p",null,"Usually those modules work fine under NodeGui, but sometimes when NodeGui uses\na newer version of V8 than Node and/or there are ABI changes, bad things may\nhappen. So in general, it is recommended to always build native modules from\nsource code."))}s.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return l})),t.d(n,"b",(function(){return p}));var o=t(0),r=t.n(o),a=r.a.createContext({}),i=function(e){var n=r.a.useContext(a),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},l=function(e){var n=i(e.components);return r.a.createElement(a.Provider,{value:n},e.children)};var u="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.a.createElement(r.a.Fragment,{},n)}},s=Object(o.forwardRef)((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,u=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===n.indexOf(o)&&(t[o]=e[o]);return t}(e,["components","mdxType","originalType","parentName"]),s=i(t),p=o,c=s[l+"."+p]||s[p]||d[p]||a;return t?r.a.createElement(c,Object.assign({},{ref:n},u,{components:t})):r.a.createElement(c,Object.assign({},{ref:n},u))}));function p(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=s;var l={};for(var d in n)hasOwnProperty.call(n,d)&&(l[d]=n[d]);l.originalType=e,l[u]="string"==typeof e?e:o,i[1]=l;for(var p=2;p=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i={sidebar_label:"Native Node Modules",title:"Using native Node Modules"},l=[{value:"How to install native modules",id:"how-to-install-native-modules",children:[]},{value:"Troubleshooting",id:"troubleshooting",children:[]},{value:"Modules that rely on node-pre-gyp",id:"modules-that-rely-on-node-pre-gyp",children:[]}],u={rightToc:l},d="wrapper";function s(e){var n=e.components,t=a(e,["components"]);return Object(o.b)(d,r({},u,t,{components:n,mdxType:"MDXLayout"}),Object(o.b)("p",null,"Native Node modules are supported by NodeGui, but since NodeGui is very\nlikely to use a different V8 version from the Node binary installed on your\nsystem, the modules you use will need to be recompiled for NodeGui's node/v8 version. Otherwise,\nyou will get the following class of error when you try to run your app:"),Object(o.b)("pre",null,Object(o.b)("code",r({parentName:"pre"},{className:"language-sh"}),"Error: The module '/path/to/native/module.node'\nwas compiled against a different Node.js version using\nNODE_MODULE_VERSION $XYZ. This version of Node.js requires\nNODE_MODULE_VERSION $ABC. Please try re-compiling or re-installing\nthe module (for instance, using `npm rebuild` or `npm install`).\n")),Object(o.b)("h2",{id:"how-to-install-native-modules"},"How to install native modules"),Object(o.b)("p",null,"To compile native Node modules against a build of NodeGui that doesn't\nmatch a public release, instruct ",Object(o.b)("inlineCode",{parentName:"p"},"npm")," to use the version of Qode (NodeJs) you have bundled\nwith your custom build."),Object(o.b)("pre",null,Object(o.b)("code",r({parentName:"pre"},{className:"language-sh"}),"npm rebuild --nodedir=/path/to/nodegui/vendor/qode\n")),Object(o.b)("p",null,"or"),Object(o.b)("pre",null,Object(o.b)("code",r({parentName:"pre"},{className:"language-sh"}),"qode /path/to/npm rebuild\n")),Object(o.b)("h2",{id:"troubleshooting"},"Troubleshooting"),Object(o.b)("p",null,"If you installed a native module and found it was not working, you need to check\nthe following things:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"When in doubt, rebuild native modules with qode first."),Object(o.b)("li",{parentName:"ul"},"Make sure the native module is compatible with the target platform and\narchitecture for your NodeGui app."),Object(o.b)("li",{parentName:"ul"},"After you upgrade NodeGui, you usually need to rebuild the modules.")),Object(o.b)("h2",{id:"modules-that-rely-on-node-pre-gyp"},"Modules that rely on ",Object(o.b)("inlineCode",{parentName:"h2"},"node-pre-gyp")),Object(o.b)("p",null,"The ",Object(o.b)("a",r({parentName:"p"},{href:"https://github.com/mapbox/node-pre-gyp"}),Object(o.b)("inlineCode",{parentName:"a"},"node-pre-gyp")," tool")," provides a way to deploy native Node\nmodules with prebuilt binaries, and many popular modules are using it."),Object(o.b)("p",null,"Usually those modules work fine under NodeGui, but sometimes when NodeGui uses\na newer version of V8 than Node and/or there are ABI changes, bad things may\nhappen. So in general, it is recommended to always build native modules from\nsource code."))}s.isMDXComponent=!0},173:function(e,n,t){"use strict";t.d(n,"a",(function(){return l})),t.d(n,"b",(function(){return p}));var o=t(0),r=t.n(o),a=r.a.createContext({}),i=function(e){var n=r.a.useContext(a),t=n;return e&&(t="function"==typeof e?e(n):Object.assign({},n,e)),t},l=function(e){var n=i(e.components);return r.a.createElement(a.Provider,{value:n},e.children)};var u="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.a.createElement(r.a.Fragment,{},n)}},s=Object(o.forwardRef)((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,u=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===n.indexOf(o)&&(t[o]=e[o]);return t}(e,["components","mdxType","originalType","parentName"]),s=i(t),p=o,c=s[l+"."+p]||s[p]||d[p]||a;return t?r.a.createElement(c,Object.assign({},{ref:n},u,{components:t})):r.a.createElement(c,Object.assign({},{ref:n},u))}));function p(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=s;var l={};for(var d in n)hasOwnProperty.call(n,d)&&(l[d]=n[d]);l.originalType=e,l[u]="string"==typeof e?e:o,i[1]=l;for(var p=2;p - + Component @@ -28,9 +28,9 @@

Component

Abstract class that is root most base class for all widgets and layouts in the NodeGui World.

This class is used to add core properties to all widgets, layouts etc in NodeGui world. Currently it helps us maintain references to the native C++ instance of the widget or layout. It also helps in preventing gc of child elements of a layout or widget

Component is an abstract class and hence no instances of the same should be created. It exists so that we can add core functionalities to all widgets and layouts easily. This is an internal class.

Component is the base class for YogaWidget and NodeLayout which means all widgets and layouts inherit it aswell. Its the root base class in NodeGui world

To get a clearer picture you can take a look at the Component source code here: src/lib/core/Component/index.ts

Static Methods

There are no public static methods for Component.

Instance Properties

There are no public instance properties for Component.

Instance Methods

There are no public instance methods for Component.

- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/EventWidget/index.html b/docs/api/EventWidget/index.html index 340418a1b..16506e699 100644 --- a/docs/api/EventWidget/index.html +++ b/docs/api/EventWidget/index.html @@ -3,7 +3,7 @@ - + EventWidget @@ -28,9 +28,9 @@

EventWidget

Abstract class that adds event handling support to all widgets.

This class implements an event emitter and merges it with Qt's event and signal system. It allows us to register and unregister event and signal listener at will from javascript

EventWidget is an abstract class and hence no instances of the same should be created. It exists so that we can add event handling functionalities to all widget's easily. This is an internal class.

EventWidget is the base class for NodeWidget which means all widgets inherit it aswell. It inherits from another abstract class YogaWidget

Example

const { QWidget, QWidgetEvents } = require("@nodegui/nodegui");
const view = new QWidget();
// addEventListener is a method from EventWidget
view.addEventListener("MouseMove", () => {
console.log("mouse moved");
});
or;
// addEventListener is a method from EventWidget
view.addEventListener(QWidgetEvents.MouseMove, () => {
console.log("mouse moved");
});

EventWidget will contain all methods and properties that are useful to handle events and signals of widgets in the NodeGui world.

Static Methods

EventWidget can access all the static methods defined in YogaWidget

Instance Properties

EventWidget can access all the instance properties defined in YogaWidget

Instance Methods

EventWidget can access all the instance methods defined in YogaWidget

Additionally it also has the following instance methods:

widget.addEventListener(eventType, callback)

Adds an event listener to the widget to listen to events that occur on a widget.

  • eventType string - The event or signal you wish to listen to for the widget. Every widget exports its own enum of all possible events and signal types it can take. For example: QWidget exports QWidgetEvents, QPushButton exports QPushButtonEvents.

  • callback (payload?: NativeEvent | any) => void - A callback function to invoke when an event occurs. Usually you receive a nativeEvent or a string as argument.

widget.removeEventListener(eventType, callback?)

Removes the specified event listener from the widget.

  • eventType string - The event or signal for which you wish to remove the listener.

  • callback Function (Optional) - If specified the removeEventListener will remove the specified listener only, otherwise all eventlisteners of the eventType on the widget will be removed.

- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/FlexLayout/index.html b/docs/api/FlexLayout/index.html index daca078e7..c147d823f 100644 --- a/docs/api/FlexLayout/index.html +++ b/docs/api/FlexLayout/index.html @@ -3,7 +3,7 @@ - + FlexLayout @@ -28,9 +28,9 @@

FlexLayout

Custom layout to help layout child widgets using flex layout.

This class is a JS wrapper around custom Qt layout implemented using Yoga

A FlexLayout can be used to layout all child NodeGui widgets using flex.

FlexLayout inherits from NodeLayout

Example

const { FlexLayout, QWidget, QLabel } = require("@nodegui/nodegui");
const view = new QWidget();
const layout = new FlexLayout();
view.setLayout(layout);
const label = new QLabel();
label.setText("label1");
const label2 = new QLabel();
label2.setText("label2");
layout.addWidget(label);
layout.addWidget(label2);

Static Methods

FlexLayout can access all the static methods defined in NodeLayout

Instance Properties

FlexLayout can access all the instance properties defined in NodeLayout

Instance Methods

FlexLayout can access all the instance methods defined in NodeLayout

Additionally it also has the following instance methods:

layout.addWidget(childWidget, childFlexNode?)

Adds the childWidget to the layout. It calls the native method of custom FlexLayout.

  • childWidget NodeWidget - child widget that needs to be added to the layout.
  • childFlexNode flexNode ref (Optional) - flexNode reference of the child widget. You can get this by calling childWidget.getFlexNode().

layout.insertChildBefore(childWidget, beforeChildWidget, childFlexNode?, beforeChildFlexNode?)

Adds the childWidget before another already set childWidget in the layout. It calls the native method of custom FlexLayout.

  • childWidget NodeWidget - child widget that needs to be added to the layout.
  • beforeChildWidget NodeWidget - the widget before which the childWidget needs to be added in the layout.
  • childFlexNode flexNode ref (Optional) - flexNode reference of the child widget. You can get this by calling childWidget.getFlexNode().
  • beforeChildFlexNode flexNode ref (Optional) - flexNode reference of the before child widget. You can get this by calling beforeChildWidget.getFlexNode().

layout.removeWidget(childWidget, childFlexNode?)

Removes the childWidget from the layout. It calls the native method of custom FlexLayout.

  • childWidget NodeWidget - child widget that needs to be added to the layout.
  • childFlexNode flexNode ref (Optional) - flexNode reference of the child widget. You can get this by calling childWidget.getFlexNode().

layout.setFlexNode(flexNode)

A layout doesnt have its own flexNode. This method sets the flex Node to use for calculating position of the child widgets. Hence this should be always equal to the flex node of widget for which this layout is set. This is called internally by widget.setLayout.

  • flexNode flexNode ref - flexNode reference of the widget for which this layout is set. You can get this by calling widget.getFlexNode().
- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/NodeLayout/index.html b/docs/api/NodeLayout/index.html index ce5d21a51..38271e4bc 100644 --- a/docs/api/NodeLayout/index.html +++ b/docs/api/NodeLayout/index.html @@ -3,7 +3,7 @@ - + NodeLayout @@ -28,9 +28,9 @@

NodeLayout

Abstract class to add functionalities common to all Layout.

This class implements all methods, properties of Qt's QLayout class so that it can be inherited by all layouts

NodeLayout is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all layout's easily. Additionally it helps in typechecking process.

NodeLayout is the base class for all layouts. It inherits from another abstract class Component

Example

const {
NodeLayout,
NodeWidget,
FlexLayout,
GridLayout,
QPushButton,
QWidget
} = require("@nodegui/nodegui");
// addChildToLayout can accept any layout since it expects NodeLayout
const addChildToLayout = (layout: NodeLayout, widget: NodeWidget) => {
layout.addWidget(widget);
};
addChildToLayout(new FlexLayout(), new QPushButton());
addChildToLayout(new GridLayout(), new QWidget());

NodeLayout will list all methods and properties that are common to all layouts in the NodeGui world.

Static Methods

NodeLayout can access all the static methods defined in Component

Instance Properties

NodeLayout can access all the instance properties defined in Component

Additionally it also has the following instance properties:

layout.type

This will return the string layout for all layouts.

Instance Methods

NodeLayout can access all the instance methods defined in Component

Additionally it also has the following instance methods:

layout.addWidget(childWidget, ...args)

This is an abstract method in NodeLayout class. All Layouts inheriting from NodeLayout should implement this method.

  • childWidget NodeWidget - Any widget in the NodeGui world.
  • ...args any[] - Additional params as required by the layout.

layout.activate()

Redoes the layout for parent widget of this layout if necessary. Returns true if the layout was redone.

layout.invalidate()

Invalidates any cached information in this layout.

layout.update()

Updates the layout for parent widget of this layout. You should generally not need to call this because it is automatically called at the most appropriate times.

- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/NodeWidget/index.html b/docs/api/NodeWidget/index.html index d70a8f5df..0281b0c95 100644 --- a/docs/api/NodeWidget/index.html +++ b/docs/api/NodeWidget/index.html @@ -3,7 +3,7 @@ - + NodeWidget @@ -29,9 +29,9 @@ Returns true if the widget was closed; otherwise returns false.

widget.setLayout(layout)

Sets the layout manager for this widget to layout. It calls the native method QWidget: setLayout.

  • layout NodeLayout - Any layout that inherits from NodeLayout class.

widget.setStyleSheet(styleSheet)

Sets the property that holds the widget's style sheet. It calls the native method QWidget: styleSheet.

  • styleSheet string - String which holds the widget's style sheet. Make sure you create this string using StyleSheet.create()

widget.setCursor(cursor)

Sets the window mouse cursor. It calls the native method QWidget: setCursor.

widget.setWindowIcon(icon)

Sets the window icon. It calls the native method QWidget: setWindowIcon.

  • icon QIcon - Specifies icon for the window.

widget.setWindowState(state)

Sets the window state. It calls the native method QWidget: setWindowState.

widget.setWindowTitle(title)

Sets the window title property. It calls the native method QWidget: setWindowTitle.

  • title string - String which holds the windows title.

widget.styleSheet()

Gets the property that holds the widget's style sheet. It calls the native method QWidget: styleSheet.

widget.hide()

Hides the widget and its children. It calls the native method QWidget: hide.

widget.move(x, y)

Sets the screen position of the widget. It calls the native method QWidget: move.

  • x number - Pixels.
  • y number - Pixels.

widget.setObjectName(objectName)

Sets the object name of the widget in Qt. It calls the native method QObject: setObjectName. Object name can be analogous to id of an element in the web world. Using the objectName of the widget one can reference it in the Qt's stylesheet much like what we do with id in the web world.

  • objectName string - String which holds the widget's object name.

widget.objectName()

Gets the property that holds the widget's object name. It calls the native method QObject: setObjectName.

widget.setMouseTracking(isMouseTracked)

Sets the property that tells whether mouseTracking is enabled for the widget. It calls the native method QWidget: mouseTracking.

  • isMouseTracked boolean - Set it to true to enable mouse tracking.

widget.setEnabled(enabled)

Sets the property that tells whether the widget is enabled. It calls the native method QWidget: enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not.

  • enabled boolean - Set it to true to enable the widget.

widget.setFixedSize(width, height)

Sets both the minimum and maximum sizes of the widget. It calls the native method QWidget: setFixedSize.

  • width number - Pixels.
  • height number - Pixels.

widget.setGeometry(x, y, width, height)

Sets the screen position as well as size of the widget. It calls the native method QWidget: setGeometry.

  • x number - Pixels.
  • y number - Pixels.
  • width number - Pixels.
  • height number - Pixels.

widget.setMaximumSize(width, height)

Sets the maximum size of the widget. It calls the native method QWidget: setMaximumSize.

  • width number - Pixels.
  • height number - Pixels.

widget.setMinimumSize(width, height)

Sets the minimum size of the widget. It calls the native method QWidget: setMinimumSize.

  • width number - Pixels.
  • height number - Pixels.

widget.repaint()

Repaints the widget. It calls the native method QWidget: repaint.

widget.update()

Updates the widget. It calls the native method QWidget: update.

widget.pos()

Returns the current widget position. It calls the native method QWidget: pos. The returned size object contains x and y coordinates in pixels.

widget.size()

Returns the current widget size. It calls the native method QWidget: size. The returned size object contains width and height in pixels.

widget.updateGeometry()

Notifies the layout system that this widget has changed and may need to change geometry.

widget.setAttribute(attributeName, switchOn)

Sets the attribute attribute on this widget if on is true; otherwise clears the attribute. It calls the native method QWidget: setAttribute.

  • attributeName WidgetAttribute - Enum from WidgetAttribute.
  • switchOn boolean - set it to true if you want to enable an attribute.

widget.testAttribute(attributeName)

Returns true if attribute attribute is set on this widget; otherwise returns false. It calls the native method QWidget: testAttribute.

  • attributeName WidgetAttribute - Enum from WidgetAttribute.

widget.inherits(className)

Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. A class is considered to inherit itself. Example:

const progressBar = new QProgressBar();
progressBar.inherits("QObject"); // returns true
progressBar.inherits("QProgressBar"); // returns true
progressBar.inherits("QTabWidget"); // returns false
  • className string - Name of the class to get if this widget inherits from.
- + - + @@ -41,13 +41,13 @@ Returns true if the widget was closed; otherwise returns false.

- + - + - + \ No newline at end of file diff --git a/docs/api/QAbstractScrollArea/index.html b/docs/api/QAbstractScrollArea/index.html index b2e8f8b8b..8570a8089 100644 --- a/docs/api/QAbstractScrollArea/index.html +++ b/docs/api/QAbstractScrollArea/index.html @@ -3,7 +3,7 @@ - + QAbstractScrollArea @@ -28,9 +28,9 @@

QAbstractScrollArea

Abstract class to add functionalities common to all scrollarea based widgets.

This class implements all methods, properties of Qt's QAbstractScrollArea class so that it can be inherited by all scroll based widgets

QAbstractScrollArea is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all scrollable widget's easily. If you wish to create a scrollarea use QScrollArea instead.

QAbstractScrollArea is the base class for all widgets. It inherits from another abstract class NodeWidget

QAbstractScrollArea will list all methods and properties that are common to all scrollable widgets in the NodeGui world.

Static Methods

QAbstractScrollArea can access all the static methods defined in NodeWidget

Instance Properties

QAbstractScrollArea can access all the instance properties defined in NodeWidget

Instance Methods

QAbstractScrollArea can access all the instance methods defined in NodeWidget

Additionally it also has the following instance methods:

widget.setViewport(widget)

Sets the viewport to be the given widget. It calls the native method QAbstractScrollArea: setViewport.

  • widget NodeWidget.

widget.viewport()

Returns the viewport widget (NodeWidget). It calls the native method QAbstractScrollArea: viewport.

- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QAbstractSlider/index.html b/docs/api/QAbstractSlider/index.html index 39f5a8af2..b3295e252 100644 --- a/docs/api/QAbstractSlider/index.html +++ b/docs/api/QAbstractSlider/index.html @@ -3,7 +3,7 @@ - + QAbstractSlider @@ -28,9 +28,9 @@

QAbstractSlider

Abstract class to add functionalities common to all slider based widgets.

This class implements all methods, properties of Qt's QAbstractSlider class so that it can be inherited by all slider based widgets

QAbstractSlider is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all slider widget's easily. If you wish to create a slider use QDial instead.

QAbstractSlider is the base class for all widgets. It inherits from another abstract class NodeWidget

QAbstractSlider will list all methods and properties that are common to all slider widgets in the NodeGui world.

Static Methods

QAbstractSlider can access all the static methods defined in NodeWidget

Instance Properties

QAbstractSlider can access all the instance properties defined in NodeWidget

Instance Methods

QAbstractSlider can access all the instance methods defined in NodeWidget

Additionally it also has the following instance methods:

widget.setSingleStep(step)

Sets the step value for user arrow key slider interaction. It calls the native method QAbstractSlider: setSingleStep.

  • step number - Specified single step value.

widget.setMaximum(maximum)

Sets the maximum value for slider. It calls the native method QAbstractSlider: setMaximum.

  • maximum number - Specified maximum slider value.

widget.setMinimum(minimum)

Sets the minimum value for slider. It calls the native method QAbstractSlider: setMinimum.

  • minimum number - Specified minimum slider value.

widget.setValue(value)

Sets the current value for slider. It calls the native method QAbstractSlider: setValue.

  • value number - Specified current slider value.

widget.setOrientation(orientation)

Sets the current orientation for slider. It calls the native method QAbstractSlider: setOrientation.

slider.maximum()

Returns the maximum value (Number) of the slider. It calls the native method QAbstractSlider: maximum.

slider.minimum()

Returns the minimum value (Number) of the slider. It calls the native method QAbstractSlider: minimum.

slider.value()

Returns the current value (Number) of the slider. It calls the native method QAbstractSlider: value.

- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QAction/index.html b/docs/api/QAction/index.html index 9bb7e9bac..4b6f8c364 100644 --- a/docs/api/QAction/index.html +++ b/docs/api/QAction/index.html @@ -3,7 +3,7 @@ - + QAction @@ -28,9 +28,9 @@

QAction

The QAction class provides an abstract user interface action that can be inserted into widgets.

This class is a JS wrapper around Qt's QAction class

QAction inherits from EventWidget

Example

const { QAction, QMenu } = require("@nodegui/nodegui");
const menu = new QMenu();
const menuAction = new QAction();
menuAction.setText("subAction");
menuAction.addEventListener("triggered", () => {
console.log("Action clicked");
});
menu.addAction(menuAction);

new QAction(parent?)

  • parent NodeWidget. Constructs an action with parent. If parent is an action group the action will be automatically inserted into the group.

Static Methods

QAction can access all the static methods defined in EventWidget

Instance Properties

QAction can access all the instance properties defined in EventWidget

Instance Methods

QAction can access all the instance methods defined in EventWidget. Additionally it also has the following instance methods:

action.setEnabled(enabled)

This property holds whether the action is enabled. It calls the native method QAction: setEnabled.

  • enabled - Boolean

action.setText(on)

This property holds the action's descriptive text. It calls the native method QAction: setText.

  • text - string

action.setIcon(icon)

Sets the icon of action. It calls the native method QAction: setIcon.

action.setMenu(menu)

Sets the menu contained by this action to the specified menu. It calls the native method QAction: setMenu.

action.setShortcut(keySequence)

This property holds the action's key sequence. It calls the native method QAction: setShortcut.

action.setShortcutContext(contextEnum)

This property holds the context in which the action is valid. It calls the native method QAction: setShortcutContext.

  • contextEnum - ShortcutContext enum.

action.isCheckable()

Returns true if this action has been marked as checkable. It calls the native method QAction: isCheckable.

action.setCheckable(isCheckable)

Indicate that this action is checkable.

A checkable action is one which has an on/off state. For example, in a word processor, a Bold toolbar button may be either on or off. An action which is not a toggle action is a command action; a command action is simply executed, e.g. file save. By default, this property is false.

It calls the native method QAction: setCheckable.

  • isCheckable: boolean

action.isChecked()

Returns true if this action has been marked as checked. It calls the native method QAction: isChecked.

action.setChecked(isChecked)

Indicate that this action is checked.

Only checkable actions can be checked. By default, this is false (the action is unchecked).

It calls the native method QAction: setChecked.

  • isChecked: boolean

action.isSeparator()

Returns true if this action is a separator action; otherwise it returns false. It calls the native method QAction: isSeparator.

action.setSeparator(isSeparator)

If isSeparator is true then this action will be considered a separator.

How a separator is represented depends on the widget it is inserted into. Under most circumstances the text, submenu, and icon will be ignored for separator actions.

It calls the native method QAction: setSeparator.

  • isSeparator: boolean
- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QApplication/index.html b/docs/api/QApplication/index.html index 5c79ec9e4..d1abbf3c5 100644 --- a/docs/api/QApplication/index.html +++ b/docs/api/QApplication/index.html @@ -3,7 +3,7 @@ - + QApplication @@ -28,9 +28,9 @@

QApplication

QApplication is the root object for the entire application. It manages app level settings.

This class is a JS wrapper around Qt's QApplication class

The QApplication class manages the GUI application's control flow and main settings. In NodeGui you will never create an instance of it manually. NodeGui's internal runtime Qode does it for you on app start. You can access the initialised QApplication though if needed.

QApplication inherits from Component

Example

const { QApplication } = require("@nodegui/nodegui");
const qApp = QApplication.instance();
qApp.quit();

Static Methods

QApplication can access all the static methods defined in Component. Additionally it also has the following static methods.

QApplication.instance()

Returns the already initialised QApplication instance. It calls the native method QApplication: instance.

QApplication.clipboard()

Returns the object for interacting with the clipboard. It calls the native method QApplication: clipboard. See QClipboard.

Instance Properties

QApplication can access all the instance properties defined in Component

Instance Methods

QApplication can access all the instance methods defined in Component. Additionally it also has the following instance methods:

qApp.quit()

Quits the entire app. It calls the native method QApplication: quit.

qApp.exit(returnCode)

Tells the application to exit with a return code. It calls the native method QApplication: exit.

  • returnCode number - The exit code while quitting the app.

qApp.processEvents()

Processes all pending events for the calling thread . It calls the native method QApplication: processEvents.

qApp.exec()

We will never call this method in NodeGui, since Qode will execute this function for us. It exists for experiments only.

Enters the main event loop and waits until exit() is called. Returns the value that was passed to exit() (which is 0 if exit() is called via quit()). It calls the native method QApplication: exec.

Returns the exit code after app exits.

- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QCheckBox/index.html b/docs/api/QCheckBox/index.html index c6505b588..572d007b5 100644 --- a/docs/api/QCheckBox/index.html +++ b/docs/api/QCheckBox/index.html @@ -3,7 +3,7 @@ - + QCheckBox @@ -28,9 +28,9 @@

QCheckBox

Create and control checkbox.

This class is a JS wrapper around Qt's QCheckBox class

A QCheckBox provides ability to add and manipulate native checkbox widgets.

QCheckBox inherits from NodeWidget

Example

const { QCheckBox } = require("@nodegui/nodegui");
const checkbox = new QCheckBox();
checkbox.setText("Hello");

new QCheckBox(parent?)

  • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

Static Methods

QCheckBox can access all the static methods defined in NodeWidget

Instance Properties

QCheckBox can access all the instance properties defined in NodeWidget

Instance Methods

QCheckBox can access all the instance methods defined in NodeWidget

Additionally it also has the following instance methods:

checkbox.setText(text)

Sets the given text to the checkbox.

  • text string

checkbox.isChecked()

returns whether the checkbox is checked or not. It calls the native method QAbstractButton: isChecked.

checkbox.setChecked(check)

This property holds whether the button is checked. It calls the native method QAbstractButton: setChecked.

  • check boolean
- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QClipboard/index.html b/docs/api/QClipboard/index.html index 3e528c4c1..2d45e17f6 100644 --- a/docs/api/QClipboard/index.html +++ b/docs/api/QClipboard/index.html @@ -3,7 +3,7 @@ - + QClipboard @@ -28,9 +28,9 @@

QClipboard

The QClipboard class provides access to the window system clipboard.

This class is a JS wrapper around Qt's QClipboard class

QClipboard inherits from Component

Example

const {
QClipboard,
QClipboardMode,
QApplication
} = require("@nodegui/nodegui");
const clipboard = QApplication.clipboard();
const text = clipboard.text(QClipboardMode.Clipboard);

Static Methods

QClipboard can access all the static methods defined in Component

Instance Properties

QClipboard can access all the instance properties defined in Component

Instance Methods

QClipboard can access all the instance methods defined in Component. Additionally it has:

clipboard.clear(mode)

Clear the clipboard contents. It calls the native method QClipboard: clear.

clipboard.setText(text, mode)

Copies text into the clipboard as plain text. It calls the native method QClipboard: setText.

clipboard.text(mode)

Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any text. It calls the native method QClipboard: text.

- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QCursor/index.html b/docs/api/QCursor/index.html index 02967f2fe..d94aae25a 100644 --- a/docs/api/QCursor/index.html +++ b/docs/api/QCursor/index.html @@ -3,7 +3,7 @@ - + QCursor @@ -28,9 +28,9 @@ - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QDial/index.html b/docs/api/QDial/index.html index f952aa6db..715780b4a 100644 --- a/docs/api/QDial/index.html +++ b/docs/api/QDial/index.html @@ -3,7 +3,7 @@ - + QDial @@ -28,9 +28,9 @@

QDial

Create and control dial slider widgets.

This class is a JS wrapper around Qt's QDial class

A QDial provides ability to add and manipulate native dial slider widgets.

QDial inherits from QAbstractSlider

Example

const { QDial } = require("@nodegui/nodegui");
const dial = new QDial();

new QDial(parent?)

  • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

Static Methods

QDial can access all the static methods defined in NodeWidget

Instance Properties

QDial can access all the instance properties defined in NodeWidget

Instance Methods

QDial can access all the instance methods defined in NodeWidget. Additionally it also has the following instance methods:

dial.setNotchesVisible(visible)

Sets the visibility of notches drawn around the dial. It calls the native method QDial: setNotchesVisible.

  • visible boolean - Set the value as current notch visibility.

dial.setWrapping(on)

Sets the ability to wrap arrow around the dial instead of limiting it to upper part of the dial. It calls the native method QDial: setWrapping.

  • on boolean - Set the value as current wrapping setting.

dial.setNotchTarget(target)

Sets the number of pixels between dial notches. It calls the native method QDial: setNotchTarget.

  • target number - Specifies number of pixels between notches.

dial.notchTarget()

Returns the current number of pixels between dial notches. It calls the native method QDial: notchTarget.

dial.notchesVisible()

Returns the visibility status (Boolean) of dial notches. It calls the native method QDial: notchesVisible.

dial.notchesVisible()

Returns the visibility status (Boolean) of dial notches. It calls the native method QDial: notchesVisible.

dial.wrapping()

Returns the current wrapping (Boolean) state of the dial. It calls the native method QDial: wrapping.

- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QGridLayout/index.html b/docs/api/QGridLayout/index.html index b55529651..84b3c6aa2 100644 --- a/docs/api/QGridLayout/index.html +++ b/docs/api/QGridLayout/index.html @@ -3,7 +3,7 @@ - + QGridLayout @@ -28,9 +28,9 @@

QGridLayout

The QGridLayout class lays out widgets in a grid.

This class is a JS wrapper around Qt's QGridLayout

QGridLayout inherits from NodeLayout

Example

const { QGridLayout, QWidget, QLabel } = require("@nodegui/nodegui");
const view = new QWidget();
const layout = new QGridLayout();
view.setLayout(layout);
const label = new QLabel();
label.setText("label1");
const label2 = new QLabel();
label2.setText("label2");
layout.addWidget(label);
layout.addWidget(label2);

Static Methods

QGridLayout can access all the static methods defined in NodeLayout

Instance Properties

QGridLayout can access all the instance properties defined in NodeLayout

Instance Methods

QGridLayout can access all the instance methods defined in NodeLayout

Additionally it also has the following instance methods:

layout.addWidget(childWidget)

Adds the childWidget to the layout. It calls the native method QGridLayout QGridLayout: addWidget.

  • childWidget NodeWidget - child widget that needs to be added to the layout.

layout.removeWidget(childWidget)

Removes the childWidget from the layout. It calls the native method of custom QGridLayout. QGridLayout: removeWidget.

  • childWidget NodeWidget - child widget that needs to be added to the layout.
- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QIcon/index.html b/docs/api/QIcon/index.html index 4289bfc96..dc65726d3 100644 --- a/docs/api/QIcon/index.html +++ b/docs/api/QIcon/index.html @@ -3,7 +3,7 @@ - + QIcon @@ -30,9 +30,9 @@ Additionally it also has the following instance methods:

QIcon: pixmap.

  • width: number,
  • height: number
  • mode?: QIconMode
  • state?: QIconState

icon.isMask()

Returns true if this icon has been marked as a mask image. It calls the native method QIcon: isMask.

icon.setIsMask(isMask)

Indicate that this icon is a mask image, and hence can potentially be modified based on where it's displayed. It calls the native method QIcon: setIsMask.

  • isMask: boolean
- + - + @@ -42,13 +42,13 @@ Additionally it also has the following instance methods:

- + - + - + \ No newline at end of file diff --git a/docs/api/QKeySequence/index.html b/docs/api/QKeySequence/index.html index b792298ba..b31684fa3 100644 --- a/docs/api/QKeySequence/index.html +++ b/docs/api/QKeySequence/index.html @@ -3,7 +3,7 @@ - + QKeySequence @@ -29,9 +29,9 @@ Additionally it also has the following instance methods:

keySequence.count()

Returns the number of keys in the key sequence. The maximum is 4. It calls the native method QKeySequence: count.

- + - + @@ -41,13 +41,13 @@ Additionally it also has the following instance methods:

- + - + - + \ No newline at end of file diff --git a/docs/api/QLabel/index.html b/docs/api/QLabel/index.html index 84fd19748..32ece31d1 100644 --- a/docs/api/QLabel/index.html +++ b/docs/api/QLabel/index.html @@ -3,7 +3,7 @@ - + QLabel @@ -28,9 +28,9 @@

QLabel

Create and control text.

This class is a JS wrapper around Qt's QLabel class

A QLabel provides ability to add and manipulate text.

QLabel inherits from NodeWidget

Example

const { QLabel } = require("@nodegui/nodegui");
const label = new QLabel();
label.setText("Hello");

new QLabel(parent?)

  • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

Static Methods

QLabel can access all the static methods defined in NodeWidget

Instance Properties

QLabel can access all the instance properties defined in NodeWidget. Additionally it also has the following instance properties:

label.pixmap

The pixmap currently set on this label.

label.text

the current text set on the label.

Instance Methods

QLabel can access all the instance methods defined in NodeWidget. Additionally it also has the following instance methods:

label.setText(text)

Sets the given text to the label.

  • text string

label.setWordWrap(on)

  • on boolean - If true it sets wordwrap on the label

label.setPixmap(pixMap)

Images in the form of a pixmap can be set as the label content

  • pixMap QPixmap - Allows to set image content in the form of a QPixmap on the label
- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QLineEdit/index.html b/docs/api/QLineEdit/index.html index d23f76fec..27d44a9a6 100644 --- a/docs/api/QLineEdit/index.html +++ b/docs/api/QLineEdit/index.html @@ -3,7 +3,7 @@ - + QLineEdit @@ -28,9 +28,9 @@

QLineEdit

Create and control editable text field.

This class is a JS wrapper around Qt's QLineEdit class

A QLineEdit provides ability to add and manipulate native editable text field widgets.

QLineEdit inherits from NodeWidget

Example

const { QLineEdit } = require("@nodegui/nodegui");
const lineEdit = new QLineEdit();

new QLineEdit(parent?)

  • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

Static Methods

QLineEdit can access all the static methods defined in NodeWidget

Instance Properties

QLineEdit can access all the instance properties defined in NodeWidget. Additionally it also has the following instance properties:

lineEdit.placeholderText

The placeholder text set on the lineEdit.

Instance Methods

QLineEdit can access all the instance methods defined in NodeWidget. Additionally it also has the following instance methods:

lineEdit.setText(text)

Sets the given text to the lineEdit.

  • text string

lineEdit.setPlaceholderText(text)

Sets the given text to the lineEdit's placeholder.

  • text string

lineEdit.text()

Returns the currently set text from native lineEdit widget.

lineEdit.setReadOnly(isReadOnly)

Sets the lineEdit to be read only. lineEdit property holds whether the line edit is read only.

  • isReadOnly boolean

lineEdit.clear()

Clears the lineEdit.

- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QMainWindow/index.html b/docs/api/QMainWindow/index.html index 6e74126b4..bf9c58254 100644 --- a/docs/api/QMainWindow/index.html +++ b/docs/api/QMainWindow/index.html @@ -3,7 +3,7 @@ - + QMainWindow @@ -29,9 +29,9 @@ Once a central widget is set you can add children/layout to the central widget.

Static Methods

QMainWindow can access all the static methods defined in NodeWidget

Instance Properties

QMainWindow can access all the instance properties defined in NodeWidget

Additionally it also has the following instance properties:

win.layout

A NodeLayout representing current layout that is set on the window. If a centralWidget is set then the layout of central widget is returned.

win.centralWidget

A NodeWidget representing currently set central widget on the window.

Instance Methods

QMainWindow can access all the instance methods defined in NodeWidget

Additionally it also has the following instance methods:

win.setCentralWidget(widget)

Sets the given widget to be the main window's central widget.

  • widget NodeWidget - Any widget that inherits from NodeWidget class.

win.setMenuBar(menuBar)

Sets the given menuBar to be the window's menubar widget.

win.setMenuWidget(menuWidget)

Sets the given widget to be the window's menubar widget.

  • menuWidget NodeWidget
- + - + @@ -41,13 +41,13 @@ Once a central widget is set you can add children/layout to the central widget.< - + - + - + \ No newline at end of file diff --git a/docs/api/QMenu/index.html b/docs/api/QMenu/index.html index 937b736ef..5c0451095 100644 --- a/docs/api/QMenu/index.html +++ b/docs/api/QMenu/index.html @@ -3,7 +3,7 @@ - + QMenu @@ -28,9 +28,9 @@

QMenu

The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.

This class is a JS wrapper around Qt's QMenu class

QMenu inherits from NodeWidget

Example

const { QMenu } = require("@nodegui/nodegui");
const menu = new QMenu();

new QMenu(parent?)

  • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

Static Methods

QMenu can access all the static methods defined in NodeWidget

Instance Properties

QMenu can access all the instance properties defined in NodeWidget

Instance Methods

QMenu can access all the instance methods defined in NodeWidget. Additionally it also has the following instance methods:

menu.setTitle(title)

This property holds the title of the menu. It calls the native method QMenu: setTitle.

  • title string

menu.addAction(action)

Appends the action action to this widget's list of actions. It calls the native method QMenu: addAction.

- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QMenuBar/index.html b/docs/api/QMenuBar/index.html index f0e3b5643..54a6fea62 100644 --- a/docs/api/QMenuBar/index.html +++ b/docs/api/QMenuBar/index.html @@ -3,7 +3,7 @@ - + QMenuBar @@ -28,9 +28,9 @@

QMenuBar

The QMenuBar class provides a menu widget for use in menu bars, context menus, and other popup menus.

This class is a JS wrapper around Qt's QMenuBar class

QMenuBar inherits from NodeWidget

Example

const { QMenuBar, QMainWindow } = require("@nodegui/nodegui");
const win = new QMainWindow();
const menu = new QMenuBar();
const menuBar = new QMenuBar();
win.setMenuBar(menuBar);
win.show();
global.win = win;

new QMenuBar(parent?)

  • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

Static Methods

QMenuBar can access all the static methods defined in NodeWidget

Instance Properties

QMenuBar can access all the instance properties defined in NodeWidget

Instance Methods

QMenuBar can access all the instance methods defined in NodeWidget. Additionally it also has the following instance methods:

menu.addMenu(menu)

Appends menu to the menu bar. It calls the native method QMenuBar: addMenu.

menu.setNativeMenuBar(nativeMenuBar)

This property holds whether or not a menubar will be used as a native menubar on platforms that support it. It calls the native method QMenuBar: setNativeMenuBar.

  • nativeMenuBar Boolean.
- + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QPixmap/index.html b/docs/api/QPixmap/index.html index b02afc402..53feb3af7 100644 --- a/docs/api/QPixmap/index.html +++ b/docs/api/QPixmap/index.html @@ -3,7 +3,7 @@ - + QPixmap @@ -30,9 +30,9 @@ returns true if load was successful otherwise returns false.

  • im This method doesnt mutate this pixmap and rather returns a new pixmap with new height and width.

    • width number. Width in pixels for new pixmap.
    • height number. Height in pixels for new pixmap.
    • aspectRatioMode AspectRatioMode (optional). Specifies how scaling should happen. AspectRatio is an enum from Qt
    - + - + @@ -42,13 +42,13 @@ This method doesnt mutate this pixmap and rather returns a new pixmap with new h - + - + - + \ No newline at end of file diff --git a/docs/api/QPlainTextEdit/index.html b/docs/api/QPlainTextEdit/index.html index 1b3d9a81b..d331ef16a 100644 --- a/docs/api/QPlainTextEdit/index.html +++ b/docs/api/QPlainTextEdit/index.html @@ -3,7 +3,7 @@ - + QPlainTextEdit @@ -28,9 +28,9 @@

    QPlainTextEdit

    Used to edit and display plain text.

    This class is a JS wrapper around Qt's QPlainTextEdit class

    A QPlainTextEdit provides ability to add and manipulate native editable text field widgets.

    QPlainTextEdit inherits from NodeWidget

    Example

    const { QPlainTextEdit } = require("@nodegui/nodegui");
    const plainTextEdit = new QPlainTextEdit();

    new QPlainTextEdit(parent?)

    • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

    Static Methods

    QPlainTextEdit can access all the static methods defined in NodeWidget

    Instance Properties

    QPlainTextEdit can access all the instance properties defined in NodeWidget.

    plainTextEdit.placeholderText

    The placeholder text set on the plainTextEdit.

    Instance Methods

    QPlainTextEdit can access all the instance methods defined in NodeWidget.

    plainTextEdit.setPlainText(text)

    Sets the given text to the plainTextEdit. It calls the native method QPlainTextEdit: setPlainText.

    • text string

    plainTextEdit.setPlaceholderText(text)

    Sets the given text to the plainTextEdit's placeholder.

    • text string

    plainTextEdit.toPlainText()

    Returns the text of the text edit as plain text. QPlainTextEdit: toPlainText.

    plainTextEdit.setReadOnly(isReadOnly)

    Sets the plainTextEdit to be read only. QPlainTextEdit: isReadOnly.

    plainTextEdit.clear()

    Deletes all the text in the text edit.QPlainTextEdit: clear.

    plainTextEdit.setWordWrapMode(mode)

    This property holds the mode QPlainTextEdit will use when wrapping text by words.QPlainTextEdit: setWordWrapMode.

    • mode: QTextOptionWrapMode

    plainTextEdit.wordWrapMode()

    returns word wrap mode. QPlainTextEdit: wordWrapMode.

    plainTextEdit.setLineWrapMode(mode)

    This property holds the line wrap mode. QPlainTextEdit: setLineWrapMode.

    • mode: LineWrapMode

    plainTextEdit.lineWrapMode()

    returns line wrap mode. QPlainTextEdit: setLineWrapMode.

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QProgressBar/index.html b/docs/api/QProgressBar/index.html index e19541ac7..5e6e84402 100644 --- a/docs/api/QProgressBar/index.html +++ b/docs/api/QProgressBar/index.html @@ -3,7 +3,7 @@ - + QProgressBar @@ -28,9 +28,9 @@

    QProgressBar

    Create and control progress bar widgets.

    This class is a JS wrapper around Qt's QProgressBar class

    A QProgressBar provides ability to add and manipulate native progress bar widgets.

    QProgressBar inherits from NodeWidget

    Example

    const { QProgressBar } = require("@nodegui/nodegui");
    const progressBar = new QProgressBar();

    new QProgressBar(parent?)

    • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

    Static Methods

    QProgressBar can access all the static methods defined in NodeWidget

    Instance Properties

    QProgressBar can access all the instance properties defined in NodeWidget

    Instance Methods

    QProgressBar can access all the instance methods defined in NodeWidget. Additionally it also has the following instance methods:

    progressBar.setValue(value)

    Sets the current value of the progressBar. It calls the native method QProgressBar: setValue.

    • value number - Set the value as current value

    progressBar.setMaximum(max)

    Sets the max value of the progressBar. It calls the native method QProgressBar: setMaximum.

    • max number - Set the value as max value of the progress bar.

    progressBar.setMinimum(min)

    Sets the min value of the progressBar. It calls the native method QProgressBar: setMinimum.

    • min number - Set the value as min value of the progress bar.

    progressBar.setOrientation(orientation)

    Sets the orientation of the progressBar. It calls the native method QProgressBar: setOrientation.

    progressBar.value()

    Returns the current value (Number) of the progressBar. It calls the native method QProgressBar: value.

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QPushButton/index.html b/docs/api/QPushButton/index.html index 728fdd52a..cd29898c4 100644 --- a/docs/api/QPushButton/index.html +++ b/docs/api/QPushButton/index.html @@ -3,7 +3,7 @@ - + QPushButton @@ -28,9 +28,9 @@

    QPushButton

    Create and control buttons.

    This class is a JS wrapper around Qt's QPushButton class

    A QPushButton provides ability to add and manipulate native button widgets.

    QPushButton inherits from NodeWidget

    Example

    const { QPushButton } = require("@nodegui/nodegui");
    const button = new QPushButton();
    button.setText("Hello");

    new QPushButton(parent?)

    • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

    Static Methods

    QPushButton can access all the static methods defined in NodeWidget

    Instance Properties

    QPushButton can access all the instance properties defined in NodeWidget

    Instance Methods

    QPushButton can access all the instance methods defined in NodeWidget

    Additionally it also has the following instance methods:

    button.setText(text)

    Sets the given text to the button.

    • text string

    button.setFlat(isFlat)

    Sets whether the button border is raised.

    • isFlat boolean

    button.setIcon(icon)

    Sets an icon in the button.

    • icon QIcon
    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QRadioButton/index.html b/docs/api/QRadioButton/index.html index 702e7f7ef..1e1e86de6 100644 --- a/docs/api/QRadioButton/index.html +++ b/docs/api/QRadioButton/index.html @@ -3,7 +3,7 @@ - + QRadioButton @@ -28,9 +28,9 @@

    QRadioButton

    Create and control radio button.

    This class is a JS wrapper around Qt's QRadioButton class

    A QRadioButton provides ability to add and manipulate native radio button widgets.

    QRadioButton inherits from NodeWidget

    Example

    const { QRadioButton } = require("@nodegui/nodegui");
    const radioButton = new QRadioButton();
    radioButton.setText("Hello");

    new QRadioButton(parent?)

    • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

    Static Methods

    QRadioButton can access all the static methods defined in NodeWidget

    Instance Properties

    QRadioButton can access all the instance properties defined in NodeWidget

    Instance Methods

    QRadioButton can access all the instance methods defined in NodeWidget

    Additionally it also has the following instance methods:

    radioButton.setText(text)

    Sets the given text to the radioButton.

    • text string
    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QScrollArea/index.html b/docs/api/QScrollArea/index.html index 481ea3dc2..7dc37f28e 100644 --- a/docs/api/QScrollArea/index.html +++ b/docs/api/QScrollArea/index.html @@ -3,7 +3,7 @@ - + QScrollArea @@ -28,9 +28,9 @@

    QScrollArea

    A QScrollArea provides a scrolling view onto another widget.

    This class is a JS wrapper around Qt's QScrollArea class

    QScrollArea inherits from QAbstractScrollArea

    Example

    const { QScrollArea } = require("@nodegui/nodegui");
    const scrollArea = new QScrollArea();
    scrollArea.setInlineStyle("flex: 1; width:'100%';");
    const imageLabel = new QLabel();
    const pixmap = new QPixmap(
    path.resolve(__dirname, "../extras/assets/kitchen.png")
    );
    imageLabel.setPixmap(pixmap);
    scrollArea.setWidget(imageLabel);

    new QScrollArea(parent?)

    • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

    Static Methods

    QScrollArea can access all the static methods defined in QAbstractScrollArea

    Instance Properties

    QScrollArea can access all the instance properties defined in QAbstractScrollArea

    Instance Methods

    QScrollArea can access all the instance methods defined in QAbstractScrollArea. Additionally it also has the following instance methods:

    scrollArea.setWidget(widget)

    Sets the scroll area's widget. It calls the native method QScrollArea: setWidget.

    • widget NodeWidget - Any widget you want to enclose in a scroll area.
    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QShortcut/index.html b/docs/api/QShortcut/index.html index a46ae9dda..617ca4e09 100644 --- a/docs/api/QShortcut/index.html +++ b/docs/api/QShortcut/index.html @@ -3,7 +3,7 @@ - + QShortcut @@ -28,9 +28,9 @@

    QShortcut

    The QShortcut class is used to create keyboard shortcuts.

    This class is a JS wrapper around Qt's QShortcut class

    QShortcut inherits from EventWidget

    Example

    const { QShortcut, QKeySequence, QMainWindow } = require("@nodegui/nodegui");
    const win = new QMainWindow();
    const shortcut = new QShortcut(win);
    shortcut.setKey(new QKeySequence("Ctrl+M"));
    shortcut.setEnabled(true);
    shortcut.addEventListener(QShortcutEvents.activated, () => {
    console.log("Shortcut Activated");
    });
    win.show();
    global.win = win;
    global.shortcut = shortcut;

    new QShortcut(parent)

    • parent NodeWidget. Any widget inheriting from NodeWidget can be passed as a parent. This will make this shortcut bind to the parent widget.

    Static Methods

    QShortcut can access all the static methods defined in EventWidget

    Instance Properties

    QShortcut can access all the instance properties defined in EventWidget

    Instance Methods

    QShortcut can access all the instance methods defined in EventWidget. Additionally it also has the following instance methods:

    shortcut.setEnabled(enabled)

    This property holds whether the shortcut is enabled. It calls the native method QShortcut: setEnabled.

    • enabled - Boolean

    shortcut.setAutoRepeat(on)

    This property holds whether the shortcut can auto repeat. It calls the native method QShortcut: setAutoRepeat.

    • on - Boolean

    shortcut.setKey(keySequence)

    This property holds the shortcut's key sequence. It calls the native method QShortcut: setKey.

    shortcut.setContext(contextEnum)

    This property holds the context in which the shortcut is valid. It calls the native method QShortcut: setContext.

    • contextEnum - ShortcutContext enum.
    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QSpinBox/index.html b/docs/api/QSpinBox/index.html index aa4f49695..dba5336a3 100644 --- a/docs/api/QSpinBox/index.html +++ b/docs/api/QSpinBox/index.html @@ -3,7 +3,7 @@ - + QSpinBox @@ -28,9 +28,9 @@

    QSpinBox

    Create and control spin box widgets.

    This class is a JS wrapper around Qt's QSpinBox class

    A QSpinBox provides ability to add and manipulate native spin box widgets.

    QSpinBox inherits from NodeWidget

    Example

    const { QSpinBox } = require("@nodegui/nodegui");
    const spinBox = new QSpinBox();

    new QSpinBox(parent?)

    • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

    Static Methods

    QSpinBox can access all the static methods defined in NodeWidget

    Instance Properties

    QSpinBox can access all the instance properties defined in NodeWidget

    Instance Methods

    QSpinBox can access all the instance methods defined in NodeWidget. Additionally it also has the following instance methods:

    spinBox.setValue(val)

    Sets the current value of the spinBox. It calls the native method QSpinBox: setValue.

    • val number - Set the value as current value

    spinBox.setRange(minimum, maximum)

    Sets the min/max value of the spinBox. It calls the native method QSpinBox: setRange.

    • max number - Set the value as max value of the progress bar.

    spinBox.setPrefix(prefix)

    Sets the prefix of the spinBox. It calls the native method QSpinBox: setPrefix.

    spinBox.setSuffix(suffix)

    Sets the suffix of the spinBox. It calls the native method QSpinBox: setSuffix.

    spinBox.setSingleStep(val)

    Sets the single step value of the spinBox. It calls the native method QSpinBox: setSingleStep.

    spinBox.cleanText()

    Returns the text content (String) of the spinBox excluding any prefix, suffix, or leading or trailing whitespace. It calls the native method QSpinBox: value.

    spinBox.minimum()

    Returns the minimum value (Number) of the spinBox. It calls the native method QSpinBox: value.

    spinBox.maximum()

    Returns the maximum value (Number) of the spinBox. It calls the native method QSpinBox: value.

    spinBox.value()

    Returns the current value (Number) of the spinBox. It calls the native method QSpinBox: value.

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QSystemTrayIcon/index.html b/docs/api/QSystemTrayIcon/index.html index 3c7ef3558..073f0afef 100644 --- a/docs/api/QSystemTrayIcon/index.html +++ b/docs/api/QSystemTrayIcon/index.html @@ -3,7 +3,7 @@ - + QSystemTrayIcon @@ -28,9 +28,9 @@

    QSystemTrayIcon

    Create and control system tray icon.

    This class is a JS wrapper around Qt's QSystemTrayIcon class

    A QSystemTrayIcon provides ability to add and manipulate native system tray icon.

    QSystemTrayIcon inherits from EventWidget

    Example

    const { QSystemTrayIcon, QIcon } = require("@nodegui/nodegui");
    const trayIcon = new QIcon(
    resolve(__dirname, "some/image/file.png");
    );
    const tray = new QSystemTrayIcon();
    tray.show();
    global.tray = tray; // prevents garbage collection of tray

    new QSystemTrayIcon(parent?)

    • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

    Static Methods

    QSystemTrayIcon can access all the static methods defined in EventWidget

    Instance Properties

    QSystemTrayIcon can access all the instance properties defined in EventWidget

    Instance Methods

    QSystemTrayIcon can access all the instance methods defined in EventWidget. Additionally it also has the following instance methods:

    trayIcon.show()

    Shows the icon in the system tray icon. It calls the native method QSystemTrayIcon: show.

    trayIcon.hide()

    Hides the system tray icon. It calls the native method QSystemTrayIcon: hide.

    trayIcon.setIcon(icon)

    Sets the icon of system tray. It calls the native method QSystemTrayIcon: setIcon.

    trayIcon.isVisible()

    Returns the visibility of icon. It calls the native method QSystemTrayIcon: setIcon.

    trayIcon.setToolTip(toolTip)

    Sets the tooltip of system tray. It calls the native method QSystemTrayIcon: setToolTip.

    • toolTip string.

    trayIcon.setContextMenu(contextMenu)

    Sets the specified menu to be the context menu for the system tray icon. It calls the native method QSystemTrayIcon: setIcon.

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QTabWidget/index.html b/docs/api/QTabWidget/index.html index 66ad64736..851658b93 100644 --- a/docs/api/QTabWidget/index.html +++ b/docs/api/QTabWidget/index.html @@ -3,7 +3,7 @@ - + QTabWidget @@ -28,9 +28,9 @@ - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QWidget/index.html b/docs/api/QWidget/index.html index 8802a7a27..024ea4124 100644 --- a/docs/api/QWidget/index.html +++ b/docs/api/QWidget/index.html @@ -3,7 +3,7 @@ - + QWidget @@ -28,9 +28,9 @@

    QWidget

    Create and control views.

    This class is a JS wrapper around Qt's QWidget class

    A QWidget can be used to encapsulate other widgets and provide structure. It functions similar to a div in the web world.

    QWidget inherits from NodeWidget

    Example

    const { QWidget } = require("@nodegui/nodegui");
    const view = new QWidget();
    view.setObjectName("container"); //Similar to setting `id` on the web
    view.setLayout(new FlexLayout());

    new QWidget(parent?)

    • parent NodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.

    Static Methods

    QWidget can access all the static methods defined in NodeWidget

    Instance Properties

    QWidget can access all the instance properties defined in NodeWidget

    Instance Methods

    QWidget can access all the instance methods defined in NodeWidget

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/QtEnums/index.html b/docs/api/QtEnums/index.html index b07097aa8..8d53d718c 100644 --- a/docs/api/QtEnums/index.html +++ b/docs/api/QtEnums/index.html @@ -3,7 +3,7 @@ - + Qt Enums @@ -28,9 +28,9 @@ - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/YogaWidget/index.html b/docs/api/YogaWidget/index.html index 249d5e3cd..35445a40e 100644 --- a/docs/api/YogaWidget/index.html +++ b/docs/api/YogaWidget/index.html @@ -3,7 +3,7 @@ - + YogaWidget @@ -28,9 +28,9 @@

    YogaWidget

    Abstract class to add common functionality related to Flex layout to all Widgets.

    This class implements methods related to flex layout required to be present in all widgets

    YogaWidget is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities related to flex layout to all widget's easily. We implement flex layout using a library called Yoga. As part of yoga every widget needs to store its own flex properties such as alignItems, flexDirection etc. This is done with the help of YogaWidget.

    YogaWidget is the base class for EventWidget which means all widgets inherit it aswell. It inherits from another abstract class Component

    const { QWidget } = require("@nodegui/nodegui");
    const view = new QWidget();
    // getFlexNode is a method from YogaWidget
    const flexNode = view.getFlexNode();

    YogaWidget helps in storing all flex properties of a widget.

    Static Methods

    YogaWidget can access all the static methods defined in Component

    Instance Properties

    YogaWidget can access all the instance properties defined in Component

    Instance Methods

    YogaWidget can access all the instance methods defined in Component

    Additionally it also has the following instance methods:

    widget.getFlexNode()

    Returns a native reference to the flex node used in c++ instance for the widget. This is not a regular javascript object and hence no methods or properties can be accessed from it. It exists so that we pass around a widgets flex node to layouts, etc.

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/api/process/index.html b/docs/api/process/index.html index 5c75d0cb0..2944bae6c 100644 --- a/docs/api/process/index.html +++ b/docs/api/process/index.html @@ -3,7 +3,7 @@ - + process @@ -30,9 +30,9 @@ It adds the following properties :

    Properties

    process.versions.qode Readonly

    A String representing Qode's version string. Qode is a lightly modified version of NodeJs that allows running Qt and NodeJs under a single process.

    process.versions.qt(compiled) Readonly

    A String representing Qt version used when compile Qode binary. This can be useful to know which version of Qt is binary compatible with the version of Qode you are running. This is useful when running qode with a different version of Qt than what it was compiled with.

    process.versions.qt(runtime) Readonly

    A String representing Qt version of the Qt library loaded during runtime. This can be useful to know which version of Qt you are using at runtime as compared to the version of Qt used when Qode was compiled.This is possible since Qt is dynamically linked to Qode and you could replace the Qt dynamic libraries with any binary compatible library. Hence, this is useful when running qode with a different version of Qt than what it was compiled with.

    - + - + @@ -42,13 +42,13 @@ It adds the following properties :

    - + - + @@ -45,13 +45,13 @@ built-in modules.

    - + - + - + \ No newline at end of file diff --git a/docs/development/README/index.html b/docs/development/README/index.html index 06f7897dd..bfa819e88 100644 --- a/docs/development/README/index.html +++ b/docs/development/README/index.html @@ -3,7 +3,7 @@ - + README @@ -29,9 +29,9 @@ https://doc.qt.io/qt-5/qprogressbar.html#textVisible-prop to get a grip on it.

    This PR can be used as a guide

    https://github.com/nodegui/nodegui/issues/36

    https://github.com/nodegui/nodegui/pull/39

    You can also take a look at few bugs or the issue board here to know what you can pick up if you are out of ideas.

    https://github.com/nodegui/nodegui/projects/

    https://github.com/nodegui/react-nodegui/projects/

    - + - + @@ -41,13 +41,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/development/common_errors/index.html b/docs/development/common_errors/index.html index 4797efaba..4d8463c6b 100644 --- a/docs/development/common_errors/index.html +++ b/docs/development/common_errors/index.html @@ -3,7 +3,7 @@ - + common_errors @@ -30,9 +30,9 @@ if its a leaf node widget(doesnt contain any children).

  • - + - + @@ -42,13 +42,13 @@ if its a leaf node widget(doesnt contain any children).

    - + - + - + \ No newline at end of file diff --git a/docs/development/debugging/index.html b/docs/development/debugging/index.html index 5fc669f99..9817ccb07 100644 --- a/docs/development/debugging/index.html +++ b/docs/development/debugging/index.html @@ -3,7 +3,7 @@ - + debugging @@ -28,9 +28,9 @@ - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/development/getting-started/index.html b/docs/development/getting-started/index.html index 226b7f049..3b905fba4 100644 --- a/docs/development/getting-started/index.html +++ b/docs/development/getting-started/index.html @@ -3,7 +3,7 @@ - + getting-started @@ -31,9 +31,9 @@ So if you take a look at NLabel you will see, it inherits from QLabel and NodeWi 4.1. You can see the readme of https://github.com/nodejs/node-addon-api.git/
  • See node-qt implementation. It is implemented in Nan (explained in video).
  • Now try to match the implementation in node-qt and convert to N-API using examples from samples.
  • Implementations not in node-qt need to be done with effort.
  • - + - + @@ -43,13 +43,13 @@ So if you take a look at NLabel you will see, it inherits from QLabel and NodeWi - + - + - + \ No newline at end of file diff --git a/docs/development/setting-up/index.html b/docs/development/setting-up/index.html index ff3083d33..78fc57fbb 100644 --- a/docs/development/setting-up/index.html +++ b/docs/development/setting-up/index.html @@ -3,7 +3,7 @@ - + setting-up @@ -28,9 +28,9 @@

    setting-up

    Setup project for development

    Development setup and getting started

    Make sure you follow the setup guide of Qode so that you have a build environment ready for Qode.

    MacOSX:

    Requirements

    1. Node version: > 11
    2. CMake 3.1 and up (Installation instructions can be found here: https://cmake.org/install/)
    3. Make, GCC v7
    4. Qt (Optional): Make sure you followed the setup instructions from Qode

    Windows:

    Requirements

    1. Node version: > 11
    2. CMake 3.1 and up (Installation instructions can be found here: https://cmake.org/install/)
    3. Visual Studio Community 2017
    4. Powershell
    5. Qt (Optional): Make sure you followed the setup instructions from Qode

    Linux:

    Supported versions: Ubuntu 17.10 and up

    Requirements

    1. Node version: > 11
    2. CMake 3.1 and up (Installation instructions can be found here: https://cmake.org/install/)
    3. Make, GCC v7, pkg-config
    4. Qt (Optional): Make sure you followed the setup instructions from Qode

    On Ubuntu: $ sudo apt-get install pkg-config build-essentials should install everything except Qt5.

    Note: If you are using your own version of Qt make sure to

    export PKG_CONFIG_PATH="<path to qt installation>/5.13.0/gcc_64/lib/pkgconfig"

    Common:

    1. Once you have setup the platform specific stuff as mentioned above, follow these:
    2. git clone this repo.
    3. yarn install
    4. yarn build:addon
    5. yarn dev

    If you want to run with your own version of Qt make sure to pass qt_home_dir variable when building addon.

    npm run rebuild:addon [--qt_home_dir=/path/to/qt]

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/development/signal_and_event_handling/index.html b/docs/development/signal_and_event_handling/index.html index 562488110..91ded63e5 100644 --- a/docs/development/signal_and_event_handling/index.html +++ b/docs/development/signal_and_event_handling/index.html @@ -3,7 +3,7 @@ - + signal_and_event_handling @@ -33,9 +33,9 @@ like this:

    And run npm run automoc before running npm run build:addon

    We need to run Qt's MOC (Meta Object Compiler) on the file whenever we use Q_OBJECT in a class or use QObject::connect. This is so that Qt can expand the macros and add necessary implementations to our class.

    How does it work ?

    1. On JS side for each widget instance we create an instance of NodeJS's Event Emitter. This is done by the class EventWidget from which NodeWidget inherits
    2. We send this event emiiter's emit function to the C++ side by calling initNodeEventEmitter method and store a pointer to the event emitter's emit function using emitOnNode. initNodeEventEmitter function is added by a macro from EventWidget (c++). You can find the initNodeEventEmitter method with the event widget macros.
    3. We setup Qt's connect method for all the signals that we want to listen to and call the emitOnNode (which is actually emit from Event emitter) whenever a signal arrives. This is done manually on every widget by overriding the method connectWidgetSignalsToEventEmitter. Check npushbutton.h for details. This takes care of all the signals of the widgets. Now to export all qt events of the widget, we had overriden the widgets event(Event*) method to listen to events received by the widget and send it to the event emitter. This is done inside the EVENTWIDGET_IMPLEMENTATIONS macro
    - + - + @@ -45,13 +45,13 @@ And run npm run automoc before running npm run build:addon - + - + - + \ No newline at end of file diff --git a/docs/development/styling/index.html b/docs/development/styling/index.html index 9921bdea5..990580717 100644 --- a/docs/development/styling/index.html +++ b/docs/development/styling/index.html @@ -3,7 +3,7 @@ - + styling @@ -35,9 +35,9 @@ declare and define q properties for each of those custom properties we want. This allows us to use something like:

    view.setStyleSheet(`
    background-color:green;
    qproperty-flex: 1;
    qproperty-alignItems: 'center';
    `);

    Notice qproperty- prefix? These are the custom q-properties we defined in YogaWidget.h. We do not need to prefix qproperty- if a stylehsheet string is passed through StyleSheet.create(). StyleSheet.create has an autoprefixer which will do the right thing.

    NodeWidget

    Every widget we implement should inherit from NodeWidget. This helps us add all the properties we want in the widgets via a single class. NodeWidget is the class that contains properties and methods shared by all widgets. This class allows us to add features to all widgets easily.

    - + - + @@ -47,13 +47,13 @@ This allows us to use something like:

    - + - + - + \ No newline at end of file diff --git a/docs/development/wrapping_widgets/index.html b/docs/development/wrapping_widgets/index.html index d3eb6c14e..191250b3b 100644 --- a/docs/development/wrapping_widgets/index.html +++ b/docs/development/wrapping_widgets/index.html @@ -3,7 +3,7 @@ - + wrapping_widgets @@ -28,9 +28,9 @@

    wrapping_widgets

    Exporting a new method from a widget

    Exporting a new widget from scratch

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/doc1/index.html b/docs/doc1/index.html index fb2ce0e4a..108fc717c 100644 --- a/docs/doc1/index.html +++ b/docs/doc1/index.html @@ -3,7 +3,7 @@ - + Style Guide @@ -28,9 +28,9 @@

    Style Guide

    You can write content using GitHub-flavored Markdown syntax.

    Markdown Syntax

    To serve as an example page when styling markdown based Docusaurus sites.

    Headers

    H1 - Create the best documentation

    H2 - Create the best documentation

    H3 - Create the best documentation

    H4 - Create the best documentation

    H5 - Create the best documentation
    H6 - Create the best documentation

    Emphasis

    Emphasis, aka italics, with asterisks or underscores.

    Strong emphasis, aka bold, with asterisks or underscores.

    Combined emphasis with asterisks and underscores.

    Strikethrough uses two tildes. Scratch this.


    Lists

    1. First ordered list item
    2. Another item ⋅⋅* Unordered sub-list.
    3. Actual numbers don't matter, just that it's a number ⋅⋅1. Ordered sub-list
    4. And another item.

    ⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

    ⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅ ⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅ ⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

    • Unordered list can use asterisks
    • Or minuses
    • Or pluses

    Links

    I'm an inline-style link

    I'm an inline-style link with title

    I'm a reference-style link

    I'm a relative reference to a repository file

    You can use numbers for reference-style link definitions

    Or leave it empty and use the link text itself.

    URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com or http://www.example.com and sometimes example.com (but not on Github, for example).

    Some text to show that the reference links can follow later.


    Images

    Here's our logo (hover to see the title text):

    Inline-style: alt text

    Reference-style: alt text


    Code

    var s = 'JavaScript syntax highlighting';
    alert(s);
    s = "Python syntax highlighting"
    print s
    No language indicated, so no syntax highlighting.
    But let's throw in a <b>tag</b>.

    Tables

    Colons can be used to align columns.

    TablesAreCool
    col 3 isright-aligned$1600
    col 2 iscentered$12
    zebra stripesare neat$1

    There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.

    MarkdownLessPretty
    Stillrendersnicely
    123

    Blockquotes

    Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.

    Quote break.

    This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.


    Inline HTML

    Definition list
    Is something people use sometimes.
    Markdown in HTML
    Does *not* work **very** well. Use HTML tags.

    Line Breaks

    Here's a line for us to start with.

    This line is separated from the one above by two newlines, so it will be a separate paragraph.

    This line is also a separate paragraph, but... This line is only separated by a single newline, so it's a separate line in the same paragraph.

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/faq/index.html b/docs/faq/index.html index 35d1423b6..43ef4b6ab 100644 --- a/docs/faq/index.html +++ b/docs/faq/index.html @@ -3,7 +3,7 @@ - + FAQ @@ -39,9 +39,9 @@ garbage collected.

    If you encounter this problem, the following articles m code from this:

    const { QWidget } = require("@nodegui/nodegui");
    const view = new QWidget();
    view.setObjectName("container");
    view.setLayout(new FlexLayout());

    to this:

    const { QWidget } = require("@nodegui/nodegui");
    const view = new QWidget();
    view.setObjectName("container");
    view.setLayout(new FlexLayout());
    global.view = view; //prevent GC
    - + - + @@ -51,13 +51,13 @@ code from this:

    - + - + - + \ No newline at end of file diff --git a/docs/guides/custom-nodegui-native-plugin/index.html b/docs/guides/custom-nodegui-native-plugin/index.html index 391d03cbe..aaa2a3f1b 100644 --- a/docs/guides/custom-nodegui-native-plugin/index.html +++ b/docs/guides/custom-nodegui-native-plugin/index.html @@ -3,7 +3,7 @@ - + Custom NodeGui Plugin @@ -28,9 +28,9 @@
    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/guides/debugging-in-vscode/index.html b/docs/guides/debugging-in-vscode/index.html index ba229e98c..6220d8cf9 100644 --- a/docs/guides/debugging-in-vscode/index.html +++ b/docs/guides/debugging-in-vscode/index.html @@ -3,7 +3,7 @@ - + Debugging in VSCode @@ -28,9 +28,9 @@

    Debugging in VSCode

    • Open a NodeGui project in VSCode.

      $ git clone git@github.com:nodegui/nodegui-starter.git
      $ code nodegui-starter
    • Add a file .vscode/launch.json with the following configuration:

      {
      "version": "0.2.0",
      "configurations": [
      {
      "name": "Debug Qode Process",
      "type": "node",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/qode",
      "windows": {
      "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/qode.exe"
      },
      "args": ["./dist/index.js"],
      "outputCapture": "std"
      }
      ]
      }

      Tip: You could also configure a preLaunchTask for building typescript before launching the debugger everytime.

    • Debugging

      Set some breakpoints in index.js, and start debugging in the Debug View. You should be able to hit the breakpoints.

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/guides/debugging/index.html b/docs/guides/debugging/index.html index a8b3b56c4..9279ee121 100644 --- a/docs/guides/debugging/index.html +++ b/docs/guides/debugging/index.html @@ -3,7 +3,7 @@ - + Debugging @@ -37,9 +37,9 @@ an external debugger will need to connect on this port. The default port
  • Debugging the NodeGui app in VSCode
- + - + @@ -49,13 +49,13 @@ launched NodeGui app present there.
  • - + - + - + \ No newline at end of file diff --git a/docs/guides/getting-started/index.html b/docs/guides/getting-started/index.html index 3bc4a1b8f..750e543fb 100644 --- a/docs/guides/getting-started/index.html +++ b/docs/guides/getting-started/index.html @@ -3,7 +3,7 @@ - + Getting started @@ -40,12 +40,12 @@ for JavaScript development.

    and Microsoft's Visual Studio Code. Both of them have excellent JavaScript support.

    If you are one of the many developers with a strong preference, know that virtually all code editors and IDEs these days support JavaScript.

    Hello World

    Clone and run the code in this tutorial by using the -nodegui/nodegui-starter repository.

    Note: Running this requires Git and npm.

    git clone https://github.com/nodegui/nodegui-starter
    cd nodegui-starter
    npm install
    npm start

    That's it!

    Congratulations! You've successfully run and modified your first NodeGui app.

    Now what?

    If you're curious to learn more about NodeGui, continue on to the tutorial.

    +nodegui/nodegui-starter repository.

    Note: Running this requires Git and npm.

    git clone https://github.com/nodegui/nodegui-starter
    cd nodegui-starter
    npm install
    npm start

    That's it!

    Congratulations! You've successfully run and modified your first NodeGui app.

    Now what?

    If you're curious to learn more about NodeGui, continue on to the tutorial.

    - + - + @@ -55,11 +55,11 @@ virtually all code editors and IDEs these days support JavaScript.

    - + - + diff --git a/docs/guides/handle-events/index.html b/docs/guides/handle-events/index.html index 29613d8cf..a225f0407 100644 --- a/docs/guides/handle-events/index.html +++ b/docs/guides/handle-events/index.html @@ -3,7 +3,7 @@ - + Handle Events @@ -28,9 +28,9 @@ - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/guides/images/index.html b/docs/guides/images/index.html index b90f801a9..b91fc1d86 100644 --- a/docs/guides/images/index.html +++ b/docs/guides/images/index.html @@ -3,7 +3,7 @@ - + Images @@ -28,9 +28,9 @@ - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/guides/layout/index.html b/docs/guides/layout/index.html index 20f11dbe8..bafe7b712 100644 --- a/docs/guides/layout/index.html +++ b/docs/guides/layout/index.html @@ -3,7 +3,7 @@ - + Layout @@ -28,9 +28,9 @@

    Layout

    NodeGui uses a layout system to automatically arrange child widgets within a widget to ensure that they make good use of the available space.

    Fixed Dimensions

    A widget's height and width determine its size on the screen. The simplest way to set the dimensions of a widget is by adding a fixed width and height to style. Setting dimensions this way is common for widgets that should always render at exactly the same size, regardless of screen dimensions.

    const { QMainWindow, QWidget } = require("@nodegui/nodegui");
    const win = new QMainWindow();
    const view = new QWidget(win);
    view.setInlineStyle("width:50px; height:30px; background-color: yellow;");
    win.show();
    (global as any).win = win;

    Dynamic Layouts

    Dynamic layouts automatically position and resize widgets when the amount of space available for them changes, ensuring that they are consistently arranged and that the user interface as a whole remains usable.

    NodeGui currently supports the following layouts at the moment:

    • FlexLayout
    • QGridLayout

    More layouts will be added as time goes on. You can also add layouts yourself by creating custom native plugins for NodeGui usng the Custom Native Plugin API.

    FlexLayout

    Use FlexLayout to have the children expand and shrink dynamically based on available space. Normally you will use flex: 1, which tells a widget to fill all available space, shared evenly amongst other widgets with the same parent. The larger the flex given, the higher the ratio of space a component will take compared to its siblings.

    A widget can only expand to fill available space if its parent has dimensions greater than 0. If a parent does not have either a fixed width and height or flex, the parent will have dimensions of 0 and the flex children will not be visible.

    Flexbox is designed to provide a consistent layout on different screen sizes. You will normally use a combination of flexDirection, alignItems, and justifyContent to achieve the right layout.

    Example:

    Lets say you want to build a UI that has a parent view which has two child widgets. One a label with text Hello and another a view with background color white. Now you want the label to occupy 1/3 of the available space while the white colored child view to occupy the remaining 2/3 space.

    flex layout example 1

    The code for that would look something like this:

    let { QLabel, FlexLayout, QWidget, QMainWindow } = require("@nodegui/nodegui");
    // Create a root view and assign a flex layout to it.
    const rootView = new QWidget();
    rootView.setLayout(new FlexLayout());
    rootView.setObjectName("rootView");
    // Create two widgets - one label and one view
    const label = new QLabel();
    label.setText("Hello");
    label.setObjectName("label");
    const view = new QWidget();
    view.setObjectName("view");
    // Now tell rootView layout that the label and the other view are its children
    rootView.layout.addWidget(label);
    rootView.layout.addWidget(view);
    // Tell FlexLayout how you want children of rootView to be poisitioned
    rootView.setStyleSheet(`
    #rootView{
    flex: 1;
    background-color: blue;
    }
    #label {
    flex: 1;
    color: white;
    background-color: green;
    }
    #view {
    flex: 3;
    background-color: white;
    }
    `);
    const win = new QMainWindow();
    win.setCentralWidget(rootView);
    win.show();
    global.win = win;

    TLDR

    • First step is to set a layout on the parent widget. You can do this using the widget's setLayout method. Here we are using FlexLayout.

    • For a layout to work you must let the layout know which widgets are the children and how to lay them on the available screen space within the parent widget. You do this using a layout's addWidget method. In the case of FlexLayout you will specify properties by setting flex properties on the parent and child widgets.

    To know more on how FlexBox layout works in depth you can visit: https://facebook.github.io/react-native/docs/0.60/flexbox.

    NodeGui uses the same library that React Native uses underneath for FlexBox (Yoga).

    • You can specify layout properties via inline styles also.

    Conclusion

    The primary layout in NodeGui is the Flexbox layout. Flexbox layout can be controlled via stylesheet just as in web. So both paint and layout properties are available at the same place.

    NodeGui will also try to support other available layouts in Qt. But, If you need a special layout that Qt/NodeGui doesnt yet support you can always create a native plugin for NodeGui and use Qt's APIs to create one. In fact, Qt doesnt have a FlexLayout built in, FlexLayout is actually a custom Qt layout written with the help of Yoga library.

    - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/guides/networking/index.html b/docs/guides/networking/index.html index 530a0e0fe..e93f2a47b 100644 --- a/docs/guides/networking/index.html +++ b/docs/guides/networking/index.html @@ -3,7 +3,7 @@ - + Networking @@ -28,9 +28,9 @@ - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/guides/nodegui-architecture/index.html b/docs/guides/nodegui-architecture/index.html index 30bd2f44b..8a9e0809d 100644 --- a/docs/guides/nodegui-architecture/index.html +++ b/docs/guides/nodegui-architecture/index.html @@ -3,7 +3,7 @@ - + Architecture @@ -41,9 +41,9 @@ compiled with Qode or a compatible Node version to be used with NodeGui.

    T consult this guide on how to recompile them for NodeGui.

    - + - + @@ -53,13 +53,13 @@ consult this guide on how to re - + - + - + \ No newline at end of file diff --git a/docs/guides/scroll-view/index.html b/docs/guides/scroll-view/index.html index a1f2049be..2f3c349c9 100644 --- a/docs/guides/scroll-view/index.html +++ b/docs/guides/scroll-view/index.html @@ -3,7 +3,7 @@ - + Scroll View @@ -28,9 +28,9 @@ - + - + @@ -40,13 +40,13 @@ - + - + - + \ No newline at end of file diff --git a/docs/guides/styling/index.html b/docs/guides/styling/index.html index e54f6c1ca..3fe35b146 100644 --- a/docs/guides/styling/index.html +++ b/docs/guides/styling/index.html @@ -3,7 +3,7 @@ - + Styling @@ -31,9 +31,9 @@ The quotes you see around 'green' and '100%&#x So the rule of thumb is that any integer based property like margin, border, etc can be written without quotes while any string property, it is better to surround them with quotes. PS: Qt does recognise some string based properties without quotes also.

    Supported properties

    Since we are not running inside a web browser, there are few differences in the properties you could use in NodeGui vs in web.

    The complete list is detailed here: https://doc.qt.io/qt-5/stylesheet-reference.html#list-of-properties

    Apart from the properties listed in the link, NodeGui also supports layout properties related to Flex. You can use all flex properties such as align-items, justify-content, flex, etc on all widgets. The layout styling will be coverted in more detail in the section: Layout.

    Advanced usage (Setting QObject Properties)

    In Qt, every widget has certain properties set on them using something called as Q_PROPERTY. There are many q-properties that are defined on each widget already. You can also define custom qproperties in the native C++ code yourself too. What does it have to do with styling ? The thing is some of these properties can be altered using qt stylesheet. In Qt's terminology, these properties are called designable properties.

    For example:

    MyLabel {
    qproperty-alignment: AlignCenter;
    }
    MyGroupBox {
    qproperty-titlecolor: rgb(100, 200, 100);
    }
    QPushButton {
    qproperty-iconsize: 20px 20px;
    }

    You can discover these properties by following Qt's documentation or by running a simple google search like "center text in QLabel using stylesheet in Qt". These are advanced properties and in practice will come in use rarely but its good to know.

    More details : https://doc.qt.io/qt-5/stylesheet-syntax.html#setting-qobject-properties


    In this section, we mostly covered the paint properties in the NodeGui stylesheet. The next section would cover on how you can use flex to layout your widgets with stylesheet.

    - + - + @@ -43,13 +43,13 @@ So the rule of thumb is that any integer based property like margin, border, etc - + - + - + \ No newline at end of file diff --git a/docs/guides/tutorial/index.html b/docs/guides/tutorial/index.html index ba63af233..fa74d0c47 100644 --- a/docs/guides/tutorial/index.html +++ b/docs/guides/tutorial/index.html @@ -3,7 +3,7 @@ - + Learn the Basics @@ -29,14 +29,14 @@ folder structure:

    your-app/
    ├── package.json
    ├── index.js

    All APIs and features found in NodeGui are accessible through the @nodegui/nodegui module, which can be required like any other Node.js module. Additionally you have access to all Node.js apis and node modules.

    require("@nodegui/nodegui");

    The @nodegui/nodegui module exports features in namespaces. As an example, a window can be created using the QMainWindow class. A simple main.js file might open a window:

    const { QMainWindow } = require("@nodegui/nodegui");
    const win = new QMainWindow();
    win.show();
    global.win = win; // To prevent win from being garbage collected.

    The index.js should create windows and handle all the system events your application might encounter.

    What's going on here?

    Firstly, we are running a regular Node.js app. This means that we are not running in a browser environment. The window you see is actually a native widget created by Qt. QMainWindow is essentially a lightweight javascript wrapper over Qt's QMainWindow. Hence every method you call on QMainWindow instance is actually affecting a native window widget. This is very light weight as compared to browser based solutions and hence is more closer to the Operating system.s

    Trying out the starter project

    Clone and run the code by using the -nodegui/nodegui-starter repository.

    Note: Running this requires Git and npm.

    git clone https://github.com/nodegui/nodegui-starter
    cd nodegui-starter
    npm install
    npm start

    What else other than a basic window?

    NodeGui has support for basic widgets like QWidget (similar to div), QCheckBox, QPushButton and many more. +nodegui/nodegui-starter repository.

    Note: Running this requires Git and npm.

    git clone https://github.com/nodegui/nodegui-starter
    cd nodegui-starter
    npm install
    npm start

    What else other than a basic window?

    NodeGui has support for basic widgets like QWidget (similar to div), QCheckBox, QPushButton and many more. You can take a look at the list of native widgets that NodeGui currently supports here : Native widgets in NodeGui. With time more widgets and APIs will be added to NodeGui. Apart from modules in NodeGui, you also have access to the entire node modules ecosystem. Thus, any node module that you can use with Node.js, can be used with NodeGui. This makes it extremely powerful.

    Fine, I want something more custom and beautiful than just native looking widgets. What do I do?

    To make things more beautiful, you will have to learn about styling. Lets take a look at that next.

    - + - + @@ -46,13 +46,13 @@ With time more widgets and APIs will be added to NodeGui. Apart from modules in - + - + - + \ No newline at end of file diff --git a/docs/guides/using-native-node-modules/index.html b/docs/guides/using-native-node-modules/index.html index a840dd476..b9e6ad7a2 100644 --- a/docs/guides/using-native-node-modules/index.html +++ b/docs/guides/using-native-node-modules/index.html @@ -3,7 +3,7 @@ - + Using native Node Modules @@ -39,9 +39,9 @@ happen. So in general, it is recommended to always build native modules from source code.

    - + - + @@ -51,13 +51,13 @@ source code.

    - + - + - + \ No newline at end of file diff --git a/docs/mdx/index.html b/docs/mdx/index.html index 5bc92bb3e..5b16c6cd3 100644 --- a/docs/mdx/index.html +++ b/docs/mdx/index.html @@ -3,7 +3,7 @@ - + Powered by MDX @@ -28,9 +28,9 @@

    Powered by MDX

    You can write JSX and use React components within your Markdown thanks to MDX.

    Docusaurus green and Facebook blue are my favorite colors.

    I can write Markdown alongside my JSX!

    - + - + @@ -40,7 +40,7 @@ - + diff --git a/docsMetadata---docs-150-2d6.bf705dd7e91425af443a.js b/docsMetadata---docs-150-2d6.bf705dd7e91425af443a.js new file mode 100644 index 000000000..1d0a9908f --- /dev/null +++ b/docsMetadata---docs-150-2d6.bf705dd7e91425af443a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{42:function(e){e.exports=JSON.parse('{"docs":{"doc1":{"id":"doc1","title":"Style Guide","sidebar_label":"Style Guide","description":"You can write content using [GitHub-flavored Markdown syntax](https://github.github.com/gfm/).","source":"@site/docs/doc1.md","permalink":"/docs/doc1"},"development/debugging":{"id":"development/debugging","title":"debugging","description":"# debugging","source":"@site/docs/development/debugging.md","permalink":"/docs/development/debugging"},"development/getting-started":{"id":"development/getting-started","title":"getting-started","description":"## Getting started","source":"@site/docs/development/getting-started.md","permalink":"/docs/development/getting-started"},"faq":{"title":"FAQ","sidebar_label":"FAQ","id":"faq","description":"## Why am I having trouble installing Qode?","source":"@site/docs/faq.md","permalink":"/docs/faq"},"development/setting-up":{"id":"development/setting-up","title":"setting-up","description":"# Setup project for development","source":"@site/docs/development/setting-up.md","permalink":"/docs/development/setting-up"},"development/styling":{"id":"development/styling","title":"styling","description":"# How styling works?","source":"@site/docs/development/styling.md","permalink":"/docs/development/styling"},"development/signal_and_event_handling":{"id":"development/signal_and_event_handling","title":"signal_and_event_handling","description":"# Event handling","source":"@site/docs/development/signal_and_event_handling.md","permalink":"/docs/development/signal_and_event_handling"},"development/wrapping_widgets":{"id":"development/wrapping_widgets","title":"wrapping_widgets","description":"# Exporting a new method from a widget","source":"@site/docs/development/wrapping_widgets.md","permalink":"/docs/development/wrapping_widgets"},"api/Component":{"sidebar_label":"Component","title":"Component","id":"api/Component","description":"> Abstract class that is root most base class for all widgets and layouts in the NodeGui World.","source":"@site/docs/api/Component.md","permalink":"/docs/api/Component","sidebar":"api","category":"Internal Modules","next":"api/EventWidget","previous":"api/QSystemTrayIcon","previous_title":"QSystemTrayIcon","next_title":"EventWidget"},"api/EventWidget":{"sidebar_label":"EventWidget","title":"EventWidget","id":"api/EventWidget","description":"> Abstract class that adds event handling support to all widgets.","source":"@site/docs/api/EventWidget.md","permalink":"/docs/api/EventWidget","sidebar":"api","category":"Internal Modules","next":"api/NodeLayout","previous":"api/Component","previous_title":"Component","next_title":"NodeLayout"},"api/FlexLayout":{"sidebar_label":"FlexLayout","title":"FlexLayout","id":"api/FlexLayout","description":"> Custom layout to help layout child widgets using flex layout.","source":"@site/docs/api/FlexLayout.md","permalink":"/docs/api/FlexLayout","sidebar":"api","category":"Layouts","next":"api/QGridLayout","previous":"api/QMenuBar","previous_title":"QMenuBar","next_title":"QGridLayout"},"api/NodeLayout":{"sidebar_label":"NodeLayout","title":"NodeLayout","id":"api/NodeLayout","description":"> Abstract class to add functionalities common to all Layout.","source":"@site/docs/api/NodeLayout.md","permalink":"/docs/api/NodeLayout","sidebar":"api","category":"Internal Modules","next":"api/NodeWidget","previous":"api/EventWidget","previous_title":"EventWidget","next_title":"NodeWidget"},"api/NodeWidget":{"sidebar_label":"NodeWidget","title":"NodeWidget","id":"api/NodeWidget","description":"> Abstract class to add functionalities common to all Widgets.","source":"@site/docs/api/NodeWidget.md","permalink":"/docs/api/NodeWidget","sidebar":"api","category":"Internal Modules","next":"api/YogaWidget","previous":"api/NodeLayout","previous_title":"NodeLayout","next_title":"YogaWidget"},"api/QAbstractSlider":{"sidebar_label":"QAbstractSlider","title":"QAbstractSlider","id":"api/QAbstractSlider","description":"> Abstract class to add functionalities common to all slider based widgets.","source":"@site/docs/api/QAbstractSlider.md","permalink":"/docs/api/QAbstractSlider","sidebar":"api","category":"Internal Modules","next":"api/process","previous":"api/QAbstractScrollArea","previous_title":"QAbstractScrollArea","next_title":"process"},"api/QApplication":{"sidebar_label":"QApplication","title":"QApplication","id":"api/QApplication","description":"> QApplication is the root object for the entire application. It manages app level settings.","source":"@site/docs/api/QApplication.md","permalink":"/docs/api/QApplication","sidebar":"api","category":"Widgets","next":"api/QCheckBox","previous":"api/synopsis","previous_title":"Synopsis","next_title":"QCheckBox"},"api/QAction":{"sidebar_label":"QAction","title":"QAction","id":"api/QAction","description":"> The QAction class provides an abstract user interface action that can be inserted into widgets.","source":"@site/docs/api/QAction.md","permalink":"/docs/api/QAction","sidebar":"api","category":"Modules","next":"api/QKeySequence","previous":"api/QShortcut","previous_title":"QShortcut","next_title":"QKeySequence"},"api/QCheckBox":{"sidebar_label":"QCheckBox","title":"QCheckBox","id":"api/QCheckBox","description":"> Create and control checkbox.","source":"@site/docs/api/QCheckBox.md","permalink":"/docs/api/QCheckBox","sidebar":"api","category":"Widgets","next":"api/QDial","previous":"api/QApplication","previous_title":"QApplication","next_title":"QDial"},"api/QClipboard":{"sidebar_label":"QClipboard","title":"QClipboard","id":"api/QClipboard","description":"> The QClipboard class provides access to the window system clipboard.","source":"@site/docs/api/QClipboard.md","permalink":"/docs/api/QClipboard","sidebar":"api","category":"Modules","next":"api/QCursor","previous":"api/QGridLayout","previous_title":"QGridLayout","next_title":"QCursor"},"api/QCursor":{"sidebar_label":"QCursor","title":"QCursor","id":"api/QCursor","description":"> The QCursor class provides scalable icons in different modes and states.","source":"@site/docs/api/QCursor.md","permalink":"/docs/api/QCursor","sidebar":"api","category":"Modules","next":"api/QPixmap","previous":"api/QClipboard","previous_title":"QClipboard","next_title":"QPixmap"},"api/QDial":{"sidebar_label":"QDial","title":"QDial","id":"api/QDial","description":"> Create and control dial slider widgets.","source":"@site/docs/api/QDial.md","permalink":"/docs/api/QDial","sidebar":"api","category":"Widgets","next":"api/QLabel","previous":"api/QCheckBox","previous_title":"QCheckBox","next_title":"QLabel"},"api/QIcon":{"sidebar_label":"QIcon","title":"QIcon","id":"api/QIcon","description":"> The QIcon class provides scalable icons in different modes and states.","source":"@site/docs/api/QIcon.md","permalink":"/docs/api/QIcon","sidebar":"api","category":"Modules","next":"api/QSystemTrayIcon","previous":"api/QKeySequence","previous_title":"QKeySequence","next_title":"QSystemTrayIcon"},"api/QGridLayout":{"sidebar_label":"QGridLayout","title":"QGridLayout","id":"api/QGridLayout","description":"> The QGridLayout class lays out widgets in a grid.","source":"@site/docs/api/QGridLayout.md","permalink":"/docs/api/QGridLayout","sidebar":"api","category":"Layouts","next":"api/QClipboard","previous":"api/FlexLayout","previous_title":"FlexLayout","next_title":"QClipboard"},"api/QKeySequence":{"sidebar_label":"QKeySequence","title":"QKeySequence","id":"api/QKeySequence","description":"> The QKeySequence class encapsulates a key sequence as used by shortcuts. .","source":"@site/docs/api/QKeySequence.md","permalink":"/docs/api/QKeySequence","sidebar":"api","category":"Modules","next":"api/QIcon","previous":"api/QAction","previous_title":"QAction","next_title":"QIcon"},"api/QLabel":{"sidebar_label":"QLabel","title":"QLabel","id":"api/QLabel","description":"> Create and control text.","source":"@site/docs/api/QLabel.md","permalink":"/docs/api/QLabel","sidebar":"api","category":"Widgets","next":"api/QLineEdit","previous":"api/QDial","previous_title":"QDial","next_title":"QLineEdit"},"api/QLineEdit":{"sidebar_label":"QLineEdit","title":"QLineEdit","id":"api/QLineEdit","description":"> Create and control editable text field.","source":"@site/docs/api/QLineEdit.md","permalink":"/docs/api/QLineEdit","sidebar":"api","category":"Widgets","next":"api/QMainWindow","previous":"api/QLabel","previous_title":"QLabel","next_title":"QMainWindow"},"api/QMainWindow":{"sidebar_label":"QMainWindow","title":"QMainWindow","id":"api/QMainWindow","description":"> Create and control windows.","source":"@site/docs/api/QMainWindow.md","permalink":"/docs/api/QMainWindow","sidebar":"api","category":"Widgets","next":"api/QPlainTextEdit","previous":"api/QLineEdit","previous_title":"QLineEdit","next_title":"QPlainTextEdit"},"api/QMenu":{"sidebar_label":"QMenu","title":"QMenu","id":"api/QMenu","description":"> The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.","source":"@site/docs/api/QMenu.md","permalink":"/docs/api/QMenu","sidebar":"api","category":"Widgets","next":"api/QMenuBar","previous":"api/QWidget","previous_title":"QWidget","next_title":"QMenuBar"},"api/QMenuBar":{"sidebar_label":"QMenuBar","title":"QMenuBar","id":"api/QMenuBar","description":"> The QMenuBar class provides a menu widget for use in menu bars, context menus, and other popup menus.","source":"@site/docs/api/QMenuBar.md","permalink":"/docs/api/QMenuBar","sidebar":"api","category":"Widgets","next":"api/FlexLayout","previous":"api/QMenu","previous_title":"QMenu","next_title":"FlexLayout"},"api/QPixmap":{"sidebar_label":"QPixmap","title":"QPixmap","id":"api/QPixmap","description":"> The QPixmap class helps hold an image in the form of off-screen image representation.","source":"@site/docs/api/QPixmap.md","permalink":"/docs/api/QPixmap","sidebar":"api","category":"Modules","next":"api/QtEnums","previous":"api/QCursor","previous_title":"QCursor","next_title":"Qt Enums"},"api/QPlainTextEdit":{"sidebar_label":"QPlainTextEdit","title":"QPlainTextEdit","id":"api/QPlainTextEdit","description":"> Used to edit and display plain text.","source":"@site/docs/api/QPlainTextEdit.md","permalink":"/docs/api/QPlainTextEdit","sidebar":"api","category":"Widgets","next":"api/QProgressBar","previous":"api/QMainWindow","previous_title":"QMainWindow","next_title":"QProgressBar"},"api/QProgressBar":{"sidebar_label":"QProgressBar","title":"QProgressBar","id":"api/QProgressBar","description":"> Create and control progress bar widgets.","source":"@site/docs/api/QProgressBar.md","permalink":"/docs/api/QProgressBar","sidebar":"api","category":"Widgets","next":"api/QPushButton","previous":"api/QPlainTextEdit","previous_title":"QPlainTextEdit","next_title":"QPushButton"},"api/QPushButton":{"sidebar_label":"QPushButton","title":"QPushButton","id":"api/QPushButton","description":"> Create and control buttons.","source":"@site/docs/api/QPushButton.md","permalink":"/docs/api/QPushButton","sidebar":"api","category":"Widgets","next":"api/QRadioButton","previous":"api/QProgressBar","previous_title":"QProgressBar","next_title":"QRadioButton"},"api/QRadioButton":{"sidebar_label":"QRadioButton","title":"QRadioButton","id":"api/QRadioButton","description":"> Create and control radio button.","source":"@site/docs/api/QRadioButton.md","permalink":"/docs/api/QRadioButton","sidebar":"api","category":"Widgets","next":"api/QScrollArea","previous":"api/QPushButton","previous_title":"QPushButton","next_title":"QScrollArea"},"api/QScrollArea":{"sidebar_label":"QScrollArea","title":"QScrollArea","id":"api/QScrollArea","description":"> A `QScrollArea` provides a scrolling view onto another widget.","source":"@site/docs/api/QScrollArea.md","permalink":"/docs/api/QScrollArea","sidebar":"api","category":"Widgets","next":"api/QSpinBox","previous":"api/QRadioButton","previous_title":"QRadioButton","next_title":"QSpinBox"},"api/QShortcut":{"sidebar_label":"QShortcut","title":"QShortcut","id":"api/QShortcut","description":"> The QShortcut class is used to create keyboard shortcuts.","source":"@site/docs/api/QShortcut.md","permalink":"/docs/api/QShortcut","sidebar":"api","category":"Modules","next":"api/QAction","previous":"api/QtEnums","previous_title":"Qt Enums","next_title":"QAction"},"api/QSpinBox":{"sidebar_label":"QSpinBox","title":"QSpinBox","id":"api/QSpinBox","description":"> Create and control spin box widgets.","source":"@site/docs/api/QSpinBox.md","permalink":"/docs/api/QSpinBox","sidebar":"api","category":"Widgets","next":"api/QTabWidget","previous":"api/QScrollArea","previous_title":"QScrollArea","next_title":"QTabWidget"},"api/QSystemTrayIcon":{"sidebar_label":"QSystemTrayIcon","title":"QSystemTrayIcon","id":"api/QSystemTrayIcon","description":"> Create and control system tray icon.","source":"@site/docs/api/QSystemTrayIcon.md","permalink":"/docs/api/QSystemTrayIcon","sidebar":"api","category":"Modules","next":"api/Component","previous":"api/QIcon","previous_title":"QIcon","next_title":"Component"},"api/QTabWidget":{"sidebar_label":"QTabWidget","title":"QTabWidget","id":"api/QTabWidget","description":"Will be available from NodeGUI v0.1.10 and up","source":"@site/docs/api/QTabWidget.md","permalink":"/docs/api/QTabWidget","sidebar":"api","category":"Widgets","next":"api/QWidget","previous":"api/QSpinBox","previous_title":"QSpinBox","next_title":"QWidget"},"api/QWidget":{"sidebar_label":"QWidget","title":"QWidget","id":"api/QWidget","description":"> Create and control views.","source":"@site/docs/api/QWidget.md","permalink":"/docs/api/QWidget","sidebar":"api","category":"Widgets","next":"api/QMenu","previous":"api/QTabWidget","previous_title":"QTabWidget","next_title":"QMenu"},"api/QtEnums":{"sidebar_label":"Qt Enums","title":"Qt Enums","id":"api/QtEnums","description":"## Enums from Qt","source":"@site/docs/api/QtEnums.md","permalink":"/docs/api/QtEnums","sidebar":"api","category":"Modules","next":"api/QShortcut","previous":"api/QPixmap","previous_title":"QPixmap","next_title":"QShortcut"},"api/YogaWidget":{"sidebar_label":"YogaWidget","title":"YogaWidget","id":"api/YogaWidget","description":"> Abstract class to add common functionality related to Flex layout to all Widgets.","source":"@site/docs/api/YogaWidget.md","permalink":"/docs/api/YogaWidget","sidebar":"api","category":"Internal Modules","next":"api/QAbstractScrollArea","previous":"api/NodeWidget","previous_title":"NodeWidget","next_title":"QAbstractScrollArea"},"api/process":{"sidebar_label":"process","title":"process","id":"api/process","description":"> Extensions to process object.","source":"@site/docs/api/process.md","permalink":"/docs/api/process","sidebar":"api","category":"APIs","previous":"api/QAbstractSlider","previous_title":"QAbstractSlider"},"api/synopsis":{"sidebar_label":"Synopsis","title":"Synopsis","id":"api/synopsis","description":"> How to use Node.js and NodeGui\'s APIs.","source":"@site/docs/api/synopsis.md","permalink":"/docs/api/synopsis","sidebar":"api","category":"General","next":"api/QApplication","next_title":"QApplication"},"guides/custom-nodegui-native-plugin":{"sidebar_label":"Custom NodeGui Plugin","title":"Custom NodeGui Plugin","id":"guides/custom-nodegui-native-plugin","description":"WIP","source":"@site/docs/guides/custom-nodegui-native-plugin.md","permalink":"/docs/guides/custom-nodegui-native-plugin","sidebar":"guides","category":"Guides","previous":"guides/using-native-node-modules","previous_title":"Using native Node Modules"},"guides/debugging-in-vscode":{"sidebar_label":"Debugging in VSCode","title":"Debugging in VSCode","id":"guides/debugging-in-vscode","description":"- **Open a NodeGui project in VSCode.**","source":"@site/docs/guides/debugging-in-vscode.md","permalink":"/docs/guides/debugging-in-vscode","sidebar":"guides","category":"Guides","next":"guides/using-native-node-modules","previous":"guides/debugging","previous_title":"Debugging","next_title":"Using native Node Modules"},"guides/debugging":{"sidebar_label":"Debugging","title":"Debugging","id":"guides/debugging","description":"## Application Debugging","source":"@site/docs/guides/debugging.md","permalink":"/docs/guides/debugging","sidebar":"guides","category":"Guides","next":"guides/debugging-in-vscode","previous":"guides/nodegui-architecture","previous_title":"Architecture","next_title":"Debugging in VSCode"},"guides/getting-started":{"sidebar_label":"Getting started","title":"Getting started","id":"guides/getting-started","description":"NodeGui enables you to create desktop applications with JavaScript. You could see it","source":"@site/docs/guides/getting-started.md","permalink":"/docs/guides/getting-started","sidebar":"guides","category":"The Basics","next":"guides/tutorial","next_title":"Learn the Basics"},"guides/handle-events":{"sidebar_label":"Handle Events","title":"Handle Events","id":"guides/handle-events","description":"WIP","source":"@site/docs/guides/handle-events.md","permalink":"/docs/guides/handle-events","sidebar":"guides","category":"The Basics","next":"guides/scroll-view","previous":"guides/layout","previous_title":"Layout","next_title":"Scroll View"},"guides/images":{"sidebar_label":"Images","title":"Images","id":"guides/images","description":"WIP","source":"@site/docs/guides/images.md","permalink":"/docs/guides/images","sidebar":"guides","category":"The Basics","next":"guides/networking","previous":"guides/scroll-view","previous_title":"Scroll View","next_title":"Networking"},"guides/layout":{"sidebar_label":"Layout","title":"Layout","id":"guides/layout","description":"NodeGui uses a layout system to automatically arrange child widgets within a widget to ensure that they make good use of the available space.","source":"@site/docs/guides/layout.md","permalink":"/docs/guides/layout","sidebar":"guides","category":"The Basics","next":"guides/handle-events","previous":"guides/styling","previous_title":"Styling","next_title":"Handle Events"},"guides/networking":{"sidebar_label":"Networking","title":"Networking","id":"guides/networking","description":"WIP","source":"@site/docs/guides/networking.md","permalink":"/docs/guides/networking","sidebar":"guides","category":"The Basics","next":"guides/nodegui-architecture","previous":"guides/images","previous_title":"Images","next_title":"Architecture"},"guides/nodegui-architecture":{"sidebar_label":"Architecture","title":"Architecture","id":"guides/nodegui-architecture","description":"By looking at how NodeGui works internally, we would get a clear picture on why the APIs are designed the way they are.","source":"@site/docs/guides/nodegui-architecture.md","permalink":"/docs/guides/nodegui-architecture","sidebar":"guides","category":"Guides","next":"guides/debugging","previous":"guides/networking","previous_title":"Networking","next_title":"Debugging"},"guides/scroll-view":{"sidebar_label":"Scroll View","title":"Scroll View","id":"guides/scroll-view","description":"WIP","source":"@site/docs/guides/scroll-view.md","permalink":"/docs/guides/scroll-view","sidebar":"guides","category":"The Basics","next":"guides/images","previous":"guides/handle-events","previous_title":"Handle Events","next_title":"Images"},"guides/styling":{"sidebar_label":"Styling","title":"Styling","id":"guides/styling","description":"With NodeGui, you can style a widget to your needs. If you are familiar with CSS in the web world you would feel right at home. All widgets have a method `setInlineStyle` for setting inline styles for the respective widget. The style names and values usually match how CSS works on the web.","source":"@site/docs/guides/styling.md","permalink":"/docs/guides/styling","sidebar":"guides","category":"The Basics","next":"guides/layout","previous":"guides/tutorial","previous_title":"Learn the Basics","next_title":"Layout"},"guides/using-native-node-modules":{"sidebar_label":"Native Node Modules","title":"Using native Node Modules","id":"guides/using-native-node-modules","description":"Native Node modules are supported by NodeGui, but since NodeGui is very","source":"@site/docs/guides/using-native-node-modules.md","permalink":"/docs/guides/using-native-node-modules","sidebar":"guides","category":"Guides","next":"guides/custom-nodegui-native-plugin","previous":"guides/debugging-in-vscode","previous_title":"Debugging in VSCode","next_title":"Custom NodeGui Plugin"},"api/QAbstractScrollArea":{"sidebar_label":"QAbstractScrollArea","title":"QAbstractScrollArea","id":"api/QAbstractScrollArea","description":"> Abstract class to add functionalities common to all scrollarea based widgets.","source":"@site/docs/api/QAbstractScrollArea.md","permalink":"/docs/api/QAbstractScrollArea","sidebar":"api","category":"Internal Modules","next":"api/QAbstractSlider","previous":"api/YogaWidget","previous_title":"YogaWidget","next_title":"QAbstractSlider"},"development/common_errors":{"id":"development/common_errors","title":"common_errors","description":"# Common errors","source":"@site/docs/development/common_errors.md","permalink":"/docs/development/common_errors"},"guides/tutorial":{"sidebar_label":"Learn the Basics","title":"Learn the Basics","id":"guides/tutorial","description":"NodeGui uses native components instead of web based components as building blocks. So to understand the basic structure of a NodeGui app, you need to be familiar with Javascript or Typescript. This tutorial is aimed at everyone who has some web experience with web development.","source":"@site/docs/guides/tutorial.md","permalink":"/docs/guides/tutorial","sidebar":"guides","category":"The Basics","next":"guides/styling","previous":"guides/getting-started","previous_title":"Getting started","next_title":"Styling"},"development/README":{"id":"development/README","title":"README","description":"# Contributor\'s guide","source":"@site/docs/development/README.md","permalink":"/docs/development/README"},"mdx":{"id":"mdx","title":"Powered by MDX","description":"You can write JSX and use React components within your Markdown thanks to [MDX](https://mdxjs.com/).","source":"@site/docs/mdx.md","permalink":"/docs/mdx"}},"docsDir":"/Users/atulr/Project/nodegui/nodegui/website/docs","docsSidebars":{"api":[{"type":"category","label":"General","items":[{"type":"doc","id":"api/synopsis"}]},{"type":"category","label":"Widgets","items":[{"type":"doc","id":"api/QApplication"},{"type":"doc","id":"api/QCheckBox"},{"type":"doc","id":"api/QDial"},{"type":"doc","id":"api/QLabel"},{"type":"doc","id":"api/QLineEdit"},{"type":"doc","id":"api/QMainWindow"},{"type":"doc","id":"api/QPlainTextEdit"},{"type":"doc","id":"api/QProgressBar"},{"type":"doc","id":"api/QPushButton"},{"type":"doc","id":"api/QRadioButton"},{"type":"doc","id":"api/QScrollArea"},{"type":"doc","id":"api/QSpinBox"},{"type":"doc","id":"api/QTabWidget"},{"type":"doc","id":"api/QWidget"},{"type":"doc","id":"api/QMenu"},{"type":"doc","id":"api/QMenuBar"}]},{"type":"category","label":"Layouts","items":[{"type":"doc","id":"api/FlexLayout"},{"type":"doc","id":"api/QGridLayout"}]},{"type":"category","label":"Modules","items":[{"type":"doc","id":"api/QClipboard"},{"type":"doc","id":"api/QCursor"},{"type":"doc","id":"api/QPixmap"},{"type":"doc","id":"api/QtEnums"},{"type":"doc","id":"api/QShortcut"},{"type":"doc","id":"api/QAction"},{"type":"doc","id":"api/QKeySequence"},{"type":"doc","id":"api/QIcon"},{"type":"doc","id":"api/QSystemTrayIcon"}]},{"type":"category","label":"Internal Modules","items":[{"type":"doc","id":"api/Component"},{"type":"doc","id":"api/EventWidget"},{"type":"doc","id":"api/NodeLayout"},{"type":"doc","id":"api/NodeWidget"},{"type":"doc","id":"api/YogaWidget"},{"type":"doc","id":"api/QAbstractScrollArea"},{"type":"doc","id":"api/QAbstractSlider"}]},{"type":"category","label":"APIs","items":[{"type":"doc","id":"api/process"}]}],"guides":[{"type":"category","label":"The Basics","items":[{"type":"doc","id":"guides/getting-started"},{"type":"doc","id":"guides/tutorial"},{"type":"doc","id":"guides/styling"},{"type":"doc","id":"guides/layout"},{"type":"doc","id":"guides/handle-events"},{"type":"doc","id":"guides/scroll-view"},{"type":"doc","id":"guides/images"},{"type":"doc","id":"guides/networking"}]},{"type":"category","label":"Guides","items":[{"type":"doc","id":"guides/nodegui-architecture"},{"type":"doc","id":"guides/debugging"},{"type":"doc","id":"guides/debugging-in-vscode"},{"type":"doc","id":"guides/using-native-node-modules"},{"type":"doc","id":"guides/custom-nodegui-native-plugin"}]}]},"sourceToPermalink":{"@site/docs/doc1.md":"/docs/doc1","@site/docs/development/debugging.md":"/docs/development/debugging","@site/docs/development/getting-started.md":"/docs/development/getting-started","@site/docs/faq.md":"/docs/faq","@site/docs/development/setting-up.md":"/docs/development/setting-up","@site/docs/development/styling.md":"/docs/development/styling","@site/docs/development/signal_and_event_handling.md":"/docs/development/signal_and_event_handling","@site/docs/development/wrapping_widgets.md":"/docs/development/wrapping_widgets","@site/docs/api/Component.md":"/docs/api/Component","@site/docs/api/EventWidget.md":"/docs/api/EventWidget","@site/docs/api/FlexLayout.md":"/docs/api/FlexLayout","@site/docs/api/NodeLayout.md":"/docs/api/NodeLayout","@site/docs/api/NodeWidget.md":"/docs/api/NodeWidget","@site/docs/api/QAbstractSlider.md":"/docs/api/QAbstractSlider","@site/docs/api/QApplication.md":"/docs/api/QApplication","@site/docs/api/QAction.md":"/docs/api/QAction","@site/docs/api/QCheckBox.md":"/docs/api/QCheckBox","@site/docs/api/QClipboard.md":"/docs/api/QClipboard","@site/docs/api/QCursor.md":"/docs/api/QCursor","@site/docs/api/QDial.md":"/docs/api/QDial","@site/docs/api/QIcon.md":"/docs/api/QIcon","@site/docs/api/QGridLayout.md":"/docs/api/QGridLayout","@site/docs/api/QKeySequence.md":"/docs/api/QKeySequence","@site/docs/api/QLabel.md":"/docs/api/QLabel","@site/docs/api/QLineEdit.md":"/docs/api/QLineEdit","@site/docs/api/QMainWindow.md":"/docs/api/QMainWindow","@site/docs/api/QMenu.md":"/docs/api/QMenu","@site/docs/api/QMenuBar.md":"/docs/api/QMenuBar","@site/docs/api/QPixmap.md":"/docs/api/QPixmap","@site/docs/api/QPlainTextEdit.md":"/docs/api/QPlainTextEdit","@site/docs/api/QProgressBar.md":"/docs/api/QProgressBar","@site/docs/api/QPushButton.md":"/docs/api/QPushButton","@site/docs/api/QRadioButton.md":"/docs/api/QRadioButton","@site/docs/api/QScrollArea.md":"/docs/api/QScrollArea","@site/docs/api/QShortcut.md":"/docs/api/QShortcut","@site/docs/api/QSpinBox.md":"/docs/api/QSpinBox","@site/docs/api/QSystemTrayIcon.md":"/docs/api/QSystemTrayIcon","@site/docs/api/QTabWidget.md":"/docs/api/QTabWidget","@site/docs/api/QWidget.md":"/docs/api/QWidget","@site/docs/api/QtEnums.md":"/docs/api/QtEnums","@site/docs/api/YogaWidget.md":"/docs/api/YogaWidget","@site/docs/api/process.md":"/docs/api/process","@site/docs/api/synopsis.md":"/docs/api/synopsis","@site/docs/guides/custom-nodegui-native-plugin.md":"/docs/guides/custom-nodegui-native-plugin","@site/docs/guides/debugging-in-vscode.md":"/docs/guides/debugging-in-vscode","@site/docs/guides/debugging.md":"/docs/guides/debugging","@site/docs/guides/getting-started.md":"/docs/guides/getting-started","@site/docs/guides/handle-events.md":"/docs/guides/handle-events","@site/docs/guides/images.md":"/docs/guides/images","@site/docs/guides/layout.md":"/docs/guides/layout","@site/docs/guides/networking.md":"/docs/guides/networking","@site/docs/guides/nodegui-architecture.md":"/docs/guides/nodegui-architecture","@site/docs/guides/scroll-view.md":"/docs/guides/scroll-view","@site/docs/guides/styling.md":"/docs/guides/styling","@site/docs/guides/using-native-node-modules.md":"/docs/guides/using-native-node-modules","@site/docs/api/QAbstractScrollArea.md":"/docs/api/QAbstractScrollArea","@site/docs/development/common_errors.md":"/docs/development/common_errors","@site/docs/guides/tutorial.md":"/docs/guides/tutorial","@site/docs/development/README.md":"/docs/development/README","@site/docs/mdx.md":"/docs/mdx"},"permalinkToId":{"/docs/doc1":"doc1","/docs/development/debugging":"development/debugging","/docs/development/getting-started":"development/getting-started","/docs/faq":"faq","/docs/development/setting-up":"development/setting-up","/docs/development/styling":"development/styling","/docs/development/signal_and_event_handling":"development/signal_and_event_handling","/docs/development/wrapping_widgets":"development/wrapping_widgets","/docs/api/Component":"api/Component","/docs/api/EventWidget":"api/EventWidget","/docs/api/FlexLayout":"api/FlexLayout","/docs/api/NodeLayout":"api/NodeLayout","/docs/api/NodeWidget":"api/NodeWidget","/docs/api/QAbstractSlider":"api/QAbstractSlider","/docs/api/QApplication":"api/QApplication","/docs/api/QAction":"api/QAction","/docs/api/QCheckBox":"api/QCheckBox","/docs/api/QClipboard":"api/QClipboard","/docs/api/QCursor":"api/QCursor","/docs/api/QDial":"api/QDial","/docs/api/QIcon":"api/QIcon","/docs/api/QGridLayout":"api/QGridLayout","/docs/api/QKeySequence":"api/QKeySequence","/docs/api/QLabel":"api/QLabel","/docs/api/QLineEdit":"api/QLineEdit","/docs/api/QMainWindow":"api/QMainWindow","/docs/api/QMenu":"api/QMenu","/docs/api/QMenuBar":"api/QMenuBar","/docs/api/QPixmap":"api/QPixmap","/docs/api/QPlainTextEdit":"api/QPlainTextEdit","/docs/api/QProgressBar":"api/QProgressBar","/docs/api/QPushButton":"api/QPushButton","/docs/api/QRadioButton":"api/QRadioButton","/docs/api/QScrollArea":"api/QScrollArea","/docs/api/QShortcut":"api/QShortcut","/docs/api/QSpinBox":"api/QSpinBox","/docs/api/QSystemTrayIcon":"api/QSystemTrayIcon","/docs/api/QTabWidget":"api/QTabWidget","/docs/api/QWidget":"api/QWidget","/docs/api/QtEnums":"api/QtEnums","/docs/api/YogaWidget":"api/YogaWidget","/docs/api/process":"api/process","/docs/api/synopsis":"api/synopsis","/docs/guides/custom-nodegui-native-plugin":"guides/custom-nodegui-native-plugin","/docs/guides/debugging-in-vscode":"guides/debugging-in-vscode","/docs/guides/debugging":"guides/debugging","/docs/guides/getting-started":"guides/getting-started","/docs/guides/handle-events":"guides/handle-events","/docs/guides/images":"guides/images","/docs/guides/layout":"guides/layout","/docs/guides/networking":"guides/networking","/docs/guides/nodegui-architecture":"guides/nodegui-architecture","/docs/guides/scroll-view":"guides/scroll-view","/docs/guides/styling":"guides/styling","/docs/guides/using-native-node-modules":"guides/using-native-node-modules","/docs/api/QAbstractScrollArea":"api/QAbstractScrollArea","/docs/development/common_errors":"development/common_errors","/docs/guides/tutorial":"guides/tutorial","/docs/development/README":"development/README","/docs/mdx":"mdx"}}')}}]); \ No newline at end of file diff --git a/docsMetadata---docs-150-2d6.dbac39bfa2e3d6968559.js b/docsMetadata---docs-150-2d6.dbac39bfa2e3d6968559.js deleted file mode 100644 index 40c99d833..000000000 --- a/docsMetadata---docs-150-2d6.dbac39bfa2e3d6968559.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{42:function(e){e.exports=JSON.parse('{"docs":{"faq":{"title":"FAQ","sidebar_label":"FAQ","id":"faq","description":"## Why am I having trouble installing Qode?","source":"@site/docs/faq.md","permalink":"/docs/faq"},"doc1":{"id":"doc1","title":"Style Guide","sidebar_label":"Style Guide","description":"You can write content using [GitHub-flavored Markdown syntax](https://github.github.com/gfm/).","source":"@site/docs/doc1.md","permalink":"/docs/doc1"},"development/common_errors":{"id":"development/common_errors","title":"common_errors","description":"# Common errors","source":"@site/docs/development/common_errors.md","permalink":"/docs/development/common_errors"},"development/README":{"id":"development/README","title":"README","description":"# Contributor\'s guide","source":"@site/docs/development/README.md","permalink":"/docs/development/README"},"development/debugging":{"id":"development/debugging","title":"debugging","description":"# debugging","source":"@site/docs/development/debugging.md","permalink":"/docs/development/debugging"},"development/getting-started":{"id":"development/getting-started","title":"getting-started","description":"## Getting started","source":"@site/docs/development/getting-started.md","permalink":"/docs/development/getting-started"},"development/setting-up":{"id":"development/setting-up","title":"setting-up","description":"# Setup project for development","source":"@site/docs/development/setting-up.md","permalink":"/docs/development/setting-up"},"development/signal_and_event_handling":{"id":"development/signal_and_event_handling","title":"signal_and_event_handling","description":"# Event handling","source":"@site/docs/development/signal_and_event_handling.md","permalink":"/docs/development/signal_and_event_handling"},"development/wrapping_widgets":{"id":"development/wrapping_widgets","title":"wrapping_widgets","description":"# Exporting a new method from a widget","source":"@site/docs/development/wrapping_widgets.md","permalink":"/docs/development/wrapping_widgets"},"development/styling":{"id":"development/styling","title":"styling","description":"# How styling works?","source":"@site/docs/development/styling.md","permalink":"/docs/development/styling"},"api/Component":{"sidebar_label":"Component","title":"Component","id":"api/Component","description":"> Abstract class that is root most base class for all widgets and layouts in the NodeGui World.","source":"@site/docs/api/Component.md","permalink":"/docs/api/Component","sidebar":"api","category":"Internal Modules","next":"api/EventWidget","previous":"api/QSystemTrayIcon","previous_title":"QSystemTrayIcon","next_title":"EventWidget"},"api/FlexLayout":{"sidebar_label":"FlexLayout","title":"FlexLayout","id":"api/FlexLayout","description":"> Custom layout to help layout child widgets using flex layout.","source":"@site/docs/api/FlexLayout.md","permalink":"/docs/api/FlexLayout","sidebar":"api","category":"Layouts","next":"api/QGridLayout","previous":"api/QMenuBar","previous_title":"QMenuBar","next_title":"QGridLayout"},"api/EventWidget":{"sidebar_label":"EventWidget","title":"EventWidget","id":"api/EventWidget","description":"> Abstract class that adds event handling support to all widgets.","source":"@site/docs/api/EventWidget.md","permalink":"/docs/api/EventWidget","sidebar":"api","category":"Internal Modules","next":"api/NodeLayout","previous":"api/Component","previous_title":"Component","next_title":"NodeLayout"},"api/NodeWidget":{"sidebar_label":"NodeWidget","title":"NodeWidget","id":"api/NodeWidget","description":"> Abstract class to add functionalities common to all Widgets.","source":"@site/docs/api/NodeWidget.md","permalink":"/docs/api/NodeWidget","sidebar":"api","category":"Internal Modules","next":"api/YogaWidget","previous":"api/NodeLayout","previous_title":"NodeLayout","next_title":"YogaWidget"},"api/NodeLayout":{"sidebar_label":"NodeLayout","title":"NodeLayout","id":"api/NodeLayout","description":"> Abstract class to add functionalities common to all Layout.","source":"@site/docs/api/NodeLayout.md","permalink":"/docs/api/NodeLayout","sidebar":"api","category":"Internal Modules","next":"api/NodeWidget","previous":"api/EventWidget","previous_title":"EventWidget","next_title":"NodeWidget"},"api/QAbstractSlider":{"sidebar_label":"QAbstractSlider","title":"QAbstractSlider","id":"api/QAbstractSlider","description":"> Abstract class to add functionalities common to all slider based widgets.","source":"@site/docs/api/QAbstractSlider.md","permalink":"/docs/api/QAbstractSlider","sidebar":"api","category":"Internal Modules","next":"api/process","previous":"api/QAbstractScrollArea","previous_title":"QAbstractScrollArea","next_title":"process"},"api/QApplication":{"sidebar_label":"QApplication","title":"QApplication","id":"api/QApplication","description":"> QApplication is the root object for the entire application. It manages app level settings.","source":"@site/docs/api/QApplication.md","permalink":"/docs/api/QApplication","sidebar":"api","category":"Widgets","next":"api/QCheckBox","previous":"api/synopsis","previous_title":"Synopsis","next_title":"QCheckBox"},"api/QCheckBox":{"sidebar_label":"QCheckBox","title":"QCheckBox","id":"api/QCheckBox","description":"> Create and control checkbox.","source":"@site/docs/api/QCheckBox.md","permalink":"/docs/api/QCheckBox","sidebar":"api","category":"Widgets","next":"api/QDial","previous":"api/QApplication","previous_title":"QApplication","next_title":"QDial"},"api/QAction":{"sidebar_label":"QAction","title":"QAction","id":"api/QAction","description":"> The QAction class provides an abstract user interface action that can be inserted into widgets.","source":"@site/docs/api/QAction.md","permalink":"/docs/api/QAction","sidebar":"api","category":"Modules","next":"api/QKeySequence","previous":"api/QShortcut","previous_title":"QShortcut","next_title":"QKeySequence"},"api/QAbstractScrollArea":{"sidebar_label":"QAbstractScrollArea","title":"QAbstractScrollArea","id":"api/QAbstractScrollArea","description":"> Abstract class to add functionalities common to all scrollarea based widgets.","source":"@site/docs/api/QAbstractScrollArea.md","permalink":"/docs/api/QAbstractScrollArea","sidebar":"api","category":"Internal Modules","next":"api/QAbstractSlider","previous":"api/YogaWidget","previous_title":"YogaWidget","next_title":"QAbstractSlider"},"api/QClipboard":{"sidebar_label":"QClipboard","title":"QClipboard","id":"api/QClipboard","description":"> The QClipboard class provides access to the window system clipboard.","source":"@site/docs/api/QClipboard.md","permalink":"/docs/api/QClipboard","sidebar":"api","category":"Modules","next":"api/QCursor","previous":"api/QGridLayout","previous_title":"QGridLayout","next_title":"QCursor"},"api/QDial":{"sidebar_label":"QDial","title":"QDial","id":"api/QDial","description":"> Create and control dial slider widgets.","source":"@site/docs/api/QDial.md","permalink":"/docs/api/QDial","sidebar":"api","category":"Widgets","next":"api/QLabel","previous":"api/QCheckBox","previous_title":"QCheckBox","next_title":"QLabel"},"api/QGridLayout":{"sidebar_label":"QGridLayout","title":"QGridLayout","id":"api/QGridLayout","description":"> The QGridLayout class lays out widgets in a grid.","source":"@site/docs/api/QGridLayout.md","permalink":"/docs/api/QGridLayout","sidebar":"api","category":"Layouts","next":"api/QClipboard","previous":"api/FlexLayout","previous_title":"FlexLayout","next_title":"QClipboard"},"api/QCursor":{"sidebar_label":"QCursor","title":"QCursor","id":"api/QCursor","description":"> The QCursor class provides scalable icons in different modes and states.","source":"@site/docs/api/QCursor.md","permalink":"/docs/api/QCursor","sidebar":"api","category":"Modules","next":"api/QPixmap","previous":"api/QClipboard","previous_title":"QClipboard","next_title":"QPixmap"},"api/QLabel":{"sidebar_label":"QLabel","title":"QLabel","id":"api/QLabel","description":"> Create and control text.","source":"@site/docs/api/QLabel.md","permalink":"/docs/api/QLabel","sidebar":"api","category":"Widgets","next":"api/QLineEdit","previous":"api/QDial","previous_title":"QDial","next_title":"QLineEdit"},"api/QKeySequence":{"sidebar_label":"QKeySequence","title":"QKeySequence","id":"api/QKeySequence","description":"> The QKeySequence class encapsulates a key sequence as used by shortcuts. .","source":"@site/docs/api/QKeySequence.md","permalink":"/docs/api/QKeySequence","sidebar":"api","category":"Modules","next":"api/QIcon","previous":"api/QAction","previous_title":"QAction","next_title":"QIcon"},"api/QLineEdit":{"sidebar_label":"QLineEdit","title":"QLineEdit","id":"api/QLineEdit","description":"> Create and control editable text field.","source":"@site/docs/api/QLineEdit.md","permalink":"/docs/api/QLineEdit","sidebar":"api","category":"Widgets","next":"api/QMainWindow","previous":"api/QLabel","previous_title":"QLabel","next_title":"QMainWindow"},"api/QIcon":{"sidebar_label":"QIcon","title":"QIcon","id":"api/QIcon","description":"> The QIcon class provides scalable icons in different modes and states.","source":"@site/docs/api/QIcon.md","permalink":"/docs/api/QIcon","sidebar":"api","category":"Modules","next":"api/QSystemTrayIcon","previous":"api/QKeySequence","previous_title":"QKeySequence","next_title":"QSystemTrayIcon"},"api/QMenu":{"sidebar_label":"QMenu","title":"QMenu","id":"api/QMenu","description":"> The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.","source":"@site/docs/api/QMenu.md","permalink":"/docs/api/QMenu","sidebar":"api","category":"Widgets","next":"api/QMenuBar","previous":"api/QWidget","previous_title":"QWidget","next_title":"QMenuBar"},"api/QPixmap":{"sidebar_label":"QPixmap","title":"QPixmap","id":"api/QPixmap","description":"> The QPixmap class helps hold an image in the form of off-screen image representation.","source":"@site/docs/api/QPixmap.md","permalink":"/docs/api/QPixmap","sidebar":"api","category":"Modules","next":"api/QtEnums","previous":"api/QCursor","previous_title":"QCursor","next_title":"Qt Enums"},"api/QMainWindow":{"sidebar_label":"QMainWindow","title":"QMainWindow","id":"api/QMainWindow","description":"> Create and control windows.","source":"@site/docs/api/QMainWindow.md","permalink":"/docs/api/QMainWindow","sidebar":"api","category":"Widgets","next":"api/QPlainTextEdit","previous":"api/QLineEdit","previous_title":"QLineEdit","next_title":"QPlainTextEdit"},"api/QMenuBar":{"sidebar_label":"QMenuBar","title":"QMenuBar","id":"api/QMenuBar","description":"> The QMenuBar class provides a menu widget for use in menu bars, context menus, and other popup menus.","source":"@site/docs/api/QMenuBar.md","permalink":"/docs/api/QMenuBar","sidebar":"api","category":"Widgets","next":"api/FlexLayout","previous":"api/QMenu","previous_title":"QMenu","next_title":"FlexLayout"},"api/QPlainTextEdit":{"sidebar_label":"QPlainTextEdit","title":"QPlainTextEdit","id":"api/QPlainTextEdit","description":"> Used to edit and display plain text.","source":"@site/docs/api/QPlainTextEdit.md","permalink":"/docs/api/QPlainTextEdit","sidebar":"api","category":"Widgets","next":"api/QProgressBar","previous":"api/QMainWindow","previous_title":"QMainWindow","next_title":"QProgressBar"},"api/QPushButton":{"sidebar_label":"QPushButton","title":"QPushButton","id":"api/QPushButton","description":"> Create and control buttons.","source":"@site/docs/api/QPushButton.md","permalink":"/docs/api/QPushButton","sidebar":"api","category":"Widgets","next":"api/QRadioButton","previous":"api/QProgressBar","previous_title":"QProgressBar","next_title":"QRadioButton"},"api/QProgressBar":{"sidebar_label":"QProgressBar","title":"QProgressBar","id":"api/QProgressBar","description":"> Create and control progress bar widgets.","source":"@site/docs/api/QProgressBar.md","permalink":"/docs/api/QProgressBar","sidebar":"api","category":"Widgets","next":"api/QPushButton","previous":"api/QPlainTextEdit","previous_title":"QPlainTextEdit","next_title":"QPushButton"},"api/QRadioButton":{"sidebar_label":"QRadioButton","title":"QRadioButton","id":"api/QRadioButton","description":"> Create and control radio button.","source":"@site/docs/api/QRadioButton.md","permalink":"/docs/api/QRadioButton","sidebar":"api","category":"Widgets","next":"api/QScrollArea","previous":"api/QPushButton","previous_title":"QPushButton","next_title":"QScrollArea"},"api/QScrollArea":{"sidebar_label":"QScrollArea","title":"QScrollArea","id":"api/QScrollArea","description":"> A `QScrollArea` provides a scrolling view onto another widget.","source":"@site/docs/api/QScrollArea.md","permalink":"/docs/api/QScrollArea","sidebar":"api","category":"Widgets","next":"api/QSpinBox","previous":"api/QRadioButton","previous_title":"QRadioButton","next_title":"QSpinBox"},"api/QShortcut":{"sidebar_label":"QShortcut","title":"QShortcut","id":"api/QShortcut","description":"> The QShortcut class is used to create keyboard shortcuts.","source":"@site/docs/api/QShortcut.md","permalink":"/docs/api/QShortcut","sidebar":"api","category":"Modules","next":"api/QAction","previous":"api/QtEnums","previous_title":"Qt Enums","next_title":"QAction"},"api/QTabWidget":{"sidebar_label":"QTabWidget","title":"QTabWidget","id":"api/QTabWidget","description":"Will be available from NodeGUI v0.1.10 and up","source":"@site/docs/api/QTabWidget.md","permalink":"/docs/api/QTabWidget","sidebar":"api","category":"Widgets","next":"api/QWidget","previous":"api/QSpinBox","previous_title":"QSpinBox","next_title":"QWidget"},"api/QSystemTrayIcon":{"sidebar_label":"QSystemTrayIcon","title":"QSystemTrayIcon","id":"api/QSystemTrayIcon","description":"> Create and control system tray icon.","source":"@site/docs/api/QSystemTrayIcon.md","permalink":"/docs/api/QSystemTrayIcon","sidebar":"api","category":"Modules","next":"api/Component","previous":"api/QIcon","previous_title":"QIcon","next_title":"Component"},"api/QWidget":{"sidebar_label":"QWidget","title":"QWidget","id":"api/QWidget","description":"> Create and control views.","source":"@site/docs/api/QWidget.md","permalink":"/docs/api/QWidget","sidebar":"api","category":"Widgets","next":"api/QMenu","previous":"api/QTabWidget","previous_title":"QTabWidget","next_title":"QMenu"},"api/QSpinBox":{"sidebar_label":"QSpinBox","title":"QSpinBox","id":"api/QSpinBox","description":"> Create and control spin box widgets.","source":"@site/docs/api/QSpinBox.md","permalink":"/docs/api/QSpinBox","sidebar":"api","category":"Widgets","next":"api/QTabWidget","previous":"api/QScrollArea","previous_title":"QScrollArea","next_title":"QTabWidget"},"api/YogaWidget":{"sidebar_label":"YogaWidget","title":"YogaWidget","id":"api/YogaWidget","description":"> Abstract class to add common functionality related to Flex layout to all Widgets.","source":"@site/docs/api/YogaWidget.md","permalink":"/docs/api/YogaWidget","sidebar":"api","category":"Internal Modules","next":"api/QAbstractScrollArea","previous":"api/NodeWidget","previous_title":"NodeWidget","next_title":"QAbstractScrollArea"},"api/QtEnums":{"sidebar_label":"Qt Enums","title":"Qt Enums","id":"api/QtEnums","description":"## Enums from Qt","source":"@site/docs/api/QtEnums.md","permalink":"/docs/api/QtEnums","sidebar":"api","category":"Modules","next":"api/QShortcut","previous":"api/QPixmap","previous_title":"QPixmap","next_title":"QShortcut"},"api/process":{"sidebar_label":"process","title":"process","id":"api/process","description":"> Extensions to process object.","source":"@site/docs/api/process.md","permalink":"/docs/api/process","sidebar":"api","category":"APIs","previous":"api/QAbstractSlider","previous_title":"QAbstractSlider"},"api/synopsis":{"sidebar_label":"Synopsis","title":"Synopsis","id":"api/synopsis","description":"> How to use Node.js and NodeGui\'s APIs.","source":"@site/docs/api/synopsis.md","permalink":"/docs/api/synopsis","sidebar":"api","category":"General","next":"api/QApplication","next_title":"QApplication"},"guides/getting-started":{"sidebar_label":"Getting started","title":"Getting started","id":"guides/getting-started","description":"NodeGui enables you to create desktop applications with JavaScript. You could see it","source":"@site/docs/guides/getting-started.md","permalink":"/docs/guides/getting-started","sidebar":"guides","category":"The Basics","next":"guides/tutorial","next_title":"Learn the Basics"},"guides/debugging":{"sidebar_label":"Debugging","title":"Debugging","id":"guides/debugging","description":"## Application Debugging","source":"@site/docs/guides/debugging.md","permalink":"/docs/guides/debugging","sidebar":"guides","category":"Guides","next":"guides/debugging-in-vscode","previous":"guides/nodegui-architecture","previous_title":"Architecture","next_title":"Debugging in VSCode"},"guides/debugging-in-vscode":{"sidebar_label":"Debugging in VSCode","title":"Debugging in VSCode","id":"guides/debugging-in-vscode","description":"- **Open a NodeGui project in VSCode.**","source":"@site/docs/guides/debugging-in-vscode.md","permalink":"/docs/guides/debugging-in-vscode","sidebar":"guides","category":"Guides","next":"guides/using-native-node-modules","previous":"guides/debugging","previous_title":"Debugging","next_title":"Using native Node Modules"},"guides/custom-nodegui-native-plugin":{"sidebar_label":"Custom NodeGui Plugin","title":"Custom NodeGui Plugin","id":"guides/custom-nodegui-native-plugin","description":"WIP","source":"@site/docs/guides/custom-nodegui-native-plugin.md","permalink":"/docs/guides/custom-nodegui-native-plugin","sidebar":"guides","category":"Guides","previous":"guides/using-native-node-modules","previous_title":"Using native Node Modules"},"guides/images":{"sidebar_label":"Images","title":"Images","id":"guides/images","description":"WIP","source":"@site/docs/guides/images.md","permalink":"/docs/guides/images","sidebar":"guides","category":"The Basics","next":"guides/networking","previous":"guides/scroll-view","previous_title":"Scroll View","next_title":"Networking"},"guides/handle-events":{"sidebar_label":"Handle Events","title":"Handle Events","id":"guides/handle-events","description":"WIP","source":"@site/docs/guides/handle-events.md","permalink":"/docs/guides/handle-events","sidebar":"guides","category":"The Basics","next":"guides/scroll-view","previous":"guides/layout","previous_title":"Layout","next_title":"Scroll View"},"guides/layout":{"sidebar_label":"Layout","title":"Layout","id":"guides/layout","description":"NodeGui uses a layout system to automatically arrange child widgets within a widget to ensure that they make good use of the available space.","source":"@site/docs/guides/layout.md","permalink":"/docs/guides/layout","sidebar":"guides","category":"The Basics","next":"guides/handle-events","previous":"guides/styling","previous_title":"Styling","next_title":"Handle Events"},"guides/scroll-view":{"sidebar_label":"Scroll View","title":"Scroll View","id":"guides/scroll-view","description":"WIP","source":"@site/docs/guides/scroll-view.md","permalink":"/docs/guides/scroll-view","sidebar":"guides","category":"The Basics","next":"guides/images","previous":"guides/handle-events","previous_title":"Handle Events","next_title":"Images"},"guides/tutorial":{"sidebar_label":"Learn the Basics","title":"Learn the Basics","id":"guides/tutorial","description":"NodeGui uses native components instead of web based components as building blocks. So to understand the basic structure of a NodeGui app, you need to be familiar with Javascript or Typescript. This tutorial is aimed at everyone who has some web experience with web development.","source":"@site/docs/guides/tutorial.md","permalink":"/docs/guides/tutorial","sidebar":"guides","category":"The Basics","next":"guides/styling","previous":"guides/getting-started","previous_title":"Getting started","next_title":"Styling"},"guides/networking":{"sidebar_label":"Networking","title":"Networking","id":"guides/networking","description":"WIP","source":"@site/docs/guides/networking.md","permalink":"/docs/guides/networking","sidebar":"guides","category":"The Basics","next":"guides/nodegui-architecture","previous":"guides/images","previous_title":"Images","next_title":"Architecture"},"guides/nodegui-architecture":{"sidebar_label":"Architecture","title":"Architecture","id":"guides/nodegui-architecture","description":"By looking at how NodeGui works internally, we would get a clear picture on why the APIs are designed the way they are.","source":"@site/docs/guides/nodegui-architecture.md","permalink":"/docs/guides/nodegui-architecture","sidebar":"guides","category":"Guides","next":"guides/debugging","previous":"guides/networking","previous_title":"Networking","next_title":"Debugging"},"guides/styling":{"sidebar_label":"Styling","title":"Styling","id":"guides/styling","description":"With NodeGui, you can style a widget to your needs. If you are familiar with CSS in the web world you would feel right at home. All widgets have a method `setInlineStyle` for setting inline styles for the respective widget. The style names and values usually match how CSS works on the web.","source":"@site/docs/guides/styling.md","permalink":"/docs/guides/styling","sidebar":"guides","category":"The Basics","next":"guides/layout","previous":"guides/tutorial","previous_title":"Learn the Basics","next_title":"Layout"},"guides/using-native-node-modules":{"sidebar_label":"Native Node Modules","title":"Using native Node Modules","id":"guides/using-native-node-modules","description":"Native Node modules are supported by NodeGui, but since NodeGui is very","source":"@site/docs/guides/using-native-node-modules.md","permalink":"/docs/guides/using-native-node-modules","sidebar":"guides","category":"Guides","next":"guides/custom-nodegui-native-plugin","previous":"guides/debugging-in-vscode","previous_title":"Debugging in VSCode","next_title":"Custom NodeGui Plugin"},"mdx":{"id":"mdx","title":"Powered by MDX","description":"You can write JSX and use React components within your Markdown thanks to [MDX](https://mdxjs.com/).","source":"@site/docs/mdx.md","permalink":"/docs/mdx"}},"docsDir":"/Users/atulr/Project/nodegui/nodegui/website/docs","docsSidebars":{"api":[{"type":"category","label":"General","items":[{"type":"doc","id":"api/synopsis"}]},{"type":"category","label":"Widgets","items":[{"type":"doc","id":"api/QApplication"},{"type":"doc","id":"api/QCheckBox"},{"type":"doc","id":"api/QDial"},{"type":"doc","id":"api/QLabel"},{"type":"doc","id":"api/QLineEdit"},{"type":"doc","id":"api/QMainWindow"},{"type":"doc","id":"api/QPlainTextEdit"},{"type":"doc","id":"api/QProgressBar"},{"type":"doc","id":"api/QPushButton"},{"type":"doc","id":"api/QRadioButton"},{"type":"doc","id":"api/QScrollArea"},{"type":"doc","id":"api/QSpinBox"},{"type":"doc","id":"api/QTabWidget"},{"type":"doc","id":"api/QWidget"},{"type":"doc","id":"api/QMenu"},{"type":"doc","id":"api/QMenuBar"}]},{"type":"category","label":"Layouts","items":[{"type":"doc","id":"api/FlexLayout"},{"type":"doc","id":"api/QGridLayout"}]},{"type":"category","label":"Modules","items":[{"type":"doc","id":"api/QClipboard"},{"type":"doc","id":"api/QCursor"},{"type":"doc","id":"api/QPixmap"},{"type":"doc","id":"api/QtEnums"},{"type":"doc","id":"api/QShortcut"},{"type":"doc","id":"api/QAction"},{"type":"doc","id":"api/QKeySequence"},{"type":"doc","id":"api/QIcon"},{"type":"doc","id":"api/QSystemTrayIcon"}]},{"type":"category","label":"Internal Modules","items":[{"type":"doc","id":"api/Component"},{"type":"doc","id":"api/EventWidget"},{"type":"doc","id":"api/NodeLayout"},{"type":"doc","id":"api/NodeWidget"},{"type":"doc","id":"api/YogaWidget"},{"type":"doc","id":"api/QAbstractScrollArea"},{"type":"doc","id":"api/QAbstractSlider"}]},{"type":"category","label":"APIs","items":[{"type":"doc","id":"api/process"}]}],"guides":[{"type":"category","label":"The Basics","items":[{"type":"doc","id":"guides/getting-started"},{"type":"doc","id":"guides/tutorial"},{"type":"doc","id":"guides/styling"},{"type":"doc","id":"guides/layout"},{"type":"doc","id":"guides/handle-events"},{"type":"doc","id":"guides/scroll-view"},{"type":"doc","id":"guides/images"},{"type":"doc","id":"guides/networking"}]},{"type":"category","label":"Guides","items":[{"type":"doc","id":"guides/nodegui-architecture"},{"type":"doc","id":"guides/debugging"},{"type":"doc","id":"guides/debugging-in-vscode"},{"type":"doc","id":"guides/using-native-node-modules"},{"type":"doc","id":"guides/custom-nodegui-native-plugin"}]}]},"sourceToPermalink":{"@site/docs/faq.md":"/docs/faq","@site/docs/doc1.md":"/docs/doc1","@site/docs/development/common_errors.md":"/docs/development/common_errors","@site/docs/development/README.md":"/docs/development/README","@site/docs/development/debugging.md":"/docs/development/debugging","@site/docs/development/getting-started.md":"/docs/development/getting-started","@site/docs/development/setting-up.md":"/docs/development/setting-up","@site/docs/development/signal_and_event_handling.md":"/docs/development/signal_and_event_handling","@site/docs/development/wrapping_widgets.md":"/docs/development/wrapping_widgets","@site/docs/development/styling.md":"/docs/development/styling","@site/docs/api/Component.md":"/docs/api/Component","@site/docs/api/FlexLayout.md":"/docs/api/FlexLayout","@site/docs/api/EventWidget.md":"/docs/api/EventWidget","@site/docs/api/NodeWidget.md":"/docs/api/NodeWidget","@site/docs/api/NodeLayout.md":"/docs/api/NodeLayout","@site/docs/api/QAbstractSlider.md":"/docs/api/QAbstractSlider","@site/docs/api/QApplication.md":"/docs/api/QApplication","@site/docs/api/QCheckBox.md":"/docs/api/QCheckBox","@site/docs/api/QAction.md":"/docs/api/QAction","@site/docs/api/QAbstractScrollArea.md":"/docs/api/QAbstractScrollArea","@site/docs/api/QClipboard.md":"/docs/api/QClipboard","@site/docs/api/QDial.md":"/docs/api/QDial","@site/docs/api/QGridLayout.md":"/docs/api/QGridLayout","@site/docs/api/QCursor.md":"/docs/api/QCursor","@site/docs/api/QLabel.md":"/docs/api/QLabel","@site/docs/api/QKeySequence.md":"/docs/api/QKeySequence","@site/docs/api/QLineEdit.md":"/docs/api/QLineEdit","@site/docs/api/QIcon.md":"/docs/api/QIcon","@site/docs/api/QMenu.md":"/docs/api/QMenu","@site/docs/api/QPixmap.md":"/docs/api/QPixmap","@site/docs/api/QMainWindow.md":"/docs/api/QMainWindow","@site/docs/api/QMenuBar.md":"/docs/api/QMenuBar","@site/docs/api/QPlainTextEdit.md":"/docs/api/QPlainTextEdit","@site/docs/api/QPushButton.md":"/docs/api/QPushButton","@site/docs/api/QProgressBar.md":"/docs/api/QProgressBar","@site/docs/api/QRadioButton.md":"/docs/api/QRadioButton","@site/docs/api/QScrollArea.md":"/docs/api/QScrollArea","@site/docs/api/QShortcut.md":"/docs/api/QShortcut","@site/docs/api/QTabWidget.md":"/docs/api/QTabWidget","@site/docs/api/QSystemTrayIcon.md":"/docs/api/QSystemTrayIcon","@site/docs/api/QWidget.md":"/docs/api/QWidget","@site/docs/api/QSpinBox.md":"/docs/api/QSpinBox","@site/docs/api/YogaWidget.md":"/docs/api/YogaWidget","@site/docs/api/QtEnums.md":"/docs/api/QtEnums","@site/docs/api/process.md":"/docs/api/process","@site/docs/api/synopsis.md":"/docs/api/synopsis","@site/docs/guides/getting-started.md":"/docs/guides/getting-started","@site/docs/guides/debugging.md":"/docs/guides/debugging","@site/docs/guides/debugging-in-vscode.md":"/docs/guides/debugging-in-vscode","@site/docs/guides/custom-nodegui-native-plugin.md":"/docs/guides/custom-nodegui-native-plugin","@site/docs/guides/images.md":"/docs/guides/images","@site/docs/guides/handle-events.md":"/docs/guides/handle-events","@site/docs/guides/layout.md":"/docs/guides/layout","@site/docs/guides/scroll-view.md":"/docs/guides/scroll-view","@site/docs/guides/tutorial.md":"/docs/guides/tutorial","@site/docs/guides/networking.md":"/docs/guides/networking","@site/docs/guides/nodegui-architecture.md":"/docs/guides/nodegui-architecture","@site/docs/guides/styling.md":"/docs/guides/styling","@site/docs/guides/using-native-node-modules.md":"/docs/guides/using-native-node-modules","@site/docs/mdx.md":"/docs/mdx"},"permalinkToId":{"/docs/faq":"faq","/docs/doc1":"doc1","/docs/development/common_errors":"development/common_errors","/docs/development/README":"development/README","/docs/development/debugging":"development/debugging","/docs/development/getting-started":"development/getting-started","/docs/development/setting-up":"development/setting-up","/docs/development/signal_and_event_handling":"development/signal_and_event_handling","/docs/development/wrapping_widgets":"development/wrapping_widgets","/docs/development/styling":"development/styling","/docs/api/Component":"api/Component","/docs/api/FlexLayout":"api/FlexLayout","/docs/api/EventWidget":"api/EventWidget","/docs/api/NodeWidget":"api/NodeWidget","/docs/api/NodeLayout":"api/NodeLayout","/docs/api/QAbstractSlider":"api/QAbstractSlider","/docs/api/QApplication":"api/QApplication","/docs/api/QCheckBox":"api/QCheckBox","/docs/api/QAction":"api/QAction","/docs/api/QAbstractScrollArea":"api/QAbstractScrollArea","/docs/api/QClipboard":"api/QClipboard","/docs/api/QDial":"api/QDial","/docs/api/QGridLayout":"api/QGridLayout","/docs/api/QCursor":"api/QCursor","/docs/api/QLabel":"api/QLabel","/docs/api/QKeySequence":"api/QKeySequence","/docs/api/QLineEdit":"api/QLineEdit","/docs/api/QIcon":"api/QIcon","/docs/api/QMenu":"api/QMenu","/docs/api/QPixmap":"api/QPixmap","/docs/api/QMainWindow":"api/QMainWindow","/docs/api/QMenuBar":"api/QMenuBar","/docs/api/QPlainTextEdit":"api/QPlainTextEdit","/docs/api/QPushButton":"api/QPushButton","/docs/api/QProgressBar":"api/QProgressBar","/docs/api/QRadioButton":"api/QRadioButton","/docs/api/QScrollArea":"api/QScrollArea","/docs/api/QShortcut":"api/QShortcut","/docs/api/QTabWidget":"api/QTabWidget","/docs/api/QSystemTrayIcon":"api/QSystemTrayIcon","/docs/api/QWidget":"api/QWidget","/docs/api/QSpinBox":"api/QSpinBox","/docs/api/YogaWidget":"api/YogaWidget","/docs/api/QtEnums":"api/QtEnums","/docs/api/process":"api/process","/docs/api/synopsis":"api/synopsis","/docs/guides/getting-started":"guides/getting-started","/docs/guides/debugging":"guides/debugging","/docs/guides/debugging-in-vscode":"guides/debugging-in-vscode","/docs/guides/custom-nodegui-native-plugin":"guides/custom-nodegui-native-plugin","/docs/guides/images":"guides/images","/docs/guides/handle-events":"guides/handle-events","/docs/guides/layout":"guides/layout","/docs/guides/scroll-view":"guides/scroll-view","/docs/guides/tutorial":"guides/tutorial","/docs/guides/networking":"guides/networking","/docs/guides/nodegui-architecture":"guides/nodegui-architecture","/docs/guides/styling":"guides/styling","/docs/guides/using-native-node-modules":"guides/using-native-node-modules","/docs/mdx":"mdx"}}')}}]); \ No newline at end of file diff --git a/index.html b/index.html index 71196683a..dd30371a4 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - + Hello from NodeGui @@ -24,9 +24,9 @@

    NodeGui

    Build performant, native, cross platform desktop apps with JavaScript and CSS 🚀

    [object Object]

    Web Technologies

    With NodeGui, you can build your app with familiar web technologies like CSS and JavaScript. There is even a React based version.

    [object Object]

    Open Source

    NodeGui is an open source project maintained by an active community of contributors.

    [object Object]

    Cross Platform

    Compatible with Mac, Windows, and Linux, NodeGui apps build and run on three platforms.

    Create native apps for Windows, MacOs and Linux using JavaScript and CSS

    lets you create truly native apps and doesn't compromise on your users' experience. It provides a core set of platform agnostic native widgets that map directly to the platform’s native UI building blocks.

    NodeGui widgets are built on top of Qt which is a mature desktop apps framework. NodeGui widgets are extremely customizable just like in the web but does NOT use a Web browser under the hood.

    Written in JavaScript—rendered with native code by Qt

    Apps can be built completely in JavaScript. This enables native app development for whole new teams of developers, and can let existing native teams work much faster.

    With NodeGui you get flexibility of web and perfromance of Native desktop apps.

    Give it a try

    1. Run these commands

    git clone https://github.com/nodegui/nodegui-startercd nodegui-starternpm installnpm start

    2. Learn the basics or dive deeper and take a look at the APIs.

    - + - + diff --git a/main.df23129c6a8dca8ab908.js b/main.8d444715bf5acf76b69f.js similarity index 82% rename from main.df23129c6a8dca8ab908.js rename to main.8d444715bf5acf76b69f.js index 97c9924eb..dc5848b18 100644 --- a/main.df23129c6a8dca8ab908.js +++ b/main.8d444715bf5acf76b69f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[73],[function(e,t,n){"use strict";e.exports=n(25)},function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t=0;f--){var p=i[f];"."===p?a(i,f):".."===p?(a(i,f),d++):d&&(a(i,f),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&r(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function u(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var l=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,o){return e(t,n[o])}));if("object"==typeof t||"object"==typeof n){var o=u(t),r=u(n);return o!==t||r!==n?e(o,r):Object.keys(Object.assign({},t,n)).every((function(o){return e(t[o],n[o])}))}return!1},c=n(3);function s(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,o=e.hash,r=t||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}function h(e,t,n,r){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",o="",r=t.indexOf("#");-1!==r&&(o=t.substr(r),t=t.substr(0,r));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===o?"":o}}(e)).state=t:(void 0===(a=Object(o.a)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(a.key=n),r?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,r.pathname)):a.pathname=r.pathname:a.pathname||(a.pathname="/"),a}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function b(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,o,r){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof o?o(a,r):r(!0):r(!1!==a)}else r(!0)},appendListener:function(e){var n=!0;function o(){n&&e.apply(void 0,arguments)}return t.push(o),function(){n=!1,t=t.filter((function(e){return e!==o}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),o=0;ot?n.splice(t,n.length-t,o):n.push(o),d({action:"PUSH",location:o,index:t,entries:n})}}))},replace:function(e,t){var o=h(e,t,f(),w.location);s.confirmTransitionTo(o,"REPLACE",n,(function(e){e&&(w.entries[w.index]=o,d({action:"REPLACE",location:o}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t=0||(r[n]=e[n]);return r}n.d(t,"a",(function(){return o}))},function(e,t,n){e.exports=n(29)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var o=n(2),r=n(1),a=n(0),i=n.n(a);function u(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var r=e.path?Object(o.e)(t,e):n.length?n[n.length-1].match:o.b.computeRootMatch(t);return r&&(n.push({route:e,match:r}),e.routes&&u(e.routes,t,n)),r})),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?i.a.createElement(o.c,n,e.map((function(e,n){return i.a.createElement(o.a,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render(Object(r.a)({},n,{},t,{route:e})):i.a.createElement(e.component,Object(r.a)({},n,t,{route:e}))}})}))):null}},function(e){e.exports=JSON.parse('{"/":{"component":"component---site-src-pages-index-jsc-4-f-f99"},"/blog/welcome":{"component":"component---theme-blog-post-pageccc-cab","content":"content---blog-welcome-286-e55","metadata":"metadata---blog-welcome-27-a-91f","prevItem":null,"nextItem":null},"/blog":{"component":"component---theme-blog-list-pagea-6-a-7ba","items":[{"content":"content---blogaf-1-856","metadata":"metadata---blog-welcome-27-a-91f"}],"metadata":"metadata---blog-83-c-2b0"},"/docs":{"component":"component---theme-doc-legacy-page-9-e-7-ca5","docsMetadata":"docsMetadata---docs-150-2d6"},"/docs/faq":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-faq-048-db5","metadata":"metadata---docs-faq-59-d-2b9"},"/docs/doc1":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-doc-1-b-2-f-e80","metadata":"metadata---docs-doc-12-a-3-5a1"},"/docs/development/common_errors":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-development-common-errorsf-15-a5b","metadata":"metadata---docs-development-common-errors-402-ef4"},"/docs/development/README":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-development-readme-149-437","metadata":"metadata---docs-development-readm-ec-6-c-332"},"/docs/development/debugging":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-development-debuggingb-54-9ed","metadata":"metadata---docs-development-debuggingc-36-26a"},"/docs/development/getting-started":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-development-getting-started-139-387","metadata":"metadata---docs-development-getting-started-89-b-c7a"},"/docs/development/setting-up":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-development-setting-up-28-c-666","metadata":"metadata---docs-development-setting-up-979-75f"},"/docs/development/signal_and_event_handling":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-development-signal-and-event-handling-7-d-4-f3f","metadata":"metadata---docs-development-signal-and-event-handling-0-b-5-692"},"/docs/development/wrapping_widgets":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-development-wrapping-widgets-84-b-538","metadata":"metadata---docs-development-wrapping-widgets-303-fb8"},"/docs/development/styling":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-development-styling-293-cad","metadata":"metadata---docs-development-styling-1-c-2-0d6"},"/docs/api/Component":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-component-4-ef-195","metadata":"metadata---docs-api-component-3-e-5-43d"},"/docs/api/FlexLayout":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-flex-layout-3-dc-a16","metadata":"metadata---docs-api-flex-layoutecf-540"},"/docs/api/EventWidget":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-event-widgetac-6-11b","metadata":"metadata---docs-api-event-widget-39-a-9ea"},"/docs/api/NodeWidget":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-node-widget-080-a39","metadata":"metadata---docs-api-node-widgeta-92-a4f"},"/docs/api/NodeLayout":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-node-layoutd-28-11a","metadata":"metadata---docs-api-node-layout-1-e-9-c15"},"/docs/api/QAbstractSlider":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-abstract-slider-3-e-0-54d","metadata":"metadata---docs-api-q-abstract-sliderdfa-ab7"},"/docs/api/QApplication":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-applicationd-3-e-0a3","metadata":"metadata---docs-api-q-applicationc-1-d-8a4"},"/docs/api/QCheckBox":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-check-boxd-9-b-c95","metadata":"metadata---docs-api-q-check-box-132-293"},"/docs/api/QAction":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-action-051-425","metadata":"metadata---docs-api-q-actioncfb-cfc"},"/docs/api/QAbstractScrollArea":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-abstract-scroll-area-3-e-6-d7f","metadata":"metadata---docs-api-q-abstract-scroll-area-59-d-279"},"/docs/api/QClipboard":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-clipboard-69-d-2ef","metadata":"metadata---docs-api-q-clipboard-486-b21"},"/docs/api/QDial":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-dial-80-b-99a","metadata":"metadata---docs-api-q-dialbfb-aef"},"/docs/api/QGridLayout":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-grid-layouta-4-e-552","metadata":"metadata---docs-api-q-grid-layout-7-db-030"},"/docs/api/QCursor":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-cursor-362-d51","metadata":"metadata---docs-api-q-cursor-887-11e"},"/docs/api/QLabel":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-label-2-f-9-04b","metadata":"metadata---docs-api-q-label-165-210"},"/docs/api/QKeySequence":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-key-sequence-6-b-2-ebe","metadata":"metadata---docs-api-q-key-sequence-623-1a1"},"/docs/api/QLineEdit":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-line-editea-0-53d","metadata":"metadata---docs-api-q-line-edit-13-f-b8a"},"/docs/api/QIcon":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-icone-5-f-b0d","metadata":"metadata---docs-api-q-icone-6-d-093"},"/docs/api/QMenu":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-menu-39-e-ecd","metadata":"metadata---docs-api-q-menuc-6-b-9ab"},"/docs/api/QPixmap":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-pixmap-8-dd-cb2","metadata":"metadata---docs-api-q-pixmapfdf-820"},"/docs/api/QMainWindow":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-main-window-0-e-7-299","metadata":"metadata---docs-api-q-main-window-04-f-efb"},"/docs/api/QMenuBar":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-menu-bar-8-d-2-872","metadata":"metadata---docs-api-q-menu-bare-25-882"},"/docs/api/QPlainTextEdit":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-plain-text-edit-7-c-8-081","metadata":"metadata---docs-api-q-plain-text-edit-161-ecc"},"/docs/api/QPushButton":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-push-button-06-c-73e","metadata":"metadata---docs-api-q-push-button-96-d-c92"},"/docs/api/QProgressBar":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-progress-barc-46-afe","metadata":"metadata---docs-api-q-progress-bar-43-d-07e"},"/docs/api/QRadioButton":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-radio-buttone-54-746","metadata":"metadata---docs-api-q-radio-button-367-f7c"},"/docs/api/QScrollArea":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-scroll-area-8-c-4-3fd","metadata":"metadata---docs-api-q-scroll-area-46-a-96e"},"/docs/api/QShortcut":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-shortcut-271-2d3","metadata":"metadata---docs-api-q-shortcut-5-e-7-1aa"},"/docs/api/QTabWidget":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-tab-widget-508-95e","metadata":"metadata---docs-api-q-tab-widgetebc-5aa"},"/docs/api/QSystemTrayIcon":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-system-tray-icon-4-b-8-4c7","metadata":"metadata---docs-api-q-system-tray-icon-711-f90"},"/docs/api/QWidget":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-widget-04-a-59f","metadata":"metadata---docs-api-q-widget-287-e6c"},"/docs/api/QSpinBox":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-q-spin-box-1-ce-bfd","metadata":"metadata---docs-api-q-spin-box-809-ae0"},"/docs/api/YogaWidget":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-yoga-widgeta-42-cc7","metadata":"metadata---docs-api-yoga-widget-95-c-f8b"},"/docs/api/QtEnums":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-qt-enumsfd-7-cf3","metadata":"metadata---docs-api-qt-enums-423-cf9"},"/docs/api/process":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-process-5-ec-b1e","metadata":"metadata---docs-api-process-32-d-09e"},"/docs/api/synopsis":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-api-synopsis-7-bb-e1c","metadata":"metadata---docs-api-synopsis-21-f-a62"},"/docs/guides/getting-started":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-getting-startedc-9-e-20f","metadata":"metadata---docs-guides-getting-started-2-b-7-1a4"},"/docs/guides/debugging":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-debuggingf-3-f-cf5","metadata":"metadata---docs-guides-debugging-970-fb8"},"/docs/guides/debugging-in-vscode":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-debugging-in-vscodebd-7-cec","metadata":"metadata---docs-guides-debugging-in-vscodebf-8-5b0"},"/docs/guides/custom-nodegui-native-plugin":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-custom-nodegui-native-plugin-632-9db","metadata":"metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f"},"/docs/guides/images":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-images-991-065","metadata":"metadata---docs-guides-images-915-5ee"},"/docs/guides/handle-events":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-handle-events-160-4b0","metadata":"metadata---docs-guides-handle-events-5-eb-540"},"/docs/guides/layout":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-layoutdf-5-a64","metadata":"metadata---docs-guides-layoutf-65-d7d"},"/docs/guides/scroll-view":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-scroll-view-76-e-87c","metadata":"metadata---docs-guides-scroll-view-9-a-9-2ac"},"/docs/guides/tutorial":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-tutoriale-53-6ab","metadata":"metadata---docs-guides-tutorial-1-f-1-23b"},"/docs/guides/networking":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-networking-374-03e","metadata":"metadata---docs-guides-networkingdfd-ce0"},"/docs/guides/nodegui-architecture":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-nodegui-architecture-262-19e","metadata":"metadata---docs-guides-nodegui-architecture-550-b82"},"/docs/guides/styling":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-stylingfec-977","metadata":"metadata---docs-guides-styling-9-ea-213"},"/docs/guides/using-native-node-modules":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-guides-using-native-node-modules-3-ab-104","metadata":"metadata---docs-guides-using-native-node-modules-31-f-551"},"/docs/mdx":{"component":"component---theme-doc-legacy-item-031-769","content":"content---docs-mdxce-3-7d1","metadata":"metadata---docs-mdx-786-f56"},"/blog/tags/nodegui":{"component":"component---theme-blog-tags-posts-page-687-b6c","items":[{"content":"content---blogaf-1-856","metadata":"metadata---blog-welcome-27-a-91f"}],"metadata":"metadata---blog-tags-nodegui-632-d46"},"/blog/tags/hello":{"component":"component---theme-blog-tags-posts-page-687-b6c","items":[{"content":"content---blogaf-1-856","metadata":"metadata---blog-welcome-27-a-91f"}],"metadata":"metadata---blog-tags-hellob-02-3e8"},"/blog/tags":{"component":"component---theme-blog-tags-list-page-01-a-d0b","tags":"tags---blog-tags-8-d-7-36d"}}')},function(e,t,n){"use strict";t.a={plugins:[],themes:[],customFields:{},themeConfig:{navbar:{title:"NodeGui",logo:{alt:"NodeGui Logo",src:"img/logo-circle.png"},links:[{to:"docs/guides/getting-started",label:"Docs",position:"right"},{to:"docs/api/QApplication",label:"API",position:"right"},{to:"blog",label:"Blog",position:"right"},{href:"https://github.com/nodegui/nodegui",label:"GitHub",position:"right"}]},footer:{style:"dark",links:[{title:"Docs",items:[{to:"docs/guides/getting-started",label:"Getting Started"},{to:"docs/api/QApplication",label:"API"}]},{title:"Community",items:[{label:"Spectrum",href:"https://spectrum.chat/nodegui"},{label:"Twitter",to:"https://twitter.com/node_gui"},{label:"Medium",to:"https://medium.com/nodegui"}]},{title:"More",items:[{label:"Blog",to:"blog"},{label:"React NodeGui",to:"https://react.nodegui.org"},{label:"FAQ",to:"docs/faq"}]}],copyright:"Copyright © 2019 NodeGui"},googleAnalytics:{trackingID:"UA-145065218-1"}},title:"NodeGui",tagline:"Build performant, native, cross platform desktop apps with JavaScript and CSS 🚀",url:"https://nodegui.org",baseUrl:"/",favicon:"img/favicon.ico",organizationName:"nodegui",projectName:"nodegui",presets:[["@docusaurus/preset-classic",{docs:{sidebarPath:"/Users/atulr/Project/nodegui/nodegui/website/sidebars.js"},theme:{customCss:"/Users/atulr/Project/nodegui/nodegui/website/src/css/custom.css"}}]]}},function(e,t,n){var o,r;void 0===(r="function"==typeof(o=function(){var e,t,n={version:"0.2.0"},o=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
    '};function r(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(o[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=r(e,o.minimum,1),n.status=1===e?null:e;var l=n.render(!t),c=l.querySelector(o.barSelector),s=o.speed,d=o.easing;return l.offsetWidth,i((function(t){""===o.positionUsing&&(o.positionUsing=n.getPositioningCSS()),u(c,function(e,t,n){var r;return(r="translate3d"===o.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===o.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,r}(e,s,d)),1===e?(u(l,{transition:"none",opacity:1}),l.offsetWidth,setTimeout((function(){u(l,{transition:"all "+s+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),s)}),s)):setTimeout(t,s)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),o.trickleSpeed)};return o.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*r(Math.random()*t,.1,.95)),t=r(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*o.trickleRate)},e=0,t=0,n.promise=function(o){return o&&"resolved"!==o.state()?(0===t&&n.start(),e++,t++,o.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=o.template;var r,i=t.querySelector(o.barSelector),l=e?"-100":a(n.status||0),s=document.querySelector(o.parent);return u(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),o.showSpinner||(r=t.querySelector(o.spinnerSelector))&&f(r),s!=document.body&&c(s,"nprogress-custom-parent"),s.appendChild(t),t},n.remove=function(){s(document.documentElement,"nprogress-busy"),s(document.querySelector(o.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var i=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),u=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})),t[n]||(t[n]=function(t){var n=document.body.style;if(t in n)return t;for(var o,r=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);r--;)if((o=e[r]+a)in n)return o;return t}(n))}function o(e,t,o){t=n(t),e.style[t]=o}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function l(e,t){return("string"==typeof e?e:d(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=d(e),o=n+t;l(n,t)||(e.className=o.substring(1))}function s(e,t){var n,o=d(e);l(e,t)&&(n=o.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function d(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})?o.call(t,n,t,e):o)||(e.exports=r)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return w}));var o=n(2),r=n(5),a=n(0),i=n.n(a),u=n(4),l=(n(7),n(1)),c=n(6),s=n(3),d=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;rR.length&&R.push(e)}function A(e,t,n){return null==e?0:function e(t,n,o,r){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var l=!1;if(null===t)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case a:case i:l=!0}}if(l)return o(r,t,""===n?"."+L(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c