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

C++ defaults函数代码示例

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

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



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

示例1: defaults

void GLOBAL_PREFS::init() {
    defaults();
    safe_strcpy(source_project, "");
    safe_strcpy(source_scheduler, "");
    mod_time = 0;
    host_specific = false;
}
开发者ID:FoxKyong,项目名称:boinc,代码行数:7,代码来源:prefs.cpp


示例2: setpresettype

PADnoteParameters::PADnoteParameters(FFTwrapper *fft_,
                                     pthread_mutex_t *mutex_):Presets()
{
    setpresettype("Ppadsynth");

    fft   = fft_;
    mutex = mutex_;

    resonance = new Resonance();
    oscilgen  = new OscilGen(fft_, resonance);
    oscilgen->ADvsPAD = true;

    FreqEnvelope = new EnvelopeParams(0, 0);
    FreqEnvelope->ASRinit(64, 50, 64, 60);
    FreqLfo = new LFOParams(70, 0, 64, 0, 0, 0, 0, 0);

    AmpEnvelope = new EnvelopeParams(64, 1);
    AmpEnvelope->ADSRinit_dB(0, 40, 127, 25);
    AmpLfo = new LFOParams(80, 0, 64, 0, 0, 0, 0, 1);

    GlobalFilter   = new FilterParams(2, 94, 40);
    FilterEnvelope = new EnvelopeParams(0, 1);
    FilterEnvelope->ADSRinit_filter(64, 40, 64, 70, 60, 64);
    FilterLfo = new LFOParams(80, 0, 64, 0, 0, 0, 0, 2);

    for(int i = 0; i < PAD_MAX_SAMPLES; ++i)
        sample[i].smp = NULL;
    newsample.smp = NULL;

    defaults();
}
开发者ID:Cubiicle,项目名称:lmms,代码行数:31,代码来源:PADnoteParameters.cpp


示例3: switch

int Doc_Test::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: initTestCase(); break;
        case 1: defaults(); break;
        case 2: createFixtureId(); break;
        case 3: addFixture(); break;
        case 4: deleteFixture(); break;
        case 5: fixture(); break;
        case 6: totalPowerConsumption(); break;
        case 7: addFunction(); break;
        case 8: deleteFunction(); break;
        case 9: function(); break;
        case 10: load(); break;
        case 11: loadWrongRoot(); break;
        case 12: save(); break;
        default: ;
        }
        _id -= 13;
    }
    return _id;
}
开发者ID:alexpaulzor,项目名称:qlc,代码行数:26,代码来源:moc_doc_test.cpp


示例4: QWidget

Opt_Misc::Opt_Misc(QWidget *parent, const char *name ) : QWidget(parent,name) {
	w_ident = new QCheckBox( i18n("Use TCP reverse ident scanning") , this , "CbIdent" );
	w_fast = new QCheckBox( i18n("Use fast scanning method (services only)") , this , "CbFast" );
	w_port = new QCheckBox( i18n("Specify a port range:") , this , "CbPort" );
	w_frag = new QCheckBox( i18n("Fragment SYN/FIN/XMAS/NULL headers") , this , "CbFrag" );

	w_verbose = new QCheckBox( i18n("Enable verbosity") , this , "CbVerbose" );
	w_debug = new QCheckBox( i18n("Enable debug") , this , "CbVerbose" );

	w_verbose_lvl = new QComboBox( this , "BoxVerbose" );
	w_verbose_lvl->insertItem( i18n("Level 1 verbose") );
	w_verbose_lvl->insertItem( i18n("Level 2 verbose") );
	w_verbose_lvl->insertItem( i18n("Level 3 verbose") );
	w_verbose_lvl->insertItem( i18n("Level 4 verbose") );

	w_debug_lvl = new QComboBox( this , "BoxDebug" );
	w_debug_lvl->insertItem( i18n("Level 1 debug") );
	w_debug_lvl->insertItem( i18n("Level 2 debug") );
	w_debug_lvl->insertItem( i18n("Level 3 debug") );
	w_debug_lvl->insertItem( i18n("Level 4 debug") );

	w_porttext = new QLineEdit( this , "LePort" );

	defaults();
	load();
	slot_Update();

	connect( w_port , SIGNAL(clicked()) ,
		 this , SLOT(slot_Update()) );
	connect( w_verbose , SIGNAL(clicked()) ,
		 this , SLOT(slot_Update()) );
	connect( w_debug , SIGNAL(clicked()) ,
		 this , SLOT(slot_Update()) );
}
开发者ID:hiamitbhardwaj,项目名称:ianzepp,代码行数:34,代码来源:opt_misc.cpp


