Mumsema.NET

FrMaLeV

Bilgi Dağıtmak İçin El Ele

Geri git   Mumsema.NET >
Cep Telefonları
> Symbian S6-7-8 Programları > Python Uygulamaları ve Dökümanları

Forum Kuralları İletiler Kayıt ol Yardım Üye Listesi Ajanda Bütün Forumları okunmuş kabul et
Alt 21-10-2007   #1
Profil Bilgileri
Standart Python - Kaynak Kodlar



Python - Kaynak Kodlar
Hazırlanan yada hazır konumda olan python kodlarını sadece bu bölümde paylaşabiliriz
Tüm kodları burada toplamamız daha iyi olur sanırım Eklentilerden ayrılmış olur konu
Not: Fazla online olma şansım olamayabilir, fırsat bulundukça arkası gelecektir





1-) Menüye geçişli panel ekleme


Appman benzeri bir program hazırlıyorsanız birden fazla panel hazırlamak isterseniz:
Bu kodları girin, yanlarına ikon isterseniz
z:\\system\\data\\ modundan paths yolunu verin yada özel istediğiniz varsa başka verin birşeyler yapın işte






import appuifw
import e32
from graphics import
*


# define application 1: listobx app

# create your icons for the listbox content
icon1 = appuifwIcon(u"z:\\system\\data\\avkonmbm", 28, 29)
icon2 = appuifwIcon(u"z:\\system\\data\\avkonmbm", 40, 41)
icon3 = appuifwIcon(u"z:\\system\\data\\avkonmbm", 30, 31)
icon4 = appuifwIcon(u"z:\\system\\data\\avkonmbm", 32, 33)
icon5 = appuifwIcon(u"z:\\system\\data\\avkonmbm", 34, 35)
icon6 = appuifwIcon(u"z:\\system\\data\\avkonmbm", 36, 37)
icon7 = appuifwIcon(u"z:\\system\\data\\avkonmbm", 38, 39)

# create your content list of your listbox including the icons to be used for each entry
entries = [(u"Sinyal", icon1),
(
u"Batarya", icon2),
(
u"3G", icon3),
(
u"GPRS", icon4),
(
u"Hafiza", icon5),
(
u"Durum", icon6),
(
u"Otomatik", icon7)]

# create the listbox callback handler
def handler():
print
"done"

# create an instance of appuifwListbox(), include the content list "entries" and the callback function "handler"
app1 = appuifwListbox(entries,handler)



# define application 2: listbox app

# define the list of items as pop-up menu content
L2 = [u"tes1", u"test2", u"test3", u"test4"]

# create the listbox callback handler
def handler_L2():
print
"ola"

# create the pop-up menu
app2 = appuifwListbox(L2, handler_L2)



# define application 3: canvas application

def app_3():
global
canvas
img
=Imagenew((176,208))
imgline((20,20,20,120),0xff00ee)
imgrectangle((40,60,50,80),0xff0000)
imgpoint((50,150),0xff0000,width=40)
imgellipse((100,150,150,180),0x0000ff)
imgtext((100,80), u'hello')

# define your redraw function (still belonging to app 3)
def handle_redraw(rect):
#global canvas
canvasblit(img)
# define the canvas, include the redraw callback function
canvas =appuifwCanvas(event_callback=None, redraw_callback=handle_redraw)
appuifwappbody = canvas



def exit_key_handler
():
app_locksignal()

# create a tab handler that switches the application based on what tab is selected
def handle_tab(index):
global
lb
if index == 0:
appuifwappbody = app1 # switch to application 1
if index == 1:
appuifwappbody = app2 # switch to application 2
if index == 2:
app_3() # switch to application 3


# create an Active Object
app_lock = e32Ao_lock()

# create the tabs with its names in unicode as a list, include the tab handler
appuifwappset_tabs([u"panel", u"panel", u"Three"],handle_tab)

# set the title of the script
appuifwapptitle = u'Tabs advanced'

# set appbody to app1 (for start of script)
appuifwappbody = app1


