您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ xi18nc函数代码示例

51自学网 2021-06-03 10:21:14
  C++
这篇教程C++ xi18nc函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中xi18nc函数的典型用法代码示例。如果您正苦于以下问题:C++ xi18nc函数的具体用法?C++ xi18nc怎么用?C++ xi18nc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: xi18nc

QString SetPartFlagsOperation::description() const{    if (PartitionTable::flagNames(newFlags()).size() == 0)        return xi18nc("@info:status", "Clear flags for partition <filename>%1</filename>", flagPartition().deviceNode());    return xi18nc("@info:status", "Set flags for partition <filename>%1</filename> to /"%2/"", flagPartition().deviceNode(), PartitionTable::flagNames(newFlags()).join(QStringLiteral(",")));}
开发者ID:KDE,项目名称:kpmcore,代码行数:7,


示例2: endSleepInhibit

void PlanExecutor::integrityCheckFinished(KJob *pJob) {	endSleepInhibit();	discardIntegrityNotification();	mIntegrityNotification = new KNotification(QStringLiteral("IntegrityCheckCompleted"), KNotification::Persistent);	mIntegrityNotification->setTitle(xi18nc("@title:window", "Integrity Check Completed"));	mIntegrityNotification->setText(pJob->errorText());	QStringList lAnswers;	if(pJob->error() == BackupJob::ErrorWithLog) {		lAnswers << xi18nc("@action:button", "Show log file");		connect(mIntegrityNotification, SIGNAL(action1Activated()), SLOT(showLog()));	} else if(pJob->error() == BackupJob::ErrorSuggestRepair) {		lAnswers << xi18nc("@action:button", "Yes");		lAnswers << xi18nc("@action:button", "No");		connect(mIntegrityNotification, SIGNAL(action1Activated()), SLOT(startRepairJob()));	}	mIntegrityNotification->setActions(lAnswers);	connect(mIntegrityNotification, SIGNAL(action2Activated()), SLOT(discardIntegrityNotification()));	connect(mIntegrityNotification, SIGNAL(closed()), SLOT(discardIntegrityNotification()));	connect(mIntegrityNotification, SIGNAL(ignored()), SLOT(discardIntegrityNotification()));	mIntegrityNotification->sendEvent();	if(mState == INTEGRITY_TESTING) { //only restore if nothing has changed during the run		mState = mLastState;	}	emit stateChanged();}
开发者ID:spersson,项目名称:Kup,代码行数:27,


示例3: xi18nc

QString RestoreOperation::description() const{	if (overwrittenPartition())		return xi18nc("@info/plain", "Restore partition from <filename>%1</filename> to <filename>%2</filename>", fileName(), overwrittenPartition()->deviceNode());	return xi18nc("@info/plain", "Restore partition on <filename>%1</filename> at %2 from <filename>%3</filename>", targetDevice().deviceNode(), Capacity::formatByteSize(restorePartition().firstSector() * targetDevice().logicalSectorSize()), fileName());}
开发者ID:Acidburn0zzz,项目名称:partitionmanager,代码行数:7,


示例4: Q_ASSERT

bool LibPartedPartitionTable::updateGeometry(Report& report, const Partition& partition, qint64 sector_start, qint64 sector_end){    Q_ASSERT(partition.devicePath() == QString::fromUtf8(pedDevice()->path));    bool rval = false;    PedPartition* pedPartition = (partition.roles().has(PartitionRole::Extended))                                 ? ped_disk_extended_partition(pedDisk())                                 : ped_disk_get_partition_by_sector(pedDisk(), partition.firstSector());    if (pedPartition) {        if (PedGeometry* pedGeometry = ped_geometry_new(pedDevice(), sector_start, sector_end - sector_start + 1)) {            if (PedConstraint* pedConstraint = ped_constraint_exact(pedGeometry)) {                if (ped_disk_set_partition_geom(pedDisk(), pedPartition, pedConstraint, sector_start, sector_end))                    rval = true;                else                    report.line() << xi18nc("@info:progress", "Could not set geometry for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());                ped_constraint_destroy(pedConstraint);            } else                report.line() << xi18nc("@info:progress", "Could not get constraint for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());            ped_geometry_destroy(pedGeometry);        } else            report.line() << xi18nc("@info:progress", "Could not get geometry for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());    } else        report.line() << xi18nc("@info:progress", "Could not open partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());    return rval;}
开发者ID:KDE,项目名称:kpmcore,代码行数:28,


示例5: ped_disk_type_get

bool LibPartedDevice::createPartitionTable(Report& report, const PartitionTable& ptable){    PedDiskType* pedDiskType = ped_disk_type_get(ptable.typeName().toLatin1().constData());    if (pedDiskType == nullptr) {        report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not retrieve partition table type /"%1/" for <filename>%2</filename>.", ptable.typeName(), deviceNode());        return false;    }    PedDevice* dev = ped_device_get(deviceNode().toLatin1().constData());    if (dev == nullptr) {        report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not open backend device <filename>%1</filename>.", deviceNode());        return false;    }    PedDisk* disk = ped_disk_new_fresh(dev, pedDiskType);    if (disk == nullptr) {        report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not create a new partition table in the backend for device <filename>%1</filename>.", deviceNode());        return false;    }    return LibPartedPartitionTable::commit(disk);}
开发者ID:shainer,项目名称:kpmcore,代码行数:25,


示例6: DialogBase

HgBackoutDialog::HgBackoutDialog(QWidget *parent) :    DialogBase(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, parent){    // dialog properties    this->setWindowTitle(xi18nc("@title:window",                "<application>Hg</application> Backout"));    okButton()->setText(xi18nc("@action:button", "Backout"));    okButton()->setDisabled(true);    //    setupUI();    // Load saved settings    FileViewHgPluginSettings *settings = FileViewHgPluginSettings::self();    this->resize(QSize(settings->backoutDialogWidth(),                               settings->backoutDialogHeight()));    // connections    connect(this, SIGNAL(finished(int)), this, SLOT(saveGeometry()));    connect(m_selectBaseCommitButton, SIGNAL(clicked()),             this, SLOT(slotSelectBaseChangeset()));    connect(m_selectParentCommitButton, SIGNAL(clicked()),             this, SLOT(slotSelectParentChangeset()));    connect(m_baseRevision, SIGNAL(textChanged(const QString&)),            this, SLOT(slotUpdateOkButton(const QString&)));}
开发者ID:KDE,项目名称:dolphin-plugins,代码行数:27,


示例7: xi18nc

QString CreatePartitionJob::description() const{	if (partition().number() > 0)		return xi18nc("@info/plain", "Create new partition <filename>%1</filename>", partition().deviceNode());	return xi18nc("@info/plain", "Create new partition on device <filename>%1</filename>", device().deviceNode());}
开发者ID:Acidburn0zzz,项目名称:partitionmanager,代码行数:7,


示例8: ped_timer_new

bool LibPartedPartitionTable::resizeFileSystem(Report& report, const Partition& partition, qint64 newLength){    bool rval = false;#if defined LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT    if (PedGeometry* originalGeometry = ped_geometry_new(pedDevice(), partition.fileSystem().firstSector(), partition.fileSystem().length())) {        if (PedFileSystem* pedFileSystem = ped_file_system_open(originalGeometry)) {            if (PedGeometry* resizedGeometry = ped_geometry_new(pedDevice(), partition.fileSystem().firstSector(), newLength)) {                PedTimer* pedTimer = ped_timer_new(pedTimerHandler, nullptr);                rval = ped_file_system_resize(pedFileSystem, resizedGeometry, pedTimer);                ped_timer_destroy(pedTimer);                if (!rval)                    report.line() << xi18nc("@info:progress", "Could not resize file system on partition <filename>%1</filename>.", partition.deviceNode());                ped_geometry_destroy(resizedGeometry);            } else                report.line() << xi18nc("@info:progress", "Could not get geometry for resized partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());            ped_file_system_close(pedFileSystem);        } else            report.line() << xi18nc("@info:progress", "Could not open partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());        ped_geometry_destroy(originalGeometry);    } else        report.line() << xi18nc("@info:progress", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());#else    Q_UNUSED(report);    Q_UNUSED(partition);    Q_UNUSED(newLength);#endif    return rval;}
开发者ID:KDE,项目名称:kpmcore,代码行数:32,


示例9: QCheckBox

void HgBackoutDialog::setupUI(){    m_mainGroup = new QGroupBox;    m_baseRevision = new QLineEdit;    m_parentRevision = new QLineEdit;    m_optMerge = new QCheckBox(xi18nc("@label:checkbox",                        "Merge with old dirstate parent after backout"));    m_selectParentCommitButton = new QPushButton(xi18nc("@label:button",                                                "Select Changeset"));    m_selectBaseCommitButton = new QPushButton(xi18nc("@label:button",                                            "Select Changeset"));    QGridLayout *mainGroupLayout = new QGridLayout;    mainGroupLayout->addWidget(new QLabel(xi18nc("@label",                                    "Revision to Backout: ")), 0, 0);    mainGroupLayout->addWidget(m_baseRevision, 0, 1);    mainGroupLayout->addWidget(m_selectBaseCommitButton, 0, 2);    mainGroupLayout->addWidget(new QLabel(xi18nc("@label",                                    "Parent Revision (optional): ")), 1, 0);    mainGroupLayout->addWidget(m_parentRevision, 1, 1);    mainGroupLayout->addWidget(m_selectParentCommitButton, 1, 2);    mainGroupLayout->addWidget(m_optMerge, 2, 0, 1, 0);    m_mainGroup->setLayout(mainGroupLayout);    QVBoxLayout *lay = new QVBoxLayout;    lay->addWidget(m_mainGroup);    layout()->insertLayout(0, lay);}
开发者ID:KDE,项目名称:dolphin-plugins,代码行数:31,


示例10: xi18nc

bool ntfs::updateBootSector(Report& report, const QString& deviceNode) const{    report.line() << xi18nc("@info:progress", "Updating boot sector for NTFS file system on partition <filename>%1</filename>.", deviceNode);    quint32 n = firstSector();    char* s = reinterpret_cast<char*>(&n);#if Q_BYTE_ORDER == Q_BIG_ENDIAN    std::swap(s[0], s[3]);    std::swap(s[1], s[2]);#endif    QFile device(deviceNode);    if (!device.open(QFile::ReadWrite | QFile::Unbuffered)) {        Log() << xi18nc("@info:progress", "Could not open partition <filename>%1</filename> for writing when trying to update the NTFS boot sector.", deviceNode);        return false;    }    if (!device.seek(0x1c)) {        Log() << xi18nc("@info:progress", "Could not seek to position 0x1c on partition <filename>%1</filename> when trying to update the NTFS boot sector.", deviceNode);        return false;    }    if (device.write(s, 4) != 4) {        Log() << xi18nc("@info:progress", "Could not write new start sector to partition <filename>%1</filename> when trying to update the NTFS boot sector.", deviceNode);        return false;    }    Log() << xi18nc("@info:progress", "Updated NTFS boot sector for partition <filename>%1</filename> successfully.", deviceNode);    return true;}
开发者ID:KDE,项目名称:kpmcore,代码行数:32,


示例11: pedDevice

bool LibPartedPartitionTable::clobberFileSystem(Report& report, const Partition& partition){    bool rval = false;    if (PedPartition* pedPartition = ped_disk_get_partition_by_sector(pedDisk(), partition.firstSector())) {        if (pedPartition->type == PED_PARTITION_NORMAL || pedPartition->type == PED_PARTITION_LOGICAL) {            if (ped_device_open(pedDevice())) {                //reiser4 stores "ReIsEr4" at sector 128 with a sector size of 512 bytes                // We need to use memset instead of = {0} because clang sucks.                const long long zeroes_length = pedDevice()->sector_size*129;                char zeroes[zeroes_length];                memset(zeroes, 0, zeroes_length*sizeof(char));                rval = ped_geometry_write(&pedPartition->geom, zeroes, 0, 129);                if (!rval)                    report.line() << xi18nc("@info:progress", "Failed to erase filesystem signature on partition <filename>%1</filename>.", partition.deviceNode());                ped_device_close(pedDevice());            }        } else            rval = true;    } else        report.line() << xi18nc("@info:progress", "Could not delete file system on partition <filename>%1</filename>: Failed to get partition.", partition.deviceNode());    return rval;}
开发者ID:KDE,项目名称:kpmcore,代码行数:28,


示例12: xi18nc

QString DeleteOperation::description() const{    if (shredAction() != NoShred)        return xi18nc("@info:status", "Shred partition <filename>%1</filename> (%2, %3)", deletedPartition().deviceNode(), Capacity::formatByteSize(deletedPartition().capacity()), deletedPartition().fileSystem().name());    else        return xi18nc("@info:status", "Delete partition <filename>%1</filename> (%2, %3)", deletedPartition().deviceNode(), Capacity::formatByteSize(deletedPartition().capacity()), deletedPartition().fileSystem().name());}
开发者ID:shainer,项目名称:kpmcore,代码行数:7,


示例13: Q_ASSERT

bool luks::resize(Report& report, const QString& deviceNode, qint64 newLength) const{    Q_ASSERT(m_innerFs);    if (mapperName().isEmpty())        return false;    qint64 payloadLength = newLength - payloadOffset();    if ( newLength - length() * m_logicalSectorSize > 0 )    {        ExternalCommand cryptResizeCmd(report, QStringLiteral("cryptsetup"), { QStringLiteral("resize"), mapperName() });        report.line() << xi18nc("@info:progress", "Resizing LUKS crypt on partition <filename>%1</filename>.", deviceNode);        if (cryptResizeCmd.run(-1) && cryptResizeCmd.exitCode() == 0)            return m_innerFs->resize(report, mapperName(), payloadLength);    }    else if (m_innerFs->resize(report, mapperName(), payloadLength))    {        ExternalCommand cryptResizeCmd(report, QStringLiteral("cryptsetup"),                {  QStringLiteral("--size"), QString::number(payloadLength / m_logicalSectorSize), // LUKS assumes 512 bytes sector                   QStringLiteral("resize"), mapperName() });        report.line() << xi18nc("@info:progress", "Resizing LUKS crypt on partition <filename>%1</filename>.", deviceNode);        if (cryptResizeCmd.run(-1) && cryptResizeCmd.exitCode() == 0)            return true;    }    report.line() << xi18nc("@info:progress", "Resizing encrypted file system on partition <filename>%1</filename> failed.", deviceNode);    return false;}
开发者ID:KDE,项目名称:kpmcore,代码行数:28,


示例14: QPushButton

void HgIgnoreWidget::setupUI(){    QVBoxLayout *sideBar = new QVBoxLayout;    m_addFiles = new QPushButton(xi18nc("@label:button", "Add Files"));    m_addPattern = new QPushButton(xi18nc("@label:button", "Add Pattern"));    m_editEntry = new QPushButton(xi18nc("@label:button", "Edit Entry"));    m_removeEntries = new QPushButton(xi18nc("@label:button", "Remove Entries"));    sideBar->addWidget(m_addFiles);    sideBar->addWidget(m_addPattern);    sideBar->addWidget(m_editEntry);    sideBar->addWidget(m_removeEntries);    sideBar->addStretch();    m_ignoreTable = new QListWidget;    m_untrackedList = new QListWidget;    setupUntrackedList();    m_ignoreTable->setSelectionMode(QListWidget::ExtendedSelection);    m_untrackedList->setSelectionMode(QListWidget::ExtendedSelection);    QHBoxLayout *mainLayout = new QHBoxLayout;    mainLayout->addWidget(m_untrackedList);    mainLayout->addWidget(m_ignoreTable);    mainLayout->addLayout(sideBar);    setLayout(mainLayout);    connect(m_addFiles, SIGNAL(clicked()), this, SLOT(slotAddFiles()));    connect(m_removeEntries, SIGNAL(clicked()), this, SLOT(slotRemoveEntries()));    connect(m_addPattern, SIGNAL(clicked()), this, SLOT(slotAddPattern()));    connect(m_editEntry, SIGNAL(clicked()), this, SLOT(slotEditEntry()));}
开发者ID:KDE,项目名称:dolphin-plugins,代码行数:31,


示例15: stateChanged

// dispatcher code for entering one of the available statesvoid PlanExecutor::enterAvailableState() {	if(mState == NOT_AVAILABLE) {		mState = WAITING_FOR_FIRST_BACKUP; //initial child state of "Available" state		emit stateChanged();	}	bool lShouldBeTakenNow = false;	bool lShouldBeTakenLater = false;	int lTimeUntilNextWakeup;	QString lUserQuestion;	QDateTime lNow = QDateTime::currentDateTime().toUTC();	switch(mPlan->mScheduleType) {	case BackupPlan::MANUAL:		break;	case BackupPlan::INTERVAL: {		QDateTime lNextTime = mPlan->nextScheduledTime();		if(!lNextTime.isValid() || lNextTime < lNow) {			lShouldBeTakenNow = true;			if(!mPlan->mLastCompleteBackup.isValid())				lUserQuestion = xi18nc("@info", "Do you want to save a first backup now?");			else {				QString t = KFormat().formatSpelloutDuration(mPlan->mLastCompleteBackup.secsTo(lNow) * 1000);				lUserQuestion = xi18nc("@info", "It has been %1 since last backup was saved./n"				                                "Save a new backup now?", t);			}		} else {			lShouldBeTakenLater = true;			lTimeUntilNextWakeup = lNow.secsTo(lNextTime)*1000;		}		break;	}	case BackupPlan::USAGE:		if(!mPlan->mLastCompleteBackup.isValid()) {			lShouldBeTakenNow = true;			lUserQuestion = xi18nc("@info", "Do you want to save a first backup now?");		} else if(mPlan->mAccumulatedUsageTime > (quint32)mPlan->mUsageLimit * 3600) {			lShouldBeTakenNow = true;			QString t = KFormat().formatSpelloutDuration(mPlan->mAccumulatedUsageTime * 1000);			lUserQuestion = xi18nc("@info", "You have been active for %1 since last backup was saved./n"			                                "Save a new backup now?", t);		}		break;	}	if(lShouldBeTakenNow) {		// Only ask the first time after destination has become available.		// Always ask if power saving is active.		if( (mPlan->mAskBeforeTakingBackup && mState == WAITING_FOR_FIRST_BACKUP) ||		    powerSaveActive()) {			askUser(lUserQuestion);		} else {			startBackupSaveJob();		}	} else if(lShouldBeTakenLater){		// schedule a wakeup for asking again when the time is right.		mSchedulingTimer->start(lTimeUntilNextWakeup);	}}
开发者ID:spersson,项目名称:Kup,代码行数:60,


示例16: setWindowTitle

void ViewListDocker::updateWindowTitle( bool modified ){    if ( modified ) {        setWindowTitle( xi18nc( "@title:window", "View Selector [modified]" ) );    } else {        setWindowTitle(xi18nc( "@title:window", "View Selector"));    }}
开发者ID:KDE,项目名称:calligra,代码行数:8,


示例17: xi18nc

KexiReportPart::KexiReportPart(QObject *parent, const QVariantList &l)  : KexiPart::Part(parent,        xi18nc("Translate this word using only lowercase alphanumeric characters (a..z, 0..9). "              "Use '_' character instead of spaces. First character should be a..z character. "              "If you cannot use latin characters in your language, use english word.",              "report"),        xi18nc("tooltip", "Create new report"),        xi18nc("what's this", "Creates new report."),        l)  , d(new Private){    setInternalPropertyValue("newObjectsAreDirty", true);}
开发者ID:TheTypoMaster,项目名称:calligra,代码行数:13,


示例18: i18nc

bool SearchController::queryContinue( KFindDirection direction ) const{    const QString messageBoxTitle = i18nc( "@title:window", "Find" );    const QString question = ( direction == FindForward ) ?        xi18nc( "@info", "End of byte array reached.<nl/>Continue from the beginning?" ) :        xi18nc( "@info", "Beginning of byte array reached.<nl/>Continue from the end?" );    const int answer = KMessageBox::questionYesNo( mParentWidget, question, messageBoxTitle,                                                   KStandardGuiItem::cont(), KStandardGuiItem::cancel() );    const bool result = ( answer != KMessageBox::No );    return result;}
开发者ID:KDE,项目名称:okteta,代码行数:14,


示例19: QPushButton

void HgPluginSettingsWidget::setupUI(){    m_diffProg = new QLineEdit;    m_diffBrowseButton = new QPushButton(xi18nc("@label", "Browse"));    QLabel *diffProgLabel = new QLabel(xi18nc("@label",                                "Visual Diff Executable"));    QGridLayout *layout = new QGridLayout;    layout->addWidget(diffProgLabel, 0, 0);    layout->addWidget(m_diffProg, 0, 1);    layout->addWidget(m_diffBrowseButton, 0, 2);    layout->setRowStretch(layout->rowCount(), 1);    setLayout(layout);}
开发者ID:KDE,项目名称:dolphin-plugins,代码行数:15,


示例20: restorePartition

bool RestoreOperation::execute(Report& parent){	bool rval = false;	bool warning = false;	Report* report = parent.newChild(description());	if (overwrittenPartition())		restorePartition().setPartitionPath(overwrittenPartition()->devicePath());	if (overwrittenPartition() || (rval = createPartitionJob()->run(*report)))	{		restorePartition().setState(Partition::StateNone);		if ((rval = restoreJob()->run(*report)))		{			if ((rval = checkTargetJob()->run(*report)))			{				// If the partition was written over an existing one, the partition itself may now				// be larger than the filesystem, so maximize the filesystem to the partition's size				// or the image length, whichever is larger. If this fails, don't return an error, just				// warn the user.				if ((warning = !maximizeJob()->run(*report)))					report->line() << xi18nc("@info/plain", "Warning: Maximizing file system on target partition <filename>%1</filename> to the size of the partition failed.", restorePartition().deviceNode());			}			else				report->line() << xi18nc("@info/plain", "Checking target file system on partition <filename>%1</filename> after the restore failed.", restorePartition().deviceNode());		}		else		{			if (!overwrittenPartition())				DeletePartitionJob(targetDevice(), restorePartition()).run(*report);			report->line() << i18nc("@info/plain", "Restoring file system failed.");		}	}	else		report->line() << i18nc("@info/plain", "Creating the destination partition to restore to failed.");	if (rval)		setStatus(warning ? StatusFinishedWarning : StatusFinishedSuccess);	else		setStatus(StatusError);	report->setStatus(i18nc("@info/plain status (success, error, warning...) of operation", "%1: %2", description(), statusText()));	return rval;}
开发者ID:Acidburn0zzz,项目名称:partitionmanager,代码行数:48,


示例21: xi18nc

void TreeLog::onSaveLog(){	const QUrl url = QFileDialog::getSaveFileUrl();	if (!url.isEmpty())	{		QTemporaryFile tempFile;		if (!tempFile.open())		{			KMessageBox::error(this, xi18nc("@info", "Could not create temporary output file to save <filename>%1</filename>.", url.fileName()), i18nc("@title:window", "Error Saving Log File"));			return;		}		QTextStream stream(&tempFile);		for (qint32 idx = 0; idx < treeLog().topLevelItemCount(); idx++)		{			QTreeWidgetItem* item = treeLog().topLevelItem(idx);			stream << item->text(1) << ": " << item->text(2) << "/n";		}		tempFile.close();		KIO::CopyJob* job = KIO::move(QUrl::fromLocalFile(tempFile.fileName()), url, KIO::HideProgressInfo);		job->exec();		if ( job->error() )			job->ui()->showErrorMessage();	}}
开发者ID:Acidburn0zzz,项目名称:partitionmanager,代码行数:30,


示例22: setLabelText

void ScanProgressDialog::setDeviceName(const QString& d){	if (d.isEmpty())		setLabelText(i18nc("@label", "Scanning..."));	else		setLabelText(xi18nc("@label", "Scanning device: <filename>%1</filename>", d));}
开发者ID:Acidburn0zzz,项目名称:partitionmanager,代码行数:7,


示例23: showColumnsContextMenu

void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree){    QMenu headerMenu(xi18nc("@title:menu", "Columns"));    QHeaderView* header = tree.header();    for (qint32 i = 0; i < tree.model()->columnCount(); i++) {        const int idx = header->logicalIndex(i);        const QString text = tree.model()->headerData(idx, Qt::Horizontal).toString();        QAction* action = headerMenu.addAction(text);        action->setCheckable(true);        action->setChecked(!header->isSectionHidden(idx));        action->setData(idx);        action->setEnabled(idx > 0);    }    QAction* action = headerMenu.exec(tree.header()->mapToGlobal(p));    if (action != nullptr) {        const bool hidden = !action->isChecked();        tree.setColumnHidden(action->data().toInt(), hidden);        if (!hidden)            tree.resizeColumnToContents(action->data().toInt());    }}
开发者ID:KDE,项目名称:kpmcore,代码行数:26,


示例24: qCDebug

void PasswordNeededQuery::execute(){    qCDebug(ARK) << "Executing password prompt";    // If we are being called from the KPart, the cursor is probably Qt::WaitCursor    // at the moment (#231974)    QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));    QPointer<KPasswordDialog> dlg = new KPasswordDialog;    dlg.data()->setPrompt(xi18nc("@info", "The archive <filename>%1</filename> is password protected. Please enter the password.",                                 m_data.value(QStringLiteral("archiveFilename")).toString()));    if (m_data.value(QStringLiteral("incorrectTryAgain")).toBool()) {        dlg.data()->showErrorMessage(i18n("Incorrect password, please try again."), KPasswordDialog::PasswordError);    }    const bool notCancelled = dlg.data()->exec();    const QString password = dlg.data()->password();    m_data[QStringLiteral("password")] = password;    setResponse(notCancelled && !password.isEmpty());    QApplication::restoreOverrideCursor();    delete dlg.data();}
开发者ID:Zeirison,项目名称:ark,代码行数:26,


示例25: return

QVariant ProvidersModel::data(const QModelIndex& index, int role) const{  if (index.isValid())  {    if (role == Qt::CheckStateRole && index.column()==Preferred)      return (m_favoriteEngines.contains(m_providers.at(index.row())->desktopEntryName()) ? Qt::Checked : Qt::Unchecked);    if (role == Qt::DisplayRole)    {      if (index.column()==Name)        return m_providers.at(index.row())->name();      if (index.column()==Shortcuts)        return m_providers.at(index.row())->keys().join(QStringLiteral(","));    }    if (role == Qt::ToolTipRole || role == Qt::WhatsThisRole)    {      if (index.column() == Preferred)        return xi18nc("@info:tooltip", "Check this box to select the highlighted web shortcut "                    "as preferred.<nl/>Preferred web shortcuts are used in "                    "places where only a few select shortcuts can be shown "                    "at one time.");    }    if (role == Qt::UserRole)      return index.row();//a nice way to bypass proxymodel  }  return QVariant();}
开发者ID:emmanuel099,项目名称:kio,代码行数:30,


示例26: HgGeneralConfigWidget

void HgConfigDialog::setupUI(){    m_generalConfig = new HgGeneralConfigWidget(m_configType);    addPage(m_generalConfig, xi18nc("@label:group", "General Settings"));    if (m_configType == HgConfig::RepoConfig) {        m_pathConfig = new HgPathConfigWidget;        addPage(m_pathConfig, xi18nc("@label:group", "Repository Paths"));        m_ignoreWidget = new HgIgnoreWidget;        addPage(m_ignoreWidget, xi18nc("@label:group", "Ignored Files"));    }    else if (m_configType == HgConfig::GlobalConfig) {        m_pluginSetting = new HgPluginSettingsWidget;        addPage(m_pluginSetting, xi18nc("@label:group", "Plugin Settings"));    }}
开发者ID:KDE,项目名称:dolphin-plugins,代码行数:17,


示例27: DialogBase

HgUpdateDialog::HgUpdateDialog(QWidget *parent):    DialogBase(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, parent){    // dialog properties    this->setWindowTitle(xi18nc("@title:window",                "<application>Hg</application> Update"));    this->okButton()->setText(xi18nc("@action:button", "Update"));    // UI     QGroupBox *selectGroup = new QGroupBox(i18n("New working directory"));    QVBoxLayout *selectLayout = new QVBoxLayout;    m_selectType = new KComboBox;    m_selectFinal = new KComboBox;    m_selectType->addItem(i18n("Branch"));    m_selectType->addItem(i18n("Tag"));    m_selectType->addItem(i18n("Changeset/Revision"));    selectLayout->addWidget(m_selectType);    selectLayout->addWidget(m_selectFinal);    selectGroup->setLayout(selectLayout);    QGroupBox *infoGroup = new QGroupBox(i18n("Current Parent"));    QVBoxLayout *infoLayout = new QVBoxLayout;    m_currentInfo = new QLabel;    infoLayout->addWidget(m_currentInfo);    infoGroup->setLayout(infoLayout);    QGroupBox *optionGroup = new QGroupBox(i18n("Options"));    QVBoxLayout *optionLayout = new QVBoxLayout;    m_discardChanges = new QCheckBox(i18n("Discard uncommitted changes"));    m_discardChanges->setCheckState(Qt::Unchecked);    optionLayout->addWidget(m_discardChanges);    optionGroup->setLayout(optionLayout);    QVBoxLayout *mainLayout = new QVBoxLayout;    mainLayout->addWidget(infoGroup);    mainLayout->addWidget(selectGroup);    mainLayout->addWidget(optionGroup);    slotUpdateDialog(0);    layout()->insertLayout(0, mainLayout);    // connections    connect(m_selectType, SIGNAL(currentIndexChanged(int)), this,            SLOT(slotUpdateDialog(int)));}
开发者ID:KDE,项目名称:dolphin-plugins,代码行数:46,


示例28: QAction

GoToStackPageAction::GoToStackPageAction(Direction direction,                                         KFormDesigner::Container *container,                                         QWidget *receiver, QObject *parent)    : QAction(QIcon::fromTheme(direction == Previous ? koIconName("go-previous") : koIconName("go-next")),              direction == Previous ? xi18nc("Go to Previous Page of a Stacked Widget", "Go to Previous Page")                                    : xi18nc("Go to Next Page of a Stacked Widget", "Go to Next Page"),              parent)    , m_direction(direction)    , m_container(container)    , m_receiver(receiver){    connect(this, SIGNAL(triggered()), this, SLOT(slotTriggered()));    QStackedWidget *stack = qobject_cast<QStackedWidget*>(m_receiver);    if (!stack || !stack->widget(nextWidgetIndex())) {        setEnabled(false);    }}
开发者ID:TheTypoMaster,项目名称:calligra,代码行数:17,


示例29: diag

void HgBundleDialog::slotSelectChangeset(){    DialogBase diag(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);    diag.setWindowTitle(xi18nc("@title:window",                "Select Changeset"));    diag.okButton()->setText(xi18nc("@action:button", "Select"));    diag.setMinimumWidth(700);        m_commitInfo = new HgCommitInfoWidget;    loadCommits();    diag.layout()->insertWidget(0, m_commitInfo);        if (diag.exec() == QDialog::Accepted) {        m_baseRevision->setText(m_commitInfo->selectedChangeset());    }}
开发者ID:KDE,项目名称:dolphin-plugins,代码行数:17,



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


C++ xiic_getreg8函数代码示例
C++ xhci_warn函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。