• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pm函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: pm

// Channel display background effect.
void ChannelStrip::setDisplayEffect ( bool bDisplayEffect )
{
	QPalette pal;
	pal.setColor(QPalette::Foreground, Qt::yellow);
	pal.setColor(QPalette::ButtonText, Qt::yellow);
	m_ui.EngineNameTextLabel->setPalette(pal);
	m_ui.MidiPortChannelTextLabel->setPalette(pal);
	pal.setColor(QPalette::Foreground, Qt::green);
	pal.setColor(QPalette::ButtonText, Qt::green);
	if (bDisplayEffect) {
		QPixmap pm(":/images/displaybg1.png");
		pal.setBrush(QPalette::Background, QBrush(pm));
	} else {
		pal.setColor(QPalette::Background, Qt::black);
	}
	m_ui.ChannelInfoFrame->setPalette(pal);
	m_ui.InstrumentNamePushButton->setPalette(pal);
	m_ui.StreamVoiceCountTextLabel->setPalette(pal);
}
开发者ID:svn2github,项目名称:linuxsampler,代码行数:20,代码来源:qsamplerChannelStrip.cpp


示例2: pm

    /*static*/
    void MongoFile::closeAllFiles( stringstream &message ) {
        static int closingAllFiles = 0;
        if ( closingAllFiles ) {
            message << "warning closingAllFiles=" << closingAllFiles << endl;
            return;
        }
        ++closingAllFiles;

        LockMongoFilesExclusive lk;

        ProgressMeter pm( mmfiles.size() , 2 , 1 );
        set<MongoFile*> temp = mmfiles;
        for ( set<MongoFile*>::iterator i = temp.begin(); i != temp.end(); i++ ) {
            (*i)->close(); // close() now removes from mmfiles
            pm.hit();
        }
        message << "closeAllFiles() finished";
        --closingAllFiles;
    }
开发者ID:AK-Dominator,项目名称:mongo,代码行数:20,代码来源:mmap.cpp


示例3: zzpy__pyDFMenu_get

tp_obj zzpy__pyDFMenu_get(tp_vm *vm)
{
  tp_obj self = tp_getraw(vm);
  IScriptEngine *engine = (IScriptEngine*)tp_get(vm, vm->builtins, tp_string("userdata")).data.val;
  IEditor *editor = engine->editor();
  TinyParams pm(vm);
  ADM_scriptDFMenuHelper *me=(ADM_scriptDFMenuHelper *)pm.asThis(&self, ADM_PYID_DF_INTEGER);
  char const *key = pm.asString();
  if (!strcmp(key, "index"))
  {
     if(!me) pm.raise("pyDFMenu:No this!");
     return tp_number(me->index());
  }
  if (!strcmp(key, "addItem"))
  {
     return tp_method(vm, self, zzpy_addItem);
  }
  return tp_get(vm, self, tp_string(key));
}
开发者ID:AlexanderStohr,项目名称:avidemux2,代码行数:19,代码来源:pyDFMenu_gen.cpp


示例4: files

void LightboxWidget::print()
{
  QString fn = QFileDialog::getSaveFileName("screenshot.png", 
					    "PNG files (*.png)", this,
					    "Screenshot dialog",
					    "Select a filename for saving");
  if(!fn.isNull()) 
    {
      QPixmap pm(centralWidget()->size());
      bitBlt(&pm, 0, 0, centralWidget());

//       QImage im = pm.convertToImage();
//       int dpm( (72.0 / 2.54) * 100.0 );
//       im.setDotsPerMeterX(dpm);
//       im.setDotsPerMeterY(dpm);
      pm.save(fn, "PNG", 100);
    }

}
开发者ID:xingzhong,项目名称:RTfslview,代码行数:19,代码来源:lightboxwidget.cpp


示例5: framr_notify

void framr_notify(actor_t *actor, message_t *message)
{
    int size;

    framr_t *self;
    struct core_vector *spawners;

    self = thorium_actor_concrete_actor(actor);

    spawners = &self->spawners;
    size = core_vector_size(spawners);

    pm("Boss received NOTIFY\n");

    ++self->completed;
    if (self->completed == size) {
        thorium_actor_send_range_empty(actor, spawners, ACTION_ASK_TO_STOP);
    }
}
开发者ID:levinas,项目名称:biosal,代码行数:19,代码来源:framr.c


