Changeset 2838


Ignore:
Timestamp:
Oct 21, 2019 9:42:28 PM (3 weeks ago)
Author:
gegorbet
Message:

modify Load Model regexp type for search

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/us_model_loader.cpp

    r2527 r2838  
    211211   // Trigger models list from db or disk source
    212212   select_diskdb();
     213
     214   resize( 700, 500 );
    213215}
    214216
     
    355357   bool listsing = do_single;                // show singles of MC groups?
    356358   bool listall  = !listdesc;                // unfiltered by description?
    357    QRegExp mpart = QRegExp( ".*" + mfilt + ".*", Qt::CaseInsensitive );
     359   QString mflt1 = mfilt;
     360   if ( ! mfilt.isEmpty() )
     361   {
     362      if ( !mfilt.startsWith( "*" ) )
     363         mflt1         = "*" + mflt1;
     364      if ( !mfilt.endsWith( "*" ) )
     365         mflt1         = mflt1 + "*";
     366   }
     367
     368   QRegExp mpart = QRegExp( mflt1, Qt::CaseInsensitive, QRegExp::WildcardUnix );
    358369   model_descriptions.clear();               // clear model descriptions
    359370qDebug() << "LM: desc single edit" << listdesc << listsing << listedit
    360  << "editGUID" << editGUID << "nruns" << runIDs.size();
     371 << "editGUID" << editGUID << "nruns" << runIDs.size() << "mflt1" << mflt1;
    361372   int kmmnew    = 0;
    362373   int kmmold    = 0;
     
    752763      for ( int jj = 0; jj < model_descrs_ufilt.size(); jj++ )
    753764      {
    754          if ( model_descrs_ufilt[ jj ].description.contains( mpart ) )
     765         mdesc     = model_descrs_ufilt[ jj ].description;
     766         lmdesc    = alt_description( mdesc, true );
     767         if ( lmdesc.contains( mpart ) )
    755768         {  // description filter matches
    756769            model_descriptions << model_descrs_ufilt[ jj ];
     
    797810   singprev   = listsing;    // save list-singles flag
    798811
     812#if 0
    799813   // Resize the widget to show listed items well
    800814   QFontMetrics fm = lw_models->fontMetrics();
     
    802816   int olhgt    = lw_models->height();
    803817   int nlines   = qMin( model_descriptions.size(), 30 );
    804 #if 0
    805818   int width    = qMin( 600, maxlch * fm.maxWidth()    );
    806819   int height   = qMin( 800, nlines * fm.lineSpacing() );
     
    810823   width        = this->width()  + width  - olwid;
    811824   height       = this->height() + height - olhgt;
    812 #endif
    813 #if 1
    814825   int width    = fm.width( strmx );
    815826   int height   = nlines * fm.lineSpacing();
     
    820831   width        = qMin( width,  qApp->desktop()->width()  - 100 );
    821832   height       = qMin( height, qApp->desktop()->height() - 100 );
    822 #endif
    823833qDebug() << "LM: width height" << width << height;
    824834
     
    826836qDebug() << "LM:  sized:" << size();
    827837   //adjustSize();
     838#endif
    828839
    829840   connect( le_mfilter,    SIGNAL( textChanged( const QString& ) ),
  • trunk/utils/us_xpn_data.cpp

    r2833 r2838  
    315315      if ( ! ( exprow.abscnf || exprow.flscnf ||
    316316               exprow.inscnf || exprow.wlscnf ) )
     317      {
     318DbgLv(1) << "XpDa: NO AFIW:  run exp" << exprow.runId << exprow.expId
     319 << "expname resname" << exprow.expname << exprow.resname;
    317320         continue;
     321      }
    318322
    319323      // Save experiment row
Note: See TracChangeset for help on using the changeset viewer.