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
01395f31
Commit
01395f31
authored
Jul 05, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added about panel
parent
b411033e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
229 additions
and
0 deletions
+229
-0
aboutpanel.py
blink/aboutpanel.py
+60
-0
mainwindow.py
blink/mainwindow.py
+4
-0
about_panel.ui
resources/about_panel.ui
+165
-0
blink-logo.png
resources/icons/blink-logo.png
+0
-0
No files found.
blink/aboutpanel.py
0 → 100644
View file @
01395f31
# Copyright (C) 2010 AG Projects. See LICENSE for details.
#
from
__future__
import
with_statement
__all__
=
[
'AboutPanel'
]
from
PyQt4
import
uic
from
PyQt4.QtCore
import
QSize
from
PyQt4.QtGui
import
QFontMetrics
from
blink.resources
import
Resources
from
blink.util
import
QSingleton
credits_text
=
"""
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<meta name="qrichtext" content="1" />
<style type="text/css">
td.name { text-align: right; padding-right: 6px; }
a:link { text-decoration: none; color: #1f487f; }
</style>
</head>
<body>
<table width="100
%
" cellspacing="2" cellpadding="0" border="0">
<tr><td class="name" align="right">AG Projects</td><td align="left"><a href="http://ag-projects.com/">http://ag-projects.com/</a></td></tr>
<tr><td class="name" align="right">NLNET Foundation</td><td align="left"><a href="http://nlnet.nl/">http://nlnet.nl/</a></td></tr>
<tr><td class="name" align="right">IETF Community</td><td align="left"><a href="http://ietf.org/">http://ietf.org/</a></td></tr>
<tr><td class="name" align="right">SIP Simple Client</td><td align="left"><a href="http://sipsimpleclient.com/">http://sipsimpleclient.com/</a></td></tr>
</table>
</body>
</html>
"""
ui_class
,
base_class
=
uic
.
loadUiType
(
Resources
.
get
(
'about_panel.ui'
))
class
AboutPanel
(
base_class
,
ui_class
):
__metaclass__
=
QSingleton
def
__init__
(
self
,
parent
=
None
):
super
(
AboutPanel
,
self
)
.
__init__
(
parent
)
with
Resources
.
directory
:
self
.
setupUi
(
self
)
credits_width
=
QFontMetrics
(
self
.
credits_text
.
currentFont
())
.
width
(
"NLNET Foundation"
+
"http://sipsimpleclient.com"
)
+
40
self
.
credits_text
.
setMinimumWidth
(
credits_width
)
self
.
credits_text
.
document
()
.
documentLayout
()
.
documentSizeChanged
.
connect
(
self
.
_credits_size_changed
)
self
.
credits_text
.
setHtml
(
credits_text
)
def
_credits_size_changed
(
self
,
size
):
size
.
setHeight
(
max
(
size
.
height
(),
168
))
self
.
credits_text
.
document
()
.
documentLayout
()
.
documentSizeChanged
.
disconnect
(
self
.
_credits_size_changed
)
self
.
credits_text
.
setFixedSize
(
size
.
toSize
()
+
QSize
(
6
,
6
))
del
ui_class
,
base_class
blink/mainwindow.py
View file @
01395f31
...
@@ -17,6 +17,7 @@ from sipsimple.account import AccountManager, BonjourAccount
...
@@ -17,6 +17,7 @@ from sipsimple.account import AccountManager, BonjourAccount
from
sipsimple.application
import
SIPApplication
from
sipsimple.application
import
SIPApplication
from
sipsimple.configuration.settings
import
SIPSimpleSettings
from
sipsimple.configuration.settings
import
SIPSimpleSettings
from
blink.aboutpanel
import
AboutPanel
from
blink.accounts
import
AccountModel
,
ActiveAccountModel
from
blink.accounts
import
AccountModel
,
ActiveAccountModel
from
blink.contacts
import
BonjourNeighbour
,
Contact
,
ContactGroup
,
ContactEditorDialog
,
ContactModel
,
ContactSearchModel
from
blink.contacts
import
BonjourNeighbour
,
Contact
,
ContactGroup
,
ContactEditorDialog
,
ContactModel
,
ContactSearchModel
from
blink.sessions
import
SessionManager
,
SessionModel
from
blink.sessions
import
SessionManager
,
SessionModel
...
@@ -57,6 +58,7 @@ class MainWindow(base_class, ui_class):
...
@@ -57,6 +58,7 @@ class MainWindow(base_class, ui_class):
self
.
contact_model
.
load
()
self
.
contact_model
.
load
()
self
.
about_panel
=
AboutPanel
(
self
)
self
.
contact_editor
=
ContactEditorDialog
(
self
.
contact_model
,
self
)
self
.
contact_editor
=
ContactEditorDialog
(
self
.
contact_model
,
self
)
self
.
session_model
=
SessionModel
(
self
)
self
.
session_model
=
SessionModel
(
self
)
...
@@ -106,6 +108,7 @@ class MainWindow(base_class, ui_class):
...
@@ -106,6 +108,7 @@ class MainWindow(base_class, ui_class):
self
.
search_box
.
shortcut
.
setKey
(
'CTRL+F'
)
self
.
search_box
.
shortcut
.
setKey
(
'CTRL+F'
)
self
.
search_box
.
shortcut
.
activated
.
connect
(
self
.
search_box
.
setFocus
)
self
.
search_box
.
shortcut
.
activated
.
connect
(
self
.
search_box
.
setFocus
)
self
.
about_action
.
triggered
.
connect
(
self
.
about_panel
.
show
)
self
.
quit_action
.
triggered
.
connect
(
self
.
close
)
self
.
quit_action
.
triggered
.
connect
(
self
.
close
)
self
.
idle_status_index
=
0
self
.
idle_status_index
=
0
...
@@ -139,6 +142,7 @@ class MainWindow(base_class, ui_class):
...
@@ -139,6 +142,7 @@ class MainWindow(base_class, ui_class):
def
closeEvent
(
self
,
event
):
def
closeEvent
(
self
,
event
):
super
(
MainWindow
,
self
)
.
closeEvent
(
event
)
super
(
MainWindow
,
self
)
.
closeEvent
(
event
)
self
.
about_panel
.
close
()
self
.
contact_editor
.
close
()
self
.
contact_editor
.
close
()
def
set_user_icon
(
self
,
image_file_name
):
def
set_user_icon
(
self
,
image_file_name
):
...
...
resources/about_panel.ui
0 → 100644
View file @
01395f31
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
about_panel
</class>
<widget
class=
"QDialog"
name=
"about_panel"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
300
</width>
<height>
451
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
About Blink
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"panel_layout"
>
<property
name=
"spacing"
>
<number>
5
</number>
</property>
<property
name=
"sizeConstraint"
>
<enum>
QLayout::SetFixedSize
</enum>
</property>
<property
name=
"leftMargin"
>
<number>
3
</number>
</property>
<property
name=
"topMargin"
>
<number>
20
</number>
</property>
<property
name=
"rightMargin"
>
<number>
3
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
5
</number>
</property>
<item>
<widget
class=
"QLabel"
name=
"logo"
>
<property
name=
"pixmap"
>
<pixmap>
icons/blink-logo.png
</pixmap>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"description"
>
<property
name=
"text"
>
<string>
A state of the art, easy to use SIP client
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
<item>
<spacer
name=
"spacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
15
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"version"
>
<property
name=
"text"
>
<string>
Version 0.1.0
July 5, 2010
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
<item>
<spacer
name=
"spacer2"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
15
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"credits"
>
<property
name=
"font"
>
<font>
<weight>
75
</weight>
<bold>
true
</bold>
</font>
</property>
<property
name=
"text"
>
<string>
Credits
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
<item>
<widget
class=
"QTextBrowser"
name=
"credits_text"
>
<property
name=
"minimumSize"
>
<size>
<width>
294
</width>
<height>
194
</height>
</size>
</property>
<property
name=
"html"
>
<string>
<
!DOCTYPE HTML PUBLIC
"
-//W3C//DTD HTML 4.0//EN
"
"
http://www.w3.org/TR/REC-html40/strict.dtd
">
<
html
><
head
><
meta name=
"
qrichtext
"
content=
"
1
"
/
><
style type=
"
text/css
">
p, li { white-space: pre-wrap; }
<
/style
><
/head
><
body style=
"
font-family:'Trebuchet MS'; font-size:9pt; font-weight:400; font-style:normal;
">
<
p style=
"
-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
/p
><
/body
><
/html
>
</string>
</property>
<property
name=
"openExternalLinks"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<spacer
name=
"spacer3"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
10
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"copyright"
>
<property
name=
"text"
>
<string>
Copyright © 2010 AG Projects
All rights reserved.
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
resources/icons/blink-logo.png
0 → 100644
View file @
01395f31
8.56 KB
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