Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
S
scom
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
scom
Commits
252fca79
Kaydet (Commit)
252fca79
authored
Kas 12, 2008
tarafından
Bahadır Kandemir
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
examples
üst
e1b0e497
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
0 deletions
+84
-0
Makefile
api/examples/qt3/Makefile
+2
-0
app.py
api/examples/qt3/app.py
+44
-0
mainform.ui
api/examples/qt3/mainform.ui
+38
-0
No files found.
api/examples/qt3/Makefile
0 → 100644
Dosyayı görüntüle @
252fca79
all
:
pyuic mainform.ui
-o
mainform.py
api/examples/qt3/app.py
0 → 100755
Dosyayı görüntüle @
252fca79
#!/usr/bin/python
# -*- coding: utf-8 -*-
import
sys
from
qt
import
*
import
comar
from
dbus.mainloop.qt3
import
DBusQtMainLoop
import
mainform
class
Window
(
mainform
.
mainForm
):
def
__init__
(
self
,
parent
=
None
):
mainform
.
mainForm
.
__init__
(
self
,
parent
)
self
.
link
=
comar
.
Link
()
self
.
connect
(
self
.
buttonServices
,
SIGNAL
(
"clicked()"
),
self
.
getServices
)
def
handleServices
(
self
,
package
,
exception
,
results
):
if
not
exception
:
serviceName
,
serviceDesc
,
serviceState
=
results
self
.
textServices
.
append
(
"
%
s -
%
s -
%
s -
%
s"
%
(
package
,
serviceName
,
serviceDesc
,
serviceState
))
def
getServices
(
self
):
self
.
link
.
System
.
Service
.
info
(
async
=
self
.
handleServices
)
def
main
():
app
=
QApplication
(
sys
.
argv
)
# Attach DBus to main loop
DBusQtMainLoop
(
set_as_default
=
True
)
app
.
connect
(
app
,
SIGNAL
(
"lastWindowClosed()"
),
app
,
SLOT
(
"quit()"
))
win
=
Window
()
win
.
show
()
# Enter main loop
app
.
exec_loop
()
if
__name__
==
"__main__"
:
main
()
api/examples/qt3/mainform.ui
0 → 100644
Dosyayı görüntüle @
252fca79
<!DOCTYPE UI>
<UI
version=
"3.3"
stdsetdef=
"1"
>
<class>
mainForm
</class>
<widget
class=
"QWidget"
>
<property
name=
"name"
>
<cstring>
mainForm
</cstring>
</property>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
459
</width>
<height>
343
</height>
</rect>
</property>
<property
name=
"caption"
>
<string>
Qt3
&
COMAR
</string>
</property>
<grid>
<property
name=
"name"
>
<cstring>
unnamed
</cstring>
</property>
<widget
class=
"QTextEdit"
row=
"0"
column=
"0"
>
<property
name=
"name"
>
<cstring>
textServices
</cstring>
</property>
</widget>
<widget
class=
"QPushButton"
row=
"1"
column=
"0"
>
<property
name=
"name"
>
<cstring>
buttonServices
</cstring>
</property>
<property
name=
"text"
>
<string>
Get Services
</string>
</property>
</widget>
</grid>
</widget>
<layoutdefaults
spacing=
"6"
margin=
"11"
/>
</UI>
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