#include <QToolButton>#include "plugintipostrabajo.h"#include "listtipostrabajoview.h"#include "tiptrab.h"#include "busquedatipotrabajo.h"#include "busquedaarticulo.h"Go to the source code of this file.
Functions | |
| int | entryPoint (Bulmafact *bges) |
| int | TrabajadorView_TrabajadorView_Post (TrabajadorView *trab) |
| Al crear la ventana de trabajadores tambien creamos un combo box para el tipo de trabajador. | |
| int | TrabajadorView_on_mui_guardar_clicked (TrabajadorView *trab) |
| int | TrabajadorView_on_mui_lista_currentItemChanged_Post (TrabajadorView *trab) |
| int | AlmacenView_AlmacenView (AlmacenView *alm) |
| int | Ficha_cargar (Ficha *fich) |
| int | Ficha_guardar_Post (Ficha *fich) |
| int AlmacenView_AlmacenView | ( | AlmacenView * | alm | ) |
| alm |
Creamos el horario de maƱana.
Apertura
Cierre
Creamos el horario de tardes.
Apertura
Cierre
Comprobamos que exista el layout.
Definition at line 171 of file plugintipostrabajo.cpp.
References _depura(), DBRecord::addDBCampo(), SubForm3::addSHeader(), DBCampo::DBdate, DBCampo::DBDupPrimaryKey, DBCampo::DBint, SHeader::DBNone, DBCampo::DBNoSave, DBCampo::DBNothing, DBCampo::DBNotNull, SHeader::DBNoView, SHeader::DBNoWrite, DBCampo::DBPrimaryKey, DBCampo::DBvarchar, FichaBf::empresaBase(), FALSE, SubForm2Bf::m_delegate, Ui_AlmacenBase::mui_frameplugin, Ui_SubForm3Base::mui_list, Ui_AlmacenBase::mui_tab, SubForm3::setDBCampoId(), SubForm3::setDBTableName(), SubForm3::setDelete(), SubForm2Bf::setEmpresaBase(), SubForm3::setinsercion(), SubForm3::setSortingEnabled(), and TRUE.
00171 { 00172 _depura("esxtoy en la clase almacen", 0); 00173 00174 SubForm2Bf *form = new SubForm2Bf(alm); 00175 delete form->m_delegate; 00176 form->m_delegate = new QSubForm3BfDelegate(form); 00177 form->mui_list->setItemDelegate(form->m_delegate); 00178 form->setObjectName("mui_tipostrabajo"); 00179 form->setEmpresaBase(alm->empresaBase()); 00180 form->setDBTableName("almacentipotrabajo"); 00181 form->setDBCampoId("idalmacen"); 00182 form->addSHeader("nomtipotrabajo", DBCampo::DBvarchar, DBCampo::DBNoSave , SHeader::DBNone, QApplication::translate("AlmacenView", "ID nom tipo Trabajo")); 00183 form->addSHeader("numpers", DBCampo::DBint, DBCampo::DBNotNull, SHeader::DBNone , QApplication::translate("AlmacenView", "Numero de Cargos Necesarios")); 00184 form->addSHeader("idalmacen", DBCampo::DBint, DBCampo::DBNotNull | DBCampo::DBPrimaryKey, SHeader::DBNoView | SHeader::DBNoWrite, QApplication::translate("AlmacenView", "ID almacen")); 00185 form->addSHeader("idtipotrabajo", DBCampo::DBint, DBCampo::DBNotNull, SHeader::DBNoView | SHeader::DBNoWrite, QApplication::translate("AlmacenView", "ID tipo Trabajo")); 00186 form->addSHeader("origidtipotrabajo", DBCampo::DBint, DBCampo::DBDupPrimaryKey | DBCampo::DBNoSave, SHeader::DBNoView, "idtipotrabajo"); 00187 00188 form->setinsercion(TRUE); 00189 form->setDelete(TRUE); 00190 form->setSortingEnabled(FALSE); 00191 00192 alm->mui_tab->addTab(form, "Trabajadores Requeridos"); 00193 return 0; 00194 }
| int entryPoint | ( | Bulmafact * | bges | ) |
| bges |
Añade en el menú del programa la opcióMn para acceder al corrector.
Definition at line 82 of file plugintipostrabajo.cpp.
References _depura(), bges, and mytiptrab::inicializa().
00082 { 00083 _depura("Estoy dentro del plugin de tipos de trabajo", 0); 00084 mytiptrab *plug = new mytiptrab(); 00085 plug->inicializa(bges); 00086 return 0; 00087 }
| int Ficha_cargar | ( | Ficha * | fich | ) |
| fich |
Definition at line 202 of file plugintipostrabajo.cpp.
References SubForm3::cargar(), DBRecord::DBvalue(), and Ui_ListProyectosBase::mui_listado.
00202 { 00203 SubForm3 *form = fich->findChild<SubForm3 *>("mui_tipostrabajo"); 00204 if (form) 00205 form->cargar("SELECT *, tipotrabajo.idtipotrabajo AS origidtipotrabajo FROM almacentipotrabajo LEFT JOIN tipotrabajo ON almacentipotrabajo.idtipotrabajo = tipotrabajo.idtipotrabajo WHERE idalmacen = " + fich->DBvalue("idalmacen")); 00206 return 0; 00207 }
| int Ficha_guardar_Post | ( | Ficha * | fich | ) |
| fich |
Definition at line 215 of file plugintipostrabajo.cpp.
References DBRecord::DBvalue(), SubForm3::guardar(), and SubForm3::setColumnValue().
00215 { 00216 SubForm3 *form = fich->findChild<SubForm3 *>("mui_tipostrabajo"); 00217 if (form) { 00218 form->setColumnValue("idalmacen", fich->DBvalue("idalmacen")); 00219 form->guardar(); 00220 } 00221 return 0; 00222 }
| int TrabajadorView_on_mui_guardar_clicked | ( | TrabajadorView * | trab | ) |
| trab |
Definition at line 136 of file plugintipostrabajo.cpp.
References postgresiface2::begin(), postgresiface2::commit(), postgresiface2::ejecuta(), FichaBf::empresaBase(), SubForm3::guardar(), BusquedaTipoTrabajo::idtipotrabajo(), TrabajadorView::idtrabajador(), postgresiface2::sanearCadena(), and SubForm3::setColumnValue().
00136 { 00137 00138 BusquedaTipoTrabajo *l = trab->findChild<BusquedaTipoTrabajo *>("tipotraba"); 00139 QString query = "UPDATE trabajador SET "; 00140 query += " idtipotrabajo = " + l->idtipotrabajo(); 00141 query += " WHERE idtrabajador=" + trab->empresaBase()->sanearCadena(trab->idtrabajador()); 00142 trab->empresaBase()->begin(); 00143 trab->empresaBase()->ejecuta(query); 00144 trab->empresaBase()->commit(); 00145 return 0; 00146 }
| int TrabajadorView_on_mui_lista_currentItemChanged_Post | ( | TrabajadorView * | trab | ) |
| trab |
Cargamos las validaciones de asterisk.
Definition at line 154 of file plugintipostrabajo.cpp.
References postgresiface2::cargacursor(), SubForm2Bf::cargar(), FichaBf::empresaBase(), TrabajadorView::idtrabajador(), and BusquedaTipoTrabajo::setidtipotrabajo().
00154 { 00155 BusquedaTipoTrabajo *l = trab->findChild<BusquedaTipoTrabajo *>("tipotraba"); 00156 00157 cursor2 *cur = trab->empresaBase()->cargacursor("SELECT idtipotrabajo FROM trabajador WHERE idtrabajador = " + trab->idtrabajador()); 00158 if (!cur->eof()) { 00159 l->setidtipotrabajo(cur->valor("idtipotrabajo")); 00160 } 00161 delete cur; 00162 return 0; 00163 }
| int TrabajadorView_TrabajadorView_Post | ( | TrabajadorView * | trab | ) |
Al crear la ventana de trabajadores tambien creamos un combo box para el tipo de trabajador.
| trab |
Comprobamos que exista el layout.
Definition at line 95 of file plugintipostrabajo.cpp.
References _depura(), DBRecord::addDBCampo(), SubForm3::addSHeader(), DBCampo::DBdate, DBCampo::DBint, SHeader::DBNone, DBCampo::DBNoSave, DBCampo::DBNothing, DBCampo::DBNotNull, SHeader::DBNoView, SHeader::DBNoWrite, DBCampo::DBPrimaryKey, DBCampo::DBvarchar, dialogChanges::dialogChanges_setQObjectExcluido(), FichaBf::empresaBase(), FALSE, Ui_TrabajadorBase::m_frameplugin, Ui_SubForm3Base::mui_list, Ui_TrabajadorBase::mui_tab, SubForm3::setDBCampoId(), SubForm3::setDBTableName(), SubForm3::setDelete(), SubForm2Bf::setEmpresaBase(), PEmpresaBase::setEmpresaBase(), BusquedaTipoTrabajo::setidtipotrabajo(), SubForm3::setinsercion(), SubForm3::setSortingEnabled(), and TRUE.
00095 { 00096 _depura("TrabajadorView_TrabajadorView_Post", 0); 00097 00098 QHBoxLayout *hboxLayout160 = new QHBoxLayout(); 00099 hboxLayout160->setSpacing(2); 00100 hboxLayout160->setMargin(0); 00101 hboxLayout160->setObjectName(QString::fromUtf8("hboxLayout16")); 00102 00103 QLabel *textLabel2_9_26 = new QLabel(trab->m_frameplugin); 00104 textLabel2_9_26->setObjectName(QString::fromUtf8("textLabel2_9_2")); 00105 hboxLayout160->addWidget(textLabel2_9_26); 00106 textLabel2_9_26->setText("Tipo Trabajo"); 00107 00108 BusquedaTipoTrabajo *tipotraba = new BusquedaTipoTrabajo(trab->m_frameplugin); 00109 tipotraba->setEmpresaBase(trab->empresaBase()); 00110 tipotraba->setidtipotrabajo(""); 00111 tipotraba->setObjectName(QString::fromUtf8("tipotraba")); 00112 hboxLayout160->addWidget(tipotraba); 00113 00114 00116 QVBoxLayout *m_hboxLayout1 = trab->m_frameplugin->findChild<QVBoxLayout *>("hboxLayout1"); 00117 if (!m_hboxLayout1) { 00118 m_hboxLayout1 = new QVBoxLayout(trab->m_frameplugin); 00119 m_hboxLayout1->setSpacing(0); 00120 m_hboxLayout1->setMargin(0); 00121 m_hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); 00122 } // end if 00123 00124 m_hboxLayout1->addLayout(hboxLayout160); 00125 00126 // trab->m_frameplugin->setLayout(hboxLayout160); 00127 return 0; 00128 }
1.5.1