示例5: load

    inline args_t load(std::string const &file, std::string const &filetype, std::string const &filename)
    {
      if(file.empty())
      { return defaults(filetype); }

      args_t args;
      if (fs::path(file).filename() == "compile_commands.json")
      { args = load_compilation_database(file, filename); }
      else
      { args = load_color_coded(file); }

      if(args.empty())
      { return defaults(filetype); }

      return add_defaults_to_args(filetype, std::move(args));
    }
开发者ID:jeaye,项目名称:color_coded,代码行数:16,代码来源:load.hpp


示例6: kdDebug

void KRecConfigGeneral::load() {
kdDebug( 60005 ) << k_funcinfo << endl;
	defaults();
	_displaymode = KRecGlobal::the()->timeFormatMode();
	switch ( _displaymode % 100 ) {
		default:
		case 0: _display0->setChecked( true ); break;
		case 1: _display1->setChecked( true ); break;
		case 2: _display2->setChecked( true ); break;
		case 3: _display3->setChecked( true ); break;
	};
	_verboseDisplayMode->setChecked( ( _displaymode / 100 == 1 ) );

	_framebase = KRecGlobal::the()->frameBase();
	switch ( _framebase ) {
		case 30: _framebase30->setChecked( true ); break;
		case 25: _framebase25->setChecked( true ); break;
		case 75: _framebase75->setChecked( true ); break;
		default:
			_framebaseother->setChecked( true );
			_framebaseotherbox->setEnabled( true );
			_framebaseotherline->setText( QString::number( _framebase ) );
			break;
	};
	kapp->config()->setGroup( "TipOfDay" );
	_tip = kapp->config()->readBoolEntry( "RunOnStart", true );
	_tipofday->setChecked( _tip );
}
开发者ID:serghei,项目名称:kde3-kdemultimedia,代码行数:28,代码来源:krecconfigure.cpp


示例7: emptyHighlightTable

void CoreHighlightSettingsPage::load()
{
    emptyHighlightTable();
    emptyIgnoredTable();

    auto ruleManager = Client::highlightRuleManager();
    if (ruleManager) {
        for (auto &rule : ruleManager->highlightRuleList()) {
            if (rule.isInverse) {
                addNewIgnoredRow(rule.isEnabled,
                                 rule.id,
                                 rule.name,
                                 rule.isRegEx,
                                 rule.isCaseSensitive,
                                 rule.sender,
                                 rule.chanName);
            }
            else {
                addNewHighlightRow(rule.isEnabled, rule.id, rule.name, rule.isRegEx, rule.isCaseSensitive, rule.sender,
                                   rule.chanName);
            }
        }

        int highlightNickType = ruleManager->highlightNick();
        ui.highlightNicksComboBox->setCurrentIndex(ui.highlightNicksComboBox->findData(QVariant(highlightNickType)));
        // Trigger the initial update of nicksCaseSensitive being enabled or not
        highlightNicksChanged(ui.highlightNicksComboBox->currentIndex());
        ui.nicksCaseSensitive->setChecked(ruleManager->nicksCaseSensitive());

        setChangedState(false);
        _initialized = true;
    } else {
        defaults();
    }
}
开发者ID:AlD,项目名称:quassel,代码行数:35,代码来源:corehighlightsettingspage.cpp


示例8: initialize

/* Initialize the defaults and run the system wgetrc and user's own
   wgetrc.  */
