本文整理汇总了C++中defaults函数的典型用法代码示例。如果您正苦于以下问题:C++ defaults函数的具体用法?C++ defaults怎么用?C++ defaults使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了defaults函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defaults
void GLOBAL_PREFS::init() {
defaults();
safe_strcpy(source_project, "");
safe_strcpy(source_scheduler, "");
mod_time = 0;
host_specific = false;
}
示例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();
}
示例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;
}
示例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()) );
}
示例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));
}
示例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 );
}
示例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();
}
}
示例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);
}
示例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() */
示例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();
}
示例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()));
}
示例12: defaults
//===========================================================================
cImageLoader::cImageLoader(const char* a_filename)
{
// init internal variables
defaults();
// load image file
loadFromFile(a_filename);
}
示例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();
}
示例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);
}
示例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 );
}
}