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
acbca1d0
Commit
acbca1d0
authored
14 years ago
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added sessions panel
parent
ea1d69b3
master
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
136 additions
and
3 deletions
+136
-3
mainwindow.py
blink/mainwindow.py
+18
-0
blink.ui
resources/blink.ui
+118
-3
mic-off.png
resources/icons/mic-off.png
+0
-0
mic-on.png
resources/icons/mic-on.png
+0
-0
No files found.
blink/mainwindow.py
View file @
acbca1d0
...
...
@@ -39,10 +39,17 @@ class MainWindow(base_class, ui_class):
self
.
search_list
.
setItemDelegate
(
ContactDelegate
(
self
.
search_list
))
self
.
search_box
.
textChanged
.
connect
(
self
.
contact_search_model
.
setFilterFixedString
)
self
.
contacts_panel
.
sibling_panel
=
self
.
sessions_panel
self
.
contacts_panel
.
sibling_name
=
u'Sessions'
self
.
sessions_panel
.
sibling_panel
=
self
.
contacts_panel
self
.
sessions_panel
.
sibling_name
=
u'Contacts'
self
.
main_view
.
setCurrentWidget
(
self
.
contacts_panel
)
self
.
contacts_view
.
setCurrentWidget
(
self
.
contact_list_panel
)
self
.
search_view
.
setCurrentWidget
(
self
.
search_list_panel
)
self
.
switch_view
.
clicked
.
connect
(
self
.
switch_main_view
)
self
.
search_box
.
textChanged
.
connect
(
self
.
search_box_text_changed
)
self
.
back_to_contacts
.
clicked
.
connect
(
self
.
search_box
.
clear
)
# this can be set in designer -Dan
...
...
@@ -80,11 +87,22 @@ class MainWindow(base_class, ui_class):
print
"identity changed"
,
string
def
search_box_text_changed
(
self
,
text
):
if
text
:
self
.
main_view
.
setCurrentWidget
(
self
.
contacts_panel
)
self
.
switch_view
.
setText
(
u"Sessions"
)
else
:
# switch to the sessions panel if there are active sessions, else to the contacts panel -Dan
pass
active_widget
=
self
.
contact_list_panel
if
text
.
isEmpty
()
else
self
.
search_panel
self
.
contacts_view
.
setCurrentWidget
(
active_widget
)
active_widget
=
self
.
search_list_panel
if
self
.
contact_search_model
.
rowCount
()
else
self
.
not_found_panel
self
.
search_view
.
setCurrentWidget
(
active_widget
)
def
switch_main_view
(
self
):
widget
=
self
.
main_view
.
currentWidget
()
.
sibling_panel
self
.
main_view
.
setCurrentWidget
(
widget
)
self
.
switch_view
.
setText
(
widget
.
sibling_name
)
def
test_add_contact
(
self
):
from
blink.contacts
import
Contact
,
ContactGroup
import
random
...
...
This diff is collapsed.
Click to expand it.
resources/blink.ui
View file @
acbca1d0
...
...
@@ -265,7 +265,7 @@
<item>
<widget
class=
"QStackedWidget"
name=
"main_view"
>
<property
name=
"currentIndex"
>
<number>
0
</number>
<number>
1
</number>
</property>
<widget
class=
"QWidget"
name=
"contacts_panel"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_8"
>
...
...
@@ -278,7 +278,7 @@
<item>
<widget
class=
"QStackedWidget"
name=
"contacts_view"
>
<property
name=
"currentIndex"
>
<number>
1
</number>
<number>
0
</number>
</property>
<widget
class=
"QWidget"
name=
"contact_list_panel"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_7"
>
...
...
@@ -644,7 +644,122 @@ buttons below.</string>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"sessions_panel"
/>
<widget
class=
"QWidget"
name=
"sessions_panel"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QListView"
name=
"session_list"
/>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"session_buttons_layout"
>
<property
name=
"spacing"
>
<number>
5
</number>
</property>
<property
name=
"leftMargin"
>
<number>
5
</number>
</property>
<property
name=
"topMargin"
>
<number>
1
</number>
</property>
<property
name=
"rightMargin"
>
<number>
5
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
3
</number>
</property>
<item>
<widget
class=
"QPushButton"
name=
"hangup_all"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
24
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
24
</height>
</size>
</property>
<property
name=
"focusPolicy"
>
<enum>
Qt::TabFocus
</enum>
</property>
<property
name=
"text"
>
<string>
Hangup all
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"conference"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
24
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
24
</height>
</size>
</property>
<property
name=
"focusPolicy"
>
<enum>
Qt::TabFocus
</enum>
</property>
<property
name=
"text"
>
<string>
Conference
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"session_buttons_spacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QToolButton"
name=
"mute"
>
<property
name=
"minimumSize"
>
<size>
<width>
29
</width>
<height>
24
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
29
</width>
<height>
24
</height>
</size>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"icon"
>
<iconset>
<normaloff>
icons/mic-on.png
</normaloff>
<normalon>
icons/mic-off.png
</normalon>
icons/mic-on.png
</iconset>
</property>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
...
...
This diff is collapsed.
Click to expand it.
resources/icons/mic-off.png
0 → 100644
View file @
acbca1d0
3.08 KB
This diff is collapsed.
Click to expand it.
resources/icons/mic-on.png
0 → 100644
View file @
acbca1d0
3 KB
This diff is collapsed.
Click to expand it.
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