Logo Search packages:      
Sourcecode: facturalux version File versions  Download package

FLSqlCursor::FLSqlCursor ( const QString &  name = QString::null,
bool  autopopulate = true,
QSqlDatabase *  db = 0,
FLSqlCursor cR = 0,
FLRelationMetaData r = 0 
)

constructor.

Parameters:
cR Cursor relacionado con este. Al indicar que este cursor depende de otro, el contenido del cursor está en función del valor actual del campo por el que se establece la relación del cursor relacionado.
r Relación que indica como se relacionan los dos cursores.

Definition at line 33 of file FLSqlCursor.cpp.

References BROWSE, bufferChanged(), FLManager::createTable(), cursorRelation, cursorUpdated(), FLManager::existsTable(), FLManager::metadata(), metadata_, modeAccess_, FLTableMetaData::name(), newBuffer(), refresh(), relation, and seek().

                                                                                                                             :
QObject (),
QSqlCursor (QString::null, autopopulate, db),
buffer_ (0),
bufferCopy_(0),
metadata_ (0),
edition (true),
browse (true),
mainFilter_ (QString::null),
action_ (0)
{
  if (!FLManager::existsTable (name))
      metadata_ = FLManager::createTable (name);
  else
      metadata_ = FLManager::metadata (name);

  cursorRelation = cR;
  relation = r;

  if (!metadata_)
      return;

  QSqlCursor::setName (metadata_->name (), autopopulate);

  modeAccess_ = BROWSE;
  if (cR && r)
      {
        connect (cR, SIGNAL (bufferChanged (QString)), this, SLOT (refresh (QString)));
        connect (cR, SIGNAL (newBuffer ()), this, SLOT (refresh ()));
        connect (cR, SIGNAL (cursorUpdated ()), this, SLOT (refresh ()));
      }
  else
      seek (0);
}


Generated by  Doxygen 1.6.0   Back to index