void Powerline_RateShowDlg::retranslateImages() { QString prevBtnImage = POWERLINE_RES((qApp->layoutDirection() == Qt::LeftToRight) ? "map/others/Prev.png" : "map/others/Next.png"); QString nextBtnImage = POWERLINE_RES((qApp->layoutDirection() == Qt::LeftToRight) ? "map/others/Next.png" : "map/others/Prev.png"); QString prevBtnDisableImage = POWERLINE_RES((qApp->layoutDirection() == Qt::LeftToRight) ? "map/others/PrevDisabled.png" : "map/others/NextDisabled.png"); QString nextBtnDisableImage = POWERLINE_RES((qApp->layoutDirection() == Qt::LeftToRight) ? "map/others/NextDisabled.png" : "map/others/PrevDisabled.png"); QString prevBtnSelectedImage = POWERLINE_RES((qApp->layoutDirection() == Qt::LeftToRight) ? "map/others/PrevSelected.png" : "map/others/NextSelected.png"); QString nextBtnSelectedImage = POWERLINE_RES((qApp->layoutDirection() == Qt::LeftToRight) ? "map/others/NextSelected.png" : "map/others/PrevSelected.png"); QPixmap prevPixmap(prevBtnImage); ui->prevPageBtn->setFixedSize(prevPixmap.size()); QPixmap nextPixmap(nextBtnImage); ui->nextPageBtn->setFixedSize(nextPixmap.size()); if (m_prevPageBtnState & BTNSTATE_DISABLED) { ui->prevPageBtn->setIcon(QIcon(prevBtnDisableImage)); } else if(m_prevPageBtnState & BTNSTATE_HOVER) { ui->prevPageBtn->setIcon(QIcon(prevBtnSelectedImage)); } else { ui->prevPageBtn->setIcon(QIcon(prevBtnImage)); } if (m_nextPageBtnState & BTNSTATE_DISABLED) { ui->nextPageBtn->setIcon(QIcon(nextBtnDisableImage)); } else if(m_nextPageBtnState & BTNSTATE_HOVER) { ui->nextPageBtn->setIcon(QIcon(nextBtnSelectedImage)); } else { ui->nextPageBtn->setIcon(QIcon(nextBtnImage)); } }
UAnimatedSplashScreen::UAnimatedSplashScreen(const QPixmap &pixmap, Qt::WindowFlags f): QSplashScreen(pixmap, f) { timer = new QTimer(); connect(timer, SIGNAL(timeout()), this, SLOT(nextPixmap())); setCursor(Qt::ArrowCursor); // костыль vBoxlayoutMain = new QVBoxLayout(); labelMessage = new QLabel(); vBoxlayoutMain->addSpacing(60); vBoxlayoutMain->addWidget(labelMessage, 0, Qt::AlignCenter); setLayout(vBoxlayoutMain); // костыль }