Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
688f2a1f
Commit
688f2a1f
authored
Jul 27, 2010
by
Luci Stanescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added keyboard shortcuts for hangup and hold
parent
ba242bba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
sessions.py
blink/sessions.py
+19
-1
No files found.
blink/sessions.py
View file @
688f2a1f
...
@@ -14,7 +14,7 @@ from functools import partial
...
@@ -14,7 +14,7 @@ from functools import partial
from
PyQt4
import
uic
from
PyQt4
import
uic
from
PyQt4.QtCore
import
Qt
,
QAbstractListModel
,
QByteArray
,
QEvent
,
QMimeData
,
QModelIndex
,
QObject
,
QSize
,
QStringList
,
QTimer
,
pyqtSignal
from
PyQt4.QtCore
import
Qt
,
QAbstractListModel
,
QByteArray
,
QEvent
,
QMimeData
,
QModelIndex
,
QObject
,
QSize
,
QStringList
,
QTimer
,
pyqtSignal
from
PyQt4.QtGui
import
QAction
,
QApplication
,
QBrush
,
QColor
,
QDrag
,
QLinearGradient
,
QListView
,
QMenu
,
QPainter
,
QPen
,
QPixmap
,
QStyle
,
QStyledItemDelegate
from
PyQt4.QtGui
import
QAction
,
QApplication
,
QBrush
,
QColor
,
QDrag
,
QLinearGradient
,
QListView
,
QMenu
,
QPainter
,
QPen
,
QPixmap
,
QS
hortcut
,
QS
tyle
,
QStyledItemDelegate
from
application.notification
import
IObserver
,
NotificationCenter
from
application.notification
import
IObserver
,
NotificationCenter
from
application.python.util
import
Null
,
Singleton
from
application.python.util
import
Null
,
Singleton
...
@@ -1237,6 +1237,14 @@ class SessionListView(QListView):
...
@@ -1237,6 +1237,14 @@ class SessionListView(QListView):
self
.
dragged_session
=
None
self
.
dragged_session
=
None
self
.
_pressed_position
=
None
self
.
_pressed_position
=
None
self
.
_pressed_index
=
None
self
.
_pressed_index
=
None
self
.
_hangup_shortcut
=
QShortcut
(
self
)
self
.
_hangup_shortcut
.
setKey
(
'CTRL+ESC'
)
self
.
_hangup_shortcut
.
setContext
(
Qt
.
ApplicationShortcut
)
self
.
_hangup_shortcut
.
activated
.
connect
(
self
.
_SH_HangupShortcutActivated
)
self
.
_hold_shortcut
=
QShortcut
(
self
)
self
.
_hold_shortcut
.
setKey
(
'CTRL+SPACE'
)
self
.
_hold_shortcut
.
setContext
(
Qt
.
ApplicationShortcut
)
self
.
_hold_shortcut
.
activated
.
connect
(
self
.
_SH_HoldShortcutActivated
)
def
setModel
(
self
,
model
):
def
setModel
(
self
,
model
):
selection_model
=
self
.
selectionModel
()
or
Null
selection_model
=
self
.
selectionModel
()
or
Null
...
@@ -1406,6 +1414,16 @@ class SessionListView(QListView):
...
@@ -1406,6 +1414,16 @@ class SessionListView(QListView):
else
:
else
:
session
.
widget
.
drop_indicator
=
True
session
.
widget
.
drop_indicator
=
True
def
_SH_HangupShortcutActivated
(
self
):
session
=
self
.
model
()
.
data
(
self
.
selectedIndexes
()[
0
])
if
session
.
conference
is
None
:
session
.
widget
.
hangup_button
.
click
()
def
_SH_HoldShortcutActivated
(
self
):
session
=
self
.
model
()
.
data
(
self
.
selectedIndexes
()[
0
])
if
session
.
conference
is
None
:
session
.
widget
.
hold_button
.
click
()
def
_SH_SelectionModelSelectionChanged
(
self
,
selected
,
deselected
):
def
_SH_SelectionModelSelectionChanged
(
self
,
selected
,
deselected
):
model
=
self
.
model
()
model
=
self
.
model
()
for
session
in
(
model
.
data
(
index
)
for
index
in
deselected
.
indexes
()):
for
session
in
(
model
.
data
(
index
)
for
index
in
deselected
.
indexes
()):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment