<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # QDBusServiceWatcher Class Reference ## [[QtDBus](index.htm) module] 該QDBusServiceWatcher類允許用戶觀看的巴士服務的變化。[More...](#details) 繼承[QObject](qobject.html)。 ### Types * `class **[WatchMode](index.htm)**` * `enum WatchModeFlag { WatchForRegistration, WatchForUnregistration, WatchForOwnerChange }` ### Methods * `__init__ (self, QObject?parent?=?None)` * `__init__ (self, QString?service, QDBusConnection?connection, WatchMode?watchMode?=?QDBusServiceWatcher.WatchForOwnerChange, QObject?parent?=?None)` * `addWatchedService (self, QString?newService)` * `QDBusConnection connection (self)` * `bool removeWatchedService (self, QString?service)` * `setConnection (self, QDBusConnection?connection)` * `setWatchedServices (self, QStringList?services)` * `setWatchMode (self, WatchMode?mode)` * `QStringList watchedServices (self)` * `WatchMode watchMode (self)` ### Qt Signals * `void serviceOwnerChanged (const QString&,const QString&,const QString&)` * `void serviceRegistered (const QString&)` * `void serviceUnregistered (const QString&)` * * * ## Detailed Description 該QDBusServiceWatcher類允許用戶觀看的巴士服務的變化。 一個QDBusServiceWatcher對象可以用來通知用戶有關服務名的總線上的所有權變更申請。它有三個手表模式: * Watching for service registration only. * Watching for service unregistration only. * Watching for any kind of service ownership change (the default mode). 除了被創建或刪除,服務可能會改變所有人沒有注銷/寄存器操作發生的事情。所以,[serviceRegistered](qdbusservicewatcher.html#serviceRegistered)()和[serviceUnregistered](qdbusservicewatcher.html#serviceUnregistered)如果發生這種情況()信號可能不被發射。 這個類是比使用更高效的[QDBusConnectionInterface.serviceOwnerChanged](qdbusconnectioninterface.html#serviceOwnerChanged)( )信號,因為它允許一個只接收為其類是感興趣的信號 * * * ## Type Documentation ``` QDBusServiceWatcher.WatchModeFlag ``` [QDBusServiceWatcher](qdbusservicewatcher.html)支持三種不同的觀看模式,這是由該標志配置: | Constant | Value | Description | | --- | --- | --- | | `QDBusServiceWatcher.WatchForRegistration` | `0x01` | 手表僅售服務注冊,而忽略與其他服務的所有權變更的任何信號。 | | `QDBusServiceWatcher.WatchForUnregistration` | `0x02` | 手表僅售服務注銷,而忽略相關的其他服務所有權變更的任何信號。 | | `QDBusServiceWatcher.WatchForOwnerChange` | `0x03` | 觀看任何類型的服務所有權的變化。 | 該WatchMode類型是一個typedef為[QFlags](index.htm)\u003cWatchModeFlag\u003e 。它存儲WatchModeFlag值的或組合。 * * * ## Method Documentation ``` QDBusServiceWatcher.__init__ (self, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 創建[QDBusServiceWatcher](qdbusservicewatcher.html)對象。需要注意的是,直到你設置一個連接[setConnection](qdbusservicewatcher.html#setConnection)( ) ,這個對象將不會發出任何信號。 該_parent_參數被傳遞到[QObject](qobject.html)設置該對象的父。 ``` QDBusServiceWatcher.__init__ (self, QString?service, QDBusConnection?connection, WatchMode?watchMode?=?QDBusServiceWatcher.WatchForOwnerChange, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 創建[QDBusServiceWatcher](qdbusservicewatcher.html)對象,并將其附加到_connection_連接。另外,此功能將立即啟動窺伺_watchMode_更改服務_service_。 該_parent_參數被傳遞到[QObject](qobject.html)設置該對象的父。 ``` QDBusServiceWatcher.addWatchedService (self, QString?newService) ``` 添加_newService_到服務,通過該對象被監視的列表。這個函數是比更有效[setWatchedServices](qdbusservicewatcher.html#watchedServices-prop)( ),并應盡可能使用添加服務。 ``` QDBusConnection QDBusServiceWatcher.connection (self) ``` [](qdbusconnection.html) [返回](qdbusconnection.html)[QDBusConnection](qdbusconnection.html)這個對象附加到。 **See also** [setConnection](qdbusservicewatcher.html#setConnection)( ) 。 ``` bool QDBusServiceWatcher.removeWatchedService (self, QString?service) ``` 移除_service_從正在觀看由該對象的服務的列表。需要注意的是D-Bus的通知是異步的,所以有可能還是待交付有關信號_service_。每當D-Bus的消息處理這些信號仍然會排放。 如果被拆除的任何服務該函數返回True。 ``` QDBusServiceWatcher.setConnection (self, QDBusConnection?connection) ``` 設置D-Bus的連接,這個對象附加到會_connection_。看著所有服務將被轉移到這方面。 需要注意的是[QDBusConnection](qdbusconnection.html)對象引用計數:[QDBusServiceWatcher](qdbusservicewatcher.html)將保持一個參考此連接,而它的存在。連接不關閉,直到引用計數下降到零,所以這將確保任何通知而收到這[QDBusServiceWatcher](qdbusservicewatcher.html)對象存在。 **See also** [connection](qdbusservicewatcher.html#connection)( ) 。 ``` QDBusServiceWatcher.setWatchedServices (self, QStringList?services) ``` ``` QDBusServiceWatcher.setWatchMode (self, WatchMode?mode) ``` ``` QStringList QDBusServiceWatcher.watchedServices (self) ``` ``` WatchMode QDBusServiceWatcher.watchMode (self) ``` [ * * * ## Qt Signal Documentation ``` void serviceOwnerChanged (const QString&,const QString&,const QString&) ``` 這是該信號的默認超載。 每當這個對象檢測到有關于該服務的所有權改變這個信號被發射_serviceName_服務。該_oldOwner_參數包含舊的所有者名稱和_newOwner_是新的主人。兩_oldOwner_和_newOwner_是唯一的連接名。 注意,此信號也被發射時的_serviceName_服務注冊或未注冊。如果它被注冊,_oldOwner_將包含一個空字符串,而如果是未注冊的,_newOwner_將包含一個空字符串。 如果你只需要找出如果該服務被注冊或只登記,不被通知的所有權變更,請考慮使用這些操作的具體模式。如果您使用更具體的模式這個類是更有效的。 ](index.htm) [**See also**](index.htm) [serviceRegistered](qdbusservicewatcher.html#serviceRegistered)()和[serviceUnregistered](qdbusservicewatcher.html#serviceUnregistered)( ) 。 ``` void serviceRegistered (const QString&) ``` 這是該信號的默認超載。 每當這個對象檢測這個信號被發射,該服務_serviceName_在公共汽車上變得可用。 **See also** [serviceUnregistered](qdbusservicewatcher.html#serviceUnregistered)()和[serviceOwnerChanged](qdbusservicewatcher.html#serviceOwnerChanged)( ) 。 ``` void serviceUnregistered (const QString&) ``` 這是該信號的默認超載。 每當這個對象檢測這個信號被發射,該服務_serviceName_從總線被取消注冊,并不再可用。 **See also** [serviceRegistered](qdbusservicewatcher.html#serviceRegistered)()和[serviceOwnerChanged](qdbusservicewatcher.html#serviceOwnerChanged)( ) 。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看