MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / WinShadow

Method WinShadow

DSView/pv/winshadow.cpp:30–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace pv {
29
30WinShadow::WinShadow(HWND hwnd, QWidget *parent)
31 : QWidget(parent)
32{
33
34 m_hwnd = HWND(hwnd);
35 m_parent = parent;
36 m_scale = 1;
37 m_bActived = false;
38 m_callback = NULL;
39
40 setWindowFlags(Qt::Window | Qt::FramelessWindowHint |
41 (!m_parent ? Qt::Tool : Qt::WindowFlags(0)));
42
43 setAttribute(Qt::WA_NoSystemBackground);
44 setAttribute(Qt::WA_TranslucentBackground);
45
46 m_timer = new QTimer(this);
47 m_timer->setInterval(100);
48 m_timer->setSingleShot(true);
49
50 m_checkTimer = new QTimer(this);
51 m_checkTimer->setInterval(300);
52 m_checkTimer->start();
53
54 connect(m_timer, &QTimer::timeout, this, &WinShadow::showShadow);
55 connect(this, &WinShadow::showSignal, this, &WinShadow::onMoveSelf);
56 connect(m_checkTimer, &QTimer::timeout, this, &WinShadow::onCheckForeWindow);
57}
58
59void WinShadow::onMoveSelf()
60{

Callers

nothing calls this directly

Calls 1

startMethod · 0.45

Tested by

no test coverage detected