{"id":185212,"date":"2013-07-07T08:01:02","date_gmt":"2013-07-07T04:01:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=185212"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=185212","title":{"rendered":"<span class=\"post_title\">QtDbus \u2014 \u0442\u044c\u043c\u0430, \u043f\u043e\u043a\u0440\u044b\u0442\u0430\u044f \u0442\u0430\u0439\u043d\u043e\u044e. \u0427\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041d\u0430\u0448\u0435 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c Qt Graphics Framework, \u043d\u0430\u0441 \u0437\u0430\u0432\u0435\u0440\u0431\u043e\u0432\u0430\u043b\u0438 \u0435\u0433\u043e \u0441\u0432\u0435\u0442\u043b\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439, \u0430 \u043f\u043e\u0442\u043e\u043c \u043c\u044b \u0434\u043e\u043b\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u0433\u0440\u0430\u0431\u043b\u044f\u043c\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0447\u0430\u0441\u0442\u044f\u043c \u0442\u0435\u043b\u0430.<\/p>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u044d\u0442\u043e \u0441\u043f\u0438\u043d-\u043e\u0444\u0444 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u044e\u0436\u0435\u0442\u0430. \u0412 \u043d\u0435\u0439 \u0441\u043a\u0430\u0437 \u043f\u043e\u0439\u0434\u0435\u0442 \u043e QtDBus. \u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c Qt \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0435\u0449\u0435 \u0432 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438 \u0431\u044b\u043b \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0441\u043d\u0430\u0431\u0436\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438. \u041d\u043e \u0433\u0440\u044f\u043d\u0443\u043b Qt 5.0, \u0438 \u0443\u0436 \u043d\u0435 \u0437\u043d\u0430\u044e \u043f\u043e \u0447\u0435\u043c\u0443, \u043d\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0442\u044c\u043c\u044b \u043f\u0435\u0440\u0435\u0448\u043b\u0430 \u0432\u044b\u0448\u0435\u043d\u0430\u0437\u0432\u0430\u043d\u043d\u0430\u044f \u0434\u043e\u043a\u0430. .<a name=\"habracut\"><\/a>  <\/p>\n<h5>\u0414\u0435\u043b\u043e \u21161. \u041a\u0430\u043a \u0447\u0442\u043e \u0438 \u0441 \u0447\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c<\/h5>\n<p>  \u041f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 DBus \u043f\u043e \u0434\u043e\u043a\u0435 Qt \u2014 \u0434\u0435\u043b\u043e \u043d\u0435\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0435. \u0415\u0441\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u2014 \u044d\u0442\u043e <a href=\"http:\/\/dbus.freedesktop.org\/doc\/dbus-tutorial.html\">\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b<\/a> \u043e\u0442 \u0441\u0430\u043c\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 dbus. \u0418 \u0445\u043e\u0442\u044f \u044f \u043d\u0435 \u0441\u043a\u0430\u0436\u0443 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e, \u043d\u043e \u0440\u0430\u0434\u0438 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043e\u0431\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u043a\u0430\u043a \u0432\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<br \/>  \u0418\u0442\u0430\u043a, \u0441\u0430\u043c\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f:<br \/>  <img decoding=\"async\" src=\"http:\/\/dbus.freedesktop.org\/doc\/diagram.svg\" alt=\"image\"\/>\u041a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 D-Bus, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0435 \u043f\u043e \u0448\u0438\u043d\u0435, \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c, \u0442\u043e \u043e\u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f. \u0410\u0434\u0440\u0435\u0441\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u0435\u0439 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0443\u0442\u044f\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 D-Bus \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0430 \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u044d\u0442\u0438\u0445 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e\u0431 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443, \u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u0434\u043e  <\/p>\n<ol>\n<li>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043a \u0434\u0435\u043c\u043e\u043d\u0443 \u043d\u0430 \u0448\u0438\u043d\u0435. \u0414\u043b\u044f \u044d\u0442\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b>QDBusConnection<\/b>, \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0448\u0438\u043d \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. <\/li>\n<li>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0438\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043c \u0441\u0432\u043e\u0435 \u0438\u043c\u044f. \u042d\u0442\u043e \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u043c, \u0438\u043c\u0435\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435, \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0435, \u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0438\u043c\u044f, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043a \u043d\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u0441\u044f.\u0414\u043b\u044f \u044d\u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <b>QDBusConnection<\/b><i>::registerService().<\/i><\/li>\n<li>\u0418 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e \u043d\u0435\u043a\u043e\u043c\u0443 \u043f\u0443\u0442\u0438(<b>QDBusConnection<\/b><i>::registerObject()<\/i>).<\/li>\n<li>\u041f\u043e\u0434\u0446\u0435\u043f\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0443 \u0438 \u0435\u043c\u0443 \u0442\u043e\u0436\u0435 \u043d\u0430\u0434\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0438\u043c\u044f.<\/li>\n<\/ol>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0443\u0436 \u0442\u0430\u043a\u0438\u043c \u0432\u043e\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u043c. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441 \u0441 \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e \u0435\u0441\u0442\u044c \u0446\u0435\u043b\u044b\u0439 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432:  <\/p>\n<ul>\n<li>\u0421\u043f\u043e\u0441\u043e\u0431 \u0438\u0437 Qt-\u0448\u043d\u043e\u0439 \u0434\u043e\u043a\u0438.<\/li>\n<li>qdbus<\/li>\n<li>qdbusviewer<\/li>\n<li>dbus-monitor<\/li>\n<\/ul>\n<p>  <\/p>\n<h5>\u0414\u0435\u043b\u043e \u21162. \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435.<br \/>  <\/h5>\n<p>\u0418\u0442\u0430\u043a, \u0433\u043e\u0442\u043e\u0432\u044c\u0442\u0435\u0441\u044c, \u0432\u0440\u0430\u0442\u0430 \u0430\u0434\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u2014 \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0432\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: Ping \u0438 Pong(\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e <a href=\"http:\/\/qt.gitorious.org\/qt\/qt\/trees\/00fa3f364fe9657317cb14191167aa9991c1758e\/examples\/dbus\/complexpingpong\">\u044d\u0442\u043e\u043c\u0443<\/a> \u043f\u0440\u0438\u043c\u0435\u0440\u0443), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c.<br \/>   \u041f\u0440\u043e\u0435\u043a\u0442 Ping:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">main.cpp<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &lt;stdio.h&gt;  #include &lt;QObject&gt; #include &lt;QCoreApplication&gt; #include &lt;QDBusConnection&gt; #include &lt;QDBusConnectionInterface&gt; #include &lt;QDBusServiceWatcher&gt; #include &lt;QDebug&gt;  #include &quot;Ping.h&quot; #include &quot;..\/serviceNameAndProperty.h&quot; int main(int argc, char *argv[]) {     QCoreApplication a(argc, argv);      if (!QDBusConnection::sessionBus().isConnected()) {              fprintf(stderr, &quot;Cannot connect to the D-Bus session bus.\\n&quot;                      &quot;To start it, run:\\n&quot;                      &quot;\\teval `dbus-launch --auto-syntax`\\n&quot;);              return 1;     }     qDebug()&lt;&lt;&quot;Ping connected to D-bus&quot;;     Ping ping;      QDBusConnectionInterface *iface = QDBusConnection::sessionBus().interface();     QObject::connect(iface, SIGNAL(serviceRegistered(QString)), &ping, SLOT(connectToService(QString)));         QObject::connect(iface, SIGNAL(serviceUnregistered(QString)), &ping, SLOT(disconnect(QString)));     QStringList registedServices = iface-&gt;registeredServiceNames();     if(registedServices.contains(ping.m_aviableServiceName))         ping.connectToService(ping.m_aviableServiceName);      return a.exec(); } <\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Ping.h<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#ifndef PING_H #define PING_H  #include &lt;QObject&gt; #include &lt;QDBusAbstractInterface&gt; #include &lt;qdbusinterface.h&gt;  class Ping : public QObject {     Q_OBJECT public:     explicit Ping(QObject *parent = 0); public slots:     void connectToService(const QString &name);     void disconnect(const QString &name); public:     QString m_aviableServiceName; private:     QDBusInterface *m_interface;     QString m_interfaceName;     static const QString _propertyName; }; #endif \/\/ PING_H <\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Ping.cpp<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &quot;Ping.h&quot; #include &quot;..\/serviceNameAndProperty.h&quot; #include &lt;QDBusConnectionInterface&gt; #include &lt;QDebug&gt;  const QString Ping::_propertyName(QUIOTING(IMAGE_DATA_SHARED_ID)); Ping::Ping(QObject *parent) :     QObject(parent) {     m_interface = NULL;     m_interfaceName = QString(BUFFER_NAME);     m_aviableServiceName = QString(SERVICE_NAME); }  void Ping::connectToService(const QString &name) {     if(name != m_aviableServiceName)         return;     qDebug()&lt;&lt;&quot;Connceting&quot;;     m_interface = new QDBusInterface(name, &quot;\/&quot;, m_interfaceName, QDBusConnection::sessionBus(), this);     if(!m_interface-&gt;isValid()){         qDebug()&lt;&lt;&quot;Invalid interface&quot;&lt;&lt;m_interface-&gt;lastError();         delete m_interface;         m_interface = NULL;         return;     }     qDebug()&lt;&lt;m_interface-&gt;interface();      QVariant var(&quot;ku&quot;);     var = m_interface-&gt;property(&quot;imageDataSharedId&quot;);     qDebug()&lt;&lt;var; }  void Ping::disconnect(const QString &name) {     if(name != m_aviableServiceName)         return;     if(name != m_interface-&gt;service())         return;      delete m_interface;     m_interface = NULL;     qDebug()&lt;&lt;&quot;Disconnect&quot;; } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u041f\u0440\u043e\u0435\u043a\u0442 Pong:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">main.cpp<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &lt;QCoreApplication&gt; #include &lt;QDBusConnection&gt; #include &lt;QDBusError&gt; #include &lt;QDebug&gt;  #include &quot;Pong.h&quot; #include &quot;..\/serviceNameAndProperty.h&quot; int main(int argc, char *argv[]) {     QCoreApplication a(argc, argv);      QObject obj;     Pong *pong = new Pong(&obj);     if( ! QDBusConnection::sessionBus().registerObject(&quot;\/&quot;, &obj)){         fprintf(stderr, &quot;%s\\n&quot;,                 qPrintable(&quot;Can't register object&quot;));         exit(1);     }     qDebug()&lt;&lt;&quot;Pong connected to D-bus&quot;;      if (!QDBusConnection::sessionBus().registerService(SERVICE_NAME)) {         fprintf(stderr, &quot;%s\\n&quot;,                 qPrintable(QDBusConnection::sessionBus().lastError().message()));         exit(1);     }     qDebug()&lt;&lt;&quot;Test service start&quot;;     return a.exec(); } <\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Pong.h<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#ifndef PONG_H #define PONG_H #include &lt;QDBusAbstractAdaptor&gt; #include &lt;QDBusVariant&gt;  #include &quot;..\/serviceNameAndProperty.h&quot; class Pong : public QDBusAbstractAdaptor {     Q_OBJECT     Q_CLASSINFO(&quot;D-Bus Interface&quot;, BUFFER_NAME)     Q_PROPERTY(QString IMAGE_DATA_SHARED_ID READ imageDataSharedId) public:     explicit Pong(QObject *parent = nullptr);          QString imageDataSharedId();  private:     QString m_imageDataSharedId;      }; #endif \/\/ PONG_H <\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Pong.cpp<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &quot;Pong.h&quot;  Pong::Pong(QObject *parent) :     QDBusAbstractAdaptor(parent) {     m_imageDataSharedId = &quot;testImageBufferId&quot;; }  QString Pong::imageDataSharedId() {     return m_imageDataSharedId; } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u0449\u0438\u0439 \u0444\u0430\u0439\u043b serviceNameAndProperty.h<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#ifndef SERVICENAMEANDPROPERTY_H #define SERVICENAMEANDPROPERTY_H #define SERVICE_NAME &quot;ru.sonarh.dbus.pong&quot; #define BUFFER_NAME &quot;buffer&quot; #define IMAGE_DATA_SHARED_ID imageDataSharedId #define QUIOTING(text) #text #endif \/\/ SERVICENAMEANDPROPERTY_H <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0438\u043d\u0433, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u043d\u0433. \u041d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/99c\/c61\/bf5\/99cc61bf51155d8ebfce14c5c4706cc7.png\"\/><br \/>  \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043f\u0438\u043d\u0433 \u043d\u0435 \u0443\u0437\u043d\u0430\u0435\u0442 \u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u043d\u0433\u0430. \u0412 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043a\u0430\u0445 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u043e\u0434\u0443 qdbusviewer:  <\/p>\n<pre><code class=\"cpp\">QDBusConnectionInterface *iface = c.interface();         connect(iface, SIGNAL(serviceRegistered(QString)),                 this, SLOT(serviceRegistered(QString)));         connect(iface, SIGNAL(serviceUnregistered(QString)),                 this, SLOT(serviceUnregistered(QString)));         connect(iface, SIGNAL(serviceOwnerChanged(QString,QString,QString)),                 this, SLOT(serviceOwnerChanged(QString,QString,QString))); <\/code><\/pre>\n<p>  \u0412\u0440\u043e\u0434\u0435 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435. \u0410\u043d-\u043d\u0435\u0442, \u0432 \u0441\u043b\u043e\u0442\u0430\u0445 \u0443 \u043d\u0438\u0445 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0435:  <\/p>\n<pre><code class=\"cpp\">void QDBusViewer::serviceOwnerChanged(const QString &name, const QString &oldOwner,                                       const QString &newOwner) {     QModelIndex hit = findItem(servicesModel, name);      if (!hit.isValid() && oldOwner.isEmpty() && !newOwner.isEmpty())         serviceRegistered(name);     else if (hit.isValid() && !oldOwner.isEmpty() && newOwner.isEmpty())         servicesModel-&gt;removeRows(hit.row(), 1);     else if (hit.isValid() && !oldOwner.isEmpty() && !newOwner.isEmpty()) {         servicesModel-&gt;removeRows(hit.row(), 1);         serviceRegistered(name);     } } <\/code><\/pre>\n<p>  \u0412\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043a\u043e\u0434 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0434\u043e\u043a\u0438. \u041b\u0430\u0434\u043d\u043e, \u043f\u0438\u0448\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0443 \u0441\u0435\u0431\u044f:  <\/p>\n<pre><code class=\"cpp\">void Ping::manageConnection(const QString& name, const QString &oldVAlue, const QString &newValue) {     if(name != m_aviableServiceName)         return;     if(newValue.isEmpty())         disconnect(name);     else         connectToService(name); } <\/code><\/pre>\n<p>  \u0418 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e <i>serviceOwnerChanged<\/i>. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435, \u0442\u0440\u043e\u043b\u043b\u0438 \u043d\u0430\u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0442, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0441\u0438\u0433\u043d\u0430\u043b deprecated. \u0425\u043e\u0440\u043e\u0448\u043e, \u0442\u043e\u0433\u0434\u0430 \u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"cpp\">QDBusServiceWatcher watcher;     watcher.setConnection(QDBusConnection::sessionBus());;      QObject::connect(&watcher, SIGNAL(serviceOwnerChanged(QString,QString,QString)),&ping,  SLOT(manageConnection(QString,QString,QString)));<\/code><\/pre>\n<p> \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u041d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u2026 \u042d\u0439, \u0442\u0440\u043e\u043b\u043b\u0438, \u0432\u044b \u0442\u0440\u043e\u043b\u043b\u0438\u0442\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0436\u0438\u0440\u043d\u043e! \u0421\u043a\u0430\u0436\u0438\u0442\u0435, \u043a\u0430\u043a \u043d\u0430\u0434\u043e \u044e\u0437\u0430\u0442\u044c \u0441\u0438\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0435? \u041d\u0435\u0442, \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443  <\/p>\n<pre><code class=\"cpp\">    watcher.addWatchedService(ping.m_aviableServiceName);<\/code><\/pre>\n<p> \u0427\u0442\u043e \u0432\u0441\u0435 \u0437\u0430\u0440\u0430\u0431\u0430\u043e\u0442\u0430\u0435\u0442 \u0438 \u043c\u044b \u0434\u0430\u0436\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0434\u0435\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043d\u0443 \u0430 \u0435\u0441\u043b\u0438 \u044f \u043d\u0435 \u0437\u043d\u0430\u044e \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438, \u0430 \u0437\u043d\u0430\u044e \u043b\u0438\u0448\u044c \u043c\u0430\u0441\u043a\u0443?<\/p>\n<h5>\u0414\u0435\u043b\u043e \u21163. \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b.<\/h5>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u043a\u0440\u0443\u0433. \u041d\u043e \u0432\u0435\u0434\u044c \u0441\u0440\u0430\u0437\u0443 \u0437\u0430 \u043d\u0438\u043c \u0438\u0434\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0439! \u0410 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d \u0432\u043e\u0442 \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/3e1\/b44\/b30\/3e1b44b309e5b828a1c1bf83f56e6bae.png\"\/><br \/>   \u0422.\u0435. \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0421\u043d\u043e\u0432\u0430 \u043b\u0435\u0437\u0435\u043c \u0432 qdbusviewer \u0438 \u0432\u0438\u0434\u0438\u043c \u0442\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:  <\/p>\n<pre><code class=\"cpp\">    QDBusMessage message = QDBusMessage::createMethodCall(sig.mService, sig.mPath, QLatin1String(&quot;org.freedesktop.DBus.Properties&quot;), QLatin1String(&quot;Get&quot;));     QList&lt;QVariant&gt; arguments;     arguments &lt;&lt; sig.mInterface &lt;&lt; sig.mName;     message.setArguments(arguments);     c.callWithCallback(message, this, SLOT(dumpMessage(QDBusMessage))); <\/code><\/pre>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0434\u0430, \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041d\u043e \u0434\u043e\u043a\u0430 \u043d\u0430\u043c \u043e\u0431\u0435\u0449\u0430\u0435\u0442 \u043d\u0435\u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u043c\u044f\u0433\u0447\u0435, \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u0435\u0435. \u0415\u0441\u043b\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u043d\u0430  <\/p>\n<pre><code class=\"cpp\">    QDBusInterface iface(sig.mService, sig.mPath, sig.mInterface,c);     if( !iface.isValid())         qDebug()&lt;&lt;(QDBusError(iface.lastError()).message());     else         qDebug()&lt;&lt;iface.property(sig.mName.toLatin1().data()); <\/code><\/pre>\n<p> \u0422\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432\u0448\u0430\u044f \u043d\u0430\u0441, \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0441\u044f. <br \/>  \u0418\u0442\u0430\u043a, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0435\u0441\u0442\u044c, \u043d\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0435\u0435 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u0430. \u041f\u0435\u0440\u0432\u043e\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u2014 \u0437\u0430\u043b\u0435\u0437\u0442\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 Qt. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043b\u043e\u0431\u043e\u0432\u043e\u0435, \u043d\u043e \u0437\u0430 \u0447\u0430\u0441 \u043a \u0443\u0441\u043f\u0435\u0445\u0443 \u044f \u043d\u0435 \u043f\u0440\u0438\u0448\u0435\u043b, \u0430 \u043c\u043e\u0437\u0433 \u043d\u0430\u043f\u0440\u044f\u0433 \u0438\u0437\u0440\u044f\u0434\u043d\u043e. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0448\u043b\u043e \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b: \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044f \u0437\u0430 \u0442\u0435\u043c \u043a\u0430\u043a \u0432\u044b\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432 KDE, \u043e\u0441\u043e\u0437\u043d\u0430\u043b, \u0447\u0442\u043e  <\/p>\n<blockquote><p>To facilitate remembering of the naming formats and their purposes, the following table can be used:<\/p>\n<table>\n<tbody>\n<tr>\n<td>Service name<\/td>\n<td>Network hostnames<\/td>\n<td>Dot-separated (\u00ablooks like a hostname\u00bb)<\/td>\n<\/tr>\n<tr>\n<td>Object path<\/td>\n<td>URL path component<\/td>\n<td>Slash-separated (\u00ablooks like a path\u00bb)<\/td>\n<\/tr>\n<tr>\n<td>Interface<\/td>\n<td>Plugin identifier<\/td>\n<td>Dot-separated<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/blockquote>\n<p>\u044d\u0442\u043e \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u0438\u043b\u0438 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u044f, \u0430 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e. \u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <b>BUFFER_NAME<\/b> \u043d\u0430 \u043d\u0435\u0432\u0440\u0430\u0437\u0443\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 fdgfsgf.buffer, \u0442\u043e \u0432\u0441\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. <br \/>  \u0415\u0441\u043b\u0438 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u043a\u0443 D-Bus \u043f\u043e-\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435, <a href=\"http:\/\/dbus.freedesktop.org\/doc\/dbus-specification.html#message-protocol-names\">\u0442\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u0441\u044f<\/a>, \u0447\u0442\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432 \u0438\u043c\u0435\u043d\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u043e\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0432 qdbusviewer?<\/p>\n<h5>\u0411\u043e\u043d\u0443\u0441-\u043b\u0435\u0432\u0435\u043b<br \/>  <\/h5>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043f\u043e\u043d\u0433\u0435, \u0432 main.cpp \u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u043c\u0438:  <\/p>\n<pre><code class=\"cpp\">Pong pong;     if( ! QDBusConnection::sessionBus().registerObject(&quot;\/&quot;, &pong)){ <\/code><\/pre>\n<p> \u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 Segmentation fault;<\/p>\n<h5>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/h5>\n<p>  \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0435\u0434\u0438\u043d\u043e\u0439, \u043d\u043e \u043f\u043e \u043c\u0435\u0440\u0435 \u043c\u043e\u0435\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0438 \u0440\u0430\u0437\u0440\u0430\u0441\u0442\u0430\u043b\u0430\u0441\u044c. \u0418 \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u0434\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432, \u0447\u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0430\u043b\u044c\u0448\u0435?<\/p>\n<h5>\u0421\u0441\u044b\u043b\u043a\u0438<\/h5>\n<ul>\n<li><a href=\"http:\/\/qt-project.org\/doc\/qt-5.0\/qtdbus\/qtdbus-index.html\">Qt-\u0448\u043d\u0430\u044f \u0434\u043e\u043a\u0430<\/a><\/li>\n<li><a href=\"http:\/\/www.freedesktop.org\/wiki\/Software\/dbus\/\">Wiki \u043f\u043e Dbus<\/a><\/li>\n<li> <a href=\"http:\/\/techbase.kde.org\/Development\/Tutorials\/D-Bus\">C\u0442\u0430\u0442\u044c\u0438 \u043e D-Bus \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 KDE<\/a><\/li>\n<li><a href=\"http:\/\/ru.wikipedia.org\/wiki\/D-Bus\">\u0421\u0442\u0430\u0442\u044c\u044f D-Bus \u043d\u0430 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438<\/a><\/li>\n<\/ul>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/185212\/\"> http:\/\/habrahabr.ru\/post\/185212\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041d\u0430\u0448\u0435 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c Qt Graphics Framework, \u043d\u0430\u0441 \u0437\u0430\u0432\u0435\u0440\u0431\u043e\u0432\u0430\u043b\u0438 \u0435\u0433\u043e \u0441\u0432\u0435\u0442\u043b\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439, \u0430 \u043f\u043e\u0442\u043e\u043c \u043c\u044b \u0434\u043e\u043b\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u0433\u0440\u0430\u0431\u043b\u044f\u043c\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0447\u0430\u0441\u0442\u044f\u043c \u0442\u0435\u043b\u0430.<\/p>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u044d\u0442\u043e \u0441\u043f\u0438\u043d-\u043e\u0444\u0444 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u044e\u0436\u0435\u0442\u0430. \u0412 \u043d\u0435\u0439 \u0441\u043a\u0430\u0437 \u043f\u043e\u0439\u0434\u0435\u0442 \u043e QtDBus. \u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c Qt \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0435\u0449\u0435 \u0432 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438 \u0431\u044b\u043b \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0441\u043d\u0430\u0431\u0436\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438. \u041d\u043e \u0433\u0440\u044f\u043d\u0443\u043b Qt 5.0, \u0438 \u0443\u0436 \u043d\u0435 \u0437\u043d\u0430\u044e \u043f\u043e \u0447\u0435\u043c\u0443, \u043d\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0442\u044c\u043c\u044b \u043f\u0435\u0440\u0435\u0448\u043b\u0430 \u0432\u044b\u0448\u0435\u043d\u0430\u0437\u0432\u0430\u043d\u043d\u0430\u044f \u0434\u043e\u043a\u0430. .<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-185212","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/185212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=185212"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/185212\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=185212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=185212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=185212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}