Set of utilities and tools for working with Plasta and interfaces in PyQt.
All these tools described below have a GUI to do the same as from code.
Tool for generate the 4 files of Plasta base package.
/object_folder_example
--- __init__.py
--- manager.py
--- add.py
--- gui.py
From code:
from maker import make_plasta_package
data = {
'className':'Person',
'addIdeAttr':True,
'attributes':[
{'name':'name','type':'Unicode'},
{'name':'last_name','type':'Unicode'},
{'name':'email','type':'Unicode'},
{'name':'age','type':'Int'},
{'name':'birthday','type':'Date'},
],
'widgetToAttr':{
'name':'lineEdit',
'last_name':'lineEdit',
'email':'lineEdit',
'age':'spinBox',
'birthday':'dateEdit',
},
'classesToGenerate':{
'storm':True,'manager':True,'gui':True,'add':True
},
'outputFolder':'/some_folder'
}
make_plasta_package.generatePackage(data)
Tool for generate .ui file like a form new/edit
from maker import add_maker_simple
outputFolder = '/some_output_folder/some_file.ui'
fields = {0: {u'field1': u'QLineEdit'}, 1: {u'field2': u'QLineEdit'}}
buttons = {'bt_limpiar': False, 'bt_cancelar_aceptar': False, 'bt_salir_guardar': True, 'bt_salir_aceptar': False}
options = {'tipo': 'Dialog', 'generar_plantilla': False}
add_maker_simple.generarUI(outputFile, fields, buttons, options)
- tipo: type of window to generate, possible values: (Dialog, MainWindow)
- generar_plantilla: if True, will be generate together with the .ui the .py file to handle
Template generator for the storm file __init__.py
. Data types are supported for databases SQLite, MySQL y PostgresSQL.
Generator/explorer of signals/events of the widgets included in a .ui
Generate the .py file for a .ui file
- Create UI
- Include signals/events methods
- Generate signals/events
- Functionality buttons located to the left of code editors
- Generate Storm class + .ui
- Generate the .ui file for the template
python main.py
python run_test.py
Contributions are welcome :)