示例6: pm

	ProperClassMethods::ProperClassMethods(shared_ptr<Class> const &clazz)
	{
		for(std::size_t m=0;m<clazz->get_methods_count();++m)
		{
			proper_method pm(clazz->get_method(m));
			if(!m_methods.push_back(pm).second)
			{
				std::size_t n(1);
				do
				{
					format fmtName("%1%_%2%");
					fmtName % clazz->get_method(m)->get_name();
					fmtName % n++;
					pm.m_proper_name=fmtName.str();
				}
				while(!m_methods.push_back(pm).second);
			}
		}
	}
开发者ID:Laeeth,项目名称:android-cpp-sdk,代码行数:19,代码来源:ProperClassMethods.cpp


示例7: pm

// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
int QFilterParametersWriter::WritePipelineToFile(FilterPipeline::Pointer pipeline, const QString& filePath, const QString& name, QSettings::Format format, IObserver* obs)
{

  if(NULL == pipeline.get())
  {
    if(NULL != obs)
    {
      PipelineMessage pm(QFilterParametersWriter::ClassName(), "FilterPipeline Object was NULL for writing", -1, PipelineMessage::Error);
      obs->processPipelineMessage(pm);
    }
    return -1;
  }

  FilterPipeline::FilterContainerType& filters = pipeline->getFilterContainer();

  QFilterParametersWriter::Pointer writer = QFilterParametersWriter::New();
  // This will open the file, and write/update the initial group of settings like the name and DREAM3D Version
  writer->openFile(filePath, format);
  // Loop over each filter and write it's input parameters to the file
  int count = filters.size();
  int index = 0;
  for(qint32 i = 0; i < count; ++i)
  {
    AbstractFilter::Pointer filter = filters.at(i);
    if(NULL != filter.get())
    {
      index = filter->writeFilterParameters(writer.get(), index);
    }
    else
    {
      AbstractFilter::Pointer badFilter = AbstractFilter::New();
      writer->openFilterGroup(badFilter.get(), i);
      writer->writeValue("Unkown Filter", "ERROR: Filter instance was NULL within the PipelineFilterWidget instance. Report this error to the DREAM3D Developers");
      writer->closeFilterGroup();
    }
  }

  writer->setNumberOfFilters(index);
  writer->setPipelineName(name);
  writer->closeFile(); // Close the file
  return 0;
}
开发者ID:kglowins,项目名称:DREAM3D,代码行数:45,代码来源:QFilterParametersWriter.cpp


示例8: pm

void ComputeMgr::updateLocalComputes()
{
    ComputeMap *computeMap = ComputeMap::Object();
    CProxy_ProxyMgr pm(CkpvAccess(BOCclass_group).proxyMgr);
    ProxyMgr *proxyMgr = pm.ckLocalBranch();
    LdbCoordinator *ldbCoordinator = LdbCoordinator::Object();

     computeFlag.resize(0);

    const int nc = computeMap->numComputes();
    for (int i=0; i<nc; i++) {

        if ( computeMap->node(i) == CkMyPe() &&
             computeMap->newNumPartitions(i) > 1 ) {
           Compute *c = computeMap->compute(i);
           ldbCoordinator->Migrate(c->ldObjHandle,CkMyPe());
           delete c;
           computeMap->registerCompute(i,NULL);
           if ( computeMap->newNode(i) == CkMyPe() ) computeFlag.add(i); 
        } else
        if (computeMap->newNode(i) == CkMyPe() && computeMap->node(i) != CkMyPe())
        {
	    computeFlag.add(i);
            for (int n=0; n < computeMap->numPids(i); n++)
            {
                proxyMgr->createProxy(computeMap->pid(i,n));
            }
        }
        else if (computeMap->node(i) == CkMyPe() &&
                 (computeMap->newNode(i) != -1 && computeMap->newNode(i) != CkMyPe() ))
        {
            // CkPrintf("delete compute %d on pe %d\n",i,CkMyPe());
            delete computeMap->compute(i);
            computeMap->registerCompute(i,NULL);
        }
    }

    if (!CkMyPe())
    {
        CkStartQD(CkIndex_ComputeMgr::updateLocalComputes2((CkQdMsg*)0), &thishandle);
    }
}
开发者ID:luyukunphy,项目名称:namd,代码行数:42,代码来源:ComputeMgr.C


