tag:blogger.com,1999:blog-14309460039336328082024-03-14T00:22:00.962+03:00C++, Qt, Software engineeringДругие мои записи, можно найти
здесь: vass.habrahabr.ruVasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.comBlogger24125tag:blogger.com,1999:blog-1430946003933632808.post-62713542445698192152015-03-02T22:03:00.002+03:002015-03-03T11:38:44.513+03:00Google C++ Mocking and Test FrameworksС огромным опозданием, но все же выкладываю видео с моим выступлением на встрече C++ User Group в Саратове. За обработку и сведение спасибо <a href="https://plus.google.com/u/0/+%D0%90%D0%BD%D0%B4%D1%80%D0%B5%D0%B9%D0%9B%D0%B5%D1%82%D1%8E%D1%88%D0%BE%D0%B2/about">Андрею Летюшову</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/eILGYcQTZEc/0.jpg" frameborder="0" height="266" src="http://www.youtube.com/embed/eILGYcQTZEc?feature=player_embedded" width="320"></iframe></div>
<br />Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com1tag:blogger.com,1999:blog-1430946003933632808.post-227826454891728442013-10-03T21:29:00.002+04:002013-10-03T21:36:39.851+04:00Пишем Objective-C код прямо в Qt проекте, не выходя из Qt Creator<b>На примере обработчика глобальных горячих клавиш<i> MacOSX</i></b><br />
<b><br /></b>
Иногда бывают случаи, когда необходимо добавить в программу платформо-зависимый код, и, если в <i>Linux</i> и <i>Windows</i> все стандартные заголовки являются <i>C/C++ </i>заголовками, то в среде <i>MacOSX</i> это <i>Objective-C</i> заголовки, и если их просто подключить в проект, вы получите тысячи и тысячи ошибок сборки, поэтому для <i>MacOSX</i> необходима возможность писать часть кода на <i>Objective-C</i>, и такая возможность есть.<br />
<br />
<a name='more'></a>Разбирать будем на примере перехвата глобального сочетания горячих клавиш с помощью платформозависимого метода<br />
<i><b>bool QApplication::macEventFilter(EventHandlerCallRef caller, EventRef event)</b>.</i><br />
Если переопределить этот виртуальный метод, вы будете получать вообще все <i>event'</i>ы от опереционной системы в него, соответственно нам необходимо отфильтровать то, что нас интересует и отдать управление дальше в ином случае, чтобы проигнорировать событие данный метод просто должен вернуть <i>false</i>. Но для того, чтобы проверить событие <i>event,</i> нам необходимо сконвертировать его в <i>NSEvent * </i>- класс из<i> MacOSX API</i>.<br />
<br />
Итак, первое что нужно сделать, это объявить в каком-нибудь заголовочном файле функцию нашего обработчика (скорее всего это будет заголовок вашего класса наследника от <i>QApplication</i>):<br />
<pre><!--StartFragment--><span style="color: navy;">#ifdef</span><span style="color: silver;"> </span><span style="color: navy;">Q_WS_MAC</span>
<span style="color: olive;">bool</span><span style="color: silver;"> </span>eventHandler<span style="color: black;">(</span><span style="color: purple;">EventRef</span><span style="color: silver;"> </span>e<span style="color: black;">);</span>
<span style="color: navy;">#endif</span>
</pre>
Далее мы создаем файл с телом этой функции и расширением <i>.mm</i>, назовем его <i>mac_helper.mm</i>:<br />
<pre><span style="color: navy;">#include</span><span style="color: silver;"> </span><QtDebug>
<span style="color: navy;">#ifdef</span><span style="color: silver;"> </span><span style="color: navy;">QT_MAC_USE_COCOA</span>
<span style="color: navy;">#import</span><span style="color: silver;"> </span><Cocoa/Cocoa.h>
<span style="color: olive;">bool</span><span style="color: silver;"> </span>eventHandler(<span style="color: purple;">EventRef</span><span style="color: silver;"> </span>e)
{
<span style="color: silver;"> </span>NSEvent<span style="color: silver;"> </span>*event<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: olive;">reinterpret_cast</span><NSEvent<span style="color: silver;"> </span>*>(e);
<span style="color: purple;"> Q_ASSERT</span>(event);
<span style="color: silver;"> </span><span style="color: olive;">if</span><span style="color: silver;"> </span>([event<span style="color: silver;"> </span>type]<span style="color: silver;"> </span>==<span style="color: silver;"> </span><span style="color: purple;">NSKeyDown</span>)<span style="color: silver;"> </span>{
<span style="color: silver;"> </span><span style="color: olive;">if</span><span style="color: silver;"> </span>([event<span style="color: silver;"> </span>modifierFlags]<span style="color: silver;"> </span>&<span style="color: silver;"> </span><span style="color: purple;">NSShiftKeyMask</span>)<span style="color: silver;"> </span>{
<span style="color: silver;"> </span><span style="color: olive;">if</span><span style="color: silver;"> </span>([event<span style="color: silver;"> </span>keyCode]<span style="color: silver;"> </span>==<span style="color: silver;"> 0x</span><span style="color: navy;">44</span>)<span style="color: silver;"> </span>{
qDebug() << "Hello key event!";
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: olive;">true</span>;
<span style="color: silver;"> </span>}
<span style="color: silver;"> </span>}
<span style="color: silver;"> </span>}
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: olive;">false</span>;
}
<span style="color: navy;">#endif</span>
<!--EndFragment--></pre>
В этом файле мы видим тело нашей функции написанное уже на <i>Objective-C</i>, хотя, как вы можете заметить, мы смело используем обычный<i> qDebug()</i>, и это будет работать.
<br />
<br />
Осталось только вызвать наш обработчик из <i>QApplication</i>:<br />
<pre><!--StartFragment--><span style="color: navy;">#ifdef</span><span style="color: silver;"> </span><span style="color: navy;">Q_WS_MAC</span>
<span style="color: olive;">bool</span><span style="color: silver;"> </span><span style="color: purple;">RMS_Keyboards_Application</span>::<span style="font-style: italic;">macEventFilter</span>(<span style="color: purple;">EventHandlerCallRef</span>,<span style="color: silver;"> </span><span style="color: purple;">EventRef</span><span style="color: silver;"> </span>e)
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span>eventHandler(e);
}
<span style="color: navy;">#endif</span><!--EndFragment-->
</pre>
И не забыть добавить .<i>mm</i> файл в проект, это делается таким образом:<br />
<pre>mac {
<span style="color: purple;">OBJECTIVE_SOURCES</span> += mac_helper.mm
}</pre>
Кстати, для заголовков на <i>Objective-C</i> тоже есть директива, она, как не трудно догадаться называется: <i>OBJECTIVE_HEADERS</i>.<br />
<br />
На этом все.Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com1tag:blogger.com,1999:blog-1430946003933632808.post-80684257112969094992013-08-05T15:37:00.001+04:002013-08-05T15:39:01.493+04:00С++ задачкаЕще одна задача на тонкости C++,<br />
что выведет этот код?<br />
<br />
<pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><!--StartFragment--><span style="color: navy;">#include</span><span style="color: silver;"> </span><span style="color: green;"><QtDebug></span>
<span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">A</span><span style="color: silver;"> </span><span style="color: black;">{</span>
<span style="color: olive;">public</span><span style="color: black;">:</span>
<span style="color: silver;"> </span><span style="color: olive;">virtual</span><span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: black; font-style: italic;">foo</span><span style="color: black;">(</span><span style="color: olive;">int</span><span style="color: silver;"> </span><span style="color: black;">i</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: navy;">1</span><span style="color: black;">)</span>
<span style="color: silver;"> </span><span style="color: black;">{</span>
<span style="color: silver;"> </span><span style="color: black;">qDebug</span><span style="color: black;">()</span><span style="color: silver;"> </span><span style="color: black;"><<</span><span style="color: silver;"> </span><span style="color: green;">"A"</span><span style="color: silver;"> </span><span style="color: black;"><<</span><span style="color: silver;"> </span><span style="color: black;">i</span><span style="color: black;">;</span>
<span style="color: silver;"> </span><span style="color: black;">}</span>
<span style="color: black;">};</span>
<span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">B</span><span style="color: silver;"> </span><span style="color: black;">:</span><span style="color: silver;"> </span><span style="color: olive;">public</span><span style="color: silver;"> </span><span style="color: purple;">A</span><span style="color: silver;"> </span><span style="color: black;">{</span>
<span style="color: olive;">public</span><span style="color: black;">:</span>
<span style="color: silver;"> </span><span style="color: olive;">virtual</span><span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: black; font-style: italic;">foo</span><span style="color: black;">(</span><span style="color: olive;">int</span><span style="color: silver;"> </span><span style="color: black;">i</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: navy;">100</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: olive;">override</span>
<span style="color: silver;"> </span><span style="color: black;">{</span>
<span style="color: silver;"> </span><span style="color: black;">qDebug</span><span style="color: black;">()</span><span style="color: silver;"> </span><span style="color: black;"><<</span><span style="color: silver;"> </span><span style="color: green;">"B"</span><span style="color: silver;"> </span><span style="color: black;"><<</span><span style="color: silver;"> </span><span style="color: black;">i</span><span style="color: black;">;</span>
<span style="color: silver;"> </span><span style="color: black;">}</span>
<span style="color: black;">};</span>
<span style="color: olive;">int</span><span style="color: silver;"> </span><span style="color: black;">main</span><span style="color: black;">()</span>
<span style="color: black;">{</span>
<span style="color: silver;"> </span><span style="color: purple;">A</span><span style="color: silver;"> </span><span style="color: black;">*</span><span style="color: black;">b</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">B</span><span style="color: black;">();</span>
<span style="color: silver;"> </span><span style="color: purple;">B</span><span style="color: silver;"> </span><span style="color: black;">*</span><span style="color: black;">bb</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: olive;"> dynamic_cast</span><<span style="color: purple;">B</span><span style="color: silver;"> </span><span style="color: black;">*>(</span><span style="color: black;">b</span><span style="color: black;">);</span>
<span style="color: silver;"> </span><span style="color: black;">b</span><span style="color: black;">-></span><span style="color: black; font-style: italic;">foo</span><span style="color: black;">();</span>
<span style="color: silver;"> </span><span style="color: black;">bb</span><span style="color: black;">-></span><span style="color: black; font-style: italic;">foo</span><span style="color: black;">();</span>
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: navy;">0</span><span style="color: black;">;</span>
}<!--EndFragment--></pre>
<br />
Ответ внутри
<br />
<a name='more'></a><br />
<b>Ответ(Выделите ниже): </b><br />
<span style="color: white;">B 1</span><br />
<span style="color: white;">B 100</span><br />
<span style="color: white;">Такой странный ответ получается потому, что дефолтный параметр подставляется во время компиляции, а метод для вызова выбирается в рантайме.</span>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com1tag:blogger.com,1999:blog-1430946003933632808.post-89859727314075526382013-03-07T21:40:00.002+04:002013-03-07T21:52:53.755+04:00Q_PROPERTY, Qt Designer, moc, uic, и нестандартно именованный setterВы когда нибудь-задумывались, что есть принципиальная разница используете ли вы стандартное именование сеттера для свойства (т. е. <i>setter</i> начинается с <i>set</i> и продолжается именем свойства с большой буквы) как например здесь:<br />
<pre><!--StartFragment--><span style="color: silver;"> </span><span style="color: purple;">Q_PROPERTY</span>(<span style="color: olive;">int</span><span style="color: silver;"> </span>foo<span style="color: silver;"> </span>READ<span style="color: silver;"> </span>foo<span style="color: silver;"> </span>WRITE<span style="color: silver;"> </span>setFoo)</pre>
И вариантом когда имя <i>setter'</i>a имеет произвольное написание? Ну например вот так:<br />
<pre><!--StartFragment--><span style="color: silver;"> </span><span style="color: purple;">Q_PROPERTY</span>(<span style="color: olive;">int</span><span style="color: silver;"> </span>foo<span style="color: silver;"> </span>READ<span style="color: silver;"> </span>foo<span style="color: silver;"> </span>WRITE<span style="color: silver;"> </span>InitFoo)</pre>
А различие есть!
<br />
В коде <i>moc</i> есть такой вот метод<br />
<pre><!--StartFragment--><span style="color: silver;"> </span><span style="color: olive;">bool</span><span style="color: silver;"> </span>stdCppSet()<span style="color: silver;"> </span><span style="color: olive;">const</span><span style="color: silver;"> </span>{
<span style="color: silver;"> </span>QByteArray<span style="color: silver;"> </span>s(<span style="color: green;">"set"</span>);
<span style="color: silver;"> </span>s<span style="color: silver;"> </span>+=<span style="color: silver;"> </span>toupper(<span style="color: maroon;">name</span>[<span style="color: navy;">0</span>]);
<span style="color: silver;"> </span>s<span style="color: silver;"> </span>+=<span style="color: silver;"> </span><span style="color: maroon;">name</span>.mid(<span style="color: navy;">1</span>);
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span>(s<span style="color: silver;"> </span>==<span style="color: silver;"> </span><span style="color: maroon;">write</span>);
<span style="color: silver;"> </span>}</pre>
Этот метод вызывается для каждого <i>Q_PROPERTY</i> и, если он возвращает <i>false</i>, то выставленный по умолчанию в <i>true</i> флаг <i>StdCppSet</i> сбрасывается и уже сброшенный записывается в метаинформацию.<br />
<br />
До тех пор, пока вы не сделали плагин для <i>Qt Designer</i> для своего виджета - разницы никакой нет. Но она сразу повляется в обратном случае, дело в том, что дизайнер также генерирует несколько разный <i>xml</i> в <i>ui-</i>файле в случае, если свойство имеет нестандартно поименованный <i>setter</i> А именно к элементу <i>property</i> добавляется аттрибут <i>stdset="0"</i>.<br />
<br />
Теперь мы подошли к самому главному, почему это важно? А важно это потому что когда по <i>ui-</i>файлу пойдет <i>uic</i>, он обратит внимание на этот аттрибут и сгенерирует совершенно другой код.<br />
Например, в случае стандартного <i>setter'</i>а код в методе <i>setupUi()</i>, будет выглядеть так:<br />
<pre><!--StartFragment--><span style="color: silver;"> </span>widget->setFoo(<span style="color: navy;">10</span>);</pre>
А в случае нестандартного так:<br />
<pre><!--StartFragment--><span style="color: silver;"> </span>widget->setProperty(<span style="color: green;">"foo"</span>,<span style="color: silver;"> </span>QVariant(<span style="color: navy;">10</span>));</pre>
А рассказывал я это все потому, что, если вдруг по каким-то причинам вам необходимо изменить в уже существующем коде стандартное имя <i>setter'</i>а на нестандартное, будьте внимательны и не забудьте обновить все <i>ui</i>-файлы, где это свойство использовано, иначе <i>uic</i> будет генерировать неверные файлы заголовков.Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com1tag:blogger.com,1999:blog-1430946003933632808.post-52374936058158701912013-03-02T13:06:00.000+04:002013-03-02T13:07:19.695+04:00Qt Designer: Использование собственных виджетов в качестве Promoting Widgets<div class="separator" style="clear: both; text-align: center;">
<a href="http://qt-project.org/doc/qt-4.8/images/designer-promoting-widgets.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="257" src="http://qt-project.org/doc/qt-4.8/images/designer-promoting-widgets.png" width="320" /></a></div>
Продолжаем развлекаться с <i>Qt Designer</i>, на это раз мы поговорим про использование собственных виджетов в <a href="http://qt-project.org/doc/qt-4.8/designer-using-custom-widgets.html#promoting-widgets">Promoting Widgets</a>. <i>Promoting Widgets</i> позволяют использовать базовый класс для представления дочернего на форме, то есть если у вас есть какой-либо наследник скажем <i>QLineEdit</i>, но вы не хотите писать для него плагин (например потому что наследник не имеет никаких новых свойств, а просто имеет другой внешний вид), то вы можете просто в форме показанной слева, выбрать базовым классом <i>QLineEdit</i> а <i>Promoted</i> классом указать своего наследника.<br />
<br />
<br />
<br />
Проблема, которую мы будем решать заключается в том, что нет <i>[задокументированного]</i> пути указать в качестве базового класса, свой виджет имеющий плагин для дизайнера.<br />
<br />
<a name='more'></a><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPSkh-tjyp_HKySh-B3Iq9SGHU45W-T8Vlji2475jebC7WJWVJFeNW88cc1KdqyRUe9_w54dUdBca9UBGdJIY6oMybz6fsU2IZUF2KD19vMNoKRQegU7PQtnQcqmE8wta0_8UNDZWIE4I/s1600/GreenPanel.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><br /><img border="0" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPSkh-tjyp_HKySh-B3Iq9SGHU45W-T8Vlji2475jebC7WJWVJFeNW88cc1KdqyRUe9_w54dUdBca9UBGdJIY6oMybz6fsU2IZUF2KD19vMNoKRQegU7PQtnQcqmE8wta0_8UNDZWIE4I/s200/GreenPanel.png" width="200" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjw4TK26mIv4jnpZ2BNCDTPE3pICdABPcucL38dnwdFm0sVPv1MSIBua5XzaN0qkOxj3T8CRNInZMO-4uAqbl1PztgRT13jBBuyu9ChEz_XrDcNEa-576Ccx8ESqN15cLOhVASuP_SedE/s1600/widget.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="164" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjw4TK26mIv4jnpZ2BNCDTPE3pICdABPcucL38dnwdFm0sVPv1MSIBua5XzaN0qkOxj3T8CRNInZMO-4uAqbl1PztgRT13jBBuyu9ChEz_XrDcNEa-576Ccx8ESqN15cLOhVASuP_SedE/s200/widget.png" width="200" /></a>Чтобы не повторятся, давайте возьмем в качестве виджета который мы будем использовать базовым, наш виджет из <a href="http://va-sorokin.blogspot.ru/2013/01/qt-designer-plugin-with-container.html">предыдущего топика</a>, который выглядит так, Давайте сделаем его наследника, который будет таким (справа)<br />
<br />
<br />
<br />
<pre><!--StartFragment--><span style="color: purple;">GreenPanelWithButtons</span>::<span style="color: purple;">GreenPanelWithButtons</span>(<span style="color: purple;">QWidget</span><span style="color: silver;"> </span>*parent)<span style="color: silver;"> </span>:
<span style="color: silver;"> </span><span style="color: purple;">PanelWithButtons</span>(parent)
{
<span style="color: silver;"> </span><span style="color: purple;">QPalette</span><span style="color: silver;"> </span>p<span style="color: silver;"> </span>=<span style="color: silver;"> </span>palette();
<span style="color: silver;"> </span>p.setColor(<span style="color: purple;">QPalette</span>::<span style="color: purple;">Window</span>,<span style="color: silver;"> </span><span style="color: purple;">Qt</span>::<span style="color: purple;">green</span>);
<span style="color: silver;"> </span>setPalette(p);
}<!--EndFragment--></pre>
Естественно мы не хотим писать еще один плагин для такого простого виджета, для того чтобы наш уже имеющийся родительский вижет смог представлять в дизайнере наш новый виджет нам нужно модифицировать код плагина:<br />
<pre><!--StartFragment--><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">PanelWithButtonsPlugin</span>::<span style="font-style: italic;">initialize</span>(<span style="color: purple;">QDesignerFormEditorInterface</span><span style="color: silver;"> </span>*core)
{
...
<span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span><span style="color: silver;"> </span>*widgetItem<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>(<span style="font-style: italic;">name</span>(),<span style="color: silver;"> </span><span style="font-style: italic;">group</span>());
<span style="color: silver;"> </span>widgetItem-><span style="font-style: italic;">setIncludeFile</span>(<span style="font-style: italic;">includeFile</span>());
<span style="color: silver;"> </span>widgetItem-><span style="font-style: italic;">setExtends</span>(<span style="color: green;">"QWidget"</span>);
<span style="color: silver;"> </span>widgetItem-><span style="font-style: italic;">setCustom</span>(<span style="color: olive;">true</span>);
<span style="color: silver;"> </span>core->widgetDataBase()-><span style="font-style: italic;">append</span>(widgetItem);
...
}<!--EndFragment--></pre>
Проблема этого кода в том, что мы на самом деле не имеем доступа к классу <i>WidgetDatabaseBaseItem</i>. Но интерфейс от которого он наследуется <i>QDesignerWidgetDataBaseItemInterface</i>, публичен и поэтому мы можем написать реализацию сами (на самом деле я ее не писал, а умыкнул из исходников <i>Qt Designer</i>) и привожу ниже полностью, хотя она тривиальна:<br />
<br />
<pre><span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>:<span style="color: silver;"> </span><span style="color: olive;">public</span><span style="color: silver;"> </span><span style="color: purple;">QDesignerWidgetDataBaseItemInterface</span>
{
<span style="color: olive;">public</span>:
<span style="color: silver;"> </span><span style="color: olive;">explicit</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&name<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: purple;">QString</span>(),
<span style="color: silver;"> </span><span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&group<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: purple;">QString</span>());
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="font-style: italic;">name</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setName</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&name);
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="font-style: italic;">group</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setGroup</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&group);
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="font-style: italic;">toolTip</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setToolTip</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&toolTip);
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="font-style: italic;">whatsThis</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setWhatsThis</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&whatsThis);
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="font-style: italic;">includeFile</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setIncludeFile</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&includeFile);
<span style="color: silver;"> </span><span style="color: purple;">QIcon</span><span style="color: silver;"> </span><span style="font-style: italic;">icon</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setIcon</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QIcon</span><span style="color: silver;"> </span>&icon);
<span style="color: silver;"> </span><span style="color: olive;">bool</span><span style="color: silver;"> </span><span style="font-style: italic;">isCompat</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setCompat</span>(<span style="color: olive;">bool</span><span style="color: silver;"> </span>compat);
<span style="color: silver;"> </span><span style="color: olive;">bool</span><span style="color: silver;"> </span><span style="font-style: italic;">isContainer</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setContainer</span>(<span style="color: olive;">bool</span><span style="color: silver;"> </span>b);
<span style="color: silver;"> </span><span style="color: olive;">bool</span><span style="color: silver;"> </span><span style="font-style: italic;">isCustom</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setCustom</span>(<span style="color: olive;">bool</span><span style="color: silver;"> </span>b);
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="font-style: italic;">pluginPath</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setPluginPath</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&path);
<span style="color: silver;"> </span><span style="color: olive;">bool</span><span style="color: silver;"> </span><span style="font-style: italic;">isPromoted</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setPromoted</span>(<span style="color: olive;">bool</span><span style="color: silver;"> </span>b);
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="font-style: italic;">extends</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setExtends</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&s);
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">setDefaultPropertyValues</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QList</span><<span style="color: purple;">QVariant</span>><span style="color: silver;"> </span>&list);
<span style="color: silver;"> </span><span style="color: purple;">QList</span><<span style="color: purple;">QVariant</span>><span style="color: silver;"> </span><span style="font-style: italic;">defaultPropertyValues</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">static</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span><span style="color: silver;"> </span>*clone(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QDesignerWidgetDataBaseItemInterface</span><span style="color: silver;"> </span>*item);
<span style="color: silver;"> </span><span style="color: purple;">QStringList</span><span style="color: silver;"> </span>fakeSlots()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span>setFakeSlots(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QStringList</span><span style="color: silver;"> </span>&);
<span style="color: silver;"> </span><span style="color: purple;">QStringList</span><span style="color: silver;"> </span>fakeSignals()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span>setFakeSignals(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QStringList</span><span style="color: silver;"> </span>&);
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>addPageMethod()<span style="color: silver;"> </span><span style="color: olive;">const</span>;
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span>setAddPageMethod(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&m);
<span style="color: olive;">private</span>:
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: maroon;">m_name</span>;
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: maroon;">m_group</span>;
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: maroon;">m_toolTip</span>;
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: maroon;">m_whatsThis</span>;
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: maroon;">m_includeFile</span>;
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: maroon;">m_pluginPath</span>;
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: maroon;">m_extends</span>;
<span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: maroon;">m_addPageMethod</span>;
<span style="color: silver;"> </span><span style="color: purple;">QIcon</span><span style="color: silver;"> </span><span style="color: maroon;">m_icon</span>;
<span style="color: silver;"> </span><span style="color: purple;">uint</span><span style="color: silver;"> </span><span style="color: maroon;">m_compat</span>:<span style="color: silver;"> </span><span style="color: navy;">1</span>;
<span style="color: silver;"> </span><span style="color: purple;">uint</span><span style="color: silver;"> </span><span style="color: maroon;">m_container</span>:<span style="color: silver;"> </span><span style="color: navy;">1</span>;
<span style="color: silver;"> </span><span style="color: purple;">uint</span><span style="color: silver;"> </span><span style="color: maroon;">m_form</span>:<span style="color: silver;"> </span><span style="color: navy;">1</span>;
<span style="color: silver;"> </span><span style="color: purple;">uint</span><span style="color: silver;"> </span><span style="color: maroon;">m_custom</span>:<span style="color: silver;"> </span><span style="color: navy;">1</span>;
<span style="color: silver;"> </span><span style="color: purple;">uint</span><span style="color: silver;"> </span><span style="color: maroon;">m_promoted</span>:<span style="color: silver;"> </span><span style="color: navy;">1</span>;
<span style="color: silver;"> </span><span style="color: purple;">QList</span><<span style="color: purple;">QVariant</span>><span style="color: silver;"> </span><span style="color: maroon;">m_defaultPropertyValues</span>;
<span style="color: silver;"> </span><span style="color: purple;">QStringList</span><span style="color: silver;"> </span><span style="color: maroon;">m_fakeSlots</span>;
<span style="color: silver;"> </span><span style="color: purple;">QStringList</span><span style="color: silver;"> </span><span style="color: maroon;">m_fakeSignals</span>;
};
<span style="color: green;">///////////////////////////////////////////////////////////////////////////////</span>
<span style="color: purple;">WidgetDataBaseItem</span>::<span style="color: purple;">WidgetDataBaseItem</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&name,<span style="color: silver;"> </span><span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&group)
<span style="color: silver;"> </span>:<span style="color: silver;"> </span><span style="color: maroon;">m_name</span>(name),
<span style="color: silver;"> </span><span style="color: maroon;">m_group</span>(group),
<span style="color: silver;"> </span><span style="color: maroon;">m_compat</span>(<span style="color: navy;">0</span>),
<span style="color: silver;"> </span><span style="color: maroon;">m_container</span>(<span style="color: navy;">0</span>),
<span style="color: silver;"> </span><span style="color: maroon;">m_form</span>(<span style="color: navy;">0</span>),
<span style="color: silver;"> </span><span style="color: maroon;">m_custom</span>(<span style="color: navy;">0</span>),
<span style="color: silver;"> </span><span style="color: maroon;">m_promoted</span>(<span style="color: navy;">0</span>)
{
}
<span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">name</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_name</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setName</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&name)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_name</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>name;
}
<span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">group</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_group</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setGroup</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&group)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_group</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>group;
}
<span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">toolTip</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_toolTip</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setToolTip</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&toolTip)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_toolTip</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>toolTip;
}
<span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">whatsThis</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_whatsThis</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setWhatsThis</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&whatsThis)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_whatsThis</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>whatsThis;
}
<span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">includeFile</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_includeFile</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setIncludeFile</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&includeFile)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_includeFile</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>includeFile;
}
<span style="color: purple;">QIcon</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">icon</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_icon</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setIcon</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QIcon</span><span style="color: silver;"> </span>&icon)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_icon</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>icon;
}
<span style="color: olive;">bool</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">isCompat</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_compat</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setCompat</span>(<span style="color: olive;">bool</span><span style="color: silver;"> </span>b)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_compat</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>b;
}
<span style="color: olive;">bool</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">isContainer</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_container</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setContainer</span>(<span style="color: olive;">bool</span><span style="color: silver;"> </span>b)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_container</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>b;
}
<span style="color: olive;">bool</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">isCustom</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_custom</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setCustom</span>(<span style="color: olive;">bool</span><span style="color: silver;"> </span>b)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_custom</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>b;
}
<span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">pluginPath</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_pluginPath</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setPluginPath</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&path)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_pluginPath</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>path;
}
<span style="color: olive;">bool</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">isPromoted</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_promoted</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setPromoted</span>(<span style="color: olive;">bool</span><span style="color: silver;"> </span>b)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_promoted</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>b;
}
<span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">extends</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_extends</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setExtends</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&s)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_extends</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>s;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">setDefaultPropertyValues</span>(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QList</span><<span style="color: purple;">QVariant</span>><span style="color: silver;"> </span>&list)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_defaultPropertyValues</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>list;
}
<span style="color: purple;">QList</span><<span style="color: purple;">QVariant</span>><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::<span style="font-style: italic;">defaultPropertyValues</span>()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_defaultPropertyValues</span>;
}
<span style="color: purple;">QStringList</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::fakeSlots()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_fakeSlots</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::setFakeSlots(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QStringList</span><span style="color: silver;"> </span>&fs)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_fakeSlots</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>fs;
}
<span style="color: purple;">QStringList</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::fakeSignals()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_fakeSignals</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::setFakeSignals(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QStringList</span><span style="color: silver;"> </span>&fs)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_fakeSignals</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>fs;
}
<span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::addPageMethod()<span style="color: silver;"> </span><span style="color: olive;">const</span>
{
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: maroon;">m_addPageMethod</span>;
}
<span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>::setAddPageMethod(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span>&m)
{
<span style="color: silver;"> </span><span style="color: maroon;">m_addPageMethod</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>m;
}
<span style="color: purple;">WidgetDataBaseItem</span><span style="color: silver;"> </span>*<span style="color: purple;">WidgetDataBaseItem</span>::clone(<span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QDesignerWidgetDataBaseItemInterface</span><span style="color: silver;"> </span>*item)
{
<span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span><span style="color: silver;"> </span>*rc<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">WidgetDataBaseItem</span>(item-><span style="font-style: italic;">name</span>(),<span style="color: silver;"> </span>item-><span style="font-style: italic;">group</span>());
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setToolTip</span>(item-><span style="font-style: italic;">toolTip</span>());
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setWhatsThis</span>(item-><span style="font-style: italic;">whatsThis</span>());
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setIncludeFile</span>(item-><span style="font-style: italic;">includeFile</span>());
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setIcon</span>(item-><span style="font-style: italic;">icon</span>());
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setCompat</span>(item-><span style="font-style: italic;">isCompat</span>());
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setContainer</span>(item-><span style="font-style: italic;">isContainer</span>());
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setCustom</span>(item-><span style="font-style: italic;">isCustom</span>()<span style="color: silver;"> </span>);
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setPluginPath</span>(item-><span style="font-style: italic;">pluginPath</span>());
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setPromoted</span>(item-><span style="font-style: italic;">isPromoted</span>());
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setExtends</span>(item-><span style="font-style: italic;">extends</span>());
<span style="color: silver;"> </span>rc-><span style="font-style: italic;">setDefaultPropertyValues</span>(item-><span style="font-style: italic;">defaultPropertyValues</span>());
<span style="color: silver;"> </span><span style="color: green;">// container page method, fake slots and signals ignored here.y</span>
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span>rc;
}<!--EndFragment--></pre>
Естественно стоит не забыть включить необходимые заголовки
<br />
<pre><!--StartFragment--><span style="color: navy;">#include</span><span style="color: silver;"> </span><span style="color: green;"><QDesignerWidgetDataBaseInterface></span>
<span style="color: navy;">#include</span><span style="color: silver;"> </span><span style="color: green;"><QDesignerWidgetDataBaseItemInterface></span><!--EndFragment--></pre>
<pre>Теперь скомпилируем наш плагин, запустим дизайнер и посмотрим, что получилось:</pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPA7hyphenhyphenXFP-6IMBth640iUfm-Te_OnVqrUU1bfLmcOxKa2OBo3qbD1iMAaKLIdJ2_-QYTia6KL_aFsLQbJ5OYMnS0b3JkWHawHFZdHuTk2DKTtN1A-64nPspS54rFhZ3j-P6B_gxII4dXA/s1600/NewPromoted+Class.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPA7hyphenhyphenXFP-6IMBth640iUfm-Te_OnVqrUU1bfLmcOxKa2OBo3qbD1iMAaKLIdJ2_-QYTia6KL_aFsLQbJ5OYMnS0b3JkWHawHFZdHuTk2DKTtN1A-64nPspS54rFhZ3j-P6B_gxII4dXA/s1600/NewPromoted+Class.png" /></a></div>
Как видим наш базовый класс появился в списке базовых классов. а это значит что теперь мы можем его использовать для представления его наследников:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN3c1mQGvXfs2uZaxGcdtxEBQhCzph0Ct_b1LER1WuoIhj5UEj-Cy9IEhQPlHkH4RlT8UaCdL3y3TsVi-oIbPSZqs78G5Qoj0roOY2y5U-52mGGy1qBmmYRnSXGnVHnnjS_uFm6lnwzo8/s1600/GreenPromo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN3c1mQGvXfs2uZaxGcdtxEBQhCzph0Ct_b1LER1WuoIhj5UEj-Cy9IEhQPlHkH4RlT8UaCdL3y3TsVi-oIbPSZqs78G5Qoj0roOY2y5U-52mGGy1qBmmYRnSXGnVHnnjS_uFm6lnwzo8/s1600/GreenPromo.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOXUVrseFUUyMDeslqNeSlqRyd3LYeE5OiygrN3dzjYL5T8xUFlEM97BuIWzwBhE0wzPOBCs8EnqDEpQrPVihX-3Ccgr4W5shdW5euIZAEodRFhNyEA9UU4GHqtpFtP2X0K7HvGk5CjOs/s1600/GreenPromoObjIns.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOXUVrseFUUyMDeslqNeSlqRyd3LYeE5OiygrN3dzjYL5T8xUFlEM97BuIWzwBhE0wzPOBCs8EnqDEpQrPVihX-3Ccgr4W5shdW5euIZAEodRFhNyEA9UU4GHqtpFtP2X0K7HvGk5CjOs/s1600/GreenPromoObjIns.png" /></a></div>
<br />
На этом все.Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com0tag:blogger.com,1999:blog-1430946003933632808.post-86644825774658952832013-01-31T23:28:00.004+04:002013-01-31T23:29:40.423+04:00Qt Designer плагин для виджета содержащего контейнер<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjw4TK26mIv4jnpZ2BNCDTPE3pICdABPcucL38dnwdFm0sVPv1MSIBua5XzaN0qkOxj3T8CRNInZMO-4uAqbl1PztgRT13jBBuyu9ChEz_XrDcNEa-576Ccx8ESqN15cLOhVASuP_SedE/s1600/widget.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjw4TK26mIv4jnpZ2BNCDTPE3pICdABPcucL38dnwdFm0sVPv1MSIBua5XzaN0qkOxj3T8CRNInZMO-4uAqbl1PztgRT13jBBuyu9ChEz_XrDcNEa-576Ccx8ESqN15cLOhVASuP_SedE/s320/widget.png" width="320" /></a></div>
Иногда, довольно таки не часто, но приходится создавать для своих виджетов плагины для <i>Qt Designer</i>. В <i>Assistant</i> отлично расписанно, как создать типовой плагин, мало того <i>Qt Creator</i> имеет отличный <i>wizard</i>, который выполняет большую часть работы. НО... Иногда (совсем редко) случается так, что нужно создать не совсем стандартный плагин. Ниже я буду рассказывать о случае, когда нужен плагин для виджета содержащего внутри себя контейнер, например <i>QFrame</i> или любой другой. Причем необходимо, чтобы этот вложенный контейнер оставался функционален в <i>Qt Designer,</i> и в нем можно было по прежнему размещать другие виджеты. О тонкостях ниже.<br />
<br />
<a name='more'></a>На картинке показан виджет для которого мы будем делать плагин, вот примерный код констурктора такого виджета:<br />
<span style="color: purple;">PanelWithButtons</span>::<span style="color: purple;">PanelWithButtons</span>(<span style="color: purple;">QWidget</span><span style="color: silver;"> </span>*parent)<span style="color: silver;"> </span>:<br />
<pre><span style="color: silver;"> </span><span style="color: purple;">QWidget</span>(parent)
{
<span style="color: silver;"> </span><span style="color: purple;">QVBoxLayout</span><span style="color: silver;"> </span>*layout<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">QVBoxLayout</span>();
<span style="color: silver;"> </span><span style="color: purple;">QFrame</span><span style="color: silver;"> </span>*frame<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">QFrame</span>(<span style="color: olive;">this</span>);
<span style="color: silver;"> </span>frame->setObjectName(<span style="color: purple;">QLatin1String</span>(<span style="color: green;">"InternalFrame"</span>));
<span style="color: silver;"> </span>frame->setFrameShape(<span style="color: purple;">QFrame</span>::<span style="color: purple;">Box</span>);
<span style="color: silver;"> </span>layout->addWidget(frame,<span style="color: silver;"> </span><span style="color: navy;">1</span>);
<span style="color: silver;"> </span><span style="color: purple;">QHBoxLayout</span><span style="color: silver;"> </span>*buttonsLayout<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">QHBoxLayout</span>();
<span style="color: silver;"> </span>buttonsLayout->addWidget(<span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">QPushButton</span>(tr(<span style="color: green;">"OK"</span>),<span style="color: silver;"> </span><span style="color: olive;">this</span>));
<span style="color: silver;"> </span>buttonsLayout->addWidget(<span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">QPushButton</span>(tr(<span style="color: green;">"Cancel"</span>),<span style="color: silver;"> </span><span style="color: olive;">this</span>));
<span style="color: silver;"> </span>layout->addLayout(buttonsLayout);
<span style="color: silver;"> </span>setLayout(layout);
}<!--EndFragment--></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIq3OIS-wHwLlugLiIfY9scA2dYi16prXr32P2I5So7iw87z-TxyFG1WpzFo8TC698F-6QrT5KM0B2hoqNNVu_6IJGtO_oXRRWpnu17S_tENIBLwvgPlNvgJfw3bT1fZCMCnEltmAzesc/s1600/ObjectInsp.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIq3OIS-wHwLlugLiIfY9scA2dYi16prXr32P2I5So7iw87z-TxyFG1WpzFo8TC698F-6QrT5KM0B2hoqNNVu_6IJGtO_oXRRWpnu17S_tENIBLwvgPlNvgJfw3bT1fZCMCnEltmAzesc/s400/ObjectInsp.png" width="400" /></a></div>
Все предельно просто, а на картинке справа, то, как наш виджет будет выглядеть в <i>Object Inspector'</i>е.<br />
<br />
<br />
<br />
<br />
<br />
<br />
Для того, чтобы получить такой эффект, нам необходимо внести внутренний <i>QFrame</i> под наблюдение <i>Qt Designer'</i>а, для этого потребуется:<br />
<ol>
<li>Получить инстанс <i>QDesignerFormWindowManagerInterface</i>, это делается в методе <i>initialize</i> плагина, таким образом:
<pre><!--StartFragment--><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">PanelWithButtonsPlugin</span>::<span style="font-style: italic;">initialize</span>(<span style="color: purple;">QDesignerFormEditorInterface</span><span style="color: silver;"> </span>*core)
{
<span style="color: silver;"> </span><span style="color: olive;">if</span><span style="color: silver;"> </span>(<span style="color: maroon;">m_initialized</span>)
<span style="color: silver;"> </span><span style="color: olive;">return</span>;
<span style="color: silver;"> </span>
<span style="color: silver;"> </span><span style="color: maroon;">m_manager</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span>core->formWindowManager();
<span style="color: silver;"> </span><span style="color: navy;">Q_ASSERT</span>(<span style="color: maroon;">m_manager</span>);
<span style="color: silver;"> </span><span style="color: maroon;">m_initialized</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: olive;">true</span>;
}</pre>
<i>Q_ASSERT</i> нужен только для пущей уверенности при разработке.</li>
<li>Теперь в методе <i>createWidget</i> мы будем регистрировать наш фрейм:
<pre><!--StartFragment--><span style="color: purple;">QWidget</span><span style="color: silver;"> </span>*<span style="color: purple;">PanelWithButtonsPlugin</span>::<span style="font-style: italic;">createWidget</span>(<span style="color: purple;">QWidget</span><span style="color: silver;"> </span>*parent)
{
<span style="color: silver;"> </span><span style="color: purple;">PanelWithButtons</span><span style="color: silver;"> </span>*panel<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">PanelWithButtons</span>(parent);
<span style="color: silver;"> </span><span style="color: purple;">QDesignerFormWindowInterface</span><span style="color: silver;"> </span>*window<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: maroon;">m_manager</span>-><span style="font-style: italic;">activeFormWindow</span>();
<span style="color: silver;"> </span><span style="color: olive;">if</span><span style="color: silver;"> </span>(window<span style="color: silver;"> </span>&&<span style="color: silver;"> </span>parent<span style="color: silver;"> </span>==<span style="color: silver;"> </span>window-><span style="font-style: italic;">mainContainer</span>())<span style="color: silver;"> </span>{
<span style="color: silver;"> </span><span style="color: purple;">QFrame</span><span style="color: silver;"> </span>*frame<span style="color: silver;"> </span>=<span style="color: silver;"> </span>panel->findChild<QFrame<span style="color: silver;"> </span>*>();
<span style="color: silver;"> </span><span style="color: navy;">Q_ASSERT</span>(frame);
<span style="color: silver;"> </span>window-><span style="font-style: italic;">manageWidget</span>(frame);
<span style="color: silver;"> </span>}
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span>panel;
}<!--EndFragment--></pre>
Главная тонкость кроется в условии, дело в том, что метод <i>createWidget</i> вызывается в трех случаях:<br />1. Когда запускается <i>Qt Designer</i>.<br />2. Когда мышка начинает тащить виджет с панели на форму.<br />3. И когда виджет, наконец-то, размещается на форме.<br />Так вот, регистрировать внутренний виджет нужно только в третьем случае, иначе это приведет к крашу дизайнера. Первая часть условия в коде выше отбрасывает первый случай, если <i>window</i> пуст, значит речь идет о первичном запуске. Вторая часть условия обрабатывает второй случай, и значит буквально следующее: "если существует активное окно и это окно является родителем для нашего только что созданного виджета". Во втором случае виджет создается лишь для того, чтобы отображаться рядом с курсором, пока вы его тащите на форму, и этот инстанс будет уничтожен сразу же, как только виджет окажется на форме, следовательно для него нет необходимости вносить внутренний фрейм под наблюдение.</li>
<li>Для того, чтобы все это заработало, необходимо добавить следующие заголовки:
<pre><!--StartFragment--><span style="color: navy;">#include</span><span style="color: silver;"> </span><span style="color: green;"><QDesignerFormEditorInterface></span>
<span style="color: navy;">#include</span><span style="color: silver;"> </span><span style="color: green;"><QDesignerFormWindowManagerInterface></span>
<span style="color: navy;">#include</span><span style="color: silver;"> </span><span style="color: green;"><QDesignerFormWindowInterface></span><!--EndFragment--></pre>
</li>
</ol>
На этом все.Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com4tag:blogger.com,1999:blog-1430946003933632808.post-74128206616649228582012-05-12T15:33:00.005+04:002012-05-14T22:12:51.384+04:00QWebView с прозрачным фоном поверх Phonon::VideoWidgetПередо мной встала задача добиться размещения виджета <i>QWebView</i> поверх работающего <i>Phonon::VideoWidget</i>, таким образом, чтобы <i>background</i> был прозрачен и выводимый на <i>QWebView</i> текст отображался непосредственно поверх видеоряда.<br />
<br />
Ниже я расскажу, почему это проблематично сделать, и какой <i>workaround</i> я нашел.<br />
<br />
<a name='more'></a>Проблема состоит в том что <i>phonon-backend</i>, например <i>GStreamer</i> рисует видеоряд в <i>Linux</i> напрямую через <i>XRender</i>, путем длительного гугления и всяческих тестов я убедился, что невозможно вывести прозрачный <i>QWidget</i> поверх видеоряда, в любом случае получается черная подложка. Т. е. изначально, я пробовал такой вариант кода:<br />
<div>
<div class="cpp-qt geshi" style="background-color: white; color: #363534; font-family: Verdana, 'DejaVu Sans', Geneva, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;">
<ol style="color: #afafaf; list-style-image: initial; list-style-position: inside; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;">
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_video <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=</span> <span class="kw1" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">new</span> Phonon<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">VideoWidget</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
.....</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<a href="http://qt-project.org/doc/QWebView.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QWebView</span></a> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">*</span>view <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=</span> <span class="kw1" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">new</span> <a href="http://qt-project.org/doc/QWebView.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QWebView</span></a><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>mVideo<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setHtml</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="st0" style="color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">"<div style=<span class="es1" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">\"</span>color:#FFFFFF;font-size:36px;<span class="es1" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">\"</span>>Hello Qt!</div>"</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<a href="http://qt-project.org/doc/QPalette.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QPalette</span></a> palette <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=</span> view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">page</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">palette</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
palette.<span class="me1" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setBrush</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/QPalette.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QPalette</span></a><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Base</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">,</span> <a href="http://qt-project.org/doc/Qt.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Qt</span></a><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">transparent</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setPalette</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>palette<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setAttribute</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/Qt.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Qt</span></a><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">WA_OpaquePaintEvent</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">,</span> <span class="kw2" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">false</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_video<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">show</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_video<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">resize</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="nu0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">640</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">,</span> <span class="nu0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">480</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setFixedSize</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>m_video<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">width</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">,</span> m_video<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">height</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
</ol>
</div>
<div style="background-color: white; color: #363534; font-family: Verdana, 'DejaVu Sans', Geneva, sans-serif; font-size: 12px; margin-bottom: 10px; margin-top: 5px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; word-wrap: break-word;">
<b style="color: black; font-family: 'Times New Roman'; font-size: medium; text-align: -webkit-auto;">ЭТОТ ВАРИАНТ НЕ РАБОТАЕТ!</b></div>
</div>
<div>
Тогда я решил попробовать поискать обходной путь и нашел его. Основная идея в том чтобы сделать оверлейный виджет отдельным окном с отключенным оформлением, причем такой, чтобы он был привязан к <i>VideoWidget</i> таким образом, чтобы мог перемещаться и менять размеры вслед за ним. </div>
<div>
<br /></div>
<div>
Сначала наследуем новый класс от видео виджета и переопределяем <i>event</i> методы таким образом, чтобы автоматически изменять геометрию оверлейного виджета в зависимости от геометрии видео виджета:</div>
<div>
<div class="cpp-qt geshi" style="background-color: white; color: #363534; font-family: Verdana, 'DejaVu Sans', Geneva, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;">
<ol style="color: #afafaf; list-style-image: initial; list-style-position: inside; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;">
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw2" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">class</span> OverlayedVideoWidget <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">:</span> <span class="kw2" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">public</span> Phonon<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">VideoWidget</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">{</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw2" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">public</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">:</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
OverlayedVideoWidget<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/QWidget.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QWidget</span></a> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">*</span>parent <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=</span> <span class="nu0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">0</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">:</span></div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
Phonon<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">VideoWidget</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>parent<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">,</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_overlayWidget<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="nu0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">0</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">{</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw4" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">void</span> setOverlayWidget<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/QWidget.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QWidget</span></a> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">*</span>widget<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">{</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_overlayWidget <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=</span> widget<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw2" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">protected</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">:</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw4" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">void</span> moveEvent<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/QMoveEvent.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QMoveEvent</span></a> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">*</span>event<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">{</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw1" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">if</span> <span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>m_overlayWidget<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_overlayWidget<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">move</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>event<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">pos</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw4" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">void</span> resizeEvent<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/QResizeEvent.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QResizeEvent</span></a> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">*</span>event<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">{</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw1" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">if</span> <span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>m_overlayWidget<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_overlayWidget<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">resize</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>event<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">size</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw4" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">void</span> hideEvent<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/QHideEvent.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QHideEvent</span></a> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">*</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">{</span></div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw1" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">if</span> <span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>m_overlayWidget<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_overlayWidget<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">hide</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw4" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">void</span> showEvent<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/QShowEvent.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QShowEvent</span></a> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">*</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">{</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw1" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">if</span> <span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>m_overlayWidget<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_overlayWidget<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">show</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw4" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">void</span> closeEvent<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/QCloseEvent.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QCloseEvent</span></a> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">*</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">{</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw1" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">if</span> <span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>m_overlayWidget<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_overlayWidget<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">close</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</span></div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="kw2" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">private</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">:</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<a href="http://qt-project.org/doc/QWidget.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QWidget</span></a> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">*</span>m_overlayWidget<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
</ol>
</div>
</div>
<div>
Таким образом мы добиваемся того, чтобы оверлейный виджет всегда находился над виджетом с видеорядом и имел точно такие же размеры.</div>
<div>
<br /></div>
<div>
А теперь подключаем виджет:</div>
<div class="cpp-qt geshi" style="background-color: white; font-family: Verdana, 'DejaVu Sans', Geneva, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;">
<ol style="list-style-image: initial; list-style-position: inside; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;">
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_video <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=</span> <span class="kw1" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">new</span> OverlayedVideoWidget<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<a href="http://qt-project.org/doc/QWebView.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QWebView</span></a> <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">*</span>view <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=</span> <span class="kw1" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">new</span> <a href="http://qt-project.org/doc/QWebView.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QWebView</span></a><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setHtml</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="st0" style="color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">"<div style=<span class="es1" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">\"</span>color:#FFFFFF;font-size:36px;<span class="es1" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">\"</span>>Hello Qt!</div>"</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<a href="http://qt-project.org/doc/QPalette.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QPalette</span></a> palette <span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=</span> view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">page</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">palette</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
palette.<span class="me1" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setBrush</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/QPalette.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QPalette</span></a><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Base</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">,</span> <a href="http://qt-project.org/doc/Qt.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Qt</span></a><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">transparent</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setPalette</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>palette<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">page</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setPalette</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>palette<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setAttribute</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/Qt.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Qt</span></a><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">WA_OpaquePaintEvent</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">,</span> <span class="kw2" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">false</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setAttribute</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/Qt.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Qt</span></a><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">WA_TranslucentBackground</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">,</span> <span class="kw2" style="color: #d20020; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">true</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<div style="color: black;">
view<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setWindowFlags</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><a href="http://qt-project.org/doc/Qt.html" style="color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Qt</span></a><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::</span><span class="me2" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">ToolTip | </span><a href="http://qt-project.org/doc/Qt.html" style="background-color: white; color: #44a51c; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"><span class="kw5" style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Qt</span></a><span class="sy0" style="background-color: white; color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">::FramelessWindowHint</span><span class="br0" style="background-color: white; color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="background-color: white; color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
</div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_video<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">setOverlayWidget</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span>view<span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li2" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de2" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_video<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">show</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
<li class="li1" style="background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: #afafaf; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 32px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 12px; padding-right: 0px; padding-top: 0px;"><div class="de1" style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
m_video<span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">-></span><span class="me3" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">resize</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">(</span><span class="nu0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">640</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">,</span> <span class="nu0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">480</span><span class="br0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">)</span><span class="sy0" style="color: #363534; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">;</span></div>
</li>
</ol>
</div>
<div>
Вся соль идеи в <b>11</b> и <b>12</b> строках. Мы делаем оверлейный виджет окном специального типа, который не имеет заголовка, не отображается в панели задач и имеет прозрачный <i>background</i>.</div>
<div>
Поскольку наше "окно" привязано к <span class="Apple-style-span" style="background-color: white; line-height: 14px;"><span class="Apple-style-span" style="font-family: inherit;"><i>OverlayedVideoWidget </i>оно все время будет как бы парить над ним, создавая эффект единого целого.</span></span></div>
<div>
<span class="Apple-style-span" style="background-color: white; line-height: 14px;"><span class="Apple-style-span" style="font-family: inherit;"><br /></span></span></div>
<div>
<span class="Apple-style-span" style="background-color: white; line-height: 14px;"><span class="Apple-style-span" style="font-family: inherit;">На этом все.</span></span></div>
<div>
<br /></div>
<div>
<br /></div>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com0tag:blogger.com,1999:blog-1430946003933632808.post-18064633497842773832012-02-09T14:22:00.000+04:002012-02-09T14:24:24.459+04:00Небольшая задачка по C++Пришла в голову маленькая задачка на тонкости C++. Решил опубликовать.<br />
<br />
<a name='more'></a><span style="font-size: large;">Первая итерация задачи (простая, на внимательность):</span><br />
<pre><span style="color: navy;">#include</span><span style="color: silver;"> </span><span style="color: green;"><iostream></span>
<span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">Base</span><span style="color: silver;"> </span>
{
<span style="color: olive;">protected</span>:
<span style="color: silver;"> </span><span style="color: olive;">virtual</span><span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">protectedVirtualMethod</span>()<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: navy;">0</span>;
};
<span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">A</span>:<span style="color: silver;"> </span><span style="color: olive;">public</span><span style="color: silver;"> </span><span style="color: purple;">Base</span><span style="color: silver;"> </span>
{
<span style="color: olive;">public</span>:
<span style="color: silver;"> </span><span style="color: purple;">A</span>():<span style="color: silver;"> </span><span style="color: purple;">Base</span>()<span style="color: silver;"> </span>
<span style="color: silver;"> </span>{
<span style="color: silver;"> </span>}
<span style="color: silver;"> </span>
<span style="color: olive;">protected</span>:
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">protectedVirtualMethod</span>()<span style="color: silver;"> </span>
<span style="color: silver;"> </span>{
<span style="color: silver;"> </span><span style="color: purple;">std</span>::cout<span style="color: silver;"> </span><<<span style="color: silver;"> </span><span style="color: green;">"A"</span><span style="color: silver;"> </span><<<span style="color: silver;"> </span><span style="color: purple;">std</span>::endl;
<span style="color: silver;"> </span>}
};
<span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">B</span><span style="color: silver;"> </span>:<span style="color: silver;"> </span><span style="color: olive;">public</span><span style="color: silver;"> </span><span style="color: purple;">Base</span><span style="color: silver;"> </span>
{
<span style="color: olive;">public</span>:
<span style="color: silver;"> </span><span style="color: purple;">B</span>():<span style="color: silver;"> </span><span style="color: purple;">Base</span>()<span style="color: silver;"> </span>
<span style="color: silver;"> </span>{
<span style="color: silver;"> </span><span style="color: maroon;">a</span><span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">A</span>();
<span style="color: silver;"> </span>}
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span>callProtected()<span style="color: silver;"> </span>
<span style="color: silver;"> </span>{
<span style="color: silver;"> </span><span style="font-style: italic;">protectedVirtualMethod</span>();
<span style="color: silver;"> </span>}
<span style="color: olive;">protected</span>:
<span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">protectedVirtualMethod</span>()<span style="color: silver;"> </span>
<span style="color: silver;"> </span>{
<span style="color: silver;"> </span><span style="color: purple;">std</span>::cout<span style="color: silver;"> </span><<<span style="color: silver;"> </span><span style="color: green;">"B"</span><span style="color: silver;"> </span><<<span style="color: silver;"> </span><span style="color: purple;">std</span>::endl;
<span style="color: silver;"> </span><span style="color: maroon;">a</span>-><span style="font-style: italic;">protectedVirtualMethod</span>();
<span style="color: silver;"> </span>}
<span style="color: olive;">private</span>:
<span style="color: silver;"> </span><span style="color: purple;">Base</span><span style="color: silver;"> </span>*<span style="color: maroon;">a</span>;
};
<span style="color: olive;">int</span><span style="color: silver;"> </span>main()
{
<span style="color: silver;"> </span><span style="color: purple;">B</span><span style="color: silver;"> </span>b;
<span style="color: silver;"> </span>b.callProtected();
<span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: navy;">0</span>;
}</pre>
Скомпилируется ли этот код? Почему? Если скомпилируется, то какой будет вывод?<br />
<b>Ответ (надо выделить):</b><span style="color: white;"> Нет, не скомпилируется, ошибка доступа к <i>a->protectedVirtualMethod()</i>, нельзя вызывать <i>protected</i> методы не из своей иерархии.</span><br />
<br />
<span style="font-size: large;">Вторая итерация задачи (на чутье):</span><br />
Изменим <i>Base</i> таким образом<br />
<pre><span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">Base</span><span style="color: silver;"> </span>
{
<span style="color: silver;"> </span><span style="color: olive;">friend</span><span style="color: silver;"> </span><span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">B</span>;
<span style="color: olive;">protected</span>:
<span style="color: silver;"> </span><span style="color: olive;">virtual</span><span style="color: silver;"> </span><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="font-style: italic;">protectedVirtualMethod</span>()<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: navy;">0</span>;
};
</pre>
<br />
Теперь скомпилируется? Почему? Что выведет?<br />
<b>Ответ (надо выделить):</b> <span style="color: white;">Скомпилируется, <i>B</i> теперь друг класса <i>Base</i> и может вызывать любые его методы, Виртуальные методы будут работать как им и положено, выведет: <i>B A.</i></span><br />
<span style="font-size: large;">Третья итерация задачи (закрепляем материал):</span><br />
Меняем в классе <i>B</i> тип <i>*a</i> на <i>A</i><br />
<pre><span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">B</span><span style="color: silver;"> </span>:<span style="color: silver;"> </span><span style="color: olive;">public</span><span style="color: silver;"> </span><span style="color: purple;">Base</span><span style="color: silver;"> </span>
{
<span style="color: silver;">//.......</span>
<span style="color: olive;">private</span>:
<span style="color: silver;"> </span><span style="color: purple;">A</span><span style="color: silver;"> </span>*<span style="color: maroon;">a</span>;
};</pre>
<br />
Вопросы те же.<br />
<b>Ответ (надо выделить):</b><span style="color: white;"> Не скомпилируется, по той же причине, что и в первом случае, потому что друзья не наследуются.</span>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com2tag:blogger.com,1999:blog-1430946003933632808.post-26299954352777341522012-02-03T14:06:00.001+04:002012-02-03T14:06:57.255+04:00Presentation of MeeGo Harmattan Native Look TimePicker and DatePiker components<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="200" src="http://habrastorage.org/storage1/ed96227f/300983ba/2c359f7e/e2ef186d.png" /> <img border="0" height="200" src="http://habrastorage.org/storage2/8d1/55b/23f/8d155b23f47efd911186f64ce911e6bd.png" /></div>
<div style="text-align: justify;">
<span style="text-align: left;">Few months ago I'm began to learn </span><i style="text-align: left;">MeeGo</i><span style="text-align: left;"> </span><i style="text-align: left;">Qt Components</i><span style="text-align: left;">. I noticed many cool native components, which </span><i style="text-align: left;">Nokia</i><span style="text-align: left;"> using in own application, not exists in </span><i style="text-align: left;">Qt Components</i><span style="text-align: left;">. I very like </span><i style="text-align: left;">Nokia</i><span style="text-align: left;"> </span><i style="text-align: left;">TimePicker</i><span style="text-align: left;"> component (you can see it, when you choose alarm time in clock application). I decided create own </span><i style="text-align: left;">TimePicker</i><span style="text-align: left;"> component with same design and functionality. Yesterday, I finished </span><i style="text-align: left;">DatePicker</i><span style="text-align: left;"> component too.</span></div>
<div style="text-align: justify;">
<div style="text-align: left;">
Components is a free and distributed under <i>BSD Licence</i>. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, under cut, you find few words about using of this components, and link to repository.</div>
</div>
<a name='more'></a><br />
<span style="font-size: large;">TimePicker</span><br />
<i>TimePicker</i> is a simple component. It is only one file<i> TimePicker.qml</i>.<br />
<br />
Example of using:<br />
<div class="content" style="background-color: white; line-height: 1.1em; margin-bottom: 0.0em; overflow-x: hidden; overflow-y: hidden;">
<pre style="font-family: Verdana, sans-serif; font-size: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;"><code class="javascript" style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; display: block; font-size: 12px; padding-bottom: 0.6em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;"> TimePicker {
id: timePicker
anchors.centerIn: parent
<span class="function"><span class="keyword" style="color: #4d7386;">function</span> <span class="title">orientationSuffix</span><span class="params">()</span> {</span>
<span class="keyword" style="color: #4d7386;">if</span> (screen.currentOrientation === Screen.Portrait || screen.currentOrientation === Screen.PortraitInverted )
<span class="keyword" style="color: #4d7386;">return</span> <span class="string" style="color: #339900;">"portrait"</span>
<span class="keyword" style="color: #4d7386;">else</span>
<span class="keyword" style="color: #4d7386;">return</span> <span class="string" style="color: #339900;">"landscape"</span>
}
backgroundImage: <span class="string" style="color: #339900;">"image://theme/meegotouch-timepicker-light-1-"</span> + orientationSuffix()
hourDotImage: <span class="string" style="color: #339900;">"image://theme/meegotouch-timepicker-disc-hours-"</span> + orientationSuffix()
minutesDotImage: <span class="string" style="color: #339900;">"image://theme/meegotouch-timepicker-disc-minutes-"</span> + orientationSuffix()
}
</code><div>
</div>
</pre>
</div>
<span style="font-family: inherit;">On this listing you can see I using native images sources, but you can set own. All three images should be square and should have same pixel size. You will need draw hours/minutes dots on transparent square png.
For getting current time you can use two properties <b>hours</b> and <b>minutes</b>, and its <i>changed signals</i>, of course. </span><br />
<span style="font-size: large;"><br /></span><br />
<span style="font-size: large;">DatePicker</span><br />
DatePicker more complicated then TimePicker. Group of files provides DataPicker:<br />
<br />
<ul>
<li><i>DatePicker.qml</i> - base component; </li>
<li><i>DateModel.qml</i> - current selected month model;</li>
<li><i>DataPickerStyle.qml</i> - style configuration container;</li>
<li><i>WeekCell.qml</i> - Week day name cell.</li>
<li><i>DayCell.qml</i> - Day number delegate.</li>
</ul>
<br />
Example of using:<br />
<div class="content" style="background-color: white; margin-bottom: 0.83em; overflow-x: hidden; overflow-y: hidden;">
<pre style="padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"><code class="javascript" style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; display: block; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;"> DatePicker { </code><code class="javascript" style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; display: block; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;"> id: datePicker
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
}
<span class="function" style="font-family: Verdana, sans-serif; font-size: 12px; line-height: 1.1em; white-space: pre-wrap;"><span class="keyword" style="color: #4d7386;"> function</span> <span class="title">orientationString</span><span class="params">()</span> {</span><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12px; line-height: 1.1em; white-space: pre-wrap;">
</span></span><span class="keyword" style="color: #4d7386; font-family: Verdana, sans-serif; font-size: 12px; line-height: 1.1em; white-space: pre-wrap;">if</span><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12px; line-height: 1.1em; white-space: pre-wrap;"> (screen.currentOrientation === Screen.Portrait || screen.currentOrientation === Screen.PortraitInverted )
</span></span><span class="keyword" style="color: #4d7386; font-family: Verdana, sans-serif; font-size: 12px; line-height: 1.1em; white-space: pre-wrap;">return</span><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12px; line-height: 1.1em; white-space: pre-wrap;"> </span></span><span class="string" style="color: #339900; font-family: Verdana, sans-serif; font-size: 12px; line-height: 1.1em; white-space: pre-wrap;">"portrait"</span><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12px; line-height: 1.1em; white-space: pre-wrap;">
</span></span><span class="keyword" style="color: #4d7386; font-family: Verdana, sans-serif; font-size: 12px; line-height: 1.1em; white-space: pre-wrap;">else</span><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12px; line-height: 1.1em; white-space: pre-wrap;">
</span></span><span class="keyword" style="color: #4d7386; font-family: Verdana, sans-serif; font-size: 12px; line-height: 1.1em; white-space: pre-wrap;">return</span><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12px; line-height: 1.1em; white-space: pre-wrap;"> </span></span><span class="string" style="color: #339900; font-family: Verdana, sans-serif; font-size: 12px; line-height: 1.1em; white-space: pre-wrap;">"landscape"</span><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12px; line-height: 1.1em; white-space: pre-wrap;">
}
platformStyle: DatePickerStyle {
orientationString: datePicker.orientationString()
}
}
</span></span></code><div style="font-family: Verdana, sans-serif; font-size: 1em; line-height: 1.1em; white-space: pre-wrap;">
</div>
</pre>
</div>
You can override design of <i>DatePicker</i> with help of <i>DatePickerStyle</i> component. It is simple container of properties.<br />
For selection concrete date use function <i>setDate(), </i>for set/unset event marker you can use <i>setEvent() </i>function, it takes two parameters - event date and enable flag. <b>Event markers can be sets only on selected month so far.</b><br />
For getting current selected date you can use selectedDateChanged signal. It has one parameter - current selected date.<br />
<br />
Both components not dependence of any Qt components, It means you can using components on any platform (with own images sources, of course).<br />
<br />
<a href="http://www.google.com/uds/css/small-logo.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" onclick="document.location.href='http://translate.google.com/';" src="http://www.google.com/uds/css/small-logo.png" style="background-color: rgba(200, 200, 200, 0.292969) !important; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; border-top-left-radius: 20px; border-top-right-radius: 20px; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 3px !important; position: absolute !important; right: 1px !important; top: -20px !important; z-index: -1 !important;" /></a><br />
You can download code from <i>Gitorious</i>: <a href="https://gitorious.org/harmattan-timepicker">Harmattan Native Look Components</a><br />
<br />
<b>P. S.</b> If you have any suggestions, questions, comments, bug reports - welcome.Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com6tag:blogger.com,1999:blog-1430946003933632808.post-9332732265202559662011-12-20T13:38:00.000+04:002011-12-20T13:38:34.751+04:00Qt AmbassadorToday my project -<a href="http://va-sorokin.blogspot.com/p/nfc-tag-tool.html"> NFC Tag Tool</a> has been accepted to <a href="http://qt.nokia.com/qt-in-use/ambassadors/project?id=a0F2000000BDk3REAT">Qt Ambassador Program</a>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-hBwAqka6r2E/TvBSek1k5JI/AAAAAAAABV0/mKHbyEscQrc/s1600/qt_ambassador_logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://3.bp.blogspot.com/-hBwAqka6r2E/TvBSek1k5JI/AAAAAAAABV0/mKHbyEscQrc/s400/qt_ambassador_logo.png" width="400" /></a></div>
<br />
<div id="-chrome-auto-translate-plugin-dialog" style="background-attachment: initial !important; background-clip: initial !important; background-color: transparent !important; background-image: initial !important; background-origin: initial !important; background-position: initial initial !important; background-repeat: initial initial !important; display: none; left: 0px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; opacity: 1 !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: absolute !important; text-align: left !important; top: 0px; z-index: 999999 !important;">
<div style="-webkit-border-radius: 10px !important; background-color: #363636 !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); border-color: #000000 !important; border-width: 0px !important; color: #fafafa !important; font-size: 16px !important; max-width: 300px !important; opacity: 0.8 !important; overflow: visible !important; padding: 8px !important; text-align: left !important; z-index: 999999 !important;">
<div class="translate">
</div>
<div class="additional">
</div>
</div>
<img onclick="document.location.href='http://translate.google.com/';" src="http://www.google.com/uds/css/small-logo.png" style="-webkit-border-radius: 20px; background-color: rgba(200, 200, 200, 0.3) !important; cursor: pointer !important; margin: 0 !important; padding: 3px 5px 0 !important; position: absolute !important; right: 1px !important; top: -20px !important; z-index: -1 !important;" /></div>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com0tag:blogger.com,1999:blog-1430946003933632808.post-60676148439964879202011-11-14T00:50:00.001+04:002012-02-09T15:11:26.328+04:00How to hide unused languages in Swype on Nokia N9New <i>Harmattan</i> firmware <b>20.2011.40-4</b> brought <i>Swype</i> keyboard to <i>N9</i> device. It's really cool, but has one problem if you want using more one language. You can't choose only needed languages for langswitсher in swype keyboard. So if you want change keyboard layout you need longtap on switcher button and choose layout from list, or tap much times on switcher button until find your layout.<br />
It's really uncomfortably!<br />
Under cut I show how you can hide unused languages.<br />
<a name='more'></a>So, first what you needed is developer-mode. You can enable it in<i> Settings->Security->Developer Mode</i>.<br />
Now, you need edit <i><b>/usr/share/swype/data/languages.lst</b></i>, and remove unused languages from this file. For access to this file you need root access:<br />
<ol>
<li>Start <i>Terminal </i>application</li>
<li>Enter <i>devel-su</i></li>
<li>Enter password: <i>rootme</i> as default</li>
<li>Enter <i>vi /usr/share/swype/lan<span style="font-family: inherit;">guages.list</span></i></li>
<li style="text-align: left;"><span style="font-family: inherit;">Edit file and save (see <i>man vi </i>for help)*</span></li>
</ol>
<div style="text-align: left;">
<span style="font-family: inherit;"><b>*</b>Make sure that you did not add new line code to file , it's make your swype nonworking. Do not use <i>nano </i>for edit, it always add 0x0A symbol to end of file.</span></div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
Done. Now only needed languages are in your Swype.</div>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com1tag:blogger.com,1999:blog-1430946003933632808.post-72795517505149388382011-11-03T21:26:00.001+04:002011-11-06T21:12:10.762+04:00Qt Developers Day 2011. MunichНа прошлой неделе я принимал участие в главном событии для людей занимающихся Qt Framework. Ниже небольшой рассказ об этом.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-VEsWDsUfATM/TqVHrpx9PhI/AAAAAAAAAlg/9WeevLsmlaY/s1600/231020111536.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-VEsWDsUfATM/TqVHrpx9PhI/AAAAAAAAAlg/9WeevLsmlaY/s320/231020111536.jpg" width="320" /></a></div>
<br />
<a name='more'></a><span style="font-size: large;">День первый</span><br />
В первый день проходили тренинги, и я даже был зарегистрирован на "Глубокое погружение", однако, так туда и не попал, потому что отправился послушать разговоры на Contribution Summit<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-WaiQ9mRVlok/Tq-68erRLWI/AAAAAAAAAms/Nx4TorPYyME/s1600/241020111577.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="http://2.bp.blogspot.com/-WaiQ9mRVlok/Tq-68erRLWI/AAAAAAAAAms/Nx4TorPYyME/s200/241020111577.jpg" width="150" /></a><a href="http://2.bp.blogspot.com/-iZ9eYrACt1w/TqVHsnUrZyI/AAAAAAAAAl0/LhfYAf0dynY/s1600/241020111579.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="http://2.bp.blogspot.com/-iZ9eYrACt1w/TqVHsnUrZyI/AAAAAAAAAl0/LhfYAf0dynY/s200/241020111579.jpg" width="150" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaWkyeFXfmFt-ywV6-k44nSsI1uS6qiP8eUHMA59haMhepVxqiJNFh-cHPvNhTb-2sIROEJS3l9zzipvZ-HcrXsSMy9ooQXtRCs45C_xdiFc3lg61twBhEl5AybkTLJSyeGUvS9UR7tFs/s1600/241020111581.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaWkyeFXfmFt-ywV6-k44nSsI1uS6qiP8eUHMA59haMhepVxqiJNFh-cHPvNhTb-2sIROEJS3l9zzipvZ-HcrXsSMy9ooQXtRCs45C_xdiFc3lg61twBhEl5AybkTLJSyeGUvS9UR7tFs/s200/241020111581.jpg" width="150" /></a></div>
<br />
Данное мероприятие проходило несколько в стороне от всех остальных и проводилось в формате <i>unconference, </i>что означает что рассписание выступлений составлялось с утра в ходе обсуждений, собственно вопросы, которые должны были подниматься перечислены на фото справа. А на фото в центре процесс составления собственно расписания.<br />
<br />
<div id="-chrome-auto-translate-plugin-dialog" style="background-attachment: initial !important; background-clip: initial !important; background-color: transparent !important; background-image: initial !important; background-origin: initial !important; display: none; left: 254px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; opacity: 1 !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: absolute !important; text-align: left !important; top: 2158px; z-index: 999999 !important;">
<div style="-webkit-border-radius: 10px !important; background-color: #363636 !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); border-color: #000000 !important; border-width: 0px !important; color: #fafafa !important; font-size: 16px !important; max-width: 300px !important; opacity: 0.8 !important; overflow: visible !important; padding: 8px !important; text-align: left !important; z-index: 999999 !important;">
<div class="translate">
кексы</div>
<div class="additional">
</div>
</div>
<img onclick="document.location.href='http://translate.google.com/';" src="http://www.google.com/uds/css/small-logo.png" style="-webkit-border-radius: 20px; background-color: rgba(200, 200, 200, 0.3) !important; cursor: pointer !important; margin: 0 !important; padding: 3px 5px 0 !important; position: absolute !important; right: 1px !important; top: -20px !important; z-index: -1 !important;" /></div>
<div class="" style="clear: both; text-align: left;">
Я выбрал для себя несколько обсуждений, которые хотелось бы послушать, это были:</div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Аналог <a href="http://www.cpan.org/">CPAN</a> для Qt. </b></div>
<div class="" style="clear: both; text-align: left;">
<a href="http://2.bp.blogspot.com/-N7udxOK8Y3U/Tq-69v2K9_I/AAAAAAAAAnE/XneRUu4hCpw/s1600/241020111588.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-N7udxOK8Y3U/Tq-69v2K9_I/AAAAAAAAAnE/XneRUu4hCpw/s320/241020111588.jpg" width="320" /></a>Забавный на мой взгляд проект, вы можете ознакомится с ним на сайте <a href="http://inqlude.org/" style="text-align: -webkit-auto;">inqlude.org</a>, смысл его заключается в том чтобы собрать в одном месте все <i>3rdParty</i> библиотеки написанные с использованием <i>Qt</i> в одном месте. А также распространнять некоторое приложение, которое автоматически сможет обновлять эти библиотеки в вашей системе. На мой взгляд неплохая идея, но реализация кажется крайне странной. Впрочем, судя по всему, проект стартовал за несколько недель до <i>QtDD</i>, так что, поживем - увидим.</div>
<div class="separator" style="clear: both; text-align: left;">
<b>Уменьшение времени запуска Qt Quick приложений</b></div>
<div class="separator" style="clear: both; text-align: left;">
К моему стыду, я почти спал на этом выступлении, и никак не мог уловить суть обсуждения, было понятно лишь одно - ребята обсуждали местами крайне низкоуровневые оптимизации скорости запуска Qt Quick приложений.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Qt порт на Android</b></div>
<div class="separator" style="clear: both; text-align: left;">
Лекцию проводил <a href="http://qt.nokia.com/qtdevdays2011/speakers#senyk">Tomas Senyk</a>, он рассказывал о реализации порта на андройд, которая делается в рамках проекта <i>Neccessitas.</i> Впрочем, насколько я понял, это его участие в проекте это хобби, и занимается он им в свободное время.</div>
<div class="separator" style="clear: both; text-align: left;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Raspberry Pi и Qt 5</b></div>
<div class="separator" style="clear: both; text-align: left;">
К большому моему сожалению я не попал на эту сессию, т.к. было мое время стоять на рекламном стенде компании, в которой я работаю.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Закончился первый день пьянкой от платинового спонсора (<i>Digia</i>) и розыгрышем <i>Kindle</i>.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">День второй</span></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="" style="clear: both;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzdyBAUmvFh56hyCiu8S1pjyJHTH8dbssauuue1BlDTiHwXmFa0Fc84vEpINc3MFsroQVSCFX_dqzeaAs63uyL5W6GUMiDP4x_pTLfrslxvgOeS7CUPL05T5E7dMkcUsmSJkwuebkaly4/s1600/251020111596.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzdyBAUmvFh56hyCiu8S1pjyJHTH8dbssauuue1BlDTiHwXmFa0Fc84vEpINc3MFsroQVSCFX_dqzeaAs63uyL5W6GUMiDP4x_pTLfrslxvgOeS7CUPL05T5E7dMkcUsmSJkwuebkaly4/s200/251020111596.jpg" width="200" /></a>Второй день начался с <i>Keynotes</i> на которых выступили люди из <i>Nokia, Ubuntu</i> и <i>CNN</i>. В самой первой сессии от <i>Nokia</i> рассказывалось о том как все хорошо и замечательно в мире Qt, показывали всякие бодрые графики и т.д., вообщем классическая вступительная часть.</div>
<div class="separator" style="clear: both;">
<a href="http://1.bp.blogspot.com/-MDMSSjejmCc/Tq-6-RraXoI/AAAAAAAAAnQ/UO2F0JWhs5c/s1600/251020111612.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="http://1.bp.blogspot.com/-MDMSSjejmCc/Tq-6-RraXoI/AAAAAAAAAnQ/UO2F0JWhs5c/s200/251020111612.jpg" width="200" /></a>Выступление Рика Спенсера(<i>Rick Spencer</i>) из <i>Ubuntu</i>, было более жизнеутверждающим, потому как он рассказывал, что "отныне и навеки" Qt и Ubuntu будут дружить :)</div>
<div class="" style="clear: both;">
<a href="http://4.bp.blogspot.com/-YXLEBtW_Ow4/Tq-6_cNzcjI/AAAAAAAAAnk/UMGfUARVWEM/s1600/251020111621.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-YXLEBtW_Ow4/Tq-6_cNzcjI/AAAAAAAAAnk/UMGfUARVWEM/s320/251020111621.jpg" width="320" /></a>Выступление CNN я не слушал, ушел постоять на стенде и перекусить, ну а после CNN собственно было самое главное ключевое выступление Ларса(<i>Lars Knoll</i>). Он рассказал про новую модель контрибуции и ее основные принципы, про Qt Project, про то что нас ждет в Qt 4.8 и в Qt 5, про нацеленность на QML для построения UI, про модульность в Qt 5 и тому подобное.</div>
<div class="" style="clear: both;">
Также на <i>Keynotes</i> проводился розыгрыш N9, суть конкурса заключалась в том, что у участников на бейджах были расставлены точки красного и синего цвета, в результате розыгрыша телефон получили все, у кого были синие точки. Впрочем на моем бейдже точек небыло вообще, что не помешало мне получить телефон. Об этом я писал в предыдущем посте.</div>
<div class="" style="clear: both;">
<br /></div>
<div class="" style="clear: both;">
Собственно, после этого начались технические сессии, и надо признатся я не вылезал из <i>Qt Labs</i> сессий фактически оба дня, и об этом ниже.</div>
<div class="" style="clear: both;">
<span style="font-family: inherit;"><br /></span></div>
<div class="" style="clear: both;">
</div>
<h3 style="background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<strong><span style="font-family: inherit; font-size: small;">Using Qt Quick and the new Qt graphics stack, Scene Graph</span></strong></h3>
<div>
<span style="font-family: inherit;">Глубокий расссказ на тему перехода на Qt Scene Graph, объяснение как все работает изнутри, примеры как создавать кастомные компоненты, пересказать просто не смогу.</span></div>
<div>
<b><span style="font-family: inherit;"><br /></span></b></div>
<div>
<h3 style="background-color: white; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<strong><span style="font-family: inherit; font-size: small;">Qt Quick Components for Desktop</span></strong></h3>
</div>
<div>
<span style="font-family: inherit; font-size: small;">Блестящая live сессия во время которой, был создан готовый музыкальный проигрыватель на QML, c разбиением на плейлисты, треки и показом обложки альбома. Показаны работающие примеры таких сложных копонентов как таблица (аналог QTableWidget), Toolbar, разные типы меню, кнопок, слайдеров сплиттеров и многое другое.</span></div>
<div>
<strong><span style="font-family: inherit; font-size: small;"><br /></span></strong></div>
<div>
<b style="font-family: inherit;">What's new in Qt Quick 2.0</b><br />
<span style="background-color: white;"><span style="font-family: inherit;">Очень </span>впечатлявшая<span style="font-family: inherit;"> меня лекция, не смотря на то, что я далек от игростроя, а большинство примеров относились как раз к игровому направлению. Было показано множество примеров использования новых возможностей </span></span><span style="font-family: inherit;"><i>Qt Quick 2.0 </i>в частности QtQuick.Particles.</span></div>
<div>
<strong><span style="font-family: inherit; font-size: small;"><br /></span></strong></div>
<div>
<b><span style="font-family: inherit;">QPA - The Qt Platform Abstraction</span></b></div>
<div>
Эту лекцию я слушал в пол-уха, и пошел на нее потому что просто больше некуда было пойти, обсуждались очень специфичные вещи, касающиеся переноса Qt на различные платформы.</div>
<div>
<span style="font-family: Times, 'Times New Roman', serif;"><b><br /></b></span></div>
<br />
<div class="" style="clear: both;">
<br /></div>
<div class="" style="clear: both;">
<a href="http://1.bp.blogspot.com/-YpEH3QOjsoY/Tq-7ArlneGI/AAAAAAAAAn0/PTPndqjfo9I/s1600/251020111645.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="http://1.bp.blogspot.com/-YpEH3QOjsoY/Tq-7ArlneGI/AAAAAAAAAn0/PTPndqjfo9I/s200/251020111645.jpg" width="200" /></a>Во время кофе-брейка мы поедали <i>Muffins</i> любезно приготовленные<i> </i>нашими немецкими коллегами по Qt Developer Network.</div>
<div class="" style="clear: both;">
<br /></div>
<div class="" style="clear: both;">
<br /></div>
<div class="" style="clear: both;">
<a href="http://4.bp.blogspot.com/-2Jhka_rMktg/Tq-6_59QZZI/AAAAAAAAAno/RQlyEXMdc1o/s1600/251020111644.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="http://4.bp.blogspot.com/-2Jhka_rMktg/Tq-6_59QZZI/AAAAAAAAAno/RQlyEXMdc1o/s200/251020111644.jpg" width="200" /></a>Хочется отметить, что аудитория Qt Labs практически на всех сессиях была забита людьми под завязку, люди стояли, сидели на полу, заглядывали в дверь, даже дополнительные стулья появивишиеся в конце второго дня не спасли ситуацию.</div>
<div class="" style="clear: both;">
А после сессий, началась дискотека в стиле Oktoberfest</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXEljRkV4NhlBA1Y2nBfbnT2IEFK1PuKpH6v7rd5RTpXjaP3l4BkXuLd-Txlx20f306ADbDBcrmiTyemmtn2MmJ0yTaYbDyGswbNHtOxpAi5kBTQj5JMRwb3ouzQgJsO_EOR-nzjOtYmk/s1600/251020111654.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="http://1.bp.blogspot.com/-PVkhS-p-Gww/Tq-7BoN9U2I/AAAAAAAAAoE/sxw7o7yz7Jo/s1600/251020111655.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-PVkhS-p-Gww/Tq-7BoN9U2I/AAAAAAAAAoE/sxw7o7yz7Jo/s320/251020111655.jpg" width="240" /></a><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXEljRkV4NhlBA1Y2nBfbnT2IEFK1PuKpH6v7rd5RTpXjaP3l4BkXuLd-Txlx20f306ADbDBcrmiTyemmtn2MmJ0yTaYbDyGswbNHtOxpAi5kBTQj5JMRwb3ouzQgJsO_EOR-nzjOtYmk/s320/251020111654.jpg" width="320" /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY8rf4LUa9bv34QpcSK5aSAAm2kVjVYzibKer-7F-pd8LNTrYV-C4iIGRFMv7MG6su_5Xjb3PAJiD62VpnTNMIZ5x3oQd-zICBKV3vTFfAwwZ1IhpbsPaoGrMh-_JSVSdFFRJMCdQ_VAo/s1600/251020111664.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwBO5tYvTbptDi3ep2544sstzYL0C-OxmxQpRdYSJrGBRRLau1g2Imzy0FGzFKsG-w_hMEwPTIbYCvMnjM605A9mnGu_3vEnK0FkHWCl_G2xY3_mv8NctTyp7dcDxDsVkygQDAcl-ebxo/s1600/251020111653.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwBO5tYvTbptDi3ep2544sstzYL0C-OxmxQpRdYSJrGBRRLau1g2Imzy0FGzFKsG-w_hMEwPTIbYCvMnjM605A9mnGu_3vEnK0FkHWCl_G2xY3_mv8NctTyp7dcDxDsVkygQDAcl-ebxo/s200/251020111653.jpg" width="200" /></a><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY8rf4LUa9bv34QpcSK5aSAAm2kVjVYzibKer-7F-pd8LNTrYV-C4iIGRFMv7MG6su_5Xjb3PAJiD62VpnTNMIZ5x3oQd-zICBKV3vTFfAwwZ1IhpbsPaoGrMh-_JSVSdFFRJMCdQ_VAo/s200/251020111664.jpg" width="200" /><br />
<div class="" style="clear: both;">
<br /></div>
<div class="" style="clear: both;">
<span style="font-size: large;">День третий</span></div>
<div class="" style="clear: both;">
<span style="background-color: white;"><b><span style="font-family: inherit;">Dance, Dance QML Revolution - Using Qt for MeeGo development</span></b></span></div>
<div class="" style="clear: both;">
<span style="font-family: inherit;">Это сессия моего коллеги из ICS, на которой он рассмотрел две игровые программы написанные с использованием Qt/QML. Первая из них носит название<i> Dance, Dance Revolution </i>и преставляет из себя приложение взаимодействующей с танцевальным полом с датчиками, которое проигрывает мелодию, а игрок должен в правильный момент наступить на нужный датчик - очень напоминает <i>Guitar Hero</i>, только вместо клавиатуры - танцевальный пол.</span></div>
<div class="" style="clear: both;">
<span style="font-family: inherit;">Второй игрой была игра под названием <i>Kolobok</i>, это классический 2D <i>Adventure</i>, самым близким примером будут небезызвестные братья Марио.</span></div>
<div class="" style="clear: both;">
<span style="background-color: white;"><b><span style="font-family: inherit;"><br /></span></b></span></div>
<div class="" style="clear: both;">
<b><span style="font-family: inherit;">Persistent Object Storage for Qt Quick</span></b></div>
<div class="" style="clear: both;">
<span style="font-family: inherit;">На этой лекции расказывали про <a href="https://gitorious.org/+qt-developers/qt/qtjsondb">QtJsonDb</a> - глобальную NoSQL СУБД для QML приложений. суть ее заключается в общем хранилище данных для всех приложений, это </span>например имеет смысл, если вы хотите получать в своих приложениях данные из записной книги телефона без каких либо дополнительных API и расходов. Наиболее похожей на данную систему существующей реализаций я могу назвать Qt Messaging Framework, с той лишь разницей, что он был ориентирован исключиетльно на хранение данных относящихся к пользовательским сообщениям (IM, EMail, SMS, MMS), Здесь же речь идет о хранилище в более широком смысле этого понятия.</div>
<div class="" style="clear: both;">
<b><span style="font-family: inherit;"><br /></span></b></div>
<div class="" style="clear: both;">
<b><span style="font-family: inherit;">How to contribute to Qt</span></b></div>
<div class="" style="clear: both;">
На мой взгляд одна из ключевых лекций на этой конференции. Мариус и Тьяго, в режиме <i>online</i> показали как контрибьютить в Qt, как происходит Code Review, как происходит одобрение или отклонение того или иного изменения, а также рассказали про систему раннего обнаружения ошибок и про систему Continues Integration (CI).</div>
<div class="" style="clear: both;">
<b><span style="font-family: inherit;"><br /></span></b></div>
<div class="" style="clear: both;">
<b><span style="font-family: inherit;">Qt 5 roadmap - Getting into the details</span></b></div>
<div class="" style="clear: both;">
<span style="font-family: Times, 'Times New Roman', serif;">Ключевая сессия, краткое резюме:</span></div>
<div class="" style="clear: both;">
<span style="font-family: Times, 'Times New Roman', serif;">1. Модульность<br />2. </span><span style="font-family: Times, 'Times New Roman', serif;">Qt Quick 2.0</span></div>
<div class="" style="clear: both;">
<span style="font-family: Times, 'Times New Roman', serif;">3. QWidget вместе со всеми наследниками переезжает в модуль QtWidgets. Этот модуль больше не будет разрабатываться Nokia, но каждый праве продолжать контрибьютить в него.</span></div>
<div class="" style="clear: both;">
<span style="font-family: Times, 'Times New Roman', serif;">4. Десктопный UI будет постепенно переведен на Qt Components</span></div>
<div class="" style="clear: both;">
<span style="font-family: Times, 'Times New Roman', serif;">5. Строгая система выпуска релизов.</span></div>
<div class="" style="clear: both;">
<span style="font-family: Times, 'Times New Roman', serif;">6. Релиз Qt 5 к середине 2012 года.</span></div>
<div class="" style="clear: both;">
<b><span style="font-family: Times, 'Times New Roman', serif;"><br /></span></b></div>
<div>
<div class="" style="clear: both;">
<span style="font-size: large;">Заключение</span></div>
<div class="" style="clear: both;">
Выше перечислено далеко не все, что удалось увидеть и услышать на конференции, поэтому, крайне рекомендую всем желающим не пропустить это мероприятие в следующем году.</div>
</div>
<div>
В заключение хочу вставить официальный видео-ролик, если вы его еще не видели, на 2:43 можно наблюдать меня с командой остальных модераторов <a href="http://developer.qt.nokia.com/">Qt Developer Network</a></div>
<div>
<br /></div>
<div>
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/FQMtg7pL82A" width="560"></iframe></div>
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com6tag:blogger.com,1999:blog-1430946003933632808.post-21779902098464293262011-11-03T14:03:00.004+04:002011-11-17T17:54:10.566+04:00Воскрешаем мертвый Nokia N9Недавно я посетил <a href="http://qt.nokia.com/qtdevdays2011">Qt Developer Days</a> в Мюнхене, и получил там в качестве награды за работу модератором на <a href="http://developer.qt.nokia.com/">Qt Developer Network</a> новенький <i>Nokia N9</i> c <i>Harmattan</i> на борту. Вернувшись домой я решил с ним поиграться, но как известно, <i>Linux</i> не та операционная система, которая прощает пользователю его ошибки, особенно если они сделаны с правами <i>root. </i>Таким образом, мой новый телефон в первый же день превратился в высокотехнологичный, глянцевый кирпич.<br />
Ниже краткая инструкция, как вернуть девайс обратно к жизни.<br />
<br />
<a name='more'></a>Итак перво-наперво необходимо скачать весь нужный stuff для прошивки:<br />
<br />
<ol>
<li><b>Flasher</b> - собственно утилита для шитья, я брал виндовую версию <a href="https://dl.dropbox.com/u/26659227/drag2up/drar_flasher.zip">отсюда</a>, а вот <a href="http://tablets-dev.nokia.com/maemo-dev-env-downloads.php">здесь</a> можно найти версии для дркгих операционных систем. (32-bit версия, не запустится на 64-bit OS)</li>
<li><b>Драйвера для кабеля </b>можно взять <a href="http://nds1.nokia.com/files/support/global/phones/software/Nokia_Connectivity_Cable_Driver_rus.msi">здесь</a>. Опять же для Windows, не уверен на счет других осей.</li>
<li><b>NaviFirm</b> - программа для закачки прошивки, качать <a href="http://www.symbian-toys.com/navifirm.aspx#download">здесь</a>. </li>
</ol>
<div>
Теперь с помощью <i>NaviFirm </i>нужно выкачать прошивку версии не младше той что уже есть на вашем телефоне. На моем была<i> 10.2011.34-1_PR_009</i>, такая прошивка на данный момент доступна только для Германии, например для России есть только <i>PR_001</i>, а например для Австралии <i>PR_005</i>. Т. е., если на вашем телефоне стоит <i>PR_001</i> то вы можете выбрать любую. </div>
<div>
Расписывать как работает программа я не буду, в ней легко разобраться, это не займет у вас более 5 минут, если же ничего не получится, то стоит задуматься - а надо ли вообще браться самому за такое опасное дело как прошивка телефона. С помощью этой программы из всего комплекта файлов, которые предлагются для выкачивание на потребуется только один, самый большой с расширением <b>.bin.</b> </div>
<div>
<br /></div>
<div>
После того как вы выкачали файл, положите его рядом с флешером и запустите<i> Command Prompt. </i>И перейдите в директорию с флешером. Не забодьте установить драйвер кабеля и воткнуть кабель в компьютер.</div>
<div>
<br /></div>
<div>
Теперь необходимо в консоли выполнить команду:</div>
<blockquote class="tr_bq">
<i>flasher.exe -F <имя файла прошивки>.bin -f</i></blockquote>
Флешер запустится и будет ждать когда вы подключите телефон к кабелю. <b>Внимание!: Прошивать можно только полностью выключенный телефон, Убедитесь, что ваш телефон выключен!</b><br />
<b><br /></b><br />
Если все прошло нормально и версия прошивки удовлетворяет требованием, то на экране компьютера будут какоето время бегать цифры с процентами (примерно 10 минут), а потом все закончится.<br />
<br />
Теперь необходимо отключить телефон от кабеля, как только вы выдерните кабель телефон самостоятельно включится, и через некоторое время на нем появится круглая стрелк, символизирующая процесс обновления. Эта стрелка будет гореть примерно 20-30 минут.<br />
После этого телефон снова выключится.<br />
<br />
Включаем его и ждем стандартного первого запуска. Собственно все, если вы все сделали правильно вы, получите полностью рабочий телефон.<br />
<br />
--<br />
<b>Disclamer</b>: В этой заметке, я поделился, исключительно, своим опытом и описал действия, которые производил сам. Используйте эти рекомендации на свой страх и риск, я не несу никакой отвественности за порчу вашего имущества, в следствие использования приведенных выше советов.<br />
<b><br /></b><br />
<br />
<br />
<div id="-chrome-auto-translate-plugin-dialog" style="background-attachment: initial !important; background-clip: initial !important; background-color: transparent !important; background-image: initial !important; background-origin: initial !important; display: none; left: 16px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; opacity: 1 !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: absolute !important; text-align: left !important; top: 998px; z-index: 999999 !important;">
<div style="-webkit-border-radius: 10px !important; background-color: #363636 !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); border-color: #000000 !important; border-width: 0px !important; color: #fafafa !important; font-size: 16px !important; max-width: 300px !important; opacity: 0.8 !important; overflow: visible !important; padding: 8px !important; text-align: left !important; z-index: 999999 !important;">
<div class="translate">
Условия использования</div>
<div class="additional">
</div>
</div>
<img onclick="document.location.href='http://translate.google.com/';" src="http://www.google.com/uds/css/small-logo.png" style="-webkit-border-radius: 20px; background-color: rgba(200, 200, 200, 0.3) !important; cursor: pointer !important; margin: 0 !important; padding: 3px 5px 0 !important; position: absolute !important; right: 1px !important; top: -20px !important; z-index: -1 !important;" /></div>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com0tag:blogger.com,1999:blog-1430946003933632808.post-39182977517196246752011-10-03T19:38:00.001+04:002013-04-19T18:10:35.572+04:00I'm Qt Certified SpecialistToday I passed Core C++ for Qt Developers exam. Second step done!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJgHDbLS20fcrfDnOrMOP7Z1Aj4JJVzvl4LbCJQzPnhbkowGVQN-Gn2E5NHNggf0MzFvY3ZW7JWQzKDepIqkroBTXA2qDl2n8ByorkVDoTIPUTvbaIywHgYANmOFDhQpWkXO7fkim3JhY/s1600/digia+certified+qt+specialist+logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJgHDbLS20fcrfDnOrMOP7Z1Aj4JJVzvl4LbCJQzPnhbkowGVQN-Gn2E5NHNggf0MzFvY3ZW7JWQzKDepIqkroBTXA2qDl2n8ByorkVDoTIPUTvbaIywHgYANmOFDhQpWkXO7fkim3JhY/s1600/digia+certified+qt+specialist+logo.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<a name='more'></a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://moikrug.ru/img/6212/attachment/a_251538938_pic_l" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="467" src="http://moikrug.ru/img/6212/attachment/a_251538938_pic_l" width="640" /></a></div>
<br /></div>
Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com1tag:blogger.com,1999:blog-1430946003933632808.post-8558094134510680672011-08-04T15:35:00.001+04:002012-10-23T16:23:03.402+04:00Пишем свой QR-Code генератор. Введение в QR-Code.<div class="separator" style="clear: both; text-align: center;">
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/9/9b/Wikipedia_mobile_en.svg/296px-Wikipedia_mobile_en.svg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/9b/Wikipedia_mobile_en.svg/296px-Wikipedia_mobile_en.svg.png" width="200" /></a></div>
<span class="Apple-style-span" style="font-size: large;">Введение.</span><br />
Сейчас стало популярным использовать QR код для передачи информации в сети, например ссылки для мобильных устройств, а также данные контактов и прочее. Интернет наводнен различными генераторами кодов, мобайл маркеты наполнены программами для распознавания.<br />
Вот и я решил немного разобраться в этом вопросе. Мне не интересен процесс распознавания, меня заинтересовало именно процесс создания QR кода.<br />
Сейчас я нахожусь в стадии разработки Qt библиотеки для генерации QR кода. Если звезды не переменят своего положения, то данная библиотека увидит свет осенью.<br />
Попутно постараюсь описывать здесь шаги которые нужно предпринять для данной работы. Однако, же как всегда, это не будет полным руководством или переводом документации, я не буду рассматривать здесь ВСЕ темы, только базовые вещи, которые нужно знать, чтобы понять как оно устроено.<br />
<br />
<a name='more'></a>Итак, первое что нужно знать про QR код, что он стандартизован и стандарт называется <span class="Apple-style-span" style="background-color: white; color: #333333;">ISO/IEC18004, его можно легко найти в интернете в виде pdf файла, и вобщем-то это единственная исчерпывающая документация по данному вопросу.</span><br />
<span class="Apple-style-span" style="background-color: white; color: #333333;"><br /></span>
<span class="Apple-style-span" style="background-color: white; color: #333333; font-size: large;">Шаги. Как превратить текст в QR-Code</span><br />
<span class="Apple-style-span" style="color: #333333;"><b>Шаг 1. Определяем тип данных</b></span><br />
<span class="Apple-style-span" style="color: #333333;">В простом случае (а сложные я здесь не рассматриваю) существует четыре типа данных:</span><br />
<br />
<ul>
<li><span class="Apple-style-span" style="color: #333333;">Арабские цифры</span></li>
<li><span class="Apple-style-span" style="color: #333333;">Арабские цифры + латинские заглавные буквы а также пробел, $%*-+/.:</span></li>
<li><span class="Apple-style-span" style="color: #333333;">Бинарный - любая байтовая последовательность</span></li>
<li><span class="Apple-style-span" style="color: #333333;">Канзи-иероглифы</span></li>
</ul>
<div>
<span class="Apple-style-span" style="color: #333333;">Соответственно, чтобы продолжать работу, необходимо определить с каким типом данных мы работаем. Это легко делается c помощью QRegExp</span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><br /></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><b>Шаг 2. Определяем версию QR кода.</b></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;">Теперь имея тип данных, длину данных и предположение о том какой уровень коррекции от ошибок нам необходим, мы можем выбрать версию QR-Code. Понятие "версия" в данном случае подразумевает размер символа (квадрата) QR кода. Всего существует 40 версий. Первая имеет размер 21x21 точек, каждая следующая на 4 больше. Существует 4 уровня коррекции ошибок:</span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><br /></span></div>
<span class="Apple-style-span" style="background-color: white; color: #333333;"></span><br />
<table border="0" cellpadding="3" cellspacing="0" class="bd1" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; text-align: center; width: 320px;"><tbody>
<tr align="center" bgcolor="#EECCCC"><td class="bdu" colspan="2" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-width: 1px;">Качество коррекции ошибок QR Code</td></tr>
<tr><td align="center" class="bdur" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-width: 1px;" width="35%">Уровень L</td><td align="center" class="bdu" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-width: 1px;" width="65%">~7%</td></tr>
<tr><td align="center" class="bdur" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-width: 1px;" width="35%">Уровень M</td><td align="center" class="bdu" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-width: 1px;" width="65%">~15%</td></tr>
<tr><td align="center" class="bdur" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-width: 1px;" width="35%">Уровень Q</td><td align="center" class="bdu" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-width: 1px;" width="65%">~25%</td></tr>
<tr><td align="center" class="bdr" style="border-bottom-color: rgb(204, 204, 204); border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-width: 1px;" width="35%">Уровень H</td><td align="center" width="65%">~30%</td></tr>
</tbody></table>
<span class="Apple-style-span" style="background-color: white; color: #333333;">
</span><span class="Apple-style-span" style="background-color: white; color: #333333;">Для обычного использования в принципе достаточно уровня M, более высокие уровни нужны для печати наклеек для товаров, у которых есть вероятность стереться или повредиться при перевозке.</span><br />
<div>
<div>
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="background-color: white;"><br /></span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;">Теперь для того, чтобы вычислить версию, необходимо свериться с таблицей описанной <a href="http://www.qrcode.com/en/vertable1.html">здесь</a>.</span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><br /></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><b>Шаг 3. Заполняем шаблон неизменяемыми служебными данными.</b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/QR_Code_Structure_Example_2.svg/300px-QR_Code_Structure_Example_2.svg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="179" src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/QR_Code_Structure_Example_2.svg/300px-QR_Code_Structure_Example_2.svg.png" width="320" /></a></div>
<div>
<span class="Apple-style-span" style="color: #333333;">На картинки из wikipedia видно, что неизменяемыми являются элементы Position, которые всегда стоят в трех углах, timing pattern и alignment pattern. На самом деле количество alignment элементов варьируется от версии, равно как и их место положение, о этом следующий шаг.</span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="background-color: white;"> </span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="background-color: white;"><br /></span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="background-color: white;"><br /></span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="background-color: white;"><br /></span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="background-color: white;"><br /></span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="background-color: white;"><b>Шаг 4. Расставляем alignment элементы</b></span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="background-color: white;">Данный элемент вообще не ставится для первой версии, в последующих версиях его количество меняется на каждой седьмой версии.</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="background-color: white;">В соответствие с таблицей:</span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-sK4mhsHmG5IH9pF8mvwLS9pci-x4KN0Ky5nggIPwcnNLRuInWjQoeVBz_7OG9PB2-IRHzTKQWBAa2Fyu7WXwuI53CBpIg9gqYPryz8ZUE5aaf91gGopO0ExOR4H6ErtwMU7z6r_Cryk/s1600/alignment.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-sK4mhsHmG5IH9pF8mvwLS9pci-x4KN0Ky5nggIPwcnNLRuInWjQoeVBz_7OG9PB2-IRHzTKQWBAa2Fyu7WXwuI53CBpIg9gqYPryz8ZUE5aaf91gGopO0ExOR4H6ErtwMU7z6r_Cryk/s1600/alignment.png" /></a></div>
<div>
<span class="Apple-style-span" style="color: #333333;">Цифры написанные в колонках описывают координаты alignment блоков по принципу каждое с каждым, те элементы, координаты которых пересекаются с Position блоками, не ставятся.</span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><br /></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><b>Шаг 5. Информация о версии.</b></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;">Информацию о версии можно вычислить, об этом смотрите стандарт, но в том же стандарте есть уже вычисленные числа для каждой версии. Я предпочел воспользоваться ими, кстати, для версии меньше седьмой информация о версии вообще не пишется. Для остальных версий эта информация записывается в блоки отмеченные на картинке выше синим цветом, оба блока идентичны, хотя порядок заполнения разный. Заполнение обоих блоков можно произвести за один проход:</span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><br /></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;">
</span><br />
<pre style="text-indent: 0px;"><span class="Apple-style-span" style="color: #333333;"><span style="color: olive;">void</span><span style="color: silver;"> </span><span style="color: purple;">QRCodeMatrix</span><span style="color: black;">::</span>setVersionInformation<span style="color: black;">()</span></span></pre>
<span class="Apple-style-span" style="color: #333333;">
</span>
<pre style="text-indent: 0px;"><span class="Apple-style-span" style="color: #333333;"><span style="color: black;">{</span></span></pre>
<span class="Apple-style-span" style="color: #333333;">
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: olive;">int</span><span style="color: silver;"> </span><span style="color: black;">versionInfoBitStreamSize</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: navy;">18</span><span style="color: black;">;</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">if</span><span style="color: silver;"> </span><span style="color: black;">(</span><span style="color: maroon;">m_info</span><span style="color: black;">.</span>codeVersion<span style="color: black;">()</span><span style="color: silver;"> </span><span style="color: black;"><</span><span style="color: silver;"> </span><span style="color: navy;">7</span><span style="color: black;">)</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: black;">;</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">int</span><span style="color: silver;"> </span><span style="color: black;">versionInformation</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: maroon;">m_versionInfo</span><span style="color: black;">[</span><span style="color: maroon;">m_info</span><span style="color: black;">.</span>codeVersion<span style="color: black;">()];</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">int</span><span style="color: silver;"> </span><span style="color: black;">firstCoordinate</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span>symbolSizeForVersion<span style="color: black;">(</span><span style="color: maroon;">m_info</span><span style="color: black;">.</span>codeVersion<span style="color: black;">())</span><span style="color: silver;"> </span><span style="color: black;">-</span><span style="color: silver;"> </span><span style="color: black;">(</span>positionSquareSize<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: navy;">1</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">-</span><span style="color: silver;"> </span><span style="color: navy;">3</span><span style="color: black;">;</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">int</span><span style="color: silver;"> </span><span style="color: black;">secondCoordinate</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: navy;">0</span><span style="color: black;">;</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">for</span><span style="color: silver;"> </span><span style="color: black;">(</span><span style="color: olive;">int</span><span style="color: silver;"> </span><span style="color: black;">i</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: navy;">0</span><span style="color: black;">;</span><span style="color: silver;"> </span><span style="color: black;">i</span><span style="color: silver;"> </span><span style="color: black;"><</span><span style="color: silver;"> </span><span style="color: black;">versionInfoBitStreamSize</span><span style="color: black;">;</span><span style="color: silver;"> </span><span style="color: black;">++</span><span style="color: black;">i</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">{</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">bool</span><span style="color: silver;"> </span><span style="color: black;">value</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: black;">versionInformation</span><span style="color: silver;"> </span><span style="color: black;">%</span><span style="color: silver;"> </span><span style="color: navy;">2</span><span style="color: black;">;</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">versionInformation</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: black;">versionInformation</span><span style="color: silver;"> </span><span style="color: black;">>></span><span style="color: silver;"> </span><span style="color: navy;">1</span><span style="color: black;">;</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span>setSystemPoint<span style="color: black;">(</span><span style="color: black;">firstCoordinate</span><span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">secondCoordinate</span><span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">value</span><span style="color: black;">);</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span>setSystemPoint<span style="color: black;">(</span><span style="color: black;">secondCoordinate</span><span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">firstCoordinate</span><span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">value</span><span style="color: black;">);</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">++</span><span style="color: black;">firstCoordinate</span><span style="color: black;">;</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">if</span><span style="color: silver;"> </span><span style="color: black;">((</span><span style="color: black;">firstCoordinate</span><span style="color: silver;"> </span><span style="color: black;">-</span><span style="color: silver;"> </span><span style="color: black;">(</span>symbolSizeForVersion<span style="color: black;">(</span><span style="color: maroon;">m_info</span><span style="color: black;">.</span>codeVersion<span style="color: black;">())</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"></span><span style="color: black;"> -</span><span style="color: silver;"> </span><span style="color: black;">(</span>positionSquareSize<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: navy;">1</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">-</span><span style="color: silver;"> </span><span style="color: navy;">3</span><span style="color: black;">))</span><span style="color: silver;"> </span><span style="color: black;">%</span><span style="color: silver;"> </span><span style="color: navy;">3</span><span style="color: silver;"> </span><span style="color: black;">==</span><span style="color: silver;"> </span><span style="color: navy;">0</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">{</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">firstCoordinate</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span>symbolSizeForVersion<span style="color: black;">(</span><span style="color: maroon;">m_info</span><span style="color: black;">.</span>codeVersion<span style="color: black;">())</span><span style="color: silver;"> </span></pre>
<pre style="text-indent: 0px;"><span style="color: black;"> -</span><span style="color: silver;"> </span><span style="color: black;">(</span>positionSquareSize<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: navy;">1</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">-</span><span style="color: silver;"> </span><span style="color: navy;">3</span><span style="color: black;">;</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">++</span><span style="color: black;">secondCoordinate</span><span style="color: black;">;</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">}</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">if</span><span style="color: silver;"> </span><span style="color: black;">(</span><span style="color: black;">secondCoordinate</span><span style="color: silver;"> </span><span style="color: black;">%</span><span style="color: silver;"> </span><span style="color: navy;">6</span><span style="color: silver;"> </span><span style="color: black;">==</span><span style="color: silver;"> </span><span style="color: navy;">0</span><span style="color: black;">)</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">secondCoordinate</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: navy;">0</span><span style="color: black;">;</span></pre>
<pre style="text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">}</span></pre>
<pre style="text-indent: 0px;"><span style="color: black;">}</span></pre>
</span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><br /></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"><b>Про следующие шаги напишу в следующий раз. Однако, ниже их кратенький обзор.</b></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><br /></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><b>Шаг 5. Вычисление битовой последовательности.</b></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;">Вычисление битовой последовательности зависит в первую очередь от типа данных, который мы получили на первом шаге.</span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><br /></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"></span><br />
<div style="color: black;">
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="color: #333333;"><b>Шаг 6. Вычисление битовой последовательности корректирующих кодов.</b></span></span></div>
<span class="Apple-style-span" style="color: #333333;">
</span>
<div>
<span class="Apple-style-span" style="color: #333333;">Вычисление корректирующих кодов зависит как от битовой последовательности полученной на 5 шаге, так и от уровня ECC выбранном нами на шаге втором.</span></div>
<span class="Apple-style-span" style="color: #333333;">
<div>
<br /></div>
</span><span class="Apple-style-span" style="color: #333333;"><b>Шаг 7. Заполнение данными</b></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;">Данные разбиваются на блоки по 8 бит, расположение блоков может варьироваться друг относительно друга, на это в основном влияют смещения от "препятствия" таких как alignment блоки.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFJ41CcHNzfgDcLbeLTKHkYtUFSAt3gwoStnmDCdWA0-ZS6Uzqb29Lptro4ohO3kBM2g63nBw2oB9fob909SHs_Vz5t5a99hQ7kNIL9fh8mL33eoHVAZ3qV15ClgSHnOzhn4AmSJohs40/s1600/data.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFJ41CcHNzfgDcLbeLTKHkYtUFSAt3gwoStnmDCdWA0-ZS6Uzqb29Lptro4ohO3kBM2g63nBw2oB9fob909SHs_Vz5t5a99hQ7kNIL9fh8mL33eoHVAZ3qV15ClgSHnOzhn4AmSJohs40/s320/data.png" width="320" /></a></div>
<div>
</div>
<div>
<span class="Apple-style-span" style="color: #333333;"><b>Шаг 8. Вычисление оптимальной маски и ее наложение.</b></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;">Маска нужна для того чтобы нормализовать количество белого и черного пространства на символе, проще говоря чтобы добиться равномерного распределения точек.</span></div>
<div>
<span class="Apple-style-span" style="color: #333333;">Существует восемь стандартных масок:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyk5aQF_kzQAMnLM9Tcfx0W29roWGZjCMH1ql76RLrfhO0jEDU00w-ScUXOPZCY513smIZ0q2fjnWbM7-v1t3vw1MtKcykrUCYJ0F69tI_HBEekmAh4ZwIKx4qjy8YC249k_YgX2HLJwI/s1600/masks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyk5aQF_kzQAMnLM9Tcfx0W29roWGZjCMH1ql76RLrfhO0jEDU00w-ScUXOPZCY513smIZ0q2fjnWbM7-v1t3vw1MtKcykrUCYJ0F69tI_HBEekmAh4ZwIKx4qjy8YC249k_YgX2HLJwI/s1600/masks.png" /></a></div>
<div>
<span class="Apple-style-span" style="color: #333333;"><br /></span></div>
<div>
<span class="Apple-style-span" style="color: #333333;"></span><br />
<div>
<span class="Apple-style-span" style="color: #333333;"><b>Шаг 9. Вычисление информации о формате.</b></span></div>
<span class="Apple-style-span" style="color: #333333;">
</span>
<div>
<span class="Apple-style-span" style="color: #333333;">Данный шаг очень сильно связан с предыдущими.Стоит добавить что позиции Format information на картинке выше отмечены красным цветом.</span></div>
<span class="Apple-style-span" style="color: #333333;">
<div>
<br /></div>
<div>
<b>Шаг 10. Рендеринг</b></div>
<div>
С рендерингом все достаточно просто, следует только не забывать что рекомендуемый размер одной точки не менее 4x4 пиксела. И что по все сторонам QR-Code необходимо оставить отступ шириной в 4 точки.</div>
<div>
<br /></div>
</span></div>
<br />
<div id="-chrome-auto-translate-plugin-dialog" style="background-attachment: initial !important; background-clip: initial !important; background-color: transparent !important; background-image: initial !important; background-origin: initial !important; background-position: initial initial !important; background-repeat: initial initial !important; display: none; left: 0px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; opacity: 1 !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: absolute !important; text-align: left !important; top: 0px; z-index: 999999 !important;">
<div style="-webkit-border-radius: 10px !important; background-color: #363636 !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); border-color: #000000 !important; border-width: 0px !important; color: #fafafa !important; font-size: 16px !important; max-width: 300px !important; opacity: 0.8 !important; overflow: visible !important; padding: 8px !important; text-align: left !important; z-index: 999999 !important;">
<div class="translate">
</div>
<div class="additional">
</div>
</div>
<img onclick="document.location.href='http://translate.google.com/';" src="http://www.google.com/uds/css/small-logo.png" style="-webkit-border-radius: 20px; background-color: rgba(200, 200, 200, 0.3) !important; cursor: pointer !important; margin: 0 !important; padding: 3px 5px 0 !important; position: absolute !important; right: 1px !important; top: -20px !important; z-index: -1 !important;" /></div>
</div>
Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com12tag:blogger.com,1999:blog-1430946003933632808.post-81733405984473401112011-07-28T13:58:00.001+04:002011-10-03T19:36:15.319+04:00I'm Qt Certified DeveloperYesterday I passed Qt Essentials exam. First step done!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg633Ew-r8lX9kqC0v__Kx73D2nRQM6CfqQJCD3ayYvRfRmihBl0O56Ca6YkOuehINdoZdfiAs1PmZyMbvvKQDGeefxIkZc7Ecf8CKqmOVdoU1KgQWY4BjEugnH3249KuKlZd0tjaRyf1E/s1600/NokiaQtCertifiedDeveloperLogo_lrg.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="82" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg633Ew-r8lX9kqC0v__Kx73D2nRQM6CfqQJCD3ayYvRfRmihBl0O56Ca6YkOuehINdoZdfiAs1PmZyMbvvKQDGeefxIkZc7Ecf8CKqmOVdoU1KgQWY4BjEugnH3249KuKlZd0tjaRyf1E/s320/NokiaQtCertifiedDeveloperLogo_lrg.jpg" width="320" /></a></div>
<br />
<a name='more'></a><br />
<br />
<div id="-chrome-auto-translate-plugin-dialog" style="background-attachment: initial !important; background-clip: initial !important; background-color: transparent !important; background-image: initial !important; background-origin: initial !important; display: none; left: 0px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; opacity: 1 !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: absolute !important; text-align: left !important; top: 0px; z-index: 999999 !important;">
<div style="-webkit-border-radius: 10px !important; background-color: #363636 !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); border-color: #000000 !important; border-width: 0px !important; color: #fafafa !important; font-size: 16px !important; max-width: 300px !important; opacity: 0.8 !important; overflow: visible !important; padding: 8px !important; text-align: left !important; z-index: 999999 !important;">
<div class="translate">
</div>
<div class="additional">
</div>
</div>
<img onclick="document.location.href='http://translate.google.com/';" src="http://www.google.com/uds/css/small-logo.png" style="-webkit-border-radius: 20px; background-color: rgba(200, 200, 200, 0.3) !important; cursor: pointer !important; margin: 0 !important; padding: 3px 5px 0 !important; position: absolute !important; right: 1px !important; top: -20px !important; z-index: -1 !important;" /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://moikrug.ru/img/5811/attachment/a_959777506_pic_l" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="481" src="http://moikrug.ru/img/5811/attachment/a_959777506_pic_l" width="640" /></a></div>
<br /></div>
Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com2tag:blogger.com,1999:blog-1430946003933632808.post-64032111333536351652011-04-30T00:59:00.003+04:002011-04-30T01:09:48.677+04:00QContact asynchronous APIЕсть в <i>Qt Mobility </i>такая штука как <i>QtContacts</i>, эта библиотека позволяет работать с различными контактами и предоставляет доступ к адресной книге. Так вот если приглядется к документации, то самым очевидным путем получения нужного контакта по идентификатору будет конструкция:<br />
<br />
<pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">QContactManager</span><span style="color: silver;"> </span><span style="color: black;">*</span><span style="color: black;">manager</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">QContactManager</span><span style="color: black;">(</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">QContact</span><span style="color: silver;"> </span><span style="color: black;">contact</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: black;">manager</span><span style="color: black;">-></span>contact<span style="color: black;">(</span>contactLocalId<span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">
</span></pre>При таком способе получения контакта, на реальном устройстве вы получите большие временные задержки и конфликты приложений одновременно использующих адресную книгу.<br />
<a name='more'></a><br />
В debug версии такого приложения вы даже получите ATTENTION, о том что не рекомендуется использользовать этот метод. В замен <i>Qt Mobility</i> предлагает <a href="http://doc.qt.nokia.com/qtmobility-1.1.0-beta/contactsasync.html">Contacts Asynchronous API</a>, который позволяет вытянуть контакты никому не мешая отфильтровав их по нужным критериям. Все классы используемые в этом API являются наследниками <span class="Apple-style-span" style="color: #363534; font-family: Verdana; font-size: 13px; line-height: 20px; white-space: normal;"><a href="http://doc.qt.nokia.com/qtmobility-1.1.0-beta/qcontactabstractrequest.html">QContactAbstractRequest</a></span><br />
<br />
Соответсвенно, если вы хотите получить контакт по его идентификатору "православным" методом, код нужно переписать примерно следущим образом: <br />
<br />
<pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">QContactManager</span><span style="color: silver;"> </span><span style="color: black;">*</span><span style="color: black;">manager</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">QContactManager</span><span style="color: black;">(</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">QContactFetchByIdRequest</span><span style="color: silver;"> </span><span style="color: black;">*</span><span style="color: black;">request</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: olive;">new</span><span style="color: silver;"> </span><span style="color: purple;">QContactFetchByIdRequest</span><span style="color: black;">(</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">QList</span><span style="color: black;"><</span><span style="color: purple;">QContactLocalId</span><span style="color: black;">></span><span style="color: silver;"> </span><span style="color: black;">localIds</span><span style="color: black;">;</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">localIds</span><span style="color: black;">.</span>append<span style="color: black;">(contactLocal</span><span style="color: black;">Id</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">request</span><span style="color: black;">-></span>setLocalIds<span style="color: black;">(</span><span style="color: black;">localIds</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>connect<span style="color: black;">(</span><span style="color: black;">request</span><span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: olive;">SIGNAL</span><span style="color: black;">(</span>resultsAvailable<span style="color: black;">()),</span><span style="color: silver;"> </span><span style="color: olive;">this</span><span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: olive;">SLOT</span><span style="color: black;">(</span>contactReceived<span style="color: black;">()));</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">request</span><span style="color: black;">-></span>start<span style="color: black;">();</span></pre>... ... ...<br />
<pre style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: olive;">void</span><span style="color: silver;"> </span><span class="Apple-style-span" style="color: purple;">AsyncApiExampleClass</span><span style="color: black;">::contactReceived()</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">{</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">QContactFetchByIdRequest</span><span style="color: silver;"> </span><span style="color: black;">*</span>senderRequest<span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span>qobject_cast<span style="color: black;"><</span><span style="color: purple;">QContactFetchByIdRequest</span><span style="color: silver;"> </span><span style="color: black;">*>(</span>sender<span style="color: black;">())</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">QList</span><span style="color: black;"><</span><span style="color: purple;">QContact</span><span style="color: black;">></span><span style="color: silver;"> </span><span style="color: black;">results</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span>senderRequest<span style="color: black;">-></span>contacts<span style="color: black;">();</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: green;">//...</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">}</span></pre><pre style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></pre><br />
Конечно, пример выше самый простой, обратившись к документации вы сможете, найти гораздо больше возможностей данного API.<br />
Что интересно среди <i>Qt Mobility examples</i> я нашел пример только для синхронного API, посмотреть же живую реализацию асинхронного API можно в плагине <i>declarative_contacts</i>.Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com1tag:blogger.com,1999:blog-1430946003933632808.post-56583424088973908582011-03-24T02:45:00.012+03:002011-04-29T02:20:44.387+04:00How to get MIME type on *nix systemIf you work with media content, you will likely need to obtain MIME type of files on your hard disk (for example, if your app should be able to send email with attachment).<br />
<br />
<div>It's very simple.</div><a name='more'></a><div>First, you need install <i>libmagic</i> devel package on your system (<i>libmagic-dev</i> for Debian-based).</div><div>Second, add in your <i>.pro</i> file this line: <i>LIBS += -lmagic</i><br />
Third, include header: <i>#include <magic.h></i></div><div>And last, implement this method:</div><br />
<div><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: purple;">QString</span><span style="color: silver;"> </span>getMimeType<span style="color: black;">(</span><span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: black;">&</span><span style="color: black;">fileName</span><span style="color: black;">)</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">{</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: black;">result</span><span style="color: black;">(</span><span style="color: green;">"application/octet-stream"</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">magic_t</span><span style="color: silver;"> </span><span style="color: black;">magicMimePredictor</span><span style="color: black;">;</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">magicMimePredictor</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span>magic_open<span style="color: black;">(</span>MAGIC_MIME_TYPE<span style="color: black;">);</span><span style="color: silver;"> </span><span style="color: green;">//</span><span style="color: silver;"> </span><span style="color: green;">Open</span><span style="color: silver;"> </span><span style="color: green;">predictor</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">if</span><span style="color: silver;"> </span><span style="color: black;">(!</span><span style="color: black;">magicMimePredictor</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">{</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>qDebug<span style="color: black;">()</span><span style="color: silver;"> </span><span style="color: black;"><<</span><span style="color: silver;"> </span><span style="color: green;">"libmagic:</span><span style="color: silver;"> </span><span style="color: green;">Unable</span><span style="color: silver;"> </span><span style="color: green;">to</span><span style="color: silver;"> </span><span style="color: green;">initialize</span><span style="color: silver;"> </span><span style="color: green;">magic</span><span style="color: silver;"> </span><span style="color: green;">library"</span><span style="color: black;">;</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">}</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">else</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">{</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">if</span><span style="color: silver;"> </span><span style="color: black;">(</span>magic_load<span style="color: black;">(</span><span style="color: black;">magicMimePredictor</span><span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: navy;">0</span><span style="color: black;">))</span><span style="color: silver;"> </span><span style="color: black;">{</span><span style="color: silver;"> </span><span style="color: green;">//</span><span style="color: silver;"> </span><span style="color: green;">if</span><span style="color: silver;"> </span><span style="color: green;">not</span><span style="color: silver;"> </span><span style="color: green;">0</span><span style="color: silver;"> </span><span style="color: green;">-</span><span style="color: silver;"> </span><span style="color: green;">error</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>qDebug<span style="color: black;">()</span><span style="color: silver;"> </span><span style="color: black;"><<</span><span style="color: silver;"> </span><span style="color: green;">"libmagic:</span><span style="color: silver;"> </span><span style="color: green;">Can't</span><span style="color: silver;"> </span><span style="color: green;">load</span><span style="color: silver;"> </span><span style="color: green;">magic</span><span style="color: silver;"> </span><span style="color: green;">database</span><span style="color: silver;"> </span><span style="color: green;">-</span><span style="color: silver;"> </span><span style="color: green;">"</span><span style="color: silver;"> </span><span style="color: black;">+</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: black;">(</span>magic_error<span style="color: black;">(</span><span style="color: black;">magicMimePredictor</span><span style="color: black;">));</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>magic_close<span style="color: black;">(</span><span style="color: black;">magicMimePredictor</span><span style="color: black;">);</span><span style="color: silver;"> </span><span style="color: green;">//</span><span style="color: silver;"> </span><span style="color: green;">Close</span><span style="color: silver;"> </span><span style="color: green;">predictor</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">}</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">else</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">{</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">char</span><span style="color: silver;"> </span><span style="color: black;">*</span><span style="color: black;">file</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: black;">fileName</span><span style="color: black;">.</span>toAscii<span style="color: black;">().</span>data<span style="color: black;">();</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">const</span><span style="color: silver;"> </span><span style="color: olive;">char</span><span style="color: silver;"> </span><span style="color: black;">*</span><span style="color: black;">mime</span><span style="color: black;">;</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">mime</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span>magic_file<span style="color: black;">(</span><span style="color: black;">magicMimePredictor</span><span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">file</span><span style="color: black;">);</span><span style="color: silver;"> </span><span style="color: green;">//</span><span style="color: silver;"> </span><span style="color: green;">getting</span><span style="color: silver;"> </span><span style="color: green;">mime-type</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">result</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: black;">(</span><span style="color: black;">mime</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>magic_close<span style="color: black;">(</span><span style="color: black;">magicMimePredictor</span><span style="color: black;">);</span><span style="color: silver;"> </span><span style="color: green;">//</span><span style="color: silver;"> </span><span style="color: green;">Close</span><span style="color: silver;"> </span><span style="color: green;">predictor</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">}</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">}</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>qDebug<span style="color: black;">()</span><span style="color: silver;"> </span><span style="color: black;"><<</span><span style="color: silver;"> </span><span style="color: green;">"libmagic:</span><span style="color: silver;"> </span><span style="color: green;">result</span><span style="color: silver;"> </span><span style="color: green;">mime type</span><span style="color: silver;"> </span><span style="color: green;">-</span><span style="color: silver;"> </span><span style="color: green;">"</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: black;">result</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">"for</span><span style="color: silver;"> </span><span style="color: green;">file:</span><span style="color: silver;"> </span><span style="color: green;">"</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">fileName</span><span style="color: black;">;</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: black;">result</span><span style="color: black;">;</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">}
</span></pre>For some platforms (such as Fedora) package can have another name: <i>file-libs</i> for library and <i>file-devel</i> for headers.</div>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com1tag:blogger.com,1999:blog-1430946003933632808.post-45831280151120854592011-03-13T22:15:00.003+03:002011-03-14T21:54:22.064+03:00Первая Российская MeeGo конференция<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXAq0kSbeQPYjQqlWMR7LMY-ICxAB08NjqDVeRKfkeovG40w-DfbsGO-GYpjGkFTXsjZjoD81NczX8saB56FFBTIu_ia5CmrKNuqg6mq6o0sDWZlqIbYHUn4Iwt3pxzdd_gUmNfv52Pkk/s1600/13032011713.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXAq0kSbeQPYjQqlWMR7LMY-ICxAB08NjqDVeRKfkeovG40w-DfbsGO-GYpjGkFTXsjZjoD81NczX8saB56FFBTIu_ia5CmrKNuqg6mq6o0sDWZlqIbYHUn4Iwt3pxzdd_gUmNfv52Pkk/s200/13032011713.jpg" width="181" /></a></div>В период с 9 по 11 марта в Москве состоялась Первая Российская MeeGo конференция, которая также включала два дня тренингов. Первый день проводились тренинги для начинающих и я пропустил его, однако посетил второй день тренингов и собственно саму конференцию. Это уже второе мероприятие подобного формата проводимое Fruct'ом, участником которого я являюсь. О предыдущей конференции посвященной Maemo я писал в прошлом году на хабрахабре.<br />
Итак, ниже обзор, фотографии и впечатления.<br />
<br />
<a name='more'></a><br />
<b>Второй день тренингов</b><br />
День начался с того, что нас не пустили на территорию АНХ :) Оказалось, что охране на вахту забыли принести списки участников, впрочем, даже когда их принесли никто поименно нас не проверял, пропустили на территорию всей толпой. Аудитория в которой проводились тренинги была вполне достойной в плане технического обеспечения. Бесплатный Wi-Fi также присутствовал, и это выгодно отличало эту конференцию от прошлогодней.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXUVMgkOSevvyQbs8UTcLl7UZYU3OeJJsHvQSfw4cz7G71ue_GMg2EPj91ef_BfWVwSny_qfSi725y7mhoWlwhTdPI0AbVx1MRT-UIlIhI_7MM2EjPZIm4zRlsgDPlcnM6w5dPGBVuOaQ/s1600/10032011613.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXUVMgkOSevvyQbs8UTcLl7UZYU3OeJJsHvQSfw4cz7G71ue_GMg2EPj91ef_BfWVwSny_qfSi725y7mhoWlwhTdPI0AbVx1MRT-UIlIhI_7MM2EjPZIm4zRlsgDPlcnM6w5dPGBVuOaQ/s200/10032011613.jpg" width="200" /></a>Первые лекции были посвящены собственно обзору средств для разработки под Intel AppUp а также особенностям и вопросам, с которыми придется столкнуться разработчику при создании и публикации приложения. Народ попался живой и вообщем-то было много вопросов и обсуждений в процессе лекции, что не может не радовать, это означает, что интерес у людей к процессу есть.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMcoF2KRQhnW_X8WmwcqfaCCdU-3nBDp7DU2g_o-b5zFEEVgIYNsCkILN98zqhHRArqotQ5jbwO9INBGIenff9H_cZlDlcntWSzABNlVG_P9UJNt7WLCLnRpz4xeq8VJ6sTGGkQ5ux38Y/s1600/10032011617.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMcoF2KRQhnW_X8WmwcqfaCCdU-3nBDp7DU2g_o-b5zFEEVgIYNsCkILN98zqhHRArqotQ5jbwO9INBGIenff9H_cZlDlcntWSzABNlVG_P9UJNt7WLCLnRpz4xeq8VJ6sTGGkQ5ux38Y/s200/10032011617.jpg" width="200" /></a></div>Потом был перерыв на обед, который был в этот раз в отличие от прошлого года организован участниками. После обеда в связи с задержкой следующего лектора, народ начал активно общаться между собой, обстановка была крайне дружеская и непринужденная.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio2_9jsxktKMCG8JI50HGHQPIkEqPW7nSNO687S8QMgYfcnQr2UG-wRdCoT3TQn78k9vle0Ja0X7sadV9bUmkc_rxdaAA7TIA2mbcPTW3NuBaAy1HkCuL4VzQe2n01-Mm6iOSksMFR67A/s1600/10032011618.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio2_9jsxktKMCG8JI50HGHQPIkEqPW7nSNO687S8QMgYfcnQr2UG-wRdCoT3TQn78k9vle0Ja0X7sadV9bUmkc_rxdaAA7TIA2mbcPTW3NuBaAy1HkCuL4VzQe2n01-Mm6iOSksMFR67A/s200/10032011618.jpg" width="200" /></a></div>Когда же, наконец, перерыв закончился, началась лекция по юзабилити, лектором выступал очень неожиданный человек для конференции по MeeGo - глава небольшой компании разработчиков под iOS, и, судя по всему, ярый фанат Apple. Впрочем, вопросов ему тоже досталось и обильно, хотя не все они касались юзабилити, но некоторые были достаточно интересны.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrUdFcM6Ic6Qj6keJ0TuBqY3CaQgfJo-XHmxIhe_druTSStr5k4vmjAXCG-VEKsNAY84OaBRLX1JIPhyphenhyphenI2MGc_4SVn3Fwxaux0nQpivbDKNDvJLoVMQvdeA42NdWQBfZWqXYEliczcaRc/s1600/10032011636.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrUdFcM6Ic6Qj6keJ0TuBqY3CaQgfJo-XHmxIhe_druTSStr5k4vmjAXCG-VEKsNAY84OaBRLX1JIPhyphenhyphenI2MGc_4SVn3Fwxaux0nQpivbDKNDvJLoVMQvdeA42NdWQBfZWqXYEliczcaRc/s200/10032011636.jpg" width="200" /></a>После небольшого перерыва подъехал Михаил Забалуев из Nokia. Он рассказывал про <a href="http://telepathy.freedesktop.org/">Telepathy</a>, вообще, это должен был быть действительно тренинг, на котором мы все должны были попробовать собрать и запустить пример под эмулятором MeeGo. Но, к сожалению, пример был рассчитан под новую версию MeeGo SDK, которой ни у кого не оказалась, и хотя предпринимались попытки установить эту версию, как я понял никто так и не попробовал запустить приложение у себя.<br />
<br />
На этом второй день тренингов закончился.<br />
<br />
<b>Первая Российская MeeGo конференция</b><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH3rc2e9wbJeuapVbHyXZ2KmGbaZXzLg6DdKqDN_KJLyZ4DnBacw0sarEA_M4ZOIuaXSqHSLR0Y54e7J5PMj5eU20RxsV1-quzUbibbyfwrcv4I-IlzVgle-ynJ1mo5NlGlqFz15E6x1s/s1600/11032011663.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH3rc2e9wbJeuapVbHyXZ2KmGbaZXzLg6DdKqDN_KJLyZ4DnBacw0sarEA_M4ZOIuaXSqHSLR0Y54e7J5PMj5eU20RxsV1-quzUbibbyfwrcv4I-IlzVgle-ynJ1mo5NlGlqFz15E6x1s/s200/11032011663.jpg" width="200" /></a></div>На начало конференции я слегка проспал, поэтому пропустил несколько первых вводных лекций, впрочем, они носили по большой части обзорный и рекламный характер, такой вывод я сделал успев а половину доклада человека из ЛинуксЦентра, вообщем ничего нового: MeeGo LinuxCenter Edition, покупайте у нас китайские железяки с поддержкой, локализацией и проприетарным софтом.<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0n1V-rPNOyt2ajSqmCh_0wsdRUnQLP24uComoN4_0qrv_CwDxNgbfzLGJHTXhF73ga9XYO5NWbo_IwNc9lH5SsT-Vm2vhzGCePO8cwWcIrtQaT4gnjcDywNcJNuR1q3wxBd5byMTCveg/s1600/11032011647.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0n1V-rPNOyt2ajSqmCh_0wsdRUnQLP24uComoN4_0qrv_CwDxNgbfzLGJHTXhF73ga9XYO5NWbo_IwNc9lH5SsT-Vm2vhzGCePO8cwWcIrtQaT4gnjcDywNcJNuR1q3wxBd5byMTCveg/s200/11032011647.jpg" width="200" /></a></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7IbkPv0BdEJGxhreuv2Y-TO7OIQBJM38ye0XLxH3TkxN0v4jSpowDcvxdAIBvRbETQgBeGufgbel3zXRdElEbn00Ap12jZfWmhyx4kZpO4vzGORAnAVR5ZvL7_IuqQV0GDbQBIp52UCg/s1600/11032011661.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7IbkPv0BdEJGxhreuv2Y-TO7OIQBJM38ye0XLxH3TkxN0v4jSpowDcvxdAIBvRbETQgBeGufgbel3zXRdElEbn00Ap12jZfWmhyx4kZpO4vzGORAnAVR5ZvL7_IuqQV0GDbQBIp52UCg/s200/11032011661.jpg" width="136" /></a>Потом наступил кофе-брейк на котором также были представлены демо-сцены. Хочется отметить работы команды из ННГУ представившей весьма, на мой взгляд интересный и полезный проект: Систему захвата видео с экрана и автоматической публикацией в социальных сетях. Представленный прототип пока умеет лишь записывать видео со всего экрана устройство и отправлять его на YouTube. Но в будущем ожидается расширение функционала на другие сервисы видео-хостинга, а также возможность захвата видео с других устройств (например веб-камеры).<br />
Также хочу упомянуть интересное приложение Виталия Петрова из ГУАП, называемое SketchIt - это простой векторный редактор схем, ориентированный на пальцевый ввод, это достигается с помощью распознавания жестов.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIof0rMoxcNR5ZJdXxEQkN_cSpOvgM3JH145R-I-2hiXnld2k-1OIR1dt-pYXKflswiYsFVVc2JJPCYfi_XXCN8zd859y8ETJB09flLr69llhq3ohVhmDiN2bZC92j1-zhgkhgBaxyp5A/s1600/11032011685.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIof0rMoxcNR5ZJdXxEQkN_cSpOvgM3JH145R-I-2hiXnld2k-1OIR1dt-pYXKflswiYsFVVc2JJPCYfi_XXCN8zd859y8ETJB09flLr69llhq3ohVhmDiN2bZC92j1-zhgkhgBaxyp5A/s200/11032011685.jpg" width="200" /></a></div>И последнее что меня зацепило, это роботы футболисты разработанные лабораторией СПРИНТ (СПбГУ-Интел) <span class="Apple-style-span" style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 12px; line-height: 16px;"> </span>управляемые с беспроводного приставочного джойстика (центр приема-передачи команд, как я понял находился на нетбуке с ОС MeeGo). И, кстати, работа порадовала не только меня, людей гоняющих мячик с помощью робота, я видел в холле почти до самого закрытия конференции.<br />
<br />
<br />
После перерыва началась самая интересная секция - техническая, на ней были представлены следующие доклады: Система безопасности платформы MeeGo, которую провел Дмитрий Касаткин из Nokia. В докладе достаточно подробно рассказывалось про то как работают различные системы защиты от зловредных воздействий, воровства и порчи платформы и ПО.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8UlAStz59wbtOLRAIBHJrf1RZbtHsj8mRNNVT8gnOQBqVoe3xeglvnxRGOcA39gO-KipBRq3WxlpOkiHeduGvZeye8OzUppivRsJp7q4t2h1Q2fPrSIs_J_abVqMb8VE7_fSeEfrywag/s1600/11032011672.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8UlAStz59wbtOLRAIBHJrf1RZbtHsj8mRNNVT8gnOQBqVoe3xeglvnxRGOcA39gO-KipBRq3WxlpOkiHeduGvZeye8OzUppivRsJp7q4t2h1Q2fPrSIs_J_abVqMb8VE7_fSeEfrywag/s200/11032011672.jpg" width="200" /></a></div>Следующую лекцию провел Виталий Репин из Nokia, личность неординарная, но очень интересная, этот человек запомнился мне еще с прошлогодней Maemo конференции, он поведал нам о <a href="http://qt.gitorious.org/qt-labs/messagingframework">QMF</a> (Qt Messaging Framework) - это средство для работы с сообщениями, которое позволяет отделить протоколы от самой системы и вынести их в плагины. В докладе рассматривалась архитектура QMF и модели данных.<br />
<br />
И последний доклад технической секции провел уже известный нам Михаил Забалуев и рассказывал он снова о Telepathy.<br />
<br />
После перерыва на обед традиционно выступил Сергей Баландин, председатель Fruct, с докладом о Российском MeeGo сообществе, его целях и достижениях.<br />
<br />
Следующий доклад носил несколько рекламный характер, но представлял большую ценность для разработчиков, так как в нем представитель Intel (Дмитрий Оганезов) рассказывал каким образом можно заработать деньги с помощью AppUp уже сейчас. Он провел обзор различных конкурсов и грантов от Intel ориентированных на увеличение количества разработчиков под MeeGo.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi4lLvYPGS8maSAp3zdzN6Y1LGeJxMqfbi9vffydgacPzKkGp6ACpsCHFuMW_XcSOOXAoee_UnRnL60FpssboI86LVntSWbsldM1M3l8RNfnauxeB0otE1nR4fN0BDm0Sa8x1FPQOivCE/s1600/11032011700.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi4lLvYPGS8maSAp3zdzN6Y1LGeJxMqfbi9vffydgacPzKkGp6ACpsCHFuMW_XcSOOXAoee_UnRnL60FpssboI86LVntSWbsldM1M3l8RNfnauxeB0otE1nR4fN0BDm0Sa8x1FPQOivCE/s200/11032011700.jpg" width="200" /></a></div>Следующим пунктом шло наверное самое эффектное выступление дня: презентация Алексея Кореневского из <a href="http://ics.com/">ICS</a> на тему "Использование Qt Quick в разработке 2D приложений", Алексей показал и объяснил как код своего игрового приложения названого "Колобок", таки само приложение, рассказав с какими трудностями пришлось столкнуться и какие решения принимались в различных случаях.<br />
<br />
После презентации Алексея я переместился в холл для "кулуарных" бесед, где и пребывал до самого закрытия конференции, кстати, после закрытия конференции тоже были достаточно долгие и интересные диалоги. Озвучивать информацию, частично ставшую известной из этих разговоров не буду.<br />
<br />
<b>Заключение</b><br />
<b><br />
</b><br />
В целом организация конференции была поставлена на высоком уровне, по сравнению с предыдущим годом, так вообще идеально. Качество материалов самой конференции осталось примерно на том же уровне, т.е. как всегда хотелось бы поменьше рекламы и маркетинга и побольше технических знаний. Относительно, второго дня тренинга, я сказал бы что он понравился мне меньше чем Maemo'вский, потому что опять-таки технические вопросы были затронуты куда менее глубоко. В любом случае, общее впечатление от конференции положительное.<br />
<br />
Ну и в конце фотография раздаточного материала и футболки:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBwozCquTammMgc82UWULAXQwG8zOX3zZvN9HWKmdirn1pNc2emKw_ufBG3yHoRjDbss31lhyphenhyphenfiVZ7MZqBO7vusNZ8AUe6uNHxsTvmtQeLqZnJw-pPcR1Ch3QyTi0cSdmsBGzPikV_G8U/s1600/13032011709.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="139" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBwozCquTammMgc82UWULAXQwG8zOX3zZvN9HWKmdirn1pNc2emKw_ufBG3yHoRjDbss31lhyphenhyphenfiVZ7MZqBO7vusNZ8AUe6uNHxsTvmtQeLqZnJw-pPcR1Ch3QyTi0cSdmsBGzPikV_G8U/s200/13032011709.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4mf-YJcWYmMyLYjyCBH8VfTTOQaTgpIZhYcMtyXmK1ew6tz9pNmBwEvokRzGIxE06vxyiLwl92hM8EotMGu2iA7r5wVMeWljRrnS73pcgrgY1_h0KCzQ5-GqBkfv9UAep363JX9JgG9s/s1600/13032011710.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="134" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4mf-YJcWYmMyLYjyCBH8VfTTOQaTgpIZhYcMtyXmK1ew6tz9pNmBwEvokRzGIxE06vxyiLwl92hM8EotMGu2iA7r5wVMeWljRrnS73pcgrgY1_h0KCzQ5-GqBkfv9UAep363JX9JgG9s/s200/13032011710.jpg" width="200" /></a></div><br />
<br />
<b>P. S. </b>Я сознательно не углублялся в технические подробности докладов, в ближайшее время презентационные материалы по всем докладам будут выложены на <a href="http://fruct.org/">fruct.org</a>. И простите за качество фотографий, с освещением что-то не то, поэтому качество сильно пострадалоVasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com11tag:blogger.com,1999:blog-1430946003933632808.post-22627123216319827002011-02-25T11:48:00.003+03:002011-04-28T23:43:53.856+04:00Установка и запуск oFono и phonesim на Debian<div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" height="49" src="http://ofono.org/sites/all/themes/ofono/logo.png" width="200" /></div>oFono - это свободный проект предоставляющий разработчику удобный инструмент для построения мобильной инфраструктуры (GSM/UMTS). oFono распространяется под лицензией GPLv2 и использует высокоуровневое DBus API. Что позволяет взаимодействовать с ним приложениям выпускаемым под различными лицензиями. phonesim - это утилита, симулятор мобильного телефона, поставляется вместе с oFono, очень полезна при отладке работы ваших приложений, например с сервисом SMS.<br />
<br />
<a name='more'></a>Собственно инструкция как поставить и запустить:<br />
1. Ставим <b>ofono</b> и <b>phonesim</b><br />
Качаем исходники отсюда:<br />
<a href="http://www.kernel.org/pub/linux/network/ofono/">http://www.kernel.org/pub/linux/network/ofono/</a><br />
Любую необходимую нам версию, лучше конечно последнюю.<br />
Желающие также могут забрать все из git репозиториев:<br />
<i>git://git.kernel.org/pub/scm/network/ofono/ofono.git</i><br />
<i>git://git.kernel.org/pub/scm/network/ofono/phonesim.git</i><br />
<br />
в сборке ничего сложного нет, все как обычно:<br />
<blockquote><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">./configure<br />
make<br />
make install</span></blockquote>Также можно вообще ничего не собирать и проверить репозитарий вашего дистрибутива Linux на наличие уже готовых бинарных пакетов, например в Debian они называются: <b>ofono</b> и <b>ofono-phonesim</b><br />
<br />
<a href="http://www.kernel.org/pub/linux/network/ofono/"></a>2. идем в <i>/etc/ofono/phonesim.conf</i> и пишем туда (<b>NB!</b> В некоторых версиях, хитрый <b>ofono </b>читает этот файл отсюда: /usr<i>/etc/ofono/phonesim.conf, </i>будьте внимательнее):<br />
<blockquote><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">[phonesim]<br />
Driver=phonesim<br />
Address=127.0.0.1<br />
Port=12345</span></blockquote>3. после чего останавливаем демона <b>ofonod</b> и запускаем его с ключами <b>ofonod -nd</b>, эти ключи запустят его не в режиме демона и в отладочном режиме.<br />
<br />
4. Теперь под пользовательской консоли запускаем:<br />
<blockquote> <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">phonesim -p 12345 -gui default.xml</span></blockquote>5. default.xml это настройки аппарата, который, собственно, будет симулироваться, этот файл лежит в папке с исходниками<br />
<br />
6. Теперь открываем еще одну консоль под юзером и выполняем команду:<br />
<blockquote><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">dbus-send --system --print-reply --type=method_call --dest=org.ofono /phonesim org.ofono.Modem.SetProperty string:"Powered" variant:boolean:true</span></blockquote>Эта команда подает сигнал нашему симулятору о том что мы включили питание.Теперь приложение которое мы запустили в предыдущей консоли появиться как окно с контролами.Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com2tag:blogger.com,1999:blog-1430946003933632808.post-79212297295360049512011-02-08T02:47:00.000+03:002011-02-08T02:47:30.201+03:00Chromium extension for Qt Developer NetworkI finished new version of my tiny extension for Chromium. This version use new Qt Developer Network API. You can see description of API <a href="http://bugreports.qt.nokia.com/browse/QTWEBSITE-137">here</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBq8194y4NHPKClkxoWL1f5g86IdoJgIW7cYTCD2dyw6m8CKZw9yi3uvbIcNKJZsYpWX-lIcxAN6In8H7di2AxgYEYwxNBAiMucOSfblFSAy1KkBcmsEGMerqyFZLqtrW_B9ethKRkBL8/s1600/qtdnbadge.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBq8194y4NHPKClkxoWL1f5g86IdoJgIW7cYTCD2dyw6m8CKZw9yi3uvbIcNKJZsYpWX-lIcxAN6In8H7di2AxgYEYwxNBAiMucOSfblFSAy1KkBcmsEGMerqyFZLqtrW_B9ethKRkBL8/s320/qtdnbadge.png" width="320" /></a></div><br />
<a name='more'></a><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px;"><pre id="cx-desc-text" style="font: normal normal normal 100%/normal arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap; word-wrap: break-word;">It shows your rank, rank badge, your points and count of needed points for next level, points for last 7 days, your special badges (Nokia Certified Developer for example), count and link of unread forum posts.
You need to be authorized on site for extension can work.
<b>Specially thanks to Qt Developer Network Team for granted API.</b></pre><pre id="cx-desc-text" style="font: normal normal normal 100%/normal arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap; word-wrap: break-word;"></pre><pre id="cx-desc-text" style="font: normal normal normal 100%/normal arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap; word-wrap: break-word;">In next version I plan add unread posts to popup window, and add some settings, such as update interval and view mode. </pre><pre id="cx-desc-text" style="font: normal normal normal 100%/normal arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap; word-wrap: break-word;"></pre></span><br />
<br />
Direct link to Google Chrome WebStore: <a href="https://chrome.google.com/webstore/detail/mhbcdhmbdinbggoongcnmblnclloilbh/">QtDN Badge</a>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com0tag:blogger.com,1999:blog-1430946003933632808.post-13389600961717388202011-01-02T15:18:00.006+03:002011-01-02T15:31:59.084+03:00Интернационализируем приложение на Qt<span class="Apple-style-span" style="font-size: large;">Введение</span><br />
<div>Данная статья не претендует на уникальность, но простым языком объясняет как начать использовать возможности встроенной интернационализации в Qt приложениях.<br />
<a name='more'></a></div><br /><br />
<span class="Apple-style-span" style="font-size: large;">Как сделать текстовую константу переводимой?</span><br />
<div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Текстовые константы у нас могут быть использованы в C++ коде, в QtScript - скриптах (и их расширениях), в QML и в UI файлах. Для UI делать ничего не нужно, только не забываем, что поумолчанию мы все тексты пишем на английском.</div><div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Для C++ кода, чтобы сделать текстовую константу переводимой достаточно обернуть ее в вызов статического метода <b>QObject::tr(const *char text)</b>. Если вы и так имеете текстовую константу внутри класса-наследника <i>QObject, </i>то, естественно указывать им класса перед методом нет необходиомости.<br />
Для скриптов и <i>QML</i> существуют две функции <strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">qsTr(string)</strong> и <strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">qsTranslate(string, string)</strong><br />
Первая может применятся в файлах со скриптами, для экстеншенов надо применять вторую функцию, это связано с тем, что все файлы экстеншенов называются одинаково (__init__.js). Первый параметр функции <em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">qsTranslate</em> принимает текстовый идентификатор уникальный для каждого файла (за этим надо следить самому, иначе некорректно создасться перевод), я использую и предлагаю всем последовать моему примеруу следующий способ формирования идентификатора, из названия модуля, т.е. например если мы имеем модуль <strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">views.somemodel.modelclass</strong>, то идетификатор будет <strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">views_somemodel_modelclass</strong>.</div><div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Важно отметить, что оборачивать в данные функции можно только константный текст, т. е. если используется конкатенация, то оборачивать необходимо каждый кусок отдельно, пример:</div><pre style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(220, 220, 220); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(220, 220, 220); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(220, 220, 220); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(220, 220, 220); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 4px; padding-left: 8px; padding-right: 8px; padding-top: 4px;"><code style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(220, 220, 220); border-bottom-style: none; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(220, 220, 220); border-left-style: none; border-left-width: 1px; border-right-color: rgb(220, 220, 220); border-right-style: none; border-right-width: 1px; border-top-color: rgb(220, 220, 220); border-top-style: none; border-top-width: 1px; border-width: initial; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">error = qsTr("File ") + filename + qsTr (" not found!") // Правильно
error = qsTr("File " + filename + " not found!") // Неправильно!</code></pre>Пример для QML:<br />
<pre style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(220, 220, 220); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(220, 220, 220); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(220, 220, 220); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(220, 220, 220); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 4px; padding-left: 8px; padding-right: 8px; padding-top: 4px;"><code style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(220, 220, 220); border-bottom-style: none; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(220, 220, 220); border-left-style: none; border-left-width: 1px; border-right-color: rgb(220, 220, 220); border-right-style: none; border-right-width: 1px; border-top-color: rgb(220, 220, 220); border-top-style: none; border-top-width: 1px; border-width: initial; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Text { text: qsTr(<span class="char" style="color: #254117;">"Pictures"</span>) }</code></pre><br /><br />
<span class="Apple-style-span" style="font-size: large;">Как обновить файл перевода</span><br />
<div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Если вы хотите создать новый перевод или обновить старый вам необходимо в консоли перейти в конфигурации в директорию в которой вы хотите сохранять переводы и там запустить следующую команду для <em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">каждого</em> языка:</div><pre style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(220, 220, 220); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(220, 220, 220); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(220, 220, 220); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(220, 220, 220); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 4px; padding-left: 8px; padding-right: 8px; padding-top: 4px;"><code style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(220, 220, 220); border-bottom-style: none; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(220, 220, 220); border-left-style: none; border-left-width: 1px; border-right-color: rgb(220, 220, 220); border-right-style: none; border-right-width: 1px; border-top-color: rgb(220, 220, 220); border-top-style: none; border-top-width: 1px; border-width: initial; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">lupdate -recursive -extensions qs,js,ui,cpp,h,qml <path to app> -ts translation.ru_RU.ts</code></pre><div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">вместо <em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">ru_RU</em> подставляя необходимый код языка.</div><br /><br />
<span class="Apple-style-span" style="font-size: large;">Как перевести</span><br />
<div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">После того как <em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">ts</em> файл создан, можно занятся переводом, для этого нужно открыть приложение <strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">QtLinguist</strong>, оно есть в стандартной поставке Qt SDK, если вы затрудняетесь его найти проверьте путь <em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">/bin</em>, если вы собирали qt из исходников и в этой папке нет файла <strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">linguist(.exe)</strong>, то это значит что при сборке вы выключили сборку утилит, ключ “-nomake tools” и вам придется пересобрать Qt без этого ключа, либо найти это приложение где-нибудь еще.</div><div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Само приложение очень просто, достаточно открыть в нем файл и сразу становиться понятно, где и что переводить.<br />
Не забудьте сохранить файл после того как вы его перевели.</div><br /><br />
<span class="Apple-style-span" style="font-size: large;">Как добавить новый перевод в приложение</span><br />
<div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Для добавления перевода его сначала необходимо скомпилировать, это делается с помощью выполнения команды:</div><pre style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(220, 220, 220); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(220, 220, 220); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(220, 220, 220); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(220, 220, 220); border-top-style: dashed; border-top-width: 1px; font-size: 13px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 4px; padding-left: 8px; padding-right: 8px; padding-top: 4px;"><code style="background-attachment: initial; background-clip: initial; background-color: #f8f8f8; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(220, 220, 220); border-bottom-style: none; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(220, 220, 220); border-left-style: none; border-left-width: 1px; border-right-color: rgb(220, 220, 220); border-right-style: none; border-right-width: 1px; border-top-color: rgb(220, 220, 220); border-top-style: none; border-top-width: 1px; border-width: initial; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">lrelease -compress translation.ru_RU.ts -qm translation.ru_RU.qm</code></pre><div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">для каждого языка, заменяя <em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">ru_RU</em> на необходимую локаль.</div><div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"><em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">В дальнейшем я планирую автоматизировать этот процесс, с помощью .pro-файла, но пока в этом нет необходимость, а процесс этот мне кажется достатчно трудоемким.</em></div><div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">После как <em style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">.qm</em> созданы/обновлены, я добавляю их в специально для этого заведенный файл ресурсов translations.qrc, который потом подгружаю в приложение.</div><div style="letter-spacing: normal; margin-bottom: 0,75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Это завершающий этап, теперь новая локаль будет доступна для выбора</div><br /><br />
<span class="Apple-style-span" style="font-size: large;">P.S. Как использовать переводы в приложении.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, serif;"><span class="Apple-style-span" style="line-height: 19px;">Для того чтобы использовать файлы интернационализации в вашем приложении, вам необходимо добавить следующую конструкцию (например в main.cpp):</span></span><br />
<div><pre class="highlightedCode brush: cpp" style="background-color: #f6f6f6; border-bottom-color: rgb(230, 230, 230); border-bottom-left-radius: 7px 7px; border-bottom-right-radius: 7px 7px; border-bottom-style: solid; border-bottom-width: 1px; border-collapse: separate; border-left-color: rgb(230, 230, 230); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(230, 230, 230); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(230, 230, 230); border-top-left-radius: 7px 7px; border-top-right-radius: 7px 7px; border-top-style: solid; border-top-width: 1px; display: block; font-size: 11px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 20px; padding-left: 20px; padding-right: 15px; padding-top: 20px;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, serif; font-size: x-small;"><span class="Apple-style-span" style="line-height: 19px;"><span class="Apple-style-span" style="color: #363534; font-family: Verdana; font-size: 13px; line-height: 16px;">QApplication app(argc, argv);
QTranslator translator;
translator.load("translation.ru_RU.qm");
app.installTranslator(&translator);</span></span></span></pre></div>Естественно, если вы озаботитесь сохранением доступа к вашему экземпляру транслятора, с помощью метода <b>load() </b>вы сможете менять локаль на лету.Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com9tag:blogger.com,1999:blog-1430946003933632808.post-16130570194177410032010-11-10T01:36:00.001+03:002010-11-10T01:36:58.105+03:00Расстановка переносовПотребовалось мне тут переносы автоматически расставить в русском тексте. Google сказал что самое лучшее это использовать алгоритм Ляна-Кнута. Однако, это хоть и совершенный, но достаточно сложный алгоритм, есть способ несколько проще, его я тоже нашел в сети, и решил описать и популяризовать в своем блоге.<br />
<a name='more'></a>Этот способ применим только для русского языка, но учитывая что английский язык имеет менее строгие правила переноса, ограничимся пока русским. Этот алгоритм носит название алгоритма П.Хpистова в модификации Дымченко и Ваpсанофьева. Он очень прост и включает в себя всего шесть правил, при этом почти полностью покрывает все возможные случаи за редким исключением.<br />
Вот эти шесть правил:<br />
<ol><li><b>"Х-"</b></li>
<li><b>"Г-Г"</b></li>
<li><b>"ГС-СГ"</b></li>
<li><b>"СГ-СГ"</b></li>
<li><b>"ГС-ССГ"</b></li>
<li><b>"ГСС-ССГ"</b></li>
</ol>Где: <b>Г</b> - гласная, <b>С</b> - согласная, <b>Х</b> - буква из набора <b>"ьъй"</b>.<br />
<br />
Применять данные правила нужно в том порядке, в котором они перечислены. То есть от коротких к длинным. Дополнительно для первых двух правил, неплохо бы проверять оставшуюся часть слова, чтобы она содержала не менее двух букв.<br />
<br />
Простой пример на Qt (расставляет знак "-" везде, где допустим перенос):<br />
<table style="-qt-table-type: root; margin-bottom: 4px; margin-left: 4px; margin-right: 4px; margin-top: 4px;"><tbody>
<tr> <td style="border: none;"><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: navy;">#define</span><span style="color: silver;"> </span>RUS_A<span style="color: silver;"> </span>QString<span style="color: black;">(</span><span style="color: green;">"[абвгдеёжзийклмнопрстуфхцчшщъыьэюя]"</span><span style="color: black;">)</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: navy;">#define</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span>QString<span style="color: black;">(</span><span style="color: green;">"[аеёиоуыэюя]"</span><span style="color: black;">)</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: navy;">#define</span><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span>QString<span style="color: black;">(</span><span style="color: green;">"[бвгджзклмнпрстфхцчшщ]"</span><span style="color: black;">)</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: navy;">#define</span><span style="color: silver;"> </span>RUS_X<span style="color: silver;"> </span>QString<span style="color: black;">(</span><span style="color: green;">"[йъь]"</span><span style="color: black;">)</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">
</span></pre><pre style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: purple;">QString</span><span style="color: silver;"> </span>Hyphenator<span style="color: black;">::</span>hyphenate<span style="color: black;">(</span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: black;">)</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">{</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>re1<span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: purple;">QRegExp</span><span style="color: black;">(</span><span style="color: purple;">QString</span><span style="color: black;">(</span><span style="color: green;">"("</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_X<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")("</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_A<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>RUS_A<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")"</span><span style="color: black;">,</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>Qt<span style="color: black;">::</span>CaseInsensitive<span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>re2<span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: purple;">QRegExp</span><span style="color: black;">(</span><span style="color: purple;">QString</span><span style="color: black;">(</span><span style="color: green;">"("</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")("</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>RUS_A<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")"</span><span style="color: black;">,</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>Qt<span style="color: black;">::</span>CaseInsensitive<span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>re3<span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: purple;">QRegExp</span><span style="color: black;">(</span><span style="color: purple;">QString</span><span style="color: black;">(</span><span style="color: green;">"("</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")("</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")"</span><span style="color: black;">,</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>Qt<span style="color: black;">::</span>CaseInsensitive<span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>re4<span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: purple;">QRegExp</span><span style="color: black;">(</span><span style="color: purple;">QString</span><span style="color: black;">(</span><span style="color: green;">"("</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")("</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")"</span><span style="color: black;">,</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>Qt<span style="color: black;">::</span>CaseInsensitive<span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>re5<span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: purple;">QRegExp</span><span style="color: black;">(</span><span style="color: purple;">QString</span><span style="color: black;">(</span><span style="color: green;">"("</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")("</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")"</span><span style="color: black;">,</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>Qt<span style="color: black;">::</span>CaseInsensitive<span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>re6<span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: purple;">QRegExp</span><span style="color: black;">(</span><span style="color: purple;">QString</span><span style="color: black;">(</span><span style="color: green;">"("</span><span style="color: black;">)</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: green;">")("</span><span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_N<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span>RUS_V<span style="color: silver;"> </span><span style="color: black;">+</span><span style="color: silver;"> </span><span style="color: green;">")"</span><span style="color: black;">,</span><span style="color: silver;"> </span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span>Qt<span style="color: black;">::</span>CaseInsensitive<span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">
</span></pre><pre style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: purple;">QString</span><span style="color: silver;"> </span><span style="color: black;">hypher</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: green;">"\\1-\\2"</span><span style="color: black;">;</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">
</span></pre><pre style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: black;">.</span>replace<span style="color: black;">(</span>re1<span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">hypher</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: black;">.</span>replace<span style="color: black;">(</span>re2<span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">hypher</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: black;">.</span>replace<span style="color: black;">(</span>re3<span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">hypher</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: black;">.</span>replace<span style="color: black;">(</span>re4<span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">hypher</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: black;">.</span>replace<span style="color: black;">(</span>re5<span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">hypher</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: silver;"> </span><span style="color: black;">=</span><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: black;">.</span>replace<span style="color: black;">(</span>re6<span style="color: black;">,</span><span style="color: silver;"> </span><span style="color: black;">hypher</span><span style="color: black;">);</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">
</span></pre><pre style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span><span style="color: black;">text</span><span style="color: black;">;</span></pre><pre style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span style="color: black;">}</span></pre></td></tr>
</tbody></table>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com0tag:blogger.com,1999:blog-1430946003933632808.post-9234592973982090832010-11-05T22:34:00.000+03:002010-11-05T23:15:30.477+03:00Пощупаем Nokia N8<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHVQiTguhiiu5V-F2yhnSkXVMw_C5_q_QfGbIzK86wRvsMrpxWGmAZr6t9TKhzCc8Rc_J6n6APYPqVrDyl1BNs6aovtt4ZsGiKT1n_b7VXr-EnRYazSVWyW_Vq9ds095kxdg0MdBCWcBY/s1600/P1050601.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHVQiTguhiiu5V-F2yhnSkXVMw_C5_q_QfGbIzK86wRvsMrpxWGmAZr6t9TKhzCc8Rc_J6n6APYPqVrDyl1BNs6aovtt4ZsGiKT1n_b7VXr-EnRYazSVWyW_Vq9ds095kxdg0MdBCWcBY/s200/P1050601.JPG" width="114" /></a></div><br />
Так получилось, что я выиграл самый свежий на данный момент телефон от Nokia. Выиграл я его не просто так, а честным трудом, поучаствовав в конкурсе на лучший <a href="http://developer.qt.nokia.com/blog/view/we_have_a_winner">дизайн футболки</a> для <a href="http://qt.nokia.com/qtdevdays2010">Qt Developer Days 2010</a>. На самом деле призом должен быть стать билет на само мероприятие, но я не смог поехать. И Nokia подарила мне телефон.<br />
<br />
<a name='more'></a><br />
Итак про телефон, аппарат имеет достаточно приятный дизайн, хорошо лежит в руке, ощущается приятная тяжесть. Экран удобный, чувствительность хорошая, правда у краев мне с моими пальцами, не очень удобно нажимать.<br />
<br />
На борту сего устройства стоит новый Symbian^3, и важно заметить, что он пока довольно сырой, бывает неадекватное поведение. Например, я никак не мог отучить телефон не подключаться к Wi-Fi и не держать соединение, сажая батарейку, пока не догадался выставить в почтовом клиенте настройку - забирать почту раз в сутки или по запросу. Также примерно с неделю после подвисания не работал виджет уведомления о пропущенных вызовах, через неделю прочухался сам, почему не работал и как вылечился я так и не понял.<br />
<br />
Однако, на устройстве есть предустановленный Qt 4.6.3, что несомненно радует и огорчает одновременно, радует, потому что есть, огорчает, потому что не 4.7. Впрочем, дев-версия 4.7 появилась буквально через несколько дней после того, как у меня появился телефон. Конечно, она еще никакая, <a href="http://www.blogger.com/profile/13622810679165105015">BlackTass</a> в своей статье <a href="http://qt-way-notes.blogspot.com/2010/11/qt-symbian-tips.html">описал все найденные им грабли</a> при сборке.<br />
<br />
Кстати, Nokia снизила стоимость регистрации на Publish.Ovi для разработчиков с 50 Euro до 1 Euro, так что Welcome :)<br />
<br />
Пара фоток интерфейса:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinGM3SqIxTMU5xfbjy4r7YSirylePFjnf7G-9-Aq68CchpUXTcFww7Izp_JtRT9xUd1GpzwivHKZkp6wH_j33Q6hREmVsl_rADD-9bkelfn_q5Nte_fHaIUJiIjScl2DmkT2iHU1W9gEw/s1600/P1050603.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinGM3SqIxTMU5xfbjy4r7YSirylePFjnf7G-9-Aq68CchpUXTcFww7Izp_JtRT9xUd1GpzwivHKZkp6wH_j33Q6hREmVsl_rADD-9bkelfn_q5Nte_fHaIUJiIjScl2DmkT2iHU1W9gEw/s200/P1050603.JPG" width="107" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2uPhtaK1l6ezsfh5OPVWNrPobuM8xZITYocLnQbOKnIzWPoeDI_80DZ_eijv8yRNZCX66a0rdmf9ahT2Js9rtpwMp6ka_eqZ_7Ohr5Pd9ksR2vqof24XwcYvUP5snLuIB6qQI42kRqDM/s1600/P1050606.JPG" imageanchor="1" style="float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2uPhtaK1l6ezsfh5OPVWNrPobuM8xZITYocLnQbOKnIzWPoeDI_80DZ_eijv8yRNZCX66a0rdmf9ahT2Js9rtpwMp6ka_eqZ_7Ohr5Pd9ksR2vqof24XwcYvUP5snLuIB6qQI42kRqDM/s200/P1050606.JPG" width="111" /></a><br />
Соответственно, экран главного меню и экран вызова звонка, ничего особенного.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
И напоследок фото сделанное телефоном в режиме макро-съемки.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFsS5dRBjY3kYn30UrhjdobQVUKdrB1zI6NgRQE5hoxAEn7wVmDzga4G1Rnqj7b1yy-y3w_f53vybQgLPn3BfEGVXKVLxqSPyYAQrnhGeo0l6oh6Hx0UcaWnbz2CFEZqqFk5_B3zZO6OA/s1600/macro.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFsS5dRBjY3kYn30UrhjdobQVUKdrB1zI6NgRQE5hoxAEn7wVmDzga4G1Rnqj7b1yy-y3w_f53vybQgLPn3BfEGVXKVLxqSPyYAQrnhGeo0l6oh6Hx0UcaWnbz2CFEZqqFk5_B3zZO6OA/s320/macro.png" width="316" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div>Vasiliy Sorokinhttp://www.blogger.com/profile/14924614737751448623noreply@blogger.com0