qcpix/tsrc/orbitsearch/testsearch.cpp
changeset 15 cf5c74390b98
parent 1 6f2c1c46032b
equal deleted inserted replaced
10:afe194b6b1cd 15:cf5c74390b98
    46     layout->addItem( searchBox );
    46     layout->addItem( searchBox );
    47     
    47     
    48     searchButton = new HbPushButton( "Search" );
    48     searchButton = new HbPushButton( "Search" );
    49     layout->addItem( searchButton );
    49     layout->addItem( searchButton );
    50     
    50     
       
    51     QGraphicsLinearLayout *getdoclayout = new QGraphicsLinearLayout;
       
    52     getdoclayout->setOrientation(Qt::Horizontal);
       
    53     
       
    54     indexBox = new HbLineEdit;
       
    55     indexBox->setInputMethodHints(Qt::ImhPreferNumbers);
       
    56     
       
    57     countBox = new HbLineEdit;
       
    58     countBox->setInputMethodHints(Qt::ImhPreferNumbers);    
       
    59     
       
    60     getdocbutton = new HbPushButton("GetDocs");
       
    61     
       
    62 #if !DONT_SHOW_RESULTS
       
    63     getdoclayout->addItem(indexBox);
       
    64     getdoclayout->addItem(countBox);
       
    65     getdoclayout->addItem(getdocbutton);
       
    66     layout->addItem(getdoclayout);
       
    67 #endif //!DONT_SHOW_RESULTS
       
    68     
    51     resultsBox = new HbTextEdit;
    69     resultsBox = new HbTextEdit;
    52     layout->addItem( resultsBox );
    70     layout->addItem( resultsBox );
    53     
    71     
    54     SearchHelper* sh = new SearchHelper(searchBox, searchButton, resultsBox);  
    72     SearchHelper* sh = new SearchHelper(searchBox, searchButton, resultsBox, indexBox, countBox,getdocbutton);  
    55     QObject::connect( searchButton, SIGNAL( clicked() ), sh, SLOT(doSearch()) );
    73     QObject::connect( searchButton, SIGNAL( clicked() ), sh, SLOT(doSearch()) );
       
    74     QObject::connect( getdocbutton, SIGNAL( clicked() ), sh, SLOT(showdocs()) );
    56     
    75     
    57     w->setLayout( layout );
    76     w->setLayout( layout );
    58     BigScreen->addView ( w );
    77     BigScreen->addView ( w );
    59     BigScreen->show();    
    78     BigScreen->show();    
    60 }
    79 }