当前位置: 首页>>代码示例>>C++>>正文


C++ QMovie::setFileName方法代码示例

本文整理汇总了C++中QMovie::setFileName方法的典型用法代码示例。如果您正苦于以下问题:C++ QMovie::setFileName方法的具体用法?C++ QMovie::setFileName怎么用?C++ QMovie::setFileName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QMovie的用法示例。


在下文中一共展示了QMovie::setFileName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QWidget

QInputOutputPacsWidget::QInputOutputPacsWidget(QWidget *parent)
 : QWidget(parent)
{
    setupUi(this);

    createContextMenuQStudyTreeWidget();

    Settings settings;
    settings.restoreColumnsWidths(InputOutputSettings::PACSStudyListColumnsWidth, m_studyTreeWidget->getQTreeWidget());

    QStudyTreeWidget::ColumnIndex sortByColumn = (QStudyTreeWidget::ColumnIndex) settings.getValue(InputOutputSettings::PACSStudyListSortByColumn).toInt();
    Qt::SortOrder sortOrderColumn = (Qt::SortOrder) settings.getValue(InputOutputSettings::PACSStudyListSortOrder).toInt();
    m_studyTreeWidget->setSortByColumn (sortByColumn, sortOrderColumn);

    m_statsWatcher = new StatsWatcher("QueryInputOutputPacsWidget", this);
    m_statsWatcher->addClicksCounter(m_retrievAndViewButton);
    m_statsWatcher->addClicksCounter(m_retrieveButton);

    // Preparem el QMovie per indicar quan s'estan fent consultes al PACS
    QMovie *operationAnimation = new QMovie(this);
    operationAnimation->setFileName(":/images/loader.gif");
    m_queryAnimationLabel->setMovie(operationAnimation);
    operationAnimation->start();

    setQueryInProgress(false);

    createConnections();
}
开发者ID:151706061,项目名称:starviewer,代码行数:28,代码来源:qinputoutputpacswidget.cpp

示例2: initDialog

void AbstractItemDetail::initDialog()
{
	newNoteDialog = new CreateNoteDialog(this);
	newNoteDialog->hide();

	notesModel = new NotesModel(this);

	loading = new QLabel(this);
	QMovie *mov = new QMovie();
	mov->setCacheMode(QMovie::CacheAll);
	loading->setMovie(mov);
	mov->setFileName(":loading.gif");
	mov->setScaledSize(QSize(20, 20));
	mov->start();

	crm = SugarCrm::getInstance();

	notesTable = new QTableView(this);
	notesTable->verticalHeader()->hide();
	notesTable->horizontalHeader()->setStretchLastSection(true);
	notesTable->setSelectionBehavior(QAbstractItemView::SelectRows);
	notesTable->setSelectionMode(QAbstractItemView::SingleSelection);

	// buttons
	save = new QPushButton(QIcon(":save.png"), tr("Speichern"));
	newNote = new QPushButton(QIcon(":notes.png"), tr("Neue Notiz"));
	newDocument = new QPushButton(QIcon(":documents.png"), tr("Neues Dokument"));

	connect(save, SIGNAL(pressed()),
			this, SLOT(saveChanges()));
	connect(newNote, SIGNAL(pressed()),
			this, SLOT(showNewNoteDialog()));
	connect(newNoteDialog, SIGNAL(accepted()),
			this, SLOT(createNewNote()));
	connect(newDocument, SIGNAL(pressed()),
			this, SLOT(showNewDocumentDialog()));
	connect(notesTable, SIGNAL(doubleClicked(QModelIndex)),
			this, SLOT(downloadNoteAttachment(QModelIndex)));
}
开发者ID:Raven24,项目名称:FSugar,代码行数:39,代码来源:abstractitemdetail.cpp

示例3: keyFound

