1 line
4.9 KiB
JavaScript
1 line
4.9 KiB
JavaScript
(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<c;p++)o[p]=t[p];return a.a.createElement.apply(null,o)}return a.a.createElement.apply(null,t)}u.displayName="MDXCreateElement"},93:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return o})),t.d(n,"rightToc",(function(){return i})),t.d(n,"default",(function(){return u}));t(0);var r=t(173);function a(){return(a=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function c(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},c=Object.keys(e);for(r=0;r<c.length;r++)t=c[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)t=c[r],n.indexOf(t)>=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}}]); |