MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / CFrmFullScreenToolBar

Method CFrmFullScreenToolBar

App/Client/FrmFullScreenToolBar.cpp:17–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15static Q_LOGGING_CATEGORY(logRecord, "App.MainWindow.FullScreen.Record")
16
17CFrmFullScreenToolBar::CFrmFullScreenToolBar(MainWindow *pMain, QWidget *parent) :
18 QWidget(parent,
19 Qt::FramelessWindowHint
20 #ifndef WIN32
21 | Qt::X11BypassWindowManagerHint //这个标志是在x11下有用,查看帮>助QWidget::showFullScreen(),符合ICCCM协议的不需要这个
22 #endif
23 | Qt::Tool
24 | Qt::WindowStaysOnTopHint
25 | Qt::CustomizeWindowHint
26 ),
27 ui(new Ui::CFrmFullScreenToolBar),
28 m_ToolBar(this),
29 m_pOperateMenu(nullptr),
30 m_pNail(nullptr),
31 m_pMain(pMain),
32 m_TimeOut(3000),
33 m_isHide(false)
34{
35 bool check = false;
36 setAttribute(Qt::WA_DeleteOnClose);
37 ui->setupUi(this);
38
39 //setFocusPolicy(Qt::NoFocus);
40
41 QSettings set(RabbitCommon::CDir::Instance()->GetFileUserConfigure());
42 m_ToolBar.addSeparator();
43 m_pNail = m_ToolBar.addAction(QIcon::fromTheme("nail"), tr("Nail"),
44 this, SLOT(slotNail()));
45 m_pNail->setCheckable(true);
46 m_pNail->setChecked(set.value("FullScreen/Nail", true).toBool());
47 m_pNail->setToolTip(tr("Nail"));
48 m_pNail->setStatusTip(tr("Nail"));
49 m_ToolBar.addSeparator();
50 m_ToolBar.addAction(m_pMain->ui->actionFull_screen_F);
51
52 m_ToolBar.addSeparator();
53 if(m_pMain->m_pActionOperateMenu) {
54 m_pOperateMenu = m_pMain->m_pActionOperateMenu;
55 m_ToolBar.addAction(m_pOperateMenu);
56 }
57
58 m_ToolBar.addAction(m_pMain->ui->actionStop);
59 m_ToolBar.addSeparator();
60 m_ToolBar.addAction(m_pMain->ui->actionExit_E);
61
62 m_ToolBar.show();
63
64 check = connect(&m_Timer, SIGNAL(timeout()),
65 this, SLOT(slotTimeOut()));
66 Q_ASSERT(check);
67
68 m_Timer.start(m_TimeOut);
69
70 ReToolBarSize();
71}
72
73CFrmFullScreenToolBar::~CFrmFullScreenToolBar()
74{

Callers

nothing calls this directly

Calls 2

setupUiMethod · 0.80
startMethod · 0.80

Tested by

no test coverage detected