mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-23 13:42:55 +08:00
Merge pull request #561 from yunyaobaihong/master
Shortcut Key Update Version
This commit is contained in:
commit
5bb68cf9bc
@ -118,6 +118,8 @@ namespace pv
|
||||
setup_ui();
|
||||
|
||||
setContextMenuPolicy(Qt::NoContextMenu);
|
||||
|
||||
_key_vaild = false;
|
||||
}
|
||||
|
||||
void MainWindow::setup_ui()
|
||||
@ -1100,6 +1102,15 @@ namespace pv
|
||||
{
|
||||
const auto &sigs = _session->get_signals();
|
||||
QKeyEvent *ke = (QKeyEvent *)event;
|
||||
|
||||
int modifier = ke->modifiers();
|
||||
if(modifier & Qt::ControlModifier ||
|
||||
modifier & Qt::ShiftModifier ||
|
||||
modifier & Qt::AltModifier)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ke->key())
|
||||
{
|
||||
case Qt::Key_S:
|
||||
|
@ -214,6 +214,9 @@ private:
|
||||
SigSession *_session;
|
||||
DeviceAgent *_device_agent;
|
||||
bool _is_auto_switch_device;
|
||||
|
||||
int _key_value;
|
||||
bool _key_vaild;
|
||||
};
|
||||
|
||||
} // namespace pv
|
||||
|
Loading…
x
Reference in New Issue
Block a user