Esempio n. 1
0
def CreateWidgets():

    WindowPanel = PyQT4_API.myWindow('AnyGUI Login Form', 300, 300, 500, 300)
    userLbl = PyQT4_API.Label("User Name :", 250, 50, 80, 30, WindowPanel)
    PswdLbl = PyQT4_API.Label("Password :"******"Not Registered User : ?", 120, 220, 170, 30,
                                 WindowPanel)
    AdmLabel = PyQT4_API.Label("Administrator :", 300, 20, 140, 30,
                               WindowPanel)
    CrctPswdLbl = PyQT4_API.Label("", 220, 160, 280, 30, WindowPanel)
    RadioLbl = PyQT4_API.Label("Choose ToolKit to Work With", 20, 15, 160, 30,
                               WindowPanel)
    usrtb = PyQT4_API.TextBox("", 340, 55, 150, 20, WindowPanel)
    Pstb = PyQT4_API.PasswordBox("", 340, 85, 150, 20, WindowPanel)
    rb1 = PyQT4_API.RadioButton("PyQT4", 20, 50, 100, 20, WindowPanel)
    rb1.setChecked(True)
    rb2 = PyQT4_API.RadioButton("Wx-Python", 20, 70, 100, 20, WindowPanel)
    rb3 = PyQT4_API.RadioButton("PyGTK", 20, 90, 100, 20, WindowPanel)
    rb4 = PyQT4_API.RadioButton("Tkinter", 20, 110, 100, 20, WindowPanel)
    rbgrp = PyQT4_API.ButtonGroup(WindowPanel)
    rlist = [rb1, rb2, rb3, rb4]
    rbgrp.addButtons(rlist)
    widgets = [WindowPanel, usrtb, Pstb, rbgrp, CrctPswdLbl]
    guest_btn = PyQT4_API.Button("Guest Login", 280, 220, 100, 35, WindowPanel)
    guest_btn.buttonListener(guest_log, widgets)
    btn = PyQT4_API.Button("Login", 320, 120, 100, 35, WindowPanel)
    btn.buttonListener(login_method, widgets)
    WindowPanel.Show()
Esempio n. 2
0
def CreateWidgets():

		
        
        WindowPanel = PyQT4_API.myWindow('PyQT4 Window By Santosh Kumar' ,300,100,520,450)
#        menubr=PyQT4_API.MenuBar(0,0,500,20,WindowPanel)
 #       menu_list=[['&File','&Exit',exit_method],['&About','&About Me',aboutMe_method]]
        userLbl=PyQT4_API.Label("User Name :",20,25,80,30,WindowPanel)
        PswdLbl=PyQT4_API.Label("Password",20,50,140,30,WindowPanel)
        RadioLbl=PyQT4_API.Label("Your Favourite Tool-Kit",350,15,160,30,WindowPanel)
        ComboLbl=PyQT4_API.Label("Your City",40,300,160,30,WindowPanel)
        ListLbl=PyQT4_API.Label("Your Favourite Animal",300,300,360,30,WindowPanel)        
        BirthLbl=PyQT4_API.Label("Your Birth Date",20,170,120,30,WindowPanel)
        RateLbl=PyQT4_API.Label("Please rate the GUI on (0-10) scale",20,370,220,30,WindowPanel)
        usrtb=PyQT4_API.TextBox("",150,30,150,20,WindowPanel)
        Pstb=PyQT4_API.PasswordBox("",150,55,150,20,WindowPanel)
        '''NewPstb=PyQT4_API.PasswordBox("",150,85,150,30,WindowPanel)
        ReNewPstb=PyQT4_API.PasswordBox("",150,120,150,30,WindowPanel)
'''
        ck1=PyQT4_API.CheckBox("I Love Animals ",20,45,150,110,WindowPanel)
        ck1.setCheckState(0)
        '''ck2=PyQT4_API.CheckBox("I Love Birds ",150,45,150,110,WindowPanel)
        ck2.setCheckState(2)
        ckBox= PyQT4_API.ButtonGroup(WindowPanel)'''
        #ckBox.addButtons([ck1,ck2])
        rb1=PyQT4_API.RadioButton("PyQT4",360,40,100,20,WindowPanel)
        rb1.setChecked(True)
        rb2=PyQT4_API.RadioButton("Wx-Python",360,60,100,20,WindowPanel)
        rb3=PyQT4_API.RadioButton("PyGTK",360,80,100,20,WindowPanel)
        rb4=PyQT4_API.RadioButton("Tkinter",360,100,100,20,WindowPanel)
        rbgrp=PyQT4_API.ButtonGroup(WindowPanel)
        rlist=[rb1,rb2,rb3,rb4]
        rbgrp.addButtons(rlist)
       # print (rbgrp.getCheck())
        cal1=PyQT4_API.Calendar(240,140,240,140,WindowPanel)  
        sld1=PyQT4_API.Slider(300,380,180,20,WindowPanel)
        sld1.setRange(0,10)
        comboList= ["Lucknow","Ahmedabad","Ropar","Mumbai","Muzaffarpur","NewDelhi","Chandigarh"]
        comboBox=PyQT4_API.ComboBox("My Combo Box",comboList,20,330,180,30,WindowPanel)
        listBox=PyQT4_API.ListBox("My List Box",300,330,180,30,WindowPanel)
        myList=["Elephant","Peacock","Bear","Lion","Tiger","Leopard","Dog","Cat","Wolf","Spider","Parrot","Nightangle"]
        listBox.addItems(myList)
        widgets=[WindowPanel,usrtb,Pstb,ck1,rbgrp,cal1,sld1,listBox,comboBox]