void MainWindow::keyFound(bool found, bool* featuresMatrix) {
    QString disabledMenuBtnSS = QString::fromUtf8(SS_MENU_DISABLED);
    QString checkedMenuBtnSS = QString::fromUtf8(SS_MENU_CHECKED);
    QString uncheckedMenuBtnSS = QString::fromUtf8(SS_MENU_UNCHECKED);
    QString copyBtnSS = QString::fromUtf8(SS_COPY_BTN);
    QString blankBtnSS = QString::fromUtf8(SS_BLANK_BTN);

    resetDeviceInfo();

    if(found) {
        YubiKeyFinder *finder = YubiKeyFinder::getInstance();
        int touchLevel = finder->touchLevel();
        qDebug() << "touchLevel is " << touchLevel;
        if(touchLevel & CONFIG1_VALID && touchLevel & CONFIG2_VALID) {
            ui->programLbl->setText(tr("Slot 1 and 2 configured"));
        } else if(touchLevel & CONFIG1_VALID) {
            ui->programLbl->setText(tr("Slot 1 configured"));
        } else if(touchLevel & CONFIG2_VALID) {
            ui->programLbl->setText(tr("Slot 2 configured"));
        } else {
            ui->programLbl->setText(tr("Not configured"));
        }

        unsigned int version = finder->version();
        ui->statusLbl->setText(KEY_FOUND);
        ui->statusLbl->setStyleSheet(QString::fromUtf8(SS_YKSTATUS_SUCCESS));

        ui->versionLbl->setText(finder->versionStr());
        qDebug() << "version is" << finder->versionStr();

        QPixmap pixmap;
        QMovie *movie = new QMovie();
        if(version < YK_VERSION(2,0,0)) {
            pixmap.load(":/res/images/v1-3-not-animated.png");
        } else if(version < YK_VERSION(2,1,4)) {
            movie->setFileName(":/res/images/V2-0-2-1-animated.gif");
        } else if(version < YK_VERSION(2,2,0)) {
            // YubiKey NEO
            pixmap.load(":/res/images/neo_transparent.png");
        } else if(version % 10 == 9){
            pixmap.load(":/res/images/yubikey_devel.png");
        } else if(version < YK_VERSION(2,3,0)){
            movie->setFileName(":/res/images/v2-2-animated.gif");
        } else {
            movie->setFileName(":/res/images/v2-3-animated.gif");
        }
        if(pixmap.isNull()) {
            ui->deviceImage->setMovie(movie);
            movie->start();
        } else {
            delete movie;
            ui->deviceImage->setPixmap(pixmap);
        }
        ui->deviceImage->setHidden(false);

        unsigned int serial = 0;
        if(featuresMatrix[YubiKeyFinder::Feature_SerialNumber]) {
            serial = YubiKeyFinder::getInstance()->serial();
        }
        if(serial != 0) {
            ui->serialNoDecLbl->setText(QString::number(serial));

            //Convert serial number in hex and modhex
            unsigned char buf[16];
            memset(buf, 0, sizeof(buf));
            size_t bufLen = 0;

            QString tmp = QString::number(serial, 16);
            size_t len = tmp.length();
            if(len % 2 != 0) {
                len++;
            }
            YubiKeyUtil::qstrClean(&tmp, (size_t)len, true);
            YubiKeyUtil::qstrHexDecode(buf, &bufLen, tmp);

            QString hex = YubiKeyUtil::qstrHexEncode(buf, bufLen);
            QString modhex = YubiKeyUtil::qstrModhexEncode(buf, bufLen);

            ui->serialNoHexLbl->setText(hex);
            ui->serialNoModhexLbl->setText(modhex);

            ui->serialNoDecCopyBtn->setStyleSheet(copyBtnSS);
            ui->serialNoHexCopyBtn->setStyleSheet(copyBtnSS);
            ui->serialNoModhexCopyBtn->setStyleSheet(copyBtnSS);
        } else {
            ui->serialNoDecLbl->setText(NA);
            ui->serialNoHexLbl->setText(NA);
            ui->serialNoModhexLbl->setText(NA);
            ui->serialNoDecCopyBtn->setStyleSheet(blankBtnSS);
            ui->serialNoHexCopyBtn->setStyleSheet(blankBtnSS);
            ui->serialNoModhexCopyBtn->setStyleSheet(blankBtnSS);
        }

        ui->otpSupportLbl->setPixmap(TICKMAP);

        if(featuresMatrix[YubiKeyFinder::Feature_MultipleConfigurations]) {
            ui->multiConfigSupportLbl->setPixmap(TICKMAP);
        } else {
            ui->multiConfigSupportLbl->setPixmap(CROSSMAP);
        }
//.........这里部分代码省略.........
开发者ID:wzzrd,项目名称:yubikey-personalization-gui,代码行数:101,代码来源:mainwindow.cpp


注:本文中的QMovie::setFileName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。