示例9: TEST

TEST(UnitsTest, UnitsPair) {
    // Test basic construction via multiplication
    using grams = units::grams<float>;
    using yards = units::yards<float>;
    auto gy = grams{5} * yards{3};
    EXPECT_FLOAT_EQ(15.f, gy.amount());

    // Test basic construction via division
    using stones = units::stones<float>;
    using inches = units::inches<float>;
    auto si = stones{10} / inches{2};
    EXPECT_FLOAT_EQ(5.f, si.amount());

    // Test manual conversion
    using pounds = units::pounds<float>;
    using meters = units::meters<float>;
    using poundmeters = units::units_pair<pounds, meters>;
    poundmeters pm(grams{5}, yards{3});
    EXPECT_FLOAT_EQ(0.0302386280, pm.amount());
}
开发者ID:patbrandt,项目名称:units,代码行数:20,代码来源:test.cpp


示例10: pm

bool BaseFileManager::hasFile(const Common::String &filename) {
	if (scumm_strnicmp(filename.c_str(), "savegame:", 9) == 0) {
		BasePersistenceManager pm(BaseEngine::instance().getGameId());
		if (filename.size() <= 9) {
			return false;
		}
		int slot = atoi(filename.c_str() + 9);
		return pm.getSaveExists(slot);
	}
	if (diskFileExists(filename)) {
		return true;
	}
	if (_packages.hasFile(filename)) {
		return true;    // We don't bother checking if the file can actually be opened, something bigger is wrong if that is the case.
	}
	if (BaseResources::hasFile(filename)) {
		return true;
	}
	return false;
}
开发者ID:mokerjoke,项目名称:scummvm,代码行数:20,代码来源:base_file_manager.cpp


示例11: invert

	ublas::matrix<double> invert(ublas::matrix<double> input) {
	 	typedef ublas::permutation_matrix<std::size_t> pmatrix;

	 	ublas::matrix<double> tmp(input);
	 	ublas::permutation_matrix<std::size_t> pm(tmp.size1());

	 	int res = ublas::lu_factorize(tmp,pm);

		if (res == 0) {
			ublas::matrix<double> inverse = ublas::identity_matrix<double>(tmp.size1());

			ublas::lu_substitute(tmp, pm, inverse);

			return inverse;
		} else {
			// Easy check for singularity, as nothing inverted = 0.
			// In the future, exceptions would be more prudent.
			return ublas::zero_matrix<double>(1, 1);
		}
	}
开发者ID:jithina,项目名称:sirens,代码行数:20,代码来源:matrix_support.cpp


示例12: v

QSObject QSPixmapClass::construct( const QSList &args ) const
{
    if ( args.size() > 0 ) {
	QSObject v( args[ 0 ] );
	if ( v.isA( "Pixmap" ) ) {
	    return v;
	} else if ( v.isString() ) {
	    QPixmap pm( v.toString() );
	    return construct( pm );
        } else {
            QVariant var = v.toVariant(QVariant::ByteArray);
            if (var.type() == QVariant::ByteArray) {
                QPixmap pm;
                pm.loadFromData( v.toVariant(QVariant::ByteArray).toByteArray() );
                return construct( pm );
            }
        }
    }
    return construct( QPixmap() );
}
开发者ID:aschet,项目名称:qsaqt5,代码行数:20,代码来源:quickpixmapobject.cpp


示例13: painter

void WorkPlaceWidget::paintEvent(QPaintEvent *){
        QPainter painter(this);
        QRect r2(0,0,this->size().width()-1,this->size().height()-1);
        QPixmap pm(":Images/Map.png");
        painter.drawPixmap(0,0,this->size().width()-1,this->size().height()-1,pm);
        painter.drawRect(r2);
        if(this->curX<10){
            this->curX=10;
        }
        if(this->curY<10){
            this->curY=10;
        }
        if(this->curX>max_width-10){
            this->curX=max_width-10;
        }
        if(this->curY>max_height-10){
            this->curY=max_height-10;
        }
        this->paintDesk();
}
开发者ID:OlgaSm,项目名称:er_diagram_mdp,代码行数:20,代码来源:workplacewidget.cpp


示例14: fname