#        menubr.addItems(menu_list,widgets);
        btn= PyQT4_API.Button("Submit",100,415,100,30,WindowPanel)
        btn.buttonListener(call_method,widgets)
        Exit_btn= PyQT4_API.Button("Exit",300,415,100,30,WindowPanel)
        Exit_btn.buttonListener(exit_method)
        WindowPanel.show()
Esempio n. 3
0
def CreateWidgets():

    WindowPanel = PyQT4_API.myWindow('PyQT4 Window By Santosh Kumar', 300, 300,
                                     400, 300)
    userLbl = PyQT4_API.Label("User Name :", 20, 15, 80, 30, WindowPanel)
    OldPswdLbl = PyQT4_API.Label("Old Password", 20, 50, 140, 30, WindowPanel)
    NewPswdLbl = PyQT4_API.Label("New Password", 20, 85, 160, 30, WindowPanel)
    ReNwPsLbl = PyQT4_API.Label("Repeat Password", 20, 120, 160, 30,
                                WindowPanel)
    usrtb = PyQT4_API.TextBox("", 150, 15, 150, 30, WindowPanel)
    OldPstb = PyQT4_API.PasswordBox("", 150, 50, 150, 30, WindowPanel)
    NewPstb = PyQT4_API.PasswordBox("", 150, 85, 150, 30, WindowPanel)
    ReNewPstb = PyQT4_API.PasswordBox("", 150, 120, 150, 30, WindowPanel)
    '''
		ck1=CheckBox("I Love Animals ",20,45,150,50,WindowPanel)
        ck1.setCheckState(0)
        ck2=CheckBox("I Love Birds ",150,45,150,50,WindowPanel)
        ck2.setCheckState(2)
        ckBox= ButtonGroup(WindowPanel)
        ckBox.addButtons([ck1,ck2])
        rb1=RadioButton("PyQT4",10,140,100,20,WindowPanel)
        rb1.setChecked(True)
        rb2=RadioButton("Wx-Python",10,160,100,20,WindowPanel)
        rb3=RadioButton("PyGTK",10,180,100,20,WindowPanel)
        rb4=RadioButton("Tkinter",10,200,100,20,WindowPanel)
        rbgrp=ButtonGroup(WindowPanel)
        rlist=[rb1,rb2,rb3,rb4]
        rbgrp.addButtons(rlist)
       # print (rbgrp.getCheck())
        tb=TextBox("  ",100,15,150,30,WindowPanel)
        listBox=ListBox("My List Box",250,80,180,190,WindowPanel)
        myList=["Elephant","Peacock","Bear","Lion","Tiger","Leopard","Dog","Cat","Wolf","Spider","Parrot","Nightangle"]
        listBox.addItems(myList)
      '''

    widgets = [
        WindowPanel, userLbl, OldPswdLbl, NewPswdLbl, ReNwPsLbl, usrtb,
        OldPstb, NewPstb, ReNewPstb
    ]
    btn = PyQT4_API.Button("Submit", 30, 180, 100, 35, WindowPanel)
    btn.buttonListener(Submit, widgets)
    Exit_btn = PyQT4_API.Button("Exit", 200, 180, 100, 35, WindowPanel)
    Exit_btn.buttonListener(exit_method)
    WindowPanel.show()