--- FLFormSearchDB.cpp 2008-12-06 03:28:15.000000000 +0100 +++ abanq-2.3-linux-src/src/flbase/FLFormSearchDB.cpp 2009-02-27 18:10:47.000000000 +0100 @@ -169,7 +169,18 @@ } void FLFormSearchDB::closeEvent( QCloseEvent * e ) { - if ( focusWidget() ) { +// dpinelo: Agregado para guardar y conocer los tamaņos de las ventanas + // dpinelo: Tras establecer el widget, establecemos las medidas guardadas del formulario + QSettings settings; + settings.setPath( "InfoSiAL", "FacturaLUX", QSettings::User ); + QString keybase( "/facturalux/lite/formularios/" ); + QRect geo = this->geometry(); + settings.writeEntry( keybase + "FLFormSearchDB" + name_ + "x", geo.x() ); + settings.writeEntry( keybase + "FLFormSearchDB" + name_ + "y", geo.y() ); + settings.writeEntry( keybase + "FLFormSearchDB" + name_ + "w", geo.width() ); + settings.writeEntry( keybase + "FLFormSearchDB" + name_ + "h", geo.height() ); + + if ( focusWidget() ) { FLFieldDB * fdb = ::qt_cast( focusWidget()->parentWidget() ); if ( fdb && fdb->autoComFrame_ && fdb->autoComFrame_->isVisible() ) { fdb->autoComFrame_->hide(); @@ -272,6 +283,17 @@ cursor_->setBrowse( false ); connect( cursor_, SIGNAL( recordChoosed() ), this, SLOT( accept() ) ); + // dpinelo: Tras establecer el widget, establecemos las medidas guardadas del formulario + QSettings settings; + settings.setPath( "InfoSiAL", "FacturaLUX", QSettings::User ); + QString keybase( "/facturalux/lite/formularios/" ); + int x = settings.readNumEntry( keybase + "FLFormSearchDB" + name_ + "x", 0 ); + int y = settings.readNumEntry( keybase + "FLFormSearchDB" + name_ + "y", 0 ); + int width = settings.readNumEntry( keybase + "FLFormSearchDB" + name_ + "w", 0 ); + int h = settings.readNumEntry( keybase + "FLFormSearchDB" + name_ + "h", 0 ); + if ( x > 0 && y > 0 && width > 0 && h > 0 ) + this->setGeometry(x, y, width, h); + int mWidth = mainWidget_->width(); int mHeight = mainWidget_->height(); QWidget * actWin = qApp->activeWindow();