appuifw
appexit_key_handler = exit_key_handler
app_lock
wait()[/FONT]




Şekilde ki gibi sağ ve solda olmak üzere 2 geçiş paneli daha sonrasını istediğiniz gibi düzenleyiniz




TUANA is offline  
Alt 21-10-2007   #2
Profil Bilgileri
Standart --->: Python - Kaynak Kodlar

RE: Python - Kaynak Kodlar
2-) Seçeneklere Menü Ekleme

Seçenekler sekmesine menü eklemek isteyen arkadaşlar

PHP Kod:

# Copyright (c) 2007 ReCKLeSS
# This scripts Copyright modded ReCKLeSS, enjoy this release

import appuifw, e32


def item1
():
appuifwnote(u"Basarili", "info")

def item2():
appuifwnote(u"Basarili", "info")

def quit():
app_locksignal()

appuifwappmenu = [(u"Uygulamaya Git", item1),
(
u"Bilgi", item2)]

appuifwappexit_key_handler = quit
app_lock
= e32Ao_lock()
app_lockwait()



Resimde gördüğünüz gibi çok kolay bir şekilde seçenekler tab ına kendi hazırladığımız menüyü ekledik gerisi sizn işinizIsterseniz daha çok da ekleme yapabilirsiniz

Şekil B
TUANA is offline  
Alt 21-10-2007   #3
Profil Bilgileri
Standart --->: Python - Kaynak Kodlar

3-) Kayan yazı eklemek

Menüye kayan yazı eklemek için aşağıdaki kodları kullanın


PHP Kod:

import e32
from graphics import
*
import fgimage
img
= Imagenew((100, 16))
fg = fgimageFGImage()
text = u"Buraya yazinizi yazin"
# lets do simple scrolling
i = 0
while i < len(text):

imgclear((0, 255, 255))
imgtext((0, 14), text[i:], 0)
fgset(0, 40, img_bitmapapi())
e32ao_sleep(02) # 200 ms sleep
i += 1

fg
unset()




200 ms sleep bölümünde yavaş yada hızlı olarak ayar yapabilirsiniz değer vererek

Şekil a
TUANA is offline  
Alt 21-10-2007   #4
Profil Bilgileri
Standart --->: Python - Kaynak Kodlar

4-) Açık olan tüm uygulamaları kapatmak

Menüde çalışan ne varsa bu kodu yazarak kapatabilirsiniz


PHP Kod:

"""
module appswitch
functions:
tuple application_list(include_all)
returns running applications (tuple of unicode strings)
pararameters:
include_all = iff true, hidden apps are listed
bool switch_to_fg(app)
bool switch_to_bg(app)
switches given application to foreground/background
returns true iff app with that caption found
paramaters:
app - unicode string (see application_list)

bool end_app(app)
request closing of given app
bool kill_app(app)
kills this app
both return true if app found
"""
import e32
import appswitch
apps
= appswitchapplication_list(True) # true = include all
# false = no hidden apps
print apps
for app in apps:
print
appswitchswitch_to_fg(app)
e32ao_sleep(1)



TUANA is offline  
Alt 21-10-2007   #5
Profil Bilgileri
Standart --->: Python - Kaynak Kodlar

5-) Telefona restart attırma

PHP Kod:


import switchoff
switchoff
Shutdown()
# Restart attırmak icin()
TUANA is offline  
Alt 21-10-2007   #6
Profil Bilgileri
Standart --->: Python - Kaynak Kodlar

6-) Çoklu seçim ve işaret seçeneği ekleme

Çoklu bir tür hazırlıyorsanız ve seçime dayalı olmasını isterseniz:
Aşağıdaki kodları girin
Kendize göre düzenleyin

Copyright Jurgen Scheible

PHP Kod:

# Copyright (c) 2005 Jurgen Scheible
# This script executes a dialog that allows the users to make multiple selections
# of items in a list via checkbox It returns the indexes (of the list) of the chosen items
# It uses the multi_selection_list() function of the appuifw module
# appuifwmulti_selection_list(choices=list , style='checkbox', search_field=1)

