Exemple #1
0
void SpellConfig::find()
{
#ifdef WIN32
    if (m_find == NULL){
        m_find = new SpellFind(edtPath);
        connect(m_find, SIGNAL(finished()), this, SLOT(findFinished()));
    }
    raiseWindow(m_find);
#endif
}
Exemple #2
0
void GpgCfg::find()
{
#ifdef WIN32
    if (m_find == NULL){
        m_find = new GpgFind(edtGPG);
        connect(m_find, SIGNAL(finished()), this, SLOT(findFinished()));
    }
    raiseWindow(m_find);
#endif
}
void FmFindWidget::init()
{
    mLayout = new QGraphicsLinearLayout( this );
    mLayout->setOrientation( Qt::Vertical );
 
    mContentWidget = new HbStackedWidget( this );
    mLayout->addItem( mContentWidget );
    initSearchPanel();
    mLayout->addItem( mSearchPanel );
    setLayout( mLayout );

    mModel = new FmFindResultModel( this );
    mModel->setObjectName( "resultModel" );

    connect( mModel, SIGNAL( modelCountChanged( int )),
        this, SLOT( on_resultModel_modelCountChanged( int )), Qt::QueuedConnection );

    connect( mModel, SIGNAL( findStarteded()),
        this, SLOT( on_resultModel_findStarted()) );

    connect( mModel, SIGNAL( findFinished()),
        this, SLOT( on_resultModel_findFinished()) );
    
    mListView = new HbListView( this );
    mListView->setModel( mModel );

    mEmptyTipWidget = new HbWidget( this );
    QGraphicsLinearLayout *emptyTipLayout = new QGraphicsLinearLayout( mEmptyTipWidget );
    HbLabel *emptyTipLable = new HbLabel( hbTrId( "No found files or folders" ), mEmptyTipWidget );
    emptyTipLayout->addItem( emptyTipLable );
    emptyTipLayout->setAlignment( emptyTipLable, Qt::AlignCenter );
    emptyTipLable->setAlignment( Qt::AlignCenter );
 
    mContentWidget->addWidget( mListView );
    mContentWidget->addWidget( mEmptyTipWidget );
    
    mContentWidget->setCurrentWidget( mEmptyTipWidget );
    connect( mListView, SIGNAL(activated(QModelIndex)), this, SLOT(itemActivated(QModelIndex)));
}