#include <QMenu>#include <QAction>#include <QObject>#include <QMessageBox>#include <QInputDialog>#include <QStringList>#include <QTranslator>#include <QTextCodec>#include <QLocale>#include <stdio.h>#include "plugincuadrante.h"#include "company.h"#include "funcaux.h"#include "facturaview.h"#include "presupuestoview.h"#include "pedidoclienteview.h"#include "albaranclienteview.h"#include "pedidoproveedorview.h"#include "cuadranteview.h"Go to the source code of this file.
Functions | |
| void | entryPoint (Bulmafact *bges) |
| int | AlmacenView_AlmacenView (AlmacenView *alm) |
| int | TrabajadorView_TrabajadorView (TrabajadorView *trab) |
| int | TrabajadorView_on_mui_lista_currentItemChanged_Post (TrabajadorView *trab) |
| int | TrabajadorView_on_mui_guardar_clicked (TrabajadorView *trab) |
| 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 132 of file plugincuadrante.cpp.
References _depura(), DBRecord::addDBCampo(), DBCampo::DBNothing, DBCampo::DBvarchar, and Ui_AlmacenBase::mui_frameplugin.
00132 { 00133 _depura("esxtoy en la clase almacen", 0); 00134 00135 alm->addDBCampo("aperturaalmacen", DBCampo::DBvarchar, DBCampo::DBNothing, "Apertura Mañana"); 00136 alm->addDBCampo("cierrealmacen", DBCampo::DBvarchar, DBCampo::DBNothing, "Cierre Mañana"); 00137 alm->addDBCampo("apertura1almacen", DBCampo::DBvarchar, DBCampo::DBNothing, "Apertura Tarde"); 00138 alm->addDBCampo("cierre1almacen", DBCampo::DBvarchar, DBCampo::DBNothing, "Cierre Tarde"); 00139 00140 00141 // --------------- 00143 QHBoxLayout *hboxLayout160 = new QHBoxLayout(); 00144 hboxLayout160->setSpacing(2); 00145 hboxLayout160->setMargin(0); 00146 hboxLayout160->setObjectName(QString::fromUtf8("hboxLayout16")); 00147 00149 QLabel *textLabel2_9_26 = new QLabel(alm->mui_frameplugin); 00150 textLabel2_9_26->setObjectName(QString::fromUtf8("textLabel2_9_2")); 00151 textLabel2_9_26->setText("Apertura Mañanas"); 00152 hboxLayout160->addWidget(textLabel2_9_26); 00153 00154 QLineEdit *horain = new QLineEdit(alm); 00155 horain->setObjectName("mui_aperturaalmacen"); 00156 hboxLayout160->addWidget(horain); 00157 00159 QLabel *textLabel2_9_27 = new QLabel(alm->mui_frameplugin); 00160 textLabel2_9_27->setText("Cierre Mañanas"); 00161 hboxLayout160->addWidget(textLabel2_9_27); 00162 00163 QLineEdit *horafin = new QLineEdit(alm); 00164 horafin->setObjectName("mui_cierrealmacen"); 00165 00166 hboxLayout160->addWidget(horafin); 00167 00168 00169 // --------------- 00170 00171 // --------------- 00173 QHBoxLayout *hboxLayout170 = new QHBoxLayout(); 00174 hboxLayout170->setSpacing(2); 00175 hboxLayout170->setMargin(0); 00176 hboxLayout170->setObjectName(QString::fromUtf8("hboxLayout17")); 00177 00179 QLabel *textLabel2_9_28 = new QLabel(alm->mui_frameplugin); 00180 textLabel2_9_28->setText("Apertura Tardes"); 00181 hboxLayout170->addWidget(textLabel2_9_28); 00182 00183 QLineEdit *horaint = new QLineEdit(alm); 00184 horaint->setObjectName("mui_apertura1almacen"); 00185 hboxLayout170->addWidget(horaint); 00186 00188 QLabel *textLabel2_9_29 = new QLabel(alm->mui_frameplugin); 00189 textLabel2_9_29->setText("Cierre Tardes"); 00190 hboxLayout170->addWidget(textLabel2_9_29); 00191 00192 QLineEdit *horafint = new QLineEdit(alm); 00193 horafint->setObjectName("mui_cierre1almacen"); 00194 00195 hboxLayout170->addWidget(horafint); 00196 00197 00198 // --------------- 00199 00200 00202 QVBoxLayout *m_hboxLayout1 = alm->mui_frameplugin->findChild<QVBoxLayout *>("hboxLayout1"); 00203 if (!m_hboxLayout1) { 00204 m_hboxLayout1 = new QVBoxLayout(alm->mui_frameplugin); 00205 m_hboxLayout1->setSpacing(0); 00206 m_hboxLayout1->setMargin(0); 00207 m_hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); 00208 } // end if 00209 // m_hboxLayout1->addWidget(horain); 00210 m_hboxLayout1->addLayout(hboxLayout160); 00211 m_hboxLayout1->addLayout(hboxLayout170); 00212 return 0; 00213 }
| void entryPoint | ( | Bulmafact * | bges | ) |
| bges |
Cargamos el sistema de traducciones una vez pasado por las configuraciones generales
Definition at line 108 of file plugincuadrante.cpp.
References _depura(), bges, CONF_DIR_TRADUCCION, CONF_TRADUCCION, confpr, myplugin4::inicializa(), theApp, traductor, and configuracion::valor().
00108 { 00109 _depura("entryPoint", 0); 00111 QTranslator *traductor = new QTranslator(0); 00112 if (confpr->valor(CONF_TRADUCCION) == "locales") { 00113 traductor->load(QString("plugincuadrante_") + QLocale::system().name(), 00114 confpr->valor(CONF_DIR_TRADUCCION).toAscii().constData()); 00115 } else { 00116 QString archivo = "plugincuadrante_" + confpr->valor(CONF_TRADUCCION); 00117 traductor->load(archivo, confpr->valor(CONF_DIR_TRADUCCION).toAscii().constData()); 00118 } // end if 00119 theApp->installTranslator(traductor); 00120 00121 myplugin4 *plug = new myplugin4(); 00122 plug->inicializa(bges); 00123 _depura("END entryPoint", 0); 00124 }
| int TrabajadorView_on_mui_guardar_clicked | ( | TrabajadorView * | trab | ) |
| trab |
Definition at line 263 of file plugincuadrante.cpp.
References SubForm3::guardar(), TrabajadorView::idtrabajador(), and SubForm3::setColumnValue().
00263 { 00264 SubForm2Bf *l = trab->findChild<SubForm2Bf *>("m_ausencias"); 00265 l->setColumnValue("idtrabajador", trab->idtrabajador()); 00266 l->guardar(); 00267 return 0; 00268 }
| int TrabajadorView_on_mui_lista_currentItemChanged_Post | ( | TrabajadorView * | trab | ) |
| trab |
Cargamos las validaciones de asterisk.
Definition at line 249 of file plugincuadrante.cpp.
References _depura(), SubForm2Bf::cargar(), and TrabajadorView::idtrabajador().
00249 { 00250 _depura("TrabajadorView_on_mui_lista_currentItemChanged_Post", 0); 00251 SubForm2Bf *l = trab->findChild<SubForm2Bf *>("m_ausencias"); 00252 l->cargar("SELECT * FROM ausencia WHERE idtrabajador = " + trab->idtrabajador()); 00253 _depura("END TrabajadorView_on_mui_lista_currentItemChanged_Post", 0); 00254 return 0; 00255 }
| int TrabajadorView_TrabajadorView | ( | TrabajadorView * | trab | ) |
| trab |
Definition at line 221 of file plugincuadrante.cpp.
References _depura(), SubForm3::addSHeader(), DBCampo::DBint, SHeader::DBNone, DBCampo::DBNothing, DBCampo::DBNotNull, SHeader::DBNoView, SHeader::DBNoWrite, DBCampo::DBPrimaryKey, DBCampo::DBvarchar, dialogChanges::dialogChanges_setQObjectExcluido(), FichaBf::empresaBase(), FALSE, Ui_SubForm3Base::mui_list, Ui_TrabajadorBase::mui_tab, SubForm3::setDBCampoId(), SubForm3::setDBTableName(), SubForm3::setDelete(), SubForm2Bf::setEmpresaBase(), SubForm3::setinsercion(), SubForm3::setSortingEnabled(), and TRUE.
00221 { 00222 _depura("TrabajadorView_TrabajadorView", 0); 00223 SubForm2Bf *l = new SubForm2Bf(trab); 00224 l->setObjectName(QString::fromUtf8("m_ausencias")); 00225 l->setEmpresaBase( trab->empresaBase()); 00226 l->setDBTableName("ausencia"); 00227 l->setDBCampoId("idausencia"); 00228 l->addSHeader("fechainausencia", DBCampo::DBvarchar, DBCampo::DBNothing , SHeader::DBNone, QApplication::translate("AlmacenView", "ID nom tipo Trabajo")); 00229 l->addSHeader("fechafinausencia", DBCampo::DBvarchar, DBCampo::DBNotNull, SHeader::DBNone , QApplication::translate("AlmacenView", "Numero de Cargos Necesarios")); 00230 l->addSHeader("motivoausencia", DBCampo::DBvarchar, DBCampo::DBNothing, SHeader::DBNone , QApplication::translate("AlmacenView", "Numero de Cargos Necesarios")); 00231 l->addSHeader("idausencia", DBCampo::DBint, DBCampo::DBPrimaryKey, SHeader::DBNoView | SHeader::DBNoWrite, QApplication::translate("AlmacenView", "ID almacen")); 00232 l->addSHeader("idtrabajador", DBCampo::DBint, DBCampo::DBNotNull, SHeader::DBNoView | SHeader::DBNoWrite, QApplication::translate("AlmacenView", "ID tipo Trabajo")); 00233 l->setinsercion(TRUE); 00234 l->setDelete(TRUE); 00235 l->setSortingEnabled(FALSE); 00236 trab->mui_tab->addTab(l, "Ausencias"); 00237 trab->dialogChanges_setQObjectExcluido(l->mui_list); 00238 00239 _depura("END TrabajadorView_TrabajadorView", 0); 00240 return 0; 00241 }
1.5.1