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

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

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

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

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

示例1: connect

void OptionsDialog::setModel(OptionsModel *model){    this->model = model;    if(model)    {        connect(model, SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));        mapper->setModel(model);        setMapper();        mapper->toFirst();    }    /* update the display unit, to not use the default ("BTC") */    updateDisplayUnit();    /* warn only when language selection changes by user action (placed here so init via mapper doesn't trigger this) */    connect(ui->lang, SIGNAL(valueChanged()), this, SLOT(showRestartWarning_Lang()));    /* disable apply button after settings are loaded as there is nothing to save */    disableApplyButton();}
开发者ID:maccyber,项目名称:aurum,代码行数:22,


示例2: showRestartWarning

void OptionsDialog::setModel(OptionsModel *model){    this->model = model;    if(model)    {        /* check if client restart is needed and show persistent message */        if (model->isRestartRequired())            showRestartWarning(true);        QString strLabel = model->getOverriddenByCommandLine();        if (strLabel.isEmpty())            strLabel = tr("none");        ui->overriddenByCommandLineLabel->setText(strLabel);        connect(model, SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));        mapper->setModel(model);        setMapper();        mapper->toFirst();    }    /* update the display unit, to not use the default ("BTC") */    updateDisplayUnit();    /* warn when one of the following settings changes by user action (placed here so init via mapper doesn't trigger them) */    /* Main */    connect(ui->databaseCache, SIGNAL(valueChanged(int)), this, SLOT(showRestartWarning()));    connect(ui->threadsScriptVerif, SIGNAL(valueChanged(int)), this, SLOT(showRestartWarning()));    /* Wallet */    connect(ui->spendZeroConfChange, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning()));    /* Network */    connect(ui->allowIncoming, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning()));    connect(ui->connectSocks, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning()));    /* Display */    connect(ui->lang, SIGNAL(valueChanged()), this, SLOT(showRestartWarning()));    connect(ui->thirdPartyTxUrls, SIGNAL(textChanged(const QString &)), this, SLOT(showRestartWarning()));}
开发者ID:420reich,项目名称:bitcoin,代码行数:39,


示例3: connect

void ReceiveCoinsDialog::setModel(WalletModel *model){    this->model = model;    if(model && model->getOptionsModel())    {        connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));        updateDisplayUnit();        ui->recentRequestsView->setModel(model->getRecentRequestsTableModel());        ui->recentRequestsView->setAlternatingRowColors(true);        ui->recentRequestsView->setSelectionBehavior(QAbstractItemView::SelectRows);        ui->recentRequestsView->setSelectionMode(QAbstractItemView::ContiguousSelection);        ui->recentRequestsView->horizontalHeader()->resizeSection(RecentRequestsTableModel::Date, 130);        ui->recentRequestsView->horizontalHeader()->resizeSection(RecentRequestsTableModel::Label, 120);#if QT_VERSION < 0x050000        ui->recentRequestsView->horizontalHeader()->setResizeMode(RecentRequestsTableModel::Message, QHeaderView::Stretch);#else        ui->recentRequestsView->horizontalHeader()->setSectionResizeMode(RecentRequestsTableModel::Message, QHeaderView::Stretch);#endif        ui->recentRequestsView->horizontalHeader()->resizeSection(RecentRequestsTableModel::Amount, 100);    }
开发者ID:Biggar,项目名称:snorcoin,代码行数:22,


示例4: connect

void OptionsDialog::setModel(OptionsModel *model){    this->model = model;    if(model)    {        connect(model, SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));        mapper->setModel(model);        setMapper();        mapper->toFirst();    }        updateDisplayUnit();        connect(ui->lang, SIGNAL(valueChanged()), this, SLOT(showRestartWarning_Lang()));        disableApplyButton();}
开发者ID:sarakas,项目名称:hellascoin,代码行数:22,


示例5: connect

void ReceiveCoinsDialog::setModel(WalletModel *_model){    this->model = _model;    if(_model && _model->getOptionsModel())    {        _model->getRecentRequestsTableModel()->sort(RecentRequestsTableModel::Date, Qt::DescendingOrder);        connect(_model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));        updateDisplayUnit();        QTableView* tableView = ui->recentRequestsView;        tableView->verticalHeader()->hide();        tableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);        tableView->setModel(_model->getRecentRequestsTableModel());        tableView->setAlternatingRowColors(true);        tableView->setSelectionBehavior(QAbstractItemView::SelectRows);        tableView->setSelectionMode(QAbstractItemView::ContiguousSelection);        tableView->setColumnWidth(RecentRequestsTableModel::Date, DATE_COLUMN_WIDTH);        tableView->setColumnWidth(RecentRequestsTableModel::Label, LABEL_COLUMN_WIDTH);        tableView->setColumnWidth(RecentRequestsTableModel::Amount, AMOUNT_MINIMUM_COLUMN_WIDTH);        connect(tableView->selectionModel(),            SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this,            SLOT(recentRequestsView_selectionChanged(QItemSelection, QItemSelection)));        // Last 2 columns are set by the columnResizingFixer, when the table geometry is ready.        columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this);        if (model->wallet().getDefaultAddressType() == OutputType::BECH32) {            ui->useBech32->setCheckState(Qt::Checked);        } else {            ui->useBech32->setCheckState(Qt::Unchecked);        }        // eventually disable the main receive button if private key operations are disabled        ui->receiveButton->setEnabled(!model->privateKeysDisabled());    }
开发者ID:GlobalBoost,项目名称:GlobalBoost-Y,代码行数:37,


示例6: setBalance

