cuadranteqtablewidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Tomeu Borras Riera                              *
00003  *   tborras@conetxia.com                                                  *
00004  *   http://www.iglues.org                                                 *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  *                                                                         *
00011  *   This program is distributed in the hope that it will be useful,       *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU General Public License for more details.                          *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this program; if not, write to the                         *
00018  *   Free Software Foundation, Inc.,                                       *
00019  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00020  ***************************************************************************/
00021 
00022 #ifndef CUADRANTEQTABLEWIDGET_H
00023 #define CUADRANTEQTABLEWIDGET_H
00024 
00025 #include <QEvent>
00026 #include <QTableWidget>
00027 #include <QTableWidgetItem>
00028 #include <QItemDelegate>
00029 #include <QLabel>
00030 #include "funcaux.h"
00031 #include "blwidget.h"
00032 
00033 
00034 class Company;
00035 
00037 class CuadranteQTextDocument : public QLabel, public QTableWidgetItem,  public PEmpresaBase {
00038 Q_OBJECT
00039 public:
00040         QString mdb_idalmacen;
00041         QDate   mdb_fechacuadrante;
00042         QString mdb_idcuadrante;
00043 
00044 public:
00045     CuadranteQTextDocument(Company *emp, QWidget *parent = 0);
00046     virtual void setAlmFecha(QString idalmacen, const QDate &date);
00047     ~CuadranteQTextDocument();
00048     void addTrabajador(QString);
00049     void pintaCuadrante(QString idalmacen, const QDate &date);
00050     QString idcuadrante();
00051     QDate fechacuadrante();
00052     QString idalmacen();
00053     void setidcuadrante(QString);
00054     const QString impresion();
00055     void contextMenuEvent ( QContextMenuEvent * e );
00056     void mouseDoubleClickEvent ( QMouseEvent * event );
00057     void setText(QString);
00058 public slots:
00059     virtual void refresh();
00060     void on_customContextMenuRequested ( const QPoint & pos );
00061 };
00062 
00063 
00066 
00067 class CuadranteQTableWidget : public QTableWidget {
00068     Q_OBJECT
00069 public:
00070     CuadranteQTableWidget(QWidget *parent = 0);
00071     ~CuadranteQTableWidget();
00072 
00073 protected:
00074     virtual bool dropMimeData (int row, int column,const QMimeData *data, Qt::DropAction action);
00075     virtual void dragEnterEvent(QDragEnterEvent *event);
00076     virtual void dropEvent(QDropEvent *event);
00077     virtual void dragMoveEvent(QDragMoveEvent *event);
00078 
00079 public slots:
00080     void on_contextMenuRequested ( int row, int col, const QPoint & pos );
00081 
00082 
00083 };
00084 
00085 
00087 class ImpCuadrante :  public PEmpresaBase {
00088 public:
00089         QString mdb_idalmacen;
00090         QDate   mdb_fechacuadrante;
00091         QString mdb_idcuadrante;
00092         QString m_html;
00093 
00094 public:
00095     ImpCuadrante(Company *emp);
00096     ~ImpCuadrante();
00097     void generar();
00098     bool buscaConflictos(QString idtrabajador, const QDate &date, QString horain, QString horafin);
00099 
00100 };
00101 
00102 
00103 #endif
00104 

Generated on Sat Dec 15 00:01:06 2007 for BulmaGes by  doxygen 1.5.1