Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 FLFormSearchDB.h 00003 ------------------- 00004 begin : Sun Nov 4 2001 00005 copyright : (C) 2001-2005 by InfoSiAL S.L. 00006 email : mail@infosial.com 00007 ***************************************************************************/ 00008 /*************************************************************************** 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; version 2 of the License. * 00012 ***************************************************************************/ 00013 /*************************************************************************** 00014 Este programa es software libre. Puede redistribuirlo y/o modificarlo 00015 bajo los términos de la Licencia Pública General de GNU en su 00016 versión 2, publicada por la Free Software Foundation. 00017 ***************************************************************************/ 00018 00019 #ifndef FLFORMSEARCHDB_H 00020 #define FLFORMSEARCHDB_H 00021 00022 #include <qpushbutton.h> 00023 #include <qsqlrecord.h> 00024 #include <qtooltip.h> 00025 #include <qwhatsthis.h> 00026 #include <qeventloop.h> 00027 00028 #include "FLFormDB.h" 00029 00030 class FLFormSearchDBInterface; 00031 00046 class FLFormSearchDB: public FLFormDB 00047 { 00048 Q_OBJECT 00049 00050 public: 00051 00057 FLFormSearchDB(const QString &actionName, QWidget *parent = 0); 00058 00064 FLFormSearchDB(FLSqlCursor *cursor, const QString &actionName = QString::null, 00065 QWidget *parent = 0); 00066 00070 ~FLFormSearchDB(); 00071 00077 void setCursor(FLSqlCursor *c); 00078 00082 void setMainWidget(QWidget *w); 00083 00089 void setMainWidget(); 00090 00102 QVariant exec(const QString &n = QString::null); 00103 00107 void setFilter(const QString &f); 00108 00112 bool accepted() { 00113 return accepted_; 00114 } 00115 00116 protected: 00117 00121 void initForm(); 00122 00126 void closeEvent(QCloseEvent *e); 00127 00131 QPushButton *pushButtonAccept; 00132 00133 public slots: 00134 00138 void initScript(); 00139 00143 void hide(); 00144 00148 virtual void accept(); 00149 00153 virtual void reject(); 00154 00155 private: 00156 00160 bool loop; 00161 00165 bool accepted_; 00166 00170 FLFormSearchDBInterface *iface; 00171 }; 00172 00173 #endif