void
initialize (void)
{
  char *file;
  int ok = true;

  /* Load the hard-coded defaults.  */
  defaults ();

  /* If SYSTEM_WGETRC is defined, use it.  */
#ifdef SYSTEM_WGETRC
  if (file_exists_p (SYSTEM_WGETRC))
    ok &= run_wgetrc (SYSTEM_WGETRC);
#endif
  /* Override it with your own, if one exists.  */
  file = wgetrc_file_name ();
  if (!file)
    return;
  /* #### We should canonicalize `file' and SYSTEM_WGETRC with
     something like realpath() before comparing them with `strcmp'  */
#ifdef SYSTEM_WGETRC
  if (!strcmp (file, SYSTEM_WGETRC))
    {
      fprintf (stderr, _("\
%s: Warning: Both system and user wgetrc point to `%s'.\n"),
               exec_name, file);
    }
开发者ID:tjmidnight,项目名称:Overwatch,代码行数:29,代码来源:init.c


示例9: getparam

void getparam(Params *prms)
/* Get configuration parameters. This function fills *prms with
 * run-time configuration parameters */
{
    defaults(prms);
    user_adjust(prms);

} /* end getparam() */
开发者ID:monsanto-pinheiro,项目名称:LVB,代码行数:8,代码来源:getparam.c


示例10: _campaignManager

UINodeMapSelector::UINodeMapSelector (IFrontend *frontend, CampaignManager &campaignManager, bool multiplayer, int cols, int rows) :
		UINodeBackgroundSelector<std::string>(frontend, cols, rows), _campaignManager(&campaignManager), _mapManager(
				nullptr), _multiplayer(multiplayer)
{
	setColsRowsFromTexture("map-icon-locked");
	defaults();
	reset();
}
开发者ID:masterDuncan,项目名称:caveexpress,代码行数:8,代码来源:UINodeMapSelector.cpp


示例11: KDialogBase

StyleConfigDialog::StyleConfigDialog(QWidget *parent, QString styleName)
    : KDialogBase(parent, "StyleConfigDialog", true, /*modal*/
                  i18n("Configure %1").arg(styleName), KDialogBase::Default | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Cancel)
{
    m_dirty = false;
    connect(this, SIGNAL(defaultClicked()), this, SIGNAL(defaults()));
    connect(this, SIGNAL(okClicked()), this, SIGNAL(save()));
}
开发者ID:serghei,项目名称:kde3-kdebase,代码行数:8,代码来源:styleconfdialog.cpp


示例12: defaults

//===========================================================================
cImageLoader::cImageLoader(const char* a_filename)
{
    // init internal variables
    defaults();

    // load image file
    loadFromFile(a_filename);
}
开发者ID:flair2005,项目名称:chai3d,代码行数:9,代码来源:CImageLoader.cpp


示例13: defaults

void BTSettingsWidget::load()
{
    torrentEdit->setMode(KFile::Directory);
    torrentEdit->fileDialog()->setCaption(i18n("Select a default torrent folder"));
    tempEdit->setMode(KFile::Directory);
    tempEdit->fileDialog()->setCaption(i18n("Select a default temporary folder"));
    defaults();
}
开发者ID:fluxer,项目名称:kde-extraapps,代码行数:8,代码来源:btsettingswidget.cpp


示例14: defaults

florb::settings::settings()
{
    m_cfgfile = florb::utils::appdir() + florb::utils::pathsep() + "config";
    florb::utils::mkdir(florb::utils::appdir());

    m_rootnode = YAML::LoadFile(m_cfgfile);
    defaults(m_cfgfile);
}
开发者ID:shugaa,项目名称:florb,代码行数:8,代码来源:settings.cpp


示例15: kDebug

void ConfigPage::slotFamilyChanged( int pos )
{
  if ( pos < 0 || pos >= (int)d->mFamilyMap.count() ) {
    return;
  }

  d->saveResourceSettings( this );

  d->mFamily = d->mFamilyMap[ pos ];

  d->mCurrentManager = d->mInfoMap[ pos ]->mManager;
  d->mCurrentConfig = d->mInfoMap[ pos ]->mConfig;

  if ( !d->mCurrentManager ) {
    kDebug() << "ERROR: cannot create ResourceManager<Resource>( mFamily )";
  }

  d->mListView->clear();

  if ( d->mCurrentManager->isEmpty() ) {
    defaults();
  }

  Resource *standardResource = d->mCurrentManager->standardResource();

  Manager<Resource>::Iterator it;
  for ( it = d->mCurrentManager->begin(); it != d->mCurrentManager->end(); ++it ) {
    ConfigViewItem *item = new ConfigViewItem( d->mListView, *it );
    if ( *it == standardResource ) {
      item->setStandard( true );
    }
  }

  if ( d->mListView->topLevelItemCount() == 0 ) {
    defaults();
    emit changed( true );
    d->mCurrentManager->writeConfig( d->mCurrentConfig );
  } else {
    if ( !standardResource ) {
      KMessageBox::sorry( this, i18n( "There is no standard resource. Please select one." ) );
    }

    emit changed( false );
  }
}
开发者ID:pvuorela,项目名称:kcalcore,代码行数:45,代码来源:configpage.cpp


示例16: defaults

Options::Options()
{
    sector = new SectorOptions* [MAX_SECTORS][INSTRUMENTS];
    snooze_dir_name = NULL;
    local_argv = NULL;
    local_argc = 0;
    defaults();
    oldTime = time(NULL) - 3600 ;
}
开发者ID:pablo-benito,项目名称:gvar,代码行数:9,代码来源:options.C


示例17: defaults

void Test::defaults() {
    int argc = 1;
    char *argv[1] = {NULL};
    Config config;

    OptionParser::parse(argc, argv, config);

    defaults(config);
}
开发者ID:pinetrees,项目名称:csv-reader,代码行数:9,代码来源:test.cpp


示例18: Animatable

Node::Node( const Node& other ) :
	Animatable( other ),
	m_tmHints( other.m_tmHints )
{
	defaults();
	assign( other );

	for ( Node* child = other.m_child ; child ; child = child->m_next )
		child->clone()->linkTo( this );
}
开发者ID:TheRyaz,项目名称:c_reading,代码行数:10,代码来源:Node.cpp


示例19: defaults

void ADnoteParameters::defaults()
{
    //Default Parameters
    GlobalPar.defaults();

    for(int nvoice = 0; nvoice < NUM_VOICES; ++nvoice)
        defaults(nvoice);

    VoicePar[0].Enabled = 1;
}
开发者ID:dmlloyd,项目名称:Carla,代码行数:10,代码来源:ADnoteParameters.cpp


示例20: DesktopPlugin

RazorWorkSpaceManager::RazorWorkSpaceManager(const QString & configId, RazorSettings * config)
    : DesktopPlugin(configId, config)
{
    qDebug() << "RazorWorkSpaceManager::RazorWorkSpaceManager" << configId;
    
    m_config->beginGroup(configId);
    
    QMap<int,WorkspaceConfig> desktops;
    WorkspaceConfig defaults(
                            strToBackgroundType(m_config->value("wallpaper_type", "color").toString(), RazorWorkSpaceManager::BackgroundColor),
                            false,
                            m_config->value("wallpaper", "#006600").toString(),
                            m_config->value("plugins", QStringList()).toStringList()
                        );
    // important: here is used screenCount() instead of beginReadArray()
    // QSettings can contain more/les/or none desktop defined.
    m_config->beginReadArray("desktops");
    int size = QApplication::desktop()->screenCount();
    QString themeWallpaper;
    for (int i = 0; i < size; ++i) {
        m_config->setArrayIndex(i);
        themeWallpaper = razorTheme->desktopBackground(i+1);

        desktops[i] = WorkspaceConfig (
                            strToBackgroundType(m_config->value("wallpaper_type", themeWallpaper.isEmpty() ? "color" : "pixmap").toString(), RazorWorkSpaceManager::BackgroundColor),
                            m_config->value("keep_aspect_ratio", defaults.keepAspectRatio).toBool(),
                            m_config->value("wallpaper", themeWallpaper.isEmpty() ? defaults.wallpaper : themeWallpaper).toString(),
                            m_config->value("plugins", defaults.plugins).toStringList()
                        );
    }
    m_config->endArray();
    
    m_config->endGroup();
    
    for (int i = 0; i < QApplication::desktop()->screenCount(); ++i)
    {
        qDebug() << "workspace for screen" << i;
        RazorWorkSpace * ws = new RazorWorkSpace(config, i);
        if (desktops.contains(i))
            ws->setConfig(desktops.value(i));
        else
            ws->setConfig(defaults);
        
        ws->show();
        
        // This X11 call seems mandatory for issue #3:
        // "There is only one desktop when on plasma-desktop"
        // for some WM it is not enough to use Qt::WA_X11NetWmWindowTypeDesktop
        // Note: this has to be called after is ws shown to take an effect.
        // EWMH specs: Cardinal to determine the desktop the window is in (or wants to be) starting with 0 for the first desktop. A Client MAY choose not to set this property, in which case the Window Manager SHOULD place it as it wishes. 0xFFFFFFFF indicates that the window SHOULD appear on all desktops.
        xfitMan().moveWindowToDesktop(ws->winId(), 0xFFFFFFFF);
        
        m_workspaces.append(ws);
    }
}
开发者ID:Alexandr-Galko,项目名称:razor-qt,代码行数:55,代码来源:workspacemanager.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ defaultsToParam_函数代码示例发布时间:2022-05-30
下一篇:
C++ default_print函数代码示例发布时间: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