Ignore:
Timestamp:
01/25/10 14:05:23 (12 years ago)
Author:
timkoma <timkoma@…>
Branches:
master, qt5
Children:
1deea3b
Parents:
7620de0
Message:

search upgrade

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r7620de0 rc7b58d4  
    247247void MainWindow::updateSearchView(const QDate &aDate)
    248248{
    249 /*
     249    qDebug() << "MainWindow::updateSearchView(), aDate: " << aDate.toString() ;
    250250    searchTreeView->reset();
    251251    int eventsCount = static_cast<EventModel*>(searchTreeView->model())->loadSearchResultEvents(aDate,AppSettings::confId());
    252     if( eventsCount ){
     252    if( eventsCount ||
     253            searchDayNavigator->getCurrentDate() != Conference::getById(AppSettings::confId()).start() ){
    253254        searchVerticalWidget->show();
    254255        searchAgainButton->show();
     
    261262        searchHead->show();
    262263    }
    263 */
    264264}
    265265
     
    312312void MainWindow::searchClicked()
    313313{
    314     QList<QString> columns;
     314    QHash<QString,QString> columns;
    315315
    316316    if( searchTitle->isChecked() )
    317         columns.append( "title" );
     317        columns.insertMulti("EVENT", "title");
    318318    if( searchAbstract->isChecked() )
    319         columns.append( "abstract" );
    320 
    321     mSqlEngine->searchEvent( AppSettings::confId(), columns, searchEdit->text() );
     319        columns.insertMulti("EVENT", "abstract");
     320    if( searchTag->isChecked() )
     321        columns.insertMulti("EVENT", "tag");
     322    if( searchSpeaker->isChecked() )
     323        columns["PERSON"] = "name";
     324    if( searchRoom->isChecked() )
     325        columns["ROOM"] = "name";
     326
     327    QString keyword = searchEdit->text().replace( QString("%"), QString("\\%") );
     328    qDebug() << "\nKeyword to search: " << keyword;
     329    mSqlEngine->searchEvent( AppSettings::confId(), columns, keyword );
     330
    322331    updateSearchView( Conference::getById(AppSettings::confId()).start() );
    323332}
Note: See TracChangeset for help on using the changeset viewer.