# import the application user interface framework module
import appuifw
# define the list of items (items must written in unicode! -> put a u in front)
L = [u'Sinyal', u'Deneme', u'OS Bilgi', u'Bluetooth', u'Mobil', u'Ekran', u'Kamera', u'Kombinasyon']
# create the multi-selection list
index = appuifwmulti_selection_list(L , style='checkbox', search_field=1)
# create a new list (Lnew) that inlcudes only the selected items and print the new list (Lnew)
Lnew = index
print Lnew



TUANA is offline  
Alt 21-10-2007   #7
Profil Bilgileri
Standart --->: Python - Kaynak Kodlar

7-) Açılışta popup ekleme ve programın en üstüne zaman ayarlı yazı bırakmak


PHP Kod:


import appuifw,e32,os
appuifw
note(u"ReCKLeSS","conf")
appuifwapptitle=u'R'
e32ao_sleep(01)
appuifwapptitle=u'Re'
e32ao_sleep(01)
appuifwapptitle=u'ReC'
e32ao_sleep(01)
appuifwapptitle=u'ReCK'
e32ao_sleep(01)
appuifwapptitle=u'ReCKL'
e32ao_sleep(01)
appuifwapptitle=u'ReCKLe'
e32ao_sleep(01)
appuifwapptitle=u'ReCKLeS'
e32ao_sleep(01)
appuifwapptitle=u'ReCKLeSS'
e32ao_sleep(01)
appuifwapptitle=u'Hosgeldiniz'
e32ao_sleep(03)
appuifwapptitle=u'Hosgeldiniz'



e32ao_sleep(01)

parantez içindeki verdiğiniz zaman değeridir
02 veya 03 yaparsanız daha hızlı geçiş yapar yazıda


TUANA is offline  
Alt 27-10-2007   #8
Profil Bilgileri
Standart --->: Python - Kaynak Kodlar

Bunlarin Hepsİ SÜper ,,,elİnİze Kolunuza SaĞlik Çoook SaĞolun KardeŞlerİmdaha Da Kod Varsa BeklerİzsaĞoluuuuuuuuuuuuuuuuuuuuun
akdumanlı is offline  
Alt 27-10-2007   #9
Profil Bilgileri
Standart --->: Python - Kaynak Kodlar

ellerine klavyene saglik usta sagol
kalpsiz_sold is offline  
Alt 28-10-2007   #10
Profil Bilgileri
Standart --->: Python - Kaynak Kodlar



arkadaşlar çok merak ettiğim bi konu var lütfen yardım edin
python program yazma konusuyla ilg (gerekli bölümde soracaktım konu kilitli)
sorunum şu= şimdi apprscaif diye dosyalar verömişsiniz bunlar xxx tir yeni isimlendirecekmişiz ama bunlar boşmu şimdi hangi program için yapsak aynı bu dosyalarımı kullanacaz lütfen yardımmmmmmmmm
akdumanlı is offline  
Cevapla
Konu Araçları


Benzer Konular
Konu Konuyu Başlatan Forum Cevap son Mesaj
Python v1.4.3 OS9 DDeBBuS Python Uygulamaları ve Dökümanları 3 21-09-2008 18:37
Python v1.4.3 [OS9 DDeBBuS Python Uygulamaları ve Dökümanları 2 21-09-2008 18:32
Python for S60 v1.4.1 DDeBBuS Python Uygulamaları ve Dökümanları 4 21-09-2008 18:31
Python v1.4.3 [OS6-7-8] DDeBBuS Python Uygulamaları ve Dökümanları 0 05-05-2008 23:23
Python 1.4.2 DDeBBuS Python Uygulamaları ve Dökümanları 0 22-01-2008 18:21

Saat 07:30.

Web Site Ekle Pagerank Toplist Netfrm Frmalev Mumsema Frmacil Dantel Derya Modeller Powered by  MyPagerank.Net Add to Google Add to My Yahoo!
Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.