void SendCoinsDialog::setModel(WalletModel *_model){    this->model = _model;    if(_model && _model->getOptionsModel())    {        for(int i = 0; i < ui->entries->count(); ++i)        {            SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget());            if(entry)            {                entry->setModel(_model);            }        }        setBalance(_model->getBalance(), _model->getUnconfirmedBalance(), _model->getImmatureBalance(),                   _model->getWatchBalance(), _model->getWatchUnconfirmedBalance(), _model->getWatchImmatureBalance());        connect(_model, SIGNAL(balanceChanged(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)), this, SLOT(setBalance(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)));        connect(_model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));        updateDisplayUnit();        // Coin Control        connect(_model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(coinControlUpdateLabels()));        connect(_model->getOptionsModel(), SIGNAL(coinControlFeaturesChanged(bool)), this, SLOT(coinControlFeatureChanged(bool)));        ui->frameCoinControl->setVisible(_model->getOptionsModel()->getCoinControlFeatures());        coinControlUpdateLabels();        // fee section        for (const int n : confTargets) {            ui->confTargetSelector->addItem(tr("%1 (%2 blocks)").arg(GUIUtil::formatNiceTimeOffset(n*Params().GetConsensus().nPowTargetSpacing)).arg(n));        }        connect(ui->confTargetSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(updateSmartFeeLabel()));        connect(ui->confTargetSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(coinControlUpdateLabels()));        connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(updateFeeSectionControls()));        connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));        connect(ui->customFee, SIGNAL(valueChanged()), this, SLOT(coinControlUpdateLabels()));        connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(setMinimumFee()));        connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateFeeSectionControls()));        connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));        connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(updateSmartFeeLabel()));        connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));        ui->customFee->setSingleStep(GetRequiredFee(1000));        updateFeeSectionControls();        updateMinFeeLabel();        updateSmartFeeLabel();        // set default rbf checkbox state        ui->optInRBF->setCheckState(Qt::Checked);        // set the smartfee-sliders default value (wallets default conf.target or last stored value)        QSettings settings;        if (settings.value("nSmartFeeSliderPosition").toInt() != 0) {            // migrate nSmartFeeSliderPosition to nConfTarget            // nConfTarget is available since 0.15 (replaced nSmartFeeSliderPosition)            int nConfirmTarget = 25 - settings.value("nSmartFeeSliderPosition").toInt(); // 25 == old slider range            settings.setValue("nConfTarget", nConfirmTarget);            settings.remove("nSmartFeeSliderPosition");        }        if (settings.value("nConfTarget").toInt() == 0)            ui->confTargetSelector->setCurrentIndex(getIndexForConfTarget(model->getDefaultConfirmTarget()));        else            ui->confTargetSelector->setCurrentIndex(getIndexForConfTarget(settings.value("nConfTarget").toInt()));    }}
开发者ID:OrangeMan110,项目名称:bitcoin,代码行数:64,


示例7: setBalance

void TransactionView::setModel(WalletModel *model){    this->walletModel = model;    if(model)    {        // Keep up to date with wallet        setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance());        connect(model, SIGNAL(balanceChanged(CAmount,CAmount,CAmount)), this, SLOT(setBalance(CAmount,CAmount,CAmount)));                     transactionProxyModel = new TransactionFilterProxy(this);        transactionProxyModel->setSourceModel(model->getTransactionTableModel());        transactionProxyModel->setDynamicSortFilter(true);        transactionProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);        transactionProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);        transactionProxyModel->setSortRole(Qt::EditRole);        transactionView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);        transactionView->setModel(transactionProxyModel);        transactionView->setAlternatingRowColors(true);        transactionView->setSelectionBehavior(QAbstractItemView::SelectRows);        transactionView->setSelectionMode(QAbstractItemView::ExtendedSelection);        transactionView->setSortingEnabled(true);        transactionView->sortByColumn(TransactionTableModel::Status, Qt::DescendingOrder);        transactionView->verticalHeader()->hide();        transactionView->setColumnWidth(TransactionTableModel::Status, STATUS_COLUMN_WIDTH);        transactionView->setColumnWidth(TransactionTableModel::Watchonly, WATCHONLY_COLUMN_WIDTH);        transactionView->setColumnWidth(TransactionTableModel::Date, DATE_COLUMN_WIDTH);        transactionView->setColumnWidth(TransactionTableModel::Type, TYPE_COLUMN_WIDTH);        transactionView->setColumnWidth(TransactionTableModel::Amount, AMOUNT_MINIMUM_COLUMN_WIDTH);        columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(transactionView, AMOUNT_MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH);        if (model->getOptionsModel())        {            // Add third party transaction URLs to context menu            QStringList listUrls = model->getOptionsModel()->getThirdPartyTxUrls().split("|", QString::SkipEmptyParts);            for (int i = 0; i < listUrls.size(); ++i)            {                QString host = QUrl(listUrls[i].trimmed(), QUrl::StrictMode).host();                if (!host.isEmpty())                {                    QAction *thirdPartyTxUrlAction = new QAction(host, this); // use host as menu item label                    if (i == 0)                        contextMenu->addSeparator();                    contextMenu->addAction(thirdPartyTxUrlAction);                    connect(thirdPartyTxUrlAction, SIGNAL(triggered()), mapperThirdPartyTxUrls, SLOT(map()));                    mapperThirdPartyTxUrls->setMapping(thirdPartyTxUrlAction, listUrls[i].trimmed());                }            }        }        // show/hide column Watch-only        updateWatchOnlyColumn(model->haveWatchOnly());        // Watch-only signal        connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyColumn(bool)));                // update the display unit, to not use the default ("BCR")        updateDisplayUnit();    }}
开发者ID:zebbra2014,项目名称:bitcredit,代码行数:67,



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


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