ãªã«ïŒ
ããã«ã¡ã¯ãHabrïŒ ããã«æžããŠããäœå¹Žãçµã¡ãŸããã ããªã/ç§ã®æéãããŸãã«ã/ããŸãã«ã軜ããŠããªãããšãé¡ã£ãŠããŸãã
QMLã®ã¢ã€ãã¢ãåèããçµéšã«ã€ããŠæžããããšæããŸãã Qtã¯åªããã©ã€ãã©ãªã§ãããå éšæ§é ã«ãã£ãŠã¯çåãçããŸãããã¯ãã¹ãã©ãããã©ãŒã ã®UIããŒã«ãããã ãã§ãªãããã¶ã€ããŒãã¯ãªãšã€ã¿ãŒãèšèªåŠè ããããŠãã¡ããQmlã®äžå¯æ¬ ãªãããã§ãã·ã§ãã«ããŒã«ããããäžçã«æäŸããŸããã ãã®åèã®çµæãç§ãã¡ã®ãããããªãããžã§ã¯ããå®çŸããŸããããã®ãããžã§ã¯ãã§ã¯ãqmlãããŸããŸãªãã©ãããã©ãŒã çšã®html5 / javascriptã«å€æãã Cordovaã䜿çšããŠã·ã³ãã«ãªAndroidã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããããšãã§ããŸãã
Qmlã¯åžžã«ãã€ã³ã¿ãŒãã§ã€ã¹éçºã®èŠ³ç¹ããã®çµ¶å¯Ÿçãªè¡šçŸåã§ç§ãã¡ïŒç§ãã¡ã¯èªåãã¡ãšåŒãã§ãããQMLåŒè·å£«ã®å°ããªæªç¥ã®ã°ã«ãŒãïŒãé äºããŠããŸããããããã£ãŠãç§ãã¡äžäººäžäººããããã䜿çšããŠãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ãšãµã€ããéçºããŠããŸãã
ç§ãã¡ã¯ãæ°ãããã®ãã¹ãŠã«éãããhabrã³ãã¥ããã£ã®ãã®éšåã«éåžžã«äŒŒãŠããããããããªæ©äŒãè©ŠããŠè©äŸ¡ãããã£ãŒãããã¯ãåãåãã補åãæ¹åããããšãã§ããŸãã
ãœãŒã¹ã³ãŒãã¯githubã§å ¥æã§ããŸãããµã€ãã®ãœãŒã¹ã³ãŒããäŸããã¹ãŠã®ãããžã§ã¯ãã§äœ¿çšããã³ã³ãããŒã«ã®ã©ã€ãã©ãªããããŸãã ããã¥ã¡ã³ããšãã¥ãŒããªã¢ã«ã¯ãåœç€Ÿã®ãŠã§ããµã€ãpureqml.comã§ã芧ããã ããŸãã
ããããªãããšãããã°ãTelegramã®ãµããŒãã°ã«ãŒãã«åå ã§ããŸãããã¹ãŠã®è³ªåã«ãªã¢ã«ã¿ã€ã ã§åçããããšããŸãã
ç§ãã¡ãäœã£ãç¡æã®ã¢ããªã±ãŒã·ã§ã³ã®1ã€ã¯Fontaneroã²ãŒã ã®ç§»æ€çã§ãLG / Samsungåžå Žã§å©çšã§ããã¯ãã§ãã
ããŠãããªãã¯èªãããšãã§ããŸããïŒ
ã©ãããŠãããªäººçã«ãã©ãçããã®ã
ãã¹ãŠãçŸåšå©çšå¯èœãªãã¹ãŠã®çš®é¡ã®ãã©ãããã©ãŒã äžã®ã«ã©ãã«ãªããã€ã¹ã®ã©ã€ã³ã®ããã®1ã€ã®å€§äŒæ¥ã§çµã¿èŸŒã¿ãœãããŠã§ã¢ïŒããã³ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ïŒã®èšè¿°ãéå§ãããšããããã¯ãã¹ãŠ2010幎ã«å§ãŸããŸããïŒarmãmipsãx86ãsh4ãsparcã®ã¿ãæ¬ èœããŠããŸãã...
ç§ãã¡ã¯æ¬¡ã®ããã«èªåèªèº«ã®äž»ãªåé¡ãå®åŒåããŸããïŒUIã¯é«éã§ãå®äŸ¡ã§ãè¯ããã®ã§ãªããã°ãªããŸããããããã£ãŠãããã3ã€ãã2ã€ã ããéžæããå¿ èŠã¯ãããŸããã ãªãœãŒã¹ãéåžžã«å°ãªãããïŒ1.5人ã®ããã°ã©ããŒïŒãUIããã°ã©ãã³ã°ãç°¡åã§æ¥œãããã®ã«ãããã£ãã®ã§ããããã°ã©ããŒã¯èŠåŽãããæ³£ããªãã§éããŸããã§ãããã座æšãæåã§è¿œè·¡ããã®ã§ã¯ãªããããžãã¹äžã®åé¡ã解決ããããšã«å°å¿µããŸããã HTMLã¯ããã«æ¶ããŸãããããã¯ãæåã®ããã€ã¹ãarm926xxxïŒarmv5ïŒäžã«ããã32 MBã®RAMãæèŒãããŠããããã§ãããã®ãã¡23 MBã®ã¿ããŠãŒã¶ãŒã¹ããŒã¹ã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšã§ããŸããïŒãŸããarmv5ã¯ãã¹ãŠã®ãŠãŒã¶ãŒã®2Gä»®æ³ã¢ãã¬ã¹ã«å¯ŸããŠãšãã§ããªãå¶éããããŸãïŒããã»ã¹å šäœã§ãç§ãééã£ãŠããå Žåã¯ä¿®æ£ããŠãã ããïŒãæ€çŽ¢ã®ç¯å²ãå€§å¹ ã«çããŸãã
æ¢åã®ãœãªã¥ãŒã·ã§ã³ãåæããåŸãQtã§ã®ååããªéçºçµéšãèãããšãæ¯èŒçæ°ããïŒåœæã®ïŒèšèªãšãã¯ãããžãŒã§ããQMLãéžæããŸãããããã¯ãŸã£ããé©ãããšã§ã¯ãããŸããã§ããã éåžžã«ã·ã³ãã«ã§çŽæçãªã®ã§ãç§ãã¡ã¯ããã«ãããå¿ èŠã ãšå€æããŸããã 1é±éã§ç»å Žããéåžžã«æ©èœçãªãããã¿ã€ãã§ããã¡ãã·ã§ããã«ãªã¢ãã¡ãŒã·ã§ã³ããããããæ£ããéžæãããã«ç¢ºä¿¡ãããŸããã
QML- ïŒååïŒè¯ã
QMLã®çŽ æŽãããç¹ã¯ãå®éã«ã¯UIãé€ããã¹ãŠãããã°ã©ãããé ããŠããããšã§ãã èšç»ãèªåã®æã«åãããã£ã³ãã¹ã«å¹ãä»ããã ãã§ãïŒ
宣èšçã¢ãããŒãã¯éåžžã«æ確ã§äœ¿ããããã§ãã ã³ã³ããŒãã³ãã®åå©çšã¯çŽæçã§ãããåçŽãªå Žåã«ã¯éåžžã«ç°¡æœã§ãã ããã«ãããæåéãæ°ãæã§2人ã®ããã°ã©ããŒãæ¬æ ŒçãªUIïŒã¡ãã¥ãŒãã¢ããªã±ãŒã·ã§ã³ãèšå®ãã¹ã±ãžã¥ãŒã«ãªã©ïŒãäœæããããšãã§ããŸããã
ç§ãã¡ã¯Qtã®ãã©ã³ãã«ã«å€ãã®æéãè²»ãããŸããããã«ã¹ã¿ã ãã«ãã§ãããéå°ãªããããããªããã°ã8 MBãŸãã¯16 MBã®ãã©ãã·ã¥ã¡ã¢ãªã«åãŸããªãããšãããããŸããã Qt QMLããªãã£ãæ代ãæãåºããŠãçµã¿èŸŒã¿ã€ã³ã¿ãŒãã§ãŒã¹ãéå±ããŠresããªããªã£ãäžçã«ãã§ã«äœãã§ãããããç§ãã¡ã®æ²ãã¿ã«ã¯éçããããŸããã§ããã
ãã®å€ãååãšç§ã¯æ·±ã»ã³ã®ããã«ã®1ã€ïŒ48éïŒã§é島ã®ããã«ã§å€ãéãããŸãããQMLãäœæã§ãããã©ãããèããŸãããC ++ã§ãåæã«ããã®éåžžã«æ²ããå¯èœæ§ã®åŒ·ãã確èªããŠãã ããã arm926ã®ãã©ãããã©ãŒã ã ãã¹ãŠãããã»ã©æªããªãããšãããããããã»ããµã«ã¯ãœãããŠã§ã¢ã§ãéæãªçŸãããŠã£ã³ããŠãæç»ããã®ã«ååãªæ©èœããããŸããã2Dã°ã©ãã£ãã¯ã¹ããŒããŠã§ã¢ã¢ã¯ã»ã©ã¬ãŒã¿ããããŸããïŒ
è¢ããŸãããé島ãæšãŠãŠãç§ãã¡ã¯æ¿ããã³ã³ãã€ã«ãå§ããŸããããããŠæ°é±éåŸãç§ãã¡ã¯ãã§ã«javascriptã§ã¯ãªãC ++ã§QMLãæã«å ¥ããŸããã ããã¯ç§ãã¡ã®æåã®QMLã§ãããæåŸãŸã§ããªãé·ãé磚ããŸããã
ããããC ++ã¯ååãªããŒãã³ã¢ã§ãããããŸããŸãªãã©ãããã©ãŒã ã«ã¢ããªã±ãŒã·ã§ã³ãé åžããããšã¯ã§ããŸããããã€ãã£ãã³ãŒãã¯éåžžã«é·ãæéã³ã³ãã€ã«ãããããã°ã©ãã®é è³ã«ããå€ãã®è² æ ãããããããå€ãã®æè³ãå¿ èŠã§ãã ãããã£ãŠãæ°å¹ŽåŸãç§ãã¡ïŒå¥ã®ïŒååãã¢ã ã¹ãã«ãã ã®ã³ãŒããŒã·ã§ããã§ãã€ãé£ã¹ãŠå€ãéããããšããjavascriptïŒv8ã§è¡šãããïŒããã€ãã£ãã³ãŒãã«æ»ãæ¹æ³ãèŠã€ããŸããã
ãããã®2ã€ã®QMLã¯ãããããçãŸããäŒæ¥ãã®ãã®ãšãšãã«éå»ã«ããããããã®èæ¯ã¯ããŸãèå³æ·±ããã®ã§ã¯ãªããããããŸããã éçºããŒã«ãšããŠäžè¬ã«å ¬éãããããšã¯ãããŸããã§ããããæ¯æ¥çŽ600äžäººããã®æè¡ã«åºã¥ããŠæ§ç¯ãããUIã䜿çšããŠããŸãã
ç§ãã¡ã®æ¥ïŒ1幎ååïŒ
ãã®å€§ãããŠæãããäŒç€ŸãèŸããåŸãã€ã³ã¿ãŒãã§ã€ã¹ããã°ããç°¡åã«éçºããããšèããŠããŸãããåæã«ã5ïŒïŒïŒãã©ãããã©ãŒã ã§ããã«SmartTVçšã®å€§ãããŠè€éãªã¢ããªã±ãŒã·ã§ã³ãäœæããå¿ èŠããããŸããã AndroidåãTVã¯ãŸã ç»å ŽããŠããããåœæã®ã»ãšãã©ã®SmartTVã¯HTMLããŒã¹ã®SDKãæäŸãããã®ãã¬ãŒã ã¯ãŒã¯ãä¿é²ãããšã«ããããã°ã©ããŒã®ç掻ã楜ã«ããŸããïŒããšãã°ãsamsungã®caphãªã©ïŒããããã¯å®è£ ãšããŠããã»ã¹ãããªãè€éã«ããŸãç¹å®ã®ã¡ãŒã«ãŒããšã«1ã€ã®UIãæžãçŽãå¿ èŠããããŸããã ïŒã¡ãŒã«ãŒã®ïŒãã¬ããWebããŒã¹ã®ãã¯ãããžãŒã䜿çšããåæ©ã¯ç解ã§ããŸãããã¢ããªã±ãŒã·ã§ã³ã®è€éããå¢ããšå®è£ ã¯éåžžã«èŠçã«ãªããŸãã ç¬èªã®QMLãšã³ãžã³ã®èšè¿°ã«5幎ã®çµéšããã£ããããå¥ã®ç¬èªã®QMLãäœæããããšã«ããŸããïŒããå€ãã®ãã€ã¯ãå¿ èŠã§ãïŒïŒã ãç¹ã«SmartTVããã³HTMLå šè¬ã«äœ¿çšããŸãã
ç§ãã¡ã®ãããããªãããžã§ã¯ããçãŸããŸããã
åºæ¬çãªæ¬èœåç
ãã¹ãŠãqmlã®ããã«é 眮ããããã¹ãŠã®ã³ã³ããŒãã³ãã.qmlãã¡ã€ã«ã«èšè¿°ããã.manifestã«ã¢ããªã±ãŒã·ã§ã³ã®æ§é ãèšè¿°ãããŸãã 次ã«ãhtml5 / javascriptã®ãã©ã³ã¹ã¬ãŒã¿ãŒ/ãã©ã³ã¹ãã€ã©ãŒïŒïŒïŒQMLãåããŸãïŒã·ã°ãã«ãã¢ããããŒã¿ãŒããããã¿ã€ããã³ã³ã¹ãã©ã¯ã¿ãŒãçæãããæ¥ç¶ãããŸãã ãããŒããã£ã¹ãã®åŸãã³ã³ãã¯ãã§é«éãªjavascriptãã¡ã€ã«ããhtml-launcherãšãšãã«ååŸãããŸããModernizrã®ã¿ãå¿ èŠã§ãã
ç¹åŸŽçãªæ©èœã¯ãQMLãQMLã§èšè¿°ãããã¹ãŠã®ã³ã¢ã³ã³ããŒãã³ããããŒã«ãã§ãŒã³ã䜿çšããŠqmlãšjavascriptã§èšè¿°ãããŠããããšã§ãããã©ã³ã¹ãã€ã©ãŒèªäœã¯ãã¡ã€ã«ãããŒã ã¹ããŒã¹ã«å解ããéåžžã¯ææžãã§èšè¿°ããŸãã
翻蚳ã®é£ãããšèªè»¢è»
䜿çšããQMLæ¹èšã¯ãå ã®QMLãšéåžžã«ãã䌌ãŠããŸãã æãéèŠãªå€æŽ-ãã©ãŒã«ã¹ããžãã¯ãåäœæããããã·ã³ãã«ã§å®å šãªãã®ã«ããŸããã
äžè¬çã«ãQt QMLãšã®äºææ§ãç¶æããããšããŸãããŸããäžäžèŽã®ããã«ã¯ãã¹ãããã³ã°ãã£ã³ããŒã³ã調æŽããããšããããŸãã
HTML5ãã¡ã€ã³ãã©ãããã©ãŒã ãšããŠäœ¿çšããŠããããïŒèšããŸã§ããããŸãããã確ãã§ã¯ãããŸããïŒ ã2Dã°ã©ãã£ãã¯ã¹ãæç»ããåçŽãªã·ã¹ãã ãšããŠHTMLã䜿çšãã芪ã«å¯ŸããŠèŠçŽ ïŒdivïŒã絶察çã«é 眮ããŸãã ããã«ãããããšãã°ãæãMouseAreaã¢ã³ã¹ã¿ãŒã䜿çšããã«ä»»æã®èŠçŽ ããããŒã€ãã³ããŸãã¯ã¯ãªãã¯ã€ãã³ããåŠçã§ããããã«ãäžçŽç©ãå®å šã«å®è£ ã§ããŸããã è¿œå ã®èŠçŽ ãäœæããããItem-MouseAreaã®æãäœæãããããã«ãBorderãGradientããŸãã¯Drag-n-Dropãä»»æã®èŠçŽ ã«è¿œå ããããšãã§ããŸãã
çŸç¶
æããã«ã3人ã®å°ããªçµç¹ããã°ã©ãã°ã«ãŒãã«ãã£ãŠQt QMLã«å«ãŸãããã¹ãŠã®ã³ã³ããŒãã³ããšæ©èœãå®è£ ããããã§ã¯ãããŸããããç§ãã¡ã®æèŠã§ã¯æãéèŠãªéšåãå ããŠããŸãã
ããã¥ã¡ã³ããžã§ãã¬ãŒã¿ãŒãšãã®ããã²ãŒã¿ãŒãããã³ããã¥ã¡ã³ãèªäœã®ã¹ã±ã«ãã³ããdoxygenãšåæ§ã®æ³šéã䜿çšããŠäœæãããŸããã ã³ã³ããŒãã³ãã©ã€ãã©ãªãã¯ãªãŒã³ã¢ããããå¿ èŠããããŸãã
Windowsããã³MacOSçšã®æé ãšããŒã«ã調æŽããŸãã
æé©åãæ©èœã®æ§ç¯ããã©ãããã©ãŒã ã®æ¹åãªã©ãå€ãã®ã¢ã€ãã¢ããããŸãã
ããã«ããããããããããžã§ã¯ãã®äžæ žã¯ãã§ã«éåžžã«å®å®ããŠãããä»ã§ã¯ãããã€ãã®åçšãããžã§ã¯ãïŒããã³ããã€ãã®éåçšãããžã§ã¯ãïŒãPureQMLã§ãªãªãŒã¹ããããšãã§ããŸããã
ç§ãã¡ã¯ããªãã®ãã£ãŒãããã¯ã楜ãã¿ã«ããŠããŸãã誰ããæ¬åœã«äœãããããã®ã§ããã°ãããã¯å€§äžå€«ã§ãïŒ
æåŸãŸã§ãã®åçœãèªãã§ããããã¹ãŠã®äººã«æè¬ããŸãïŒ
ãã®èšäºã«èå³ããã人ã¯ãQMLã®ããžã§ã³ãäžçŽç©ã®éçºãããŸããŸãªã¬ãã«ã®ããŸããŸãªãã©ãããã©ãŒã ãšã®çµ±åã宣èšçããã³ããã§ãªããèšèªã®æ¹åã宣èšãžã®æ¬¡å ã®è¿œå ïŒïŒ ãemãptïŒãåŒãç¶ãæ€èšã§ããŸãã
ãããŸã§ã®ãšãããsmartTVãã©ãããã©ãŒã ã®ãœãŒã¹ã³ãŒããéããªãããšã«ããŸããããäžè¬ã«ããã®å¯èœæ§ãæ€èšããŠããŸãã SmartTVã®ããŒãžã§ã³ãååŸãããå Žåã¯ãã³ã¡ã³ããæžããŠãã ããããããã©ã®ããã«è¡ããã«ã€ããŠèããŸãã