qte和顯示裝置關聯的過程

2021-05-22 19:40:36 字數 1031 閱讀 4397

本文以qte 2.3.10為例,雖然這已經是很老的版本了,但是在某些場合它仍然是非常適合的。

qpainter_qws.cpp

qpainter::begin():

gfx = ((qpaintdevice *)pdev)->graphicscontext();

qwidget_qws.cpp

qwidget::graphicscontext():

qgfx_qws=qwsdisplay()->screengfx();

qpaintdevice::qwsdisplay()->screengfx();

qgfx * qwsdisplay::screengfx()

從qgfx_qws.cpp開始:

qgfx *qgfx::creategfx()呼叫qt_screen->creategfx()來進行關聯。qt_screen是個全域性變數,它在qgfxraser_qws.cpp中的qscreen *qt_get_screen( int display_id, const char *spec )被初始化。初始化語句為:

qt_screen = drivertable[i].qt_get_screen( display_id );而drivertable又是全域性變數,在當qgfxraser_qws.cpp中直接在編譯時被賦值:

struct drivertable

char *name;

qscreen *(*qt_get_screen)(int);

int accel;

} drivertable = ,

#endif

#if !defined(qt_no_qws_vnc)

,#endif

,#if !defined(qt_no_qws_linuxfb)

#include "qgfxlinuxfb_qws.cpp"

#endif

而且,qgfxraser_qws.cpp中用c++的模板功能實現了最底層的畫圖功能,如drawline,drawpoint,但是不包含硬體加速。需要硬體加速的需要要自己另外實現。

Qt E中的鍵盤裝置管理

font face p.msonormal,li.msonormal,div.msonormal p.msocaption,li.msocaption,div.msocaption p.a,li.a,div.a page page section1 div.section1 鍵盤裝置在 qt中表現為...

zigbee協議學習之端裝置關聯過程抓包

關聯過程 關聯過程抓包分析 beacon request幀展開 beacon幀展開 父節點廣播的裝置申明 通過關聯方式加入乙個網路 加入乙個裝置,是兩個裝置的事,即子裝置和待定父裝置 對於子裝置,首先子裝置呼叫nlme network discovery.request 原語,設定待掃瞄的通道,以及...

間隔層裝置和過程層簡介

1.間隔層裝置包括 測控裝置,保護裝置,數字錄播器。2.繼電保護與智慧型終端採用goose點對點,保護之間採用goose組網傳輸方式。3.過程層裝置包括,非常規互感器,合併單元,智慧型操作箱。4.合併單元,對感測器傳來的三相電氣量進行合併和同步處理,並將處理後的數碼訊號按特定格式提供給間隔層裝置使用...