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
515eae37
Commit
515eae37
authored
May 04, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced classproperty from blink.util with the one from sipsimple.util
parent
d591b4fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
15 deletions
+3
-15
event.py
blink/event.py
+1
-1
resources.py
blink/resources.py
+1
-1
util.py
blink/util.py
+1
-13
No files found.
blink/event.py
View file @
515eae37
...
...
@@ -5,7 +5,7 @@ __all__ = ['CallFunctionEvent']
from
PyQt4.QtCore
import
QEvent
from
blink
.util
import
classproperty
from
sipsimple
.util
import
classproperty
class
EventMeta
(
type
(
QEvent
)):
...
...
blink/resources.py
View file @
515eae37
...
...
@@ -9,7 +9,7 @@ import os
import
platform
import
sys
from
blink
.util
import
classproperty
from
sipsimple
.util
import
classproperty
class
DirectoryContextManager
(
unicode
):
...
...
blink/util.py
View file @
515eae37
# Copyright (C) 2010 AG Projects. See LICENSE for details.
#
__all__
=
[
'QSingleton'
,
'c
lassproperty'
,
'c
all_in_gui_thread'
,
'run_in_gui_thread'
]
__all__
=
[
'QSingleton'
,
'call_in_gui_thread'
,
'run_in_gui_thread'
]
from
PyQt4.QtCore
import
QObject
from
application.python.decorator
import
decorator
,
preserve_signature
...
...
@@ -12,18 +12,6 @@ class QSingleton(Singleton, type(QObject)):
"""A metaclass for making Qt objects singletons"""
# TODO: replace later with classproperty from sipsimple.util
def
classproperty
(
function
):
class
Descriptor
(
object
):
def
__get__
(
self
,
instance
,
owner
):
return
function
(
owner
)
def
__set__
(
self
,
instance
,
value
):
raise
AttributeError
(
"read-only attribute cannot be set"
)
def
__delete__
(
self
,
instance
):
raise
AttributeError
(
"read-only attribute cannot be deleted"
)
return
Descriptor
()
def
call_in_gui_thread
(
function
,
*
args
,
**
kw
):
from
blink
import
Blink
from
blink.event
import
CallFunctionEvent
...
...
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