예제 #1
0
TreeFinder::TreeFinder(TreeWidget* tree) : AbstractFinder(tree)
{
    d.tree = tree;
    if (tree)
        tree->blockItemReset(true);
    connect(this, SIGNAL(returnPressed()), this, SLOT(animateHide()));
}
예제 #2
0
파일: searchbar.cpp 프로젝트: bochi/kueue
    hide();

    if ( !mIsBrowserSearch )
    {
        connect(ui.nextButton, SIGNAL(clicked()),
                this, SLOT(findNext()));
        connect(ui.previousButton, SIGNAL(clicked()),
                this, SLOT(findPrevious()));
        connect(ui.searchLineEdit, SIGNAL(returnPressed()),
                this, SLOT(findNext()));
        connect(ui.searchLineEdit, SIGNAL(textEdited(const QString &)),
                this, SLOT(findNext()));
    }

    connect(ui.doneButton, SIGNAL(clicked()),
            this, SLOT(animateHide()));
    connect(m_timeLine, SIGNAL(frameChanged(int)),
            this, SLOT(frameChanged(int)));
    
    new QShortcut(QKeySequence(Qt::Key_Escape), this, SLOT(animateHide()));
}

void SearchBar::initializeSearchWidget()
{
    m_widget = new QWidget(this);
    m_widget->setContentsMargins(0, 0, 0, 0);
    ui.setupUi(m_widget);
    ui.previousButton->setText(m_widget->layoutDirection()
                == Qt::LeftToRight? QChar(9664): QChar(9654));
    ui.nextButton->setText(m_widget->layoutDirection()
                == Qt::LeftToRight? QChar(9654): QChar(9664));