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
73e16e21
Commit
73e16e21
authored
Feb 10, 2016
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a separate UI file for the dragged audio session
parent
0dc02b43
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
19 deletions
+81
-19
sessions.py
blink/sessions.py
+10
-19
audio_session_drag.ui
resources/audio_session_drag.ui
+71
-0
No files found.
blink/sessions.py
View file @
73e16e21
...
@@ -1306,6 +1306,7 @@ class Bottom: __metaclass__ = MarkerType
...
@@ -1306,6 +1306,7 @@ class Bottom: __metaclass__ = MarkerType
ui_class
,
base_class
=
uic
.
loadUiType
(
Resources
.
get
(
'audio_session.ui'
))
ui_class
,
base_class
=
uic
.
loadUiType
(
Resources
.
get
(
'audio_session.ui'
))
class
AudioSessionWidget
(
base_class
,
ui_class
):
class
AudioSessionWidget
(
base_class
,
ui_class
):
def
__init__
(
self
,
session
,
parent
=
None
):
def
__init__
(
self
,
session
,
parent
=
None
):
super
(
AudioSessionWidget
,
self
)
.
__init__
(
parent
)
super
(
AudioSessionWidget
,
self
)
.
__init__
(
parent
)
...
@@ -1541,34 +1542,23 @@ class AudioSessionWidget(base_class, ui_class):
...
@@ -1541,34 +1542,23 @@ class AudioSessionWidget(base_class, ui_class):
super
(
AudioSessionWidget
,
self
)
.
paintEvent
(
event
)
super
(
AudioSessionWidget
,
self
)
.
paintEvent
(
event
)
ui_class
,
base_class
=
uic
.
loadUiType
(
Resources
.
get
(
'audio_session_drag.ui'
))
class
DraggedAudioSessionWidget
(
base_class
,
ui_class
):
class
DraggedAudioSessionWidget
(
base_class
,
ui_class
):
"""Used to draw a dragged session item"""
def
__init__
(
self
,
session_widget
,
parent
=
None
):
def
__init__
(
self
,
session_widget
,
parent
=
None
):
super
(
DraggedAudioSessionWidget
,
self
)
.
__init__
(
parent
)
super
(
DraggedAudioSessionWidget
,
self
)
.
__init__
(
parent
)
with
Resources
.
directory
:
with
Resources
.
directory
:
self
.
setupUi
(
self
)
self
.
setupUi
(
self
)
# add a left margin for the colored band
self
.
address_layout
.
setContentsMargins
(
8
,
-
1
,
-
1
,
-
1
)
self
.
stream_layout
.
setContentsMargins
(
8
,
-
1
,
-
1
,
-
1
)
self
.
bottom_layout
.
setContentsMargins
(
8
,
-
1
,
-
1
,
-
1
)
self
.
mute_button
.
hide
()
self
.
hold_button
.
hide
()
self
.
record_button
.
hide
()
self
.
hangup_button
.
hide
()
self
.
tls_label
.
hide
()
self
.
srtp_label
.
hide
()
self
.
latency_label
.
hide
()
self
.
packet_loss_label
.
hide
()
self
.
duration_label
.
hide
()
self
.
stream_info_label
.
setText
(
u''
)
self
.
address_label
.
setText
(
session_widget
.
address_label
.
text
())
self
.
selected
=
session_widget
.
selected
self
.
selected
=
session_widget
.
selected
self
.
in_conference
=
session_widget
.
position_in_conference
is
not
None
self
.
in_conference
=
session_widget
.
position_in_conference
is
not
None
self
.
address_label
.
setText
(
session_widget
.
address_label
.
text
())
if
self
.
in_conference
:
if
self
.
in_conference
:
self
.
status
_label
.
setText
(
u'Drop outside the conference to detach'
)
self
.
note
_label
.
setText
(
u'Drop outside the conference to detach'
)
else
:
else
:
self
.
status_label
.
setText
(
u'Drop over a session to conference them'
)
self
.
note_label
.
setText
(
u'Drop on a session to conference them'
)
self
.
status_label
.
show
()
def
paintEvent
(
self
,
event
):
def
paintEvent
(
self
,
event
):
painter
=
QPainter
(
self
)
painter
=
QPainter
(
self
)
...
@@ -1598,6 +1588,7 @@ class DraggedAudioSessionWidget(base_class, ui_class):
...
@@ -1598,6 +1588,7 @@ class DraggedAudioSessionWidget(base_class, ui_class):
painter
.
end
()
painter
.
end
()
super
(
DraggedAudioSessionWidget
,
self
)
.
paintEvent
(
event
)
super
(
DraggedAudioSessionWidget
,
self
)
.
paintEvent
(
event
)
del
ui_class
,
base_class
del
ui_class
,
base_class
...
...
resources/audio_session_drag.ui
0 → 100644
View file @
73e16e21
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
session
</class>
<widget
class=
"QWidget"
name=
"session"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
296
</width>
<height>
62
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Session
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"session_layout"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<property
name=
"leftMargin"
>
<number>
13
</number>
</property>
<property
name=
"topMargin"
>
<number>
4
</number>
</property>
<property
name=
"rightMargin"
>
<number>
5
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
4
</number>
</property>
<item>
<widget
class=
"QLabel"
name=
"address_label"
>
<property
name=
"font"
>
<font>
<weight>
75
</weight>
<bold>
true
</bold>
</font>
</property>
<property
name=
"text"
>
<string>
test@example.com
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
</set>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"note_label"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
<
html
><
head/
><
body
><
p
><
span style=
"
font-weight:600;
">
Drop
<
/span
>
: Conference
&
nbsp;
<
span style=
"
font-weight:600;
">
Alt+Drop
<
/span
>
: Transfer
<
/p
><
/body
><
/html
>
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft
</set>
</property>
<property
name=
"wordWrap"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
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