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
b3a338c4
Commit
b3a338c4
authored
Apr 14, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed arrow button to collapse_button and updated logic
parent
b448c967
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
contacts.py
blink/contacts.py
+3
-7
contact_group.ui
resources/contact_group.ui
+1
-3
No files found.
blink/contacts.py
View file @
b3a338c4
...
...
@@ -39,7 +39,7 @@ class ContactGroup(object):
@
property
def
collapsed
(
self
):
return
self
.
widget
.
collapse
d
return
self
.
widget
.
collapse
_button
.
isChecked
()
def
_get_name
(
self
):
return
self
.
__dict__
[
'name'
]
...
...
@@ -126,10 +126,6 @@ class ContactGroupWidget(base_class, ui_class):
self
.
name_view
.
setCurrentWidget
(
self
.
label_widget
)
self
.
name_editor
.
editingFinished
.
connect
(
self
.
_end_editing
)
@
property
def
collapsed
(
self
):
return
self
.
arrow
.
isChecked
()
@
property
def
editing
(
self
):
return
self
.
name_view
.
currentWidget
()
is
self
.
editor_widget
...
...
@@ -193,7 +189,7 @@ class ContactGroupWidget(base_class, ui_class):
painter
.
drawLine
(
rect
.
bottomLeft
(),
rect
.
bottomRight
())
#painter.drawLine(option.rect.topRight(), option.rect.bottomRight())
if
self
.
collapse
d
:
if
self
.
collapse
_button
.
isChecked
()
:
arrow
=
QPolygonF
([
QPointF
(
0
,
0
),
QPointF
(
0
,
9
),
QPointF
(
8
,
4.5
)])
arrow
.
translate
(
QPointF
(
5
,
4
))
else
:
...
...
@@ -251,7 +247,7 @@ class ContactDelegate(QStyledItemDelegate):
if
type
(
item
)
is
ContactGroup
:
if
item
.
widget
is
Null
:
item
.
widget
=
ContactGroupWidget
(
item
.
name
,
parent
)
item
.
widget
.
arrow
.
toggled
.
connect
(
partial
(
self
.
_update_list_view
,
item
))
item
.
widget
.
collapse_button
.
toggled
.
connect
(
partial
(
self
.
_update_list_view
,
item
))
return
item
.
widget
else
:
return
None
...
...
resources/contact_group.ui
View file @
b3a338c4
...
...
@@ -21,7 +21,7 @@
<number>
0
</number>
</property>
<item>
<widget
class=
"QToolButton"
name=
"
arrow
"
>
<widget
class=
"QToolButton"
name=
"
collapse_button
"
>
<property
name=
"maximumSize"
>
<size>
<width>
18
</width>
...
...
@@ -172,8 +172,6 @@ border-width: 0;
</widget>
</item>
</layout>
<zorder>
name_label
</zorder>
<zorder>
name_editor
</zorder>
</widget>
<widget
class=
"QWidget"
name=
"editor_widget"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
...
...
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