コード例 #1
0
PlayList::PlayList(Player *player, QWidget *parent) :
    QWidget(parent),
    ui(new Ui::PlayList)
{
    ui->setupUi(this);
    curIndex = 0;
    lengthFilter = 0;
    this->player = player;
    ui->playListTable->horizontalHeader()->setStretchLastSection(true);//自动设置最后一列宽度
    this->setWindowFlags(Qt::WindowTitleHint | Qt::CustomizeWindowHint);
    this->setFixedSize(this->width(), this->height());

    //“查找”文本框,绑定回车键到“查找”按钮
    connect(ui->searchEdit, SIGNAL(returnPressed()), this, SLOT(on_searchButton_clicked()));

    readFromFile(QCoreApplication::applicationDirPath() + "/PlayList.sdpl");

    //搜索功能部分的动画
    //搜索条
    finderAnimation = new QPropertyAnimation(ui->finderFlame, "geometry");
    finderAnimation->setEasingCurve(QEasingCurve::OutCirc);
    finderAnimation->setDuration(600);
    finderAnimation->setStartValue(QRect(331, 330, 331, 31));
    finderAnimation->setEndValue(QRect(0, 330, 331, 31));
    //播放列表
    playListAnimation = new QPropertyAnimation(ui->playListTable, "geometry");
    playListAnimation->setDuration(600);
    playListAnimation->setEasingCurve(QEasingCurve::OutCirc);
}
コード例 #2
0
ファイル: SearchBar.cpp プロジェクト: tomvodi/QTail
void SearchBar::startSearch(const QString &text)
{
   ui->searchLineEdit->setText(text);
   on_searchButton_clicked();
}
コード例 #3
0
ファイル: FileConfigurator.C プロジェクト: autodataming/IQmol
void File::on_searchBox_returnPressed()
{
   on_searchButton_clicked(true);
}
コード例 #4
0
ファイル: FileConfigurator.C プロジェクト: autodataming/IQmol
void File::on_searchBox_textEdited(QString const& text)
{
   m_searchText = text;
   on_searchButton_clicked(true);
}
コード例 #5
0
void MainWindow::on_searchText_returnPressed()
{
    on_searchButton_clicked();

    return;
}
コード例 #6
0
		void SongSearch::keyPressEvent(QKeyEvent *event)
		{
			if(event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
				on_searchButton_clicked();
		}