void KexiDBImageBox::updatePixmap()
{
    if (!(designMode() && pixmap().isNull()))
        return;

    if (!KexiDBImageBox_static->pixmap) {
        const QString fname(KStandardDirs::locate("data", QLatin1String("kexi/pics/imagebox.png")));
        QPixmap pm( KIconLoader::global()->loadMimeTypeIcon(
            koIconNameCStr("image-x-generic"), KIconLoader::NoGroup, KIconLoader::SizeLarge, KIconLoader::DisabledState) );
        if (!pm.isNull()) {
            KIconEffect::semiTransparent(pm);
            KIconEffect::semiTransparent(pm);
        }
        KexiDBImageBox_static->pixmap = new QPixmap(pm);
        KexiDBImageBox_static->small = new QPixmap( 
            KexiDBImageBox_static->pixmap->scaled(
                KexiDBImageBox_static->pixmap->width() / 2, KexiDBImageBox_static->pixmap->height() / 2, 
                Qt::KeepAspectRatio, Qt::SmoothTransformation) );
    }
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:20,代码来源:kexidbimagebox.cpp


示例15: pages

QImage Score::createThumbnail()
{
    Page* page = pages().at(0);
    QRectF fr  = page->abbox();
    qreal mag  = 256.0 / qMax(fr.width(), fr.height());
    int w      = int(fr.width() * mag);
    int h      = int(fr.height() * mag);

    QImage pm(w, h, QImage::Format_ARGB32_Premultiplied);
    pm.setDotsPerMeterX(lrint((mag * 1000) / INCH));
    pm.setDotsPerMeterY(lrint((mag * 1000) / INCH));
    pm.fill(0xffffffff);
    QPainter p(&pm);
    p.setRenderHint(QPainter::Antialiasing, true);
    p.setRenderHint(QPainter::TextAntialiasing, true);
    p.scale(mag, mag);
    print(&p, 0);
    p.end();
    return pm;
}
开发者ID:JasonLil,项目名称:MuseScore,代码行数:20,代码来源:scorefile.cpp


示例16: QVariant

QVariant SensorModel::data( const QModelIndex &index, int role ) const
{
  if ( !index.isValid() )
    return QVariant();

  if ( index.row() >= mSensors.count() || index.row() < 0 )
    return QVariant();

  SensorModelEntry sensor = mSensors[ index.row() ];

  if ( role == Qt::DisplayRole ) {
    switch ( index.column() ) {
      case 0:
        return sensor.hostName();
        break;
      case 1:
        return sensor.sensorName();
        break;
      case 2:
        return sensor.unit();
        break;
      case 3:
        return sensor.status();
        break;
      case 4:
        return sensor.label();
        break;
    }
  } else if ( role == Qt::DecorationRole ) {
    if ( index.column() == 1 ) {
      if ( sensor.color().isValid() ) {
        QPixmap pm( 12, 12 );
        pm.fill( sensor.color() );

        return pm;
      }
    }
  }

  return QVariant();
}
开发者ID:KDE,项目名称:ksysguard,代码行数:41,代码来源:SensorModel.cpp


示例17: _getExtent

Status RecordStoreV1Base::touch(OperationContext* txn, BSONObjBuilder* output) const {
    Timer t;

    std::vector<touch_location> ranges;
    {
        DiskLoc nextLoc = _details->firstExtent(txn);
        Extent* ext = nextLoc.isNull() ? NULL : _getExtent(txn, nextLoc);
        while (ext) {
            touch_location tl;
            tl.root = reinterpret_cast<const char*>(ext);
            tl.length = ext->length;
            ranges.push_back(tl);

            nextLoc = ext->xnext;
            if (nextLoc.isNull())
                ext = NULL;
            else
                ext = _getExtent(txn, nextLoc);
        }
    }

    std::string progress_msg = "touch " + std::string(txn->getNS()) + " extents";
    stdx::unique_lock<Client> lk(*txn->getClient());
    ProgressMeterHolder pm(
        *txn->setMessage_inlock(progress_msg.c_str(), "Touch Progress", ranges.size()));
    lk.unlock();

    for (std::vector<touch_location>::iterator it = ranges.begin(); it != ranges.end(); ++it) {
        touch_pages(it->root, it->length);
        pm.hit();
        txn->checkForInterrupt();
    }
    pm.finished();

    if (output) {
        output->append("numRanges", static_cast<int>(ranges.size()));
        output->append("millis", t.millis());
    }

    return Status::OK();
}
开发者ID:AnkyrinRepeat,项目名称:mongo,代码行数:41,代码来源:record_store_v1_base.cpp


示例18: pm

void Energy::train()
{
  try{
    cout<<"A:\n"<<A<<endl;
    cout<<"b:\n"<<b<<endl;


    /*** linear least squares ***/
    la::matrix<double> AT = la::trans(A);
    la::matrix<double> ATA = la::prod(AT,A);
    la::vector<double> ATb = la::prod(AT,b);
    la::permutation_matrix<int> pm(ATA.size1());
    la::lu_factorize(ATA,pm);
    la::vector<double> c(ATb);
    lu_substitute(ATA, pm, c); 
    la::vector<double> est = la::prod(A,c);

    /*** set coeffficients  ***/
    set_coefficients(c);
    
    /*  cout<<"A:\n"<<print_matrix(A)<<endl;
	cout<<"b:\n"<<print_matrix(b)<<endl;
	cout<<"AT:\n"<<print_matrix(AT)<<endl;
	cout<<"ATA:\n"<<print_matrix(ATA)<<endl;
	cout<<"ATb:\n"<<print_matrix(ATb)<<endl;
	cout<<"ATA - after:\n"<<print_matrix(ATA)<<endl;
	cout<<"c:\n"<<print_matrix(c)<<endl;
	cout<<"est:\n"<<print_matrix(est)<<endl;
    */
    cout<<"TRAINING DONE"<<endl;
  }
  catch(...)
    {
      cout<<"WARNING: Training fail, will stil write matices to octave file"<<endl;
      
    }


  cout<<"Done writting to octave file"<<endl;

}
开发者ID:yongwangCPH,项目名称:peat,代码行数:41,代码来源:energy.cpp


示例19: wkt0

void object::test<1>
()
{
    std::string
    wkt0("LINESTRING(99739.70596 -2239218.0625,99739.85604 -2239218.21258,99739.85605 -2239218.21258, 99739.85605 -2239218.21258,99739.86851 -2239218.21258,99739.86851 -2239218.20012, 99739.86851 -2239218.20012,99739.86851 -2239218.04, 99739.95848 -2239218.11015,99739.86851 -2239218.20012, 99739.86851 -2239218.20012,99739.85605 -2239218.21258, 99739.85605 -2239218.21258,99739.80901 -2239218.25961, 99739.80901 -2239218.25961,99739.68863 -2239218.38, 99739.86204 -2239218.31264,99739.80901 -2239218.25961, 99739.80901 -2239218.25961,99739.66841 -2239218.11901)");
    SegStrVct nodable;
    getSegmentStrings(wkt0, nodable);
    ensure_equals(nodable.size(), 1u);

    PrecisionModel pm(1e-5);
    MCIndexSnapRounder noder(pm);

    ensure_equals(nodable.size(), 1u);
    noder.computeNodes(&nodable);
    std::unique_ptr<SegStrVct> noded(noder.getNodedSubstrings());

    ensure_equals("1e-5", noded->size(), 178u);

    freeSegmentStrings(*noded);
    freeSegmentStrings(nodable);
}
开发者ID:libgeos,项目名称:libgeos,代码行数:21,代码来源:MCIndexSnapRounderTest.cpp


示例20: dir

void ZFonts::fillFontsByDir(QString sDir)
{
	QStringList slFonts;
	slFonts.clear();
	QDir dir( sDir );
	dir.setFilter( QDir::Files );
	dir.setNameFilter("*.ttf;*.TTF");
	slFonts = dir.entryList();
	
	QString * path;
	QPixmap pm( ProgDir + "/fonts.png");
	for ( QStringList::Iterator it = slFonts.begin(); it != slFonts.end(); ++it ) 
	{
		ZSettingItem* item = new ZSettingItem(lbFonts, "%I%M");
		item->setPixmap( 0, pm  );
		item->appendSubItem( 1, QString::fromUtf8(*it) );
		path = new QString(sDir+"/"+(*it));
		item->setReservedData( (int)path );
		lbFonts->insertItem( item );      
	}
}
开发者ID:OpenMagx,项目名称:open-magx-src,代码行数:21,代码来源:ZFonts.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ pm8xxx_gpio_config函数代码示例发布时间:2022-05-30
下一篇:
C++ ply_trace函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap