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
c92ecc5f
Commit
c92ecc5f
authored
Jun 10, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved user interaction with the conference button
parent
cc4caa58
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
5 deletions
+36
-5
buttons.py
blink/widgets/buttons.py
+22
-2
blink.ui
resources/blink.ui
+14
-3
No files found.
blink/widgets/buttons.py
View file @
c92ecc5f
# Copyright (c) 2010 AG Projects. See LICENSE for details.
# Copyright (c) 2010 AG Projects. See LICENSE for details.
#
#
__all__
=
[
'ToolButton'
,
'SegmentButton'
,
'SingleSegment'
,
'LeftSegment'
,
'MiddleSegment'
,
'RightSegment'
,
'SwitchViewButton'
]
__all__
=
[
'ToolButton'
,
'
ConferenceButton'
,
'
SegmentButton'
,
'SingleSegment'
,
'LeftSegment'
,
'MiddleSegment'
,
'RightSegment'
,
'SwitchViewButton'
]
from
PyQt4.QtCore
import
QTimer
,
pyqtSignal
from
PyQt4.QtCore
import
QTimer
,
pyqtSignal
from
PyQt4.QtGui
import
QPushButton
,
QStyle
,
QStyleOptionToolButton
,
QStylePainter
,
QToolButton
from
PyQt4.QtGui
import
Q
Action
,
Q
PushButton
,
QStyle
,
QStyleOptionToolButton
,
QStylePainter
,
QToolButton
class
ToolButton
(
QToolButton
):
class
ToolButton
(
QToolButton
):
...
@@ -17,6 +17,26 @@ class ToolButton(QToolButton):
...
@@ -17,6 +17,26 @@ class ToolButton(QToolButton):
painter
.
drawComplexControl
(
QStyle
.
CC_ToolButton
,
option
)
painter
.
drawComplexControl
(
QStyle
.
CC_ToolButton
,
option
)
class
ConferenceButton
(
ToolButton
):
makeConference
=
pyqtSignal
()
breakConference
=
pyqtSignal
()
def
__init__
(
self
,
parent
=
None
):
super
(
ConferenceButton
,
self
)
.
__init__
(
parent
)
self
.
make_conference_action
=
QAction
(
u'Conference all single sessions'
,
self
,
triggered
=
self
.
makeConference
.
emit
)
self
.
break_conference_action
=
QAction
(
u'Break selected conference'
,
self
,
triggered
=
self
.
breakConference
.
emit
)
self
.
toggled
.
connect
(
self
.
_SH_Toggled
)
self
.
addAction
(
self
.
make_conference_action
)
def
_SH_Toggled
(
self
,
checked
):
if
checked
:
self
.
removeAction
(
self
.
make_conference_action
)
self
.
addAction
(
self
.
break_conference_action
)
else
:
self
.
removeAction
(
self
.
break_conference_action
)
self
.
addAction
(
self
.
make_conference_action
)
class
SegmentTypeMeta
(
type
):
class
SegmentTypeMeta
(
type
):
def
__repr__
(
cls
):
def
__repr__
(
cls
):
return
cls
.
__name__
return
cls
.
__name__
...
...
resources/blink.ui
View file @
c92ecc5f
...
@@ -712,7 +712,7 @@ buttons below.</string>
...
@@ -712,7 +712,7 @@ buttons below.</string>
<widget
class=
"QPushButton"
name=
"hangup_all_button"
>
<widget
class=
"QPushButton"
name=
"hangup_all_button"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
0
</width>
<width>
85
</width>
<height>
24
</height>
<height>
24
</height>
</size>
</size>
</property>
</property>
...
@@ -731,10 +731,10 @@ buttons below.</string>
...
@@ -731,10 +731,10 @@ buttons below.</string>
</widget>
</widget>
</item>
</item>
<item>
<item>
<widget
class=
"
QPush
Button"
name=
"conference_button"
>
<widget
class=
"
Conference
Button"
name=
"conference_button"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
0
</width>
<width>
85
</width>
<height>
24
</height>
<height>
24
</height>
</size>
</size>
</property>
</property>
...
@@ -753,6 +753,12 @@ buttons below.</string>
...
@@ -753,6 +753,12 @@ buttons below.</string>
<property
name=
"checkable"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
<bool>
true
</bool>
</property>
</property>
<property
name=
"popupMode"
>
<enum>
QToolButton::InstantPopup
</enum>
</property>
<property
name=
"toolButtonStyle"
>
<enum>
Qt::ToolButtonTextOnly
</enum>
</property>
</widget>
</widget>
</item>
</item>
<item>
<item>
...
@@ -873,6 +879,11 @@ buttons below.</string>
...
@@ -873,6 +879,11 @@ buttons below.</string>
<extends>
QPushButton
</extends>
<extends>
QPushButton
</extends>
<header>
blink.widgets.buttons
</header>
<header>
blink.widgets.buttons
</header>
</customwidget>
</customwidget>
<customwidget>
<class>
ConferenceButton
</class>
<extends>
QToolButton
</extends>
<header>
blink.widgets.buttons
</header>
</customwidget>
</customwidgets>
</customwidgets>
<tabstops>
<tabstops>
<tabstop>
search_box
</tabstop>
<tabstop>
search_box
</tabstop>
...
...
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