void MusicRecommendFoundWidget::createLabels() { delete m_statusLabel; m_statusLabel = nullptr; initFirstWidget(); m_container->show(); layout()->removeWidget(m_mainWindow); QScrollArea *scrollArea = new QScrollArea(this); scrollArea->setStyleSheet(MusicUIObject::MScrollBarStyle01); scrollArea->setWidgetResizable(true); scrollArea->setFrameShape(QFrame::NoFrame); scrollArea->setAlignment(Qt::AlignLeft); scrollArea->setWidget(m_mainWindow); layout()->addWidget(scrollArea); QWidget *function = new QWidget(m_mainWindow); function->setStyleSheet(MusicUIObject::MCheckBoxStyle01 + MusicUIObject::MPushButtonStyle03); QVBoxLayout *grid = new QVBoxLayout(function); QLabel *firstLabel = new QLabel(function); firstLabel->setText(tr("<font color=#158FE1> Recommend Music</font>")); grid->addWidget(firstLabel); QLabel *iconLabel = new QLabel(function); iconLabel->setPixmap(QPixmap(":/image/lb_recmd_daily")); grid->addWidget(iconLabel); //////////////////////////////////////////////////////////////////////////// grid->addWidget(m_container); m_mainWindow->layout()->addWidget(function); }
MusicTimerWidget::MusicTimerWidget(QWidget *parent) : MusicAbstractMoveDialog(parent), ui(new Ui::MusicTimerWidget) { ui->setupUi(this); ui->topTitleCloseButton->setIcon(QIcon(":/share/searchclosed")); ui->topTitleCloseButton->setStyleSheet(MusicUIObject::MToolButtonStyle03); ui->topTitleCloseButton->setCursor(QCursor(Qt::PointingHandCursor)); ui->topTitleCloseButton->setToolTip(tr("Close")); connect(ui->topTitleCloseButton, SIGNAL(clicked()), SLOT(close())); connect(ui->timerToPlay, SIGNAL(clicked()), SLOT(changeFirstWidget())); connect(ui->timerToStop, SIGNAL(clicked()), SLOT(changeSecondWidget())); connect(ui->timerToShutdown, SIGNAL(clicked()), SLOT(changeThreeWidget())); ui->timerToPlay->setIcon(QIcon(":/control/timerPlay")); ui->timerToStop->setIcon(QIcon(":/control/timerStop")); ui->timerToShutdown->setIcon(QIcon(":/control/timerDown")); ui->timerToPlay->setStyleSheet(MusicUIObject::MPushButtonStyle08); ui->timerToStop->setStyleSheet(MusicUIObject::MPushButtonStyle08); ui->timerToShutdown->setStyleSheet(MusicUIObject::MPushButtonStyle08); ui->confirm->setStyleSheet(MusicUIObject::MPushButtonStyle08); ui->cancel->setStyleSheet(MusicUIObject::MPushButtonStyle08); ui->timerToPlay->setCursor(QCursor(Qt::PointingHandCursor)); ui->timerToStop->setCursor(QCursor(Qt::PointingHandCursor)); ui->timerToShutdown->setCursor(QCursor(Qt::PointingHandCursor)); ui->confirm->setCursor(QCursor(Qt::PointingHandCursor)); ui->cancel->setCursor(QCursor(Qt::PointingHandCursor)); connect(ui->timerToPlay, SIGNAL(clicked()), SLOT(changeFirstWidget())); connect(ui->timerToStop, SIGNAL(clicked()), SLOT(changeSecondWidget())); connect(ui->timerToShutdown, SIGNAL(clicked()), SLOT(changeThreeWidget())); connect(ui->confirm, SIGNAL(clicked()), SLOT(commitTheResults())); connect(ui->cancel, SIGNAL(clicked()), SLOT(close())); initComboParameter(); initFirstWidget(); initSecondWidget(); initThreeWidget(); initParemeter(); QButtonGroup *group1 = new QButtonGroup(this); group1->addButton(ui->noSetRadioButton1, 0); group1->addButton(ui->setRadioButton1, 1); connect(group1, SIGNAL(buttonClicked(int)), SLOT(buttonClicked(int))); QButtonGroup *group2 = new QButtonGroup(this); group2->addButton(ui->noSetRadioButton2, 2); group2->addButton(ui->setRadioButton2, 3); connect(group2, SIGNAL(buttonClicked(int)), SLOT(buttonClicked(int))); QButtonGroup *group3 = new QButtonGroup(this); group3->addButton(ui->noSetRadioButton3, 4); group3->addButton(ui->setRadioButton3, 5); connect(group3, SIGNAL(buttonClicked(int)), SLOT(buttonClicked(int))); M_CONNECTION_PTR->setValue(getClassName(), this); M_CONNECTION_PTR->poolConnect(getClassName(), MusicApplicationObject::getClassName()); }
MusicConnectMobileWidget::MusicConnectMobileWidget(QWidget *parent) : QWidget(parent) { QVBoxLayout *vBox = new QVBoxLayout(this); vBox->setContentsMargins(0, 0, 0, 0); m_stackedWidget = new QStackedWidget(this); vBox->addWidget(m_stackedWidget); setLayout(vBox); initFirstWidget(); initSecondWidget(); initThirdWidget(); changeStatckedWidgetFirst(); }
void MusicWebDJRadioInfoWidget::createLabels() { initFirstWidget(); m_container->show(); layout()->removeWidget(m_mainWindow); QScrollArea *scrollArea = new QScrollArea(this); scrollArea->verticalScrollBar()->setStyleSheet(MusicUIObject::MScrollBarStyle01); scrollArea->setWidgetResizable(true); scrollArea->setFrameShape(QFrame::NoFrame); scrollArea->setAlignment(Qt::AlignLeft); scrollArea->setWidget(m_mainWindow); layout()->addWidget(scrollArea); QWidget *function = new QWidget(m_mainWindow); function->setStyleSheet(MusicUIObject::MCheckBoxStyle01 + MusicUIObject::MPushButtonStyle03); QVBoxLayout *grid = new QVBoxLayout(function); QWidget *firstTopFuncWidget = new QWidget(function); QHBoxLayout *firstTopFuncLayout = new QHBoxLayout(firstTopFuncWidget); QLabel *firstLabel = new QLabel(function); firstLabel->setText(tr("<font color=#158FE1> DJRadio > %1 </font>").arg(m_currentPlaylistItem.m_name)); QPushButton *backButton = new QPushButton(tr("Back")); backButton->setFixedSize(90, 30); backButton->setStyleSheet(MusicUIObject::MPushButtonStyle03); backButton->setCursor(QCursor(Qt::PointingHandCursor)); connect(backButton, SIGNAL(clicked()), this, SIGNAL(backToMainMenu())); firstTopFuncLayout->addWidget(firstLabel); firstTopFuncLayout->addWidget(backButton); grid->addWidget(firstTopFuncWidget); //////////////////////////////////////////////////////////////////////////// QWidget *topFuncWidget = new QWidget(function); QHBoxLayout *topFuncLayout = new QHBoxLayout(topFuncWidget); m_iconLabel = new QLabel(topFuncWidget); m_iconLabel->setPixmap(QPixmap(":/image/lb_warning").scaled(180, 180)); m_iconLabel->setFixedSize(210, 180); //////////////////////////////////////////////////////////////////////////// QWidget *topLineWidget = new QWidget(topFuncWidget); QVBoxLayout *topLineLayout = new QVBoxLayout(topLineWidget); topLineLayout->setContentsMargins(10, 5, 5, 0); QLabel *nameLabel = new QLabel(topLineWidget); QFont nameFont = nameLabel->font(); nameFont.setPixelSize(20); nameLabel->setFont(nameFont); nameLabel->setStyleSheet(MusicUIObject::MFontStyle01); nameLabel->setText("-"); QLabel *singerLabel = new QLabel(topLineWidget); singerLabel->setStyleSheet(MusicUIObject::MColorStyle04 + MusicUIObject::MFontStyle03); singerLabel->setText("-"); QLabel *playCountLabel = new QLabel(topLineWidget); playCountLabel->setStyleSheet(MusicUIObject::MColorStyle04 + MusicUIObject::MFontStyle03); QLabel *updateTimeLabel = new QLabel(topLineWidget); updateTimeLabel->setStyleSheet(MusicUIObject::MColorStyle04 + MusicUIObject::MFontStyle03); updateTimeLabel->setText("-"); topLineLayout->addWidget(nameLabel); topLineLayout->addWidget(singerLabel); topLineLayout->addWidget(playCountLabel); topLineLayout->addWidget(updateTimeLabel); topLineWidget->setLayout(topLineLayout); topFuncLayout->addWidget(m_iconLabel); topFuncLayout->addWidget(topLineWidget); topFuncWidget->setLayout(topFuncLayout); grid->addWidget(topFuncWidget); //////////////////////////////////////////////////////////////////////////// QWidget *functionWidget = new QWidget(this); functionWidget->setStyleSheet(MusicUIObject::MPushButtonStyle03); QHBoxLayout *hlayout = new QHBoxLayout(functionWidget); m_songButton = new QPushButton(functionWidget); m_songButton->setText(tr("songItems")); m_songButton->setFixedSize(100, 25); m_songButton->setCursor(QCursor(Qt::PointingHandCursor)); hlayout->addWidget(m_songButton); hlayout->addStretch(1); functionWidget->setLayout(hlayout); QButtonGroup *group = new QButtonGroup(this); group->addButton(m_songButton, 0); connect(group, SIGNAL(buttonClicked(int)), m_container, SLOT(setCurrentIndex(int))); #ifdef Q_OS_UNIX m_songButton->setFocusPolicy(Qt::NoFocus); #endif grid->addWidget(functionWidget); ////////////////////////////////////////////////////////////////////// grid->addWidget(m_container); grid->addStretch(1); function->setLayout(grid); m_mainWindow->layout()->addWidget(function); m_resizeWidgets << nameLabel << singerLabel << playCountLabel << updateTimeLabel; }