UltraScan III
us_model_gui.cpp
Go to the documentation of this file.
1 
3 #include "us_model_gui.h"
4 #include "us_gui_settings.h"
5 #include "us_settings.h"
6 #include "us_constants.h"
7 #include "us_properties.h"
8 #include "us_investigator.h"
9 #include "us_util.h"
10 #include "us_passwd.h"
11 #include "us_associations_gui.h"
12 
14  : US_WidgetsDialog( 0, 0 ), model( current_model )
15 {
16  setWindowTitle ( "UltraScan Model Editor" );
17  setPalette ( US_GuiSettings::frameColor() );
18  setAttribute ( Qt::WA_DeleteOnClose );
19  setWindowModality( Qt::WindowModal );
20 
21  model_descriptions.clear();
22 
24  model_saved = true;
25 
26  recent_row = -1;
27  investigator = -1;
28 
29  QGridLayout* main = new QGridLayout( this );
30  main->setContentsMargins( 2, 2, 2, 2 );
31  main->setSpacing ( 2 );
32 
33  // Start widgets
34  QPushButton* pb_investigator = us_pushbutton( tr( "Select Investigator" ) );
35 
36  if ( US_Settings::us_inv_level() < 1 )
37  pb_investigator->setEnabled( false );
38 
39  le_investigator = us_lineedit( "", 0, true );
40 
42 
43  QLabel* lb_mlfilt = us_label( tr( "List Filter:" ) );
44  le_mlfilt = us_lineedit( "" );
45  le_nlines = us_lineedit( "", 0, true );
46 
47  QPushButton* pb_models = us_pushbutton( tr( "List Available Models" ) );
48  QPushButton* pb_new = us_pushbutton( tr( "Create New Model" ) );
49 
50  QLabel* lb_description = us_label( tr( "Model Description:" ) );
52 
53  // Models List Box
55 
56  QPushButton* pb_components = us_pushbutton( tr( "Manage Components" ) );
57  QPushButton* pb_associations = us_pushbutton( tr( "Manage Associations" ) );
58 
59  QLabel* lb_wavelength = us_label( tr( "Wavelength:" ) );
61 
62  QLabel* lb_optics = us_label( tr( "Optical System:" ) );
63 
65  cb_optics->addItem( tr( "Absorbance" ), ABSORBANCE );
66  cb_optics->addItem( tr( "Interference" ), INTERFERENCE );
67  cb_optics->addItem( tr( "Fluorescence" ), FLUORESCENCE );
68 
69  QLabel* lb_guid = us_label( tr( "Global Identifier:" ) );
70  le_guid = us_lineedit( "", 0, true );
71 
72  if ( US_Settings::us_debug() == 0 )
73  {
74  lb_guid->setVisible( false );
75  le_guid->setVisible( false );
76  }
77 
78  pb_save = us_pushbutton( tr( "Save / Update Model" ) );
79  pb_delete = us_pushbutton( tr( "Delete Selected Model" ) );
80  pb_save ->setEnabled( false );
81  pb_delete->setEnabled( false );
82 
83 
84  // Pushbuttons
85  QBoxLayout* buttonbox = new QHBoxLayout;
86  QPushButton* pb_help = us_pushbutton( tr( "Help") );
87  QPushButton* pb_close = us_pushbutton( tr( "Cancel") );
88  QPushButton* pb_accept = us_pushbutton( tr( "Accept") );
89  buttonbox->addWidget( pb_help );
90  buttonbox->addWidget( pb_close );
91  buttonbox->addWidget( pb_accept );
92 
93  int row = 0;
94  main->addWidget( pb_investigator, row, 0, 1, 1 );
95  main->addWidget( le_investigator, row++, 1, 1, 3 );
96  main->addLayout( dkdb_cntrls, row++, 0, 1, 4 );
97  main->addWidget( lb_mlfilt, row, 0, 1, 1 );
98  main->addWidget( le_mlfilt, row, 1, 1, 2 );
99  main->addWidget( le_nlines, row++, 3, 1, 1 );
100  main->addWidget( pb_models, row, 0, 1, 2 );
101  main->addWidget( pb_new, row++, 2, 1, 2 );
102  main->addWidget( lb_description, row, 0, 1, 1 );
103  main->addWidget( le_description, row++, 1, 1, 3 );
104  main->addWidget( lw_models, row, 0, 5, 4 ); row += 5;
105  main->addWidget( pb_components, row, 0, 1, 2 );
106  main->addWidget( pb_associations, row++, 2, 1, 2 );
107  main->addWidget( lb_wavelength, row, 0, 1, 1 );
108  main->addWidget( le_wavelength, row, 1, 1, 1 );
109  main->addWidget( lb_optics, row, 2, 1, 1 );
110  main->addWidget( cb_optics, row++, 3, 1, 1 );
111  main->addWidget( lb_guid, row, 0, 1, 1 );
112  main->addWidget( le_guid, row++, 1, 1, 3 );
113  main->addWidget( pb_save, row, 0, 1, 2 );
114  main->addWidget( pb_delete, row++, 2, 1, 2 );
115  main->addLayout( buttonbox, row++, 0, 1, 4 );
116 
117  connect( pb_investigator, SIGNAL( clicked() ),
118  SLOT( get_person() ) );
119  connect( dkdb_cntrls, SIGNAL( changed ( bool ) ),
120  SLOT( upd_disk_db( bool ) ) );
121  connect( le_mlfilt, SIGNAL( editingFinished() ),
122  SLOT( filter_changed() ) );
123  connect( pb_models, SIGNAL( clicked() ),
124  SLOT( list_models() ) );
125  connect( pb_new, SIGNAL( clicked() ),
126  SLOT( new_model() ) );
127  connect( le_description, SIGNAL( editingFinished () ),
128  SLOT ( edit_description() ) );
129  connect( pb_components, SIGNAL( clicked() ),
130  SLOT( manage_components() ) );
131  connect( pb_associations, SIGNAL( clicked() ),
132  SLOT( associations() ) );
133  connect( pb_save, SIGNAL( clicked() ),
134  SLOT( save_model() ) );
135  connect( pb_delete, SIGNAL( clicked() ),
136  SLOT( delete_model() ) );
137  connect( pb_help, SIGNAL( clicked() ),
138  SLOT( help() ) );
139  connect( pb_close, SIGNAL( clicked() ),
140  SLOT( close() ) );
141  connect( pb_accept, SIGNAL( clicked() ),
142  SLOT( accept_model() ) );
143  connect( lw_models, SIGNAL( itemClicked ( QListWidgetItem* ) ),
144  SLOT ( select_model( QListWidgetItem* ) ) );
145 
146  if ( !model.description.isEmpty() && model.description != "New Model" )
147  { // if re-loading a previous model, list that model
148  ModelDesc desc;
150  desc.DB_id = -1;
151  desc.filename .clear();
152  desc.modelGUID = model.modelGUID;
153  desc.editGUID = model.editGUID;
154 
156  model_descriptions << desc;
157  show_model_desc();
158  recent_row = 0;
159 
160  le_description->setText( model.description );
161  le_wavelength ->setText( QString::number( model.wavelength, 'f', 1 ) );
162  le_guid ->setText( model.modelGUID );
163  cb_optics ->setCurrentIndex( model.optics );
164  lw_models ->setCurrentRow( recent_row );
165  }
166 
167  check_db();
168  resize( 500, 600 );
169 }
170 
172 {
173  if ( ! ignore_changes() ) return;
174 
175  US_Model m; // Create a new model
176 
177  le_description->setText( m.description );
178 
179  ModelDesc desc;
180  desc.description = m.description;
181  desc.DB_id = "-1";
182  desc.filename .clear();
183  desc.modelGUID.clear();
184  desc.editGUID .clear();
185 
186  le_guid->clear();
187 
188  model = m;
189  working_model = m;
190  model_saved = false;
191 
192  model_descriptions << desc;
193  show_model_desc();
194 
195  // Account for sorting
196  int last = model_descriptions.size() - 1;
197 
198  for ( int ii = 0; ii < lw_models->count(); ii++ )
199  {
200  if ( lw_models->item( ii )->type() - QListWidgetItem::UserType == last )
201  {
202  lw_models->setCurrentRow( ii );
203  recent_row = ii;
204  break;
205  }
206  }
207 }
208 
210 {
211  lw_models->clear();
212  QString mfilt = le_mlfilt->text();
213  bool listdesc = !mfilt.isEmpty();
214 qDebug() << "ShMDsc: mfilt listdesc" << mfilt << listdesc;
215  QRegExp mpart = QRegExp( ".*" + mfilt + ".*", Qt::CaseInsensitive );
216  QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
217 
218  for ( int ii = 0; ii < model_descriptions.size(); ii++ )
219  {
220  QString desc = model_descriptions[ ii ].description;
221 
222  // If filtering, exclude non-matching items
223  if ( listdesc && !desc.contains( mpart ) )
224  continue;
225 
226  // Add a type value to the lw_item that is the position of the item
227  // in the model_description list plus the Qt minimum value
228  // for custom types.
229  new QListWidgetItem( desc, lw_models, ii + QListWidgetItem::UserType );
230  }
231 
232  lw_models->sortItems();
233  QApplication::restoreOverrideCursor();
234 }
235 
237 {
238  if ( working_model == model ) return true;
239 
240  int response = QMessageBox::question( this,
241  tr( "Model Changed" ),
242  tr( "The model has changed. Do you want to ignore the changes?" ),
243  QMessageBox::Cancel, QMessageBox::Yes );
244 
245  if ( response == QMessageBox::Cancel ) return false;
246 
248  return true;
249 }
250 
252 {
253  int row = lw_models->currentRow();
254  if ( row < 0 || model_descriptions.size() == 0 ) return;
255 
256  QString desc = le_description->text().trimmed();
257  if ( desc.isEmpty() ) return;
258 
259  if ( desc != "New Model" )
260  {
261  pb_save ->setEnabled( true );
262  pb_delete->setEnabled( true );
263  }
264 
265  if ( desc == lw_models->item( row )->text() ) return;
266 
267  // Find index into model_descriptions
268  int index = lw_models->item( row )->type() - QListWidgetItem::UserType;
269 
270  model_descriptions[ index ].description = desc;
271  model.description = desc;
272  show_model_desc();
273 
274  // Re-select row (it was sorted)
275  for ( int ii = 0; ii < model_descriptions.size(); ii++ )
276  {
277  if ( lw_models->item( ii )->type() - QListWidgetItem::UserType == index )
278  {
279  lw_models->setCurrentRow( ii );
280  break;
281  }
282  }
283 }
284 
285 void US_ModelGui::select_model( QListWidgetItem* item )
286 {
287 qDebug() << "SelMdl: IN";
288  if ( ! ignore_changes() )
289  {
290 qDebug() << "SelMdl: ignore_changes FALSE";
291  // Reset to last row;
292  item -> listWidget()->setCurrentRow( recent_row );
293  return;
294  }
295 
296  // Get the current index
297  if ( model_descriptions.size() == 0 )
298  return;
299 
300  int index = item->listWidget()-> currentRow();
301  QString mdesc = item->text();
302  int modlx = modelIndex( mdesc, model_descriptions );
303 qDebug() << "SelMdl: index modlx" << index << modlx << "mdesc" << mdesc;
304 
305  // For the case of the user clicking on "New Model"
306  if ( model_descriptions[ modlx ].modelGUID.isEmpty() )
307  {
308  model.description = mdesc;
309  model.modelGUID = "";
310  le_description->setText( model.description );
311  le_guid ->setText( model.modelGUID );
312  return;
313  }
314 
315  if ( dkdb_cntrls->db() )
316  { // Load from database
317  US_Passwd pw;
318  US_DB2 db( pw.getPasswd() );
319 
320  if ( db.lastErrno() != US_DB2::OK )
321  {
322  connect_error( db.lastError() );
323  return;
324  }
325 
326  QString modelID = model_descriptions[ modlx ].DB_id;
327  model.load( modelID, &db );
328  }
329 
330  else
331  { // Load from local disk
332  QString filename = model_descriptions[ modlx ].filename;
333 
334  if ( filename.isEmpty() )
335  return;
336  else
337  model.load( filename );
338  }
339 
340  if ( mdesc != "New Model" )
341  {
342  pb_save ->setEnabled( true );
343  pb_delete->setEnabled( true );
344  }
345 
346  model_descriptions[ modlx ].editGUID = model.editGUID;
347 
349 
350  recent_row = index;
351 
352  // Populate
353  le_description->setText( model.description );
354  le_wavelength ->setText( QString::number( model.wavelength, 'f', 1 ) );
355 
356  le_guid ->setText( model.modelGUID );
357 
358  cb_optics ->setCurrentIndex( model.optics );
359 }
360 
362 {
363  int row = lw_models->currentRow();
364  if ( row < 0 ) return;
365 
366  QString mdesc = lw_models->item( row )->text();
367  int modlx = modelIndex( mdesc, model_descriptions );
368  ModelDesc md = model_descriptions.takeAt( modlx );
369 
370  show_model_desc();
371 
372  // Delete from DB or disk
373 
374  if ( ! dkdb_cntrls->db() )
375  {
376  QString path;
377  if ( ! US_Model::model_path( path ) ) return;
378 
379  // If guid matches one we already have, use that filename
380  // otherwise create a new filename.
381  QString fn = US_Model::get_filename( path, le_guid->text(), newFile );
382  if ( newFile ) return;
383 
384  QFile::remove( fn );
385  }
386  else // Remove from DB
387  {
388  QStringList q;
389  q << "delete_model" << md.DB_id;
390 
391  if ( status_query( q ) )
392  QMessageBox::information( this,
393  tr( "Model Deleted" ),
394  tr( "The model has been deleted from the database." ) );
395  }
396 }
397 
398 bool US_ModelGui::status_query( const QStringList& q )
399 {
400  US_Passwd pw;
401  US_DB2 db( pw.getPasswd() );
402 
403  if ( db.lastErrno() != US_DB2::OK )
404  {
405  connect_error( db.lastError() );
406  return false;
407  }
408 
409  db.statusQuery( q );
410 
411  return database_ok( db );
412 }
413 
415 {
416  if ( dkdb_cntrls->db() )
417  {
418  QStringList DB = US_Settings::defaultDB();
419 
420  if ( DB.size() < 5 )
421  {
422  QMessageBox::warning( this,
423  tr( "Attention" ),
424  tr( "There is no default database set." ) );
425  }
426  }
427 
429 
430  QString number = ( investigator > 0 )
431  ? QString::number( investigator ) + ": "
432  : "";
433 
434  le_investigator->setText( number + US_Settings::us_inv_name() );
435 }
436 
437 void US_ModelGui::connect_error( const QString& error )
438 {
439  QMessageBox::warning( this,
440  tr( "Connection Problem" ),
441  tr( "Could not connect to database\n" ) + error );
442 }
443 
445 {
446  if ( db.lastErrno() == US_DB2::OK ) return true;
447 
448  QMessageBox::information( this,
449  tr( "Database Error" ),
450  tr( "The following error was returned:\n" ) + db.lastError() );
451 
452  return false;
453 }
454 
456 {
457  US_Investigator* dialog = new US_Investigator;
458  dialog->exec();
459 
461 
462  QString number = ( investigator > 0 )
463  ? QString::number( investigator ) + ": "
464  : "";
465 
466  le_investigator->setText( number + US_Settings::us_inv_name() );
467 }
468 
470 {
471  int index = lw_models->currentRow();
472 qDebug() << "MngCmp: index" << index;
473 
474  if ( index < 0 )
475  {
476  QMessageBox::information( this,
477  tr( "Model not selected" ),
478  tr( "Please select a model first.\n"
479  "If necessary, create a new model." ) );
480  return;
481  }
482 
483  int dbdisk = dkdb_cntrls->db() ? US_Disk_DB_Controls::DB
486 
487  US_Properties* dialog = new US_Properties( working_model, dbdisk );
488 
489  connect( dialog, SIGNAL( done ( void ) ), SLOT( update_sim ( void ) ) );
490  connect( dialog, SIGNAL( use_db( bool ) ), SLOT( source_changed( bool ) ) );
491  dialog->exec();
492 }
493 
495 {
497  model_saved = false;
498 }
499 
501 {
502  int index = lw_models->currentRow();
503 
504  if ( index < 0 )
505  {
506  QMessageBox::information( this,
507  tr( "Model not selected" ),
508  tr( "Please select a model first.\n"
509  "If necessary, create a new model." ) );
510  return;
511  }
512 
513  if ( model.components.size() < 2 )
514  {
515  QMessageBox::information( this,
516  tr( "Model Incomplete" ),
517  tr( "There must be at least two analytes in the selected\n"
518  "model to specify associations." ) );
519  return;
520  }
521 
523 
525  connect( dialog, SIGNAL( done() ), SLOT( update_assoc() ) );
526  dialog->exec();
527 }
528 
530 {
532  model_saved = false;
533 }
534 
536 {
537  if ( ! ignore_changes() )
538  return;
539 
540  if ( ! model_saved )
541  {
542  int response = QMessageBox::question( this,
543  tr( "Model Changed" ),
544  tr( "The model may have changed and not been saved.\n"
545  "Do you want to accept the possibly unsaved model?" ),
546  QMessageBox::Cancel, QMessageBox::Yes );
547 
548  if ( response == QMessageBox::Cancel ) return;
549  }
550 
551  if ( recent_row >= 0 )
552  emit valueChanged( model );
553 
554  close();
555 }
556 
558 {
559  if ( ! verify_model() ) return;
560 
561  model.wavelength = le_wavelength->text().toDouble();
562 
563  if ( ! dkdb_cntrls->db() )
564  {
565  QString path;
566  if ( ! US_Model::model_path( path ) ) return;
567 
568  // If guid is null, generate a new one.
569  if ( le_guid->text().size() != 36 )
570  le_guid->setText( US_Util::new_guid() );
571 
572  model.modelGUID = le_guid->text();
573 qDebug() << "MdlSv: path" << path << "guid" << model.modelGUID;
574 
575  // If guid matches one we already have, use that filename
576  // otherwise create a new filename.
577  QString fn = US_Model::get_filename( path, le_guid->text(), newFile );
578  QFile file( fn );
579 qDebug() << "MdlSv: fn" << fn;
580 
581  if ( ! file.open( QIODevice::WriteOnly | QIODevice::Text) )
582  {
583  qDebug() << "Cannot open file for writing: " << fn;
584  return;
585  }
586 
587  model.write( fn );
588 
589  QString save_type = newFile ? "saved" : "updated";
590 
591  QMessageBox::information( this,
592  tr( "Model Saved" ),
593  tr( "The model has been %1 in the disk." ).arg( save_type ) );
594 
596  }
597  else // Save/update in DB
598  {
599  US_Passwd pw;
600  US_DB2 db( pw.getPasswd() );
601 
602  if ( db.lastErrno() != US_DB2::OK )
603  {
604  connect_error( db.lastError() );
605  return;
606  }
607 
608  if ( model.write( &db ) == US_DB2::OK )
609  {
610  QMessageBox::information( this,
611  tr( "Model Written" ),
612  tr( "The model has been %1 in the database." ).arg( model.message ) );
613 
615  le_guid->setText( model.modelGUID );
616  }
617  else
618  {
619  QMessageBox::information( this,
620  tr( "Database Error" ),
621  tr( "The model could not be saved:\n" ) + model.message );
622  return;
623  }
624  }
625 
626  model_saved = true;
627 }
628 
630 {
631  if ( model.components.size() == 0 )
632  {
633  QMessageBox::information( this,
634  tr( "Model Error" ),
635  tr( "The model has no components." ) );
636  return false;
637  }
638 
639  if ( model.description.size() == 0 ||
640  model.description.trimmed() == "New Model" )
641  {
642  QMessageBox::information( this,
643  tr( "Model Name Error" ),
644  tr( "The model does not have an acceptable name.\n"
645  "Enter a non-blank, non-\"New Model\" name in the\n"
646  "Model Description field. You may then save the model." ) );
647  return false;
648  }
649 
650  return true;
651 }
652 
653 int US_ModelGui::modelIndex( QString mdesc, QList< ModelDesc > mds )
654 {
655  for ( int ii = 0; ii < mds.size(); ii++ )
656  {
657  if ( mdesc == mds[ ii ].description )
658  return ii;
659  }
660 
661  return -1;
662 }
663 
665 {
666 qDebug() << "SrcChg: db" << db;
667  if ( db )
668  dkdb_cntrls->set_db();
669  else
671 
672  model_descriptions.clear();
673 
674  list_models();
675 
676  qApp->processEvents();
677 }
678 
679 // Slot to handle change in list filter
681 {
682 qDebug() << "FltChg: mfilt" << le_mlfilt->text();
683  list_models();
684 }
685 
686 // Slot to handle change in disk/db selection
688 {
689 qDebug() << "UpdDDb: db" << db;
690  model_descriptions.clear();
691 
692  list_models();
693 
694  qApp->processEvents();
695 }
696 
697 
699 {
700 qDebug() << "LsMdl: IN";
701  if ( ! ignore_changes() ) return;
702 
703  QString path;
704  if ( ! US_Model::model_path( path ) ) return;
705 
706 qDebug() << "LsMdl: path" << path;
707  le_description->clear();
708 
709  if ( model_descriptions.count() == 0 )
710  { // No model descriptions, so get them all
711  QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
712 
713  if ( ! dkdb_cntrls->db() )
714  {
715  QDir f( path );
716  QStringList filter( "M*.xml" );
717  QStringList f_names = f.entryList( filter, QDir::Files, QDir::Name );
718 
719  QXmlStreamAttributes a;
720 
721  for ( int ii = 0; ii < f_names.size(); ii++ )
722  {
723  QFile m_file( path + "/" + f_names[ ii ] );
724 
725  if ( ! m_file.open( QIODevice::ReadOnly | QIODevice::Text) )
726  continue;
727 
728  QXmlStreamReader xml( &m_file );
729 
730  while ( ! xml.atEnd() )
731  {
732  xml.readNext();
733 
734  if ( xml.isStartElement() )
735  {
736  if ( xml.name() == "model" )
737  {
738  ModelDesc md;
739  a = xml.attributes();
740  md.description = a.value( "description" ).toString();
741  md.modelGUID = a.value( "modelGUID" ).toString();
742  md.editGUID = a.value( "editGUID" ).toString();
743  md.filename = path + "/" + f_names[ ii ];
744  md.DB_id = -1;
745  model_descriptions << md;
746  break;
747  }
748  }
749  }
750 
751  m_file.close();
752  }
753  }
754 
755  else // DB Access
756  {
757  if ( investigator < 0 )
758  {
759  QMessageBox::information( this,
760  tr( "Investigator not set" ),
761  tr( "Please select an investigator first." ) );
762  return;
763  }
764 
765  US_Passwd pw;
766  US_DB2 db( pw.getPasswd() );
767 
768  if ( db.lastErrno() != US_DB2::OK )
769  {
770  connect_error( db.lastError() );
771  return;
772  }
773 
774  QStringList q;
775  q << "get_model_desc" << QString::number( investigator );
776 
777  db.query( q );
778 
779  while ( db.next() )
780  {
781  ModelDesc md;
782 
783  md.DB_id = db.value( 0 ).toString();
784  md.modelGUID = db.value( 1 ).toString();
785  md.description = db.value( 2 ).toString();
786  md.editGUID = db.value( 5 ).toString();
787  md.filename.clear();
788 
789  model_descriptions << md;
790  }
791  }
792  QApplication::restoreOverrideCursor();
793  QApplication::restoreOverrideCursor();
794  }
795 
796  qApp->processEvents();
797  int olhgt = lw_models->height(); // old list dimensions before any change
798  int olwid = lw_models->width();
799 qDebug() << "LsMdl: old h,w" << olhgt << olwid;
800 
801  show_model_desc(); // re-do list of model descriptions
802 
803  int nmodls = model_descriptions.size();
804  int nlines = lw_models->count();
805 qDebug() << "LsMdl: nmodls" << nmodls << "nlines" << nlines;
806  le_nlines->setText( nlines == 1 ? tr( "1 list item" )
807  : tr( "%1 list items" ).arg( nlines ) );
808  qApp->processEvents();
809 
810  if ( nlines == 0 )
811  lw_models->addItem( "No models found." );
812 
813  else
814  { // Resize to show reasonable portion of list
815  nlines = qMin( nlines, 13 ); // show at most 13 lines,
816  nlines = qMin( nlines, 5 ); // and no less than 5
817 
818  QFontMetrics fm = lw_models->fontMetrics();
819  int height = nlines * fm.lineSpacing(); // list height needed
820  int width = fm.maxWidth() * 20; // list width needed
821 
822  height = qMax( height, olhgt ); // max of old,new height
823  width = qMax( width, olwid ); // max of old,new width
824 
825  height = this->height() + height - olhgt; // bump by difference in
826  width = this->width() + width - olwid; // old,new list size
827 
828  resize( width, height ); // new total dialog size
829  }
830 qDebug() << "LsMdl: END";
831 }
832