Example #1
0
void GLOBAL_PREFS::init() {
    defaults();
    safe_strcpy(source_project, "");
    safe_strcpy(source_scheduler, "");
    mod_time = 0;
    host_specific = false;
}
Example #2
0
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();
}
Example #3
0
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;
}
Example #4
0
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()) );
}
Example #5
0
    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));
    }
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 );
}
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();
    }
}
Example #8
0
/* 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);
    }
Example #9
0
void getparam(Params *prms)
/* Get configuration parameters. This function fills *prms with
 * run-time configuration parameters */
{
    defaults(prms);
    user_adjust(prms);

} /* end getparam() */
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();
}
Example #11
0
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()));
}
Example #12
0
//===========================================================================
cImageLoader::cImageLoader(const char* a_filename)
{
    // init internal variables
    defaults();

    // load image file
    loadFromFile(a_filename);
}
Example #13
0
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();
}
Example #14
0
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);
}
Example #15
0
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 );
  }
}
Example #16
0
Options::Options()
{
    sector = new SectorOptions* [MAX_SECTORS][INSTRUMENTS];
    snooze_dir_name = NULL;
    local_argv = NULL;
    local_argc = 0;
    defaults();
    oldTime = time(NULL) - 3600 ;
}
Example #17
0
void Test::defaults() {
    int argc = 1;
    char *argv[1] = {NULL};
    Config config;

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

    defaults(config);
}
Example #18
0
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 );
}
Example #19
0
void ADnoteParameters::defaults()
{
    //Default Parameters
    GlobalPar.defaults();

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

    VoicePar[0].Enabled = 1;
}
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);
    }
}
Example #21
0
ADnoteParameters::ADnoteParameters(FFTwrapper *fft_)
    :PresetsArray()
{
    setpresettype("Padsyth");
    fft = fft_;


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

    defaults();
}
Example #22
0
void Thunder::parser(char *l)
{
  defaults();
  l = tokenize(l);
  begin_while_parse(l) {
    l = parse()->parseAttributes(l, this);
    if (!l) break;
    if      (!stringcmp(l, "number")) l = parse()->parseUInt16(l, &number, "number");
    else if (!stringcmp(l, "period")) l = parse()->parseFloat(l, &period, "period");
  }
  end_while_parse(l);
}
Example #23
0
int main(int argc, char** argv)
{
	glutInit(&argc, argv);

	int width = 500;
	int height = 500;
	unsigned int displayMode = GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL;
	displayMode = defaults(displayMode, width, height);

	glutInitDisplayMode (displayMode);
	glutInitContextVersion (3, 3);
	glutInitContextFlags(GLUT_FORWARD_COMPATIBLE);
	glutInitContextProfile(GLUT_CORE_PROFILE);
#ifdef DEBUG
	glutInitContextFlags(GLUT_DEBUG);
#endif
	glutInitWindowSize (width, height); 
	glutInitWindowPosition (300, 200);
	int window = glutCreateWindow (argv[0]);

	glload::LoadFunctions();

	glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION);

	if(!glload::IsVersionGEQ(3, 3))
	{
		printf("Your OpenGL version is %i, %i. You must have at least OpenGL 3.3 to run this tutorial.\n",
			glload::GetMajorVersion(), glload::GetMinorVersion());
		glutDestroyWindow(window);
		return 0;
	}

	if(glext_ARB_debug_output)
	{
		glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
		glDebugMessageCallbackARB(DebugFunc, (void*)15);
	}

	init();

	UserListener listener;
	Leap::Controller controller;
	controller.addListener(listener);

	glutDisplayFunc(display); 
	glutReshapeFunc(reshape);
	glutKeyboardFunc(keyboard);
	glutMainLoop();

	controller.removeListener(listener);

	return 0;
}
Example #24
0
// values for fields with an enabling checkbox in the GUI.
// These are the values shown when the checkbox is first checked
// (in cases where this differs from the default).
// These should be consistent with html/inc/prefs.inc
//
void GLOBAL_PREFS::enabled_defaults() {
    defaults();
    disk_max_used_gb = 100;
    disk_min_free_gb = 1.0;
    daily_xfer_limit_mb = 10000;
    daily_xfer_period_days = 30;
    max_bytes_sec_down = 100*KILO;
    max_bytes_sec_up = 100*KILO;
    cpu_times.start_hour = 0;
    cpu_times.end_hour = 23.983;    // 23:59
    net_times.start_hour = 0;
    net_times.end_hour = 23.983;    // 23:59
}
Example #25
0
Icon::Icon(uint8_t type_id, Noid _noid, Payload *pp)
{
  setType(type_id);
  replicateVolatileNetObject(PROPS, _noid);
  noh->getAllProperties(pp);
  copyNoid(_noid);

  parse()->parseName(names.named, names.named);
  makeSolid();
  defaults();
  initializeMobileObject(0);
  taken = false;
}
Example #26
0
FilterParams::FilterParams(unsigned char Ptype_,
                           unsigned char Pfreq_,
                           unsigned char Pq_)
    : PresetsArray()
{
    setpresettype("Pfilter");
    Dtype   = Ptype_;
    Dfreq   = Pfreq_;
    Dq      = Pq_;

    changed = false;
    defaults();
}
Example #27
0
StyleConfigDialog::StyleConfigDialog(QWidget* parent, QString styleName)
  : KDialog( parent )
{
  setObjectName( "StyleConfigDialog" );
  setModal( true );
  setCaption( i18n( "Configure %1", styleName ) );
  setButtons( Default | Ok | Cancel );
  setDefaultButton( Cancel );

  m_dirty = false;
  connect( this, SIGNAL(defaultClicked()), this, SIGNAL(defaults()));
  connect( this, SIGNAL(okClicked()), this, SIGNAL(save()));
}
Example #28
0
int InputPatch_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: defaults(); break;
        case 1: patch(); break;
        default: ;
        }
        _id -= 2;
    }
    return _id;
}
Example #29
0
SUBnoteParameters::SUBnoteParameters():Presets(){
    setpresettype("Psubsyth");
    AmpEnvelope=new EnvelopeParams(64,1);
    AmpEnvelope->ADSRinit_dB(0,40,127,25);
    FreqEnvelope=new EnvelopeParams(64,0);
    FreqEnvelope->ASRinit(30,50,64,60);
    BandWidthEnvelope=new EnvelopeParams(64,0);
    BandWidthEnvelope->ASRinit_bw(100,70,64,60);

    GlobalFilter=new FilterParams(2,80,40);
    GlobalFilterEnvelope=new EnvelopeParams(0,1);
    GlobalFilterEnvelope->ADSRinit_filter(64,40,64,70,60,64);
    
    defaults();
};
//==============================================================================
cVideo::cVideo()
{
    // allocate video manager
    if (m_manager == NULL)
    {
        m_manager = new TheoraVideoManager();
        m_audio   = new OpenAL_AudioInterfaceFactory();

        // assign audio output to manager
        ((TheoraVideoManager*)m_manager)->setAudioInterfaceFactory((OpenAL_AudioInterfaceFactory*)m_audio);
    }

    // init internal variables
    defaults();
}