Beispiel #1
0
void Parameters::handleArgs(int argc, char **argv, const char *init_settings)
{ setdirnameForSettings(dirname(argv[0]));
  cout << "Executable directory is " << dirnameForSettings() << endl;
  if (init_settings != 0)
    loadDefaults(init_settings);
  for ( ++argv; (*argv); ++argv )
  { string arg(*argv);
    if (arg=="-f")
    { //cout << "argument: -f " << argv[1] << endl;
      string filename(*++argv);
      parseSettingsFile(filename);
    }
    else if (arg[0] == '-' && arg[1] == '-')
    { // this currently can only be --param=val
      string line(arg,2,string::npos);
      string::size_type eq = line.find('=');
      if (eq != string::npos)
        line[eq] = ' ';
      //cout << line << endl;
      parseLine(line);
    }
    else
    { cout << "unknown argument: " << arg << endl;
    }
  }
}
void KOEventEditor::newEvent()
{
  init();
  mEvent = 0;
  loadDefaults();
  setCaption( i18nc( "@title:window", "New Event" ) );
}
Beispiel #3
0
InputMap::InputMap(QObject*parent, t_input_universe universes) : QObject(parent)
{
	m_universes = universes;
	m_editorUniverse = 0;
	
	initPatch();
	loadPlugins();

#ifdef Q_WS_X11
	/* First, load user profiles (overrides system profiles) */
	QDir dir(QString(getenv("HOME")));
	loadProfiles(dir.absoluteFilePath(QString(USERINPUTPROFILEDIR)));
#endif

	/* Then, load system profiles */
#ifdef __APPLE__
	loadProfiles(QString("%1/%2")
                    .arg(QApplication::applicationDirPath())
                    .arg(INPUTPROFILEDIR));
#else
	loadProfiles(INPUTPROFILEDIR);
#endif

	loadDefaults();
}
Beispiel #4
0
SettingsDialog::SettingsDialog(QWidget *parent)
    : QDialog(parent)
#if QT_VERSION >= 0x040500
    , m_cacheEnabled(false)
#endif
{
    setupUi(this);
    connect(exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
    connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
    connect(cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
    connect(standardFontButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
    connect(fixedFontButton, SIGNAL(clicked()), this, SLOT(chooseFixedFont()));
    connect(languageButton, SIGNAL(clicked()), this, SLOT(chooseAcceptLanguage()));

#if QT_VERSION < 0x040500
    oneCloseButton->setVisible(false); // no other mode than one close button with qt <4.5
    networkCache->setVisible(false);
#else
    // As network cache has too many bugs in 4.5.1, do not allow to enable it.
    if (QLatin1String(qVersion()) == QLatin1String("4.5.1"))
        networkCache->setVisible(false);
#endif
    loadDefaults();
    loadFromSettings();
}
Beispiel #5
0
void SettingsPageDlg::buttonClicked(QAbstractButton *button)
{
    switch (ui.buttonBox->standardButton(button)) {
    case QDialogButtonBox::Ok:
        if (currentPage() && currentPage()->hasChanged()) {
            if (applyChanges()) accept();
        }
        else accept();
        break;
    case QDialogButtonBox::Apply:
        applyChanges();
        break;
    case QDialogButtonBox::Cancel:
        undoChanges();
        reject();
        break;
    case QDialogButtonBox::Reset:
        reload();
        break;
    case QDialogButtonBox::RestoreDefaults:
        loadDefaults();
        break;
    default:
        break;
    }
}
Beispiel #6
0
newContactDialog::newContactDialog(QWidget *parent) :
        QDialog(parent),
        ui(new Ui::newContactDialog)
{
    ui->setupUi(this);
    loadDefaults();

}
Beispiel #7
0
//******** PUBLIC FUNCTIONS **************
void Config::loadConfigFile(QString filePath){
  loadDefaults();
  if(!QFile::exists(filePath)){
    Backend::log("Configuration file does not exist: "+filePath+"\nLoading default configuration");
    filePath=":samples/pcdm.conf";
  }
  readConfigFile(filePath);
}
SettingsDialog_Various_Processing_Noise::SettingsDialog_Various_Processing_Noise(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);

    loadDefaults();
    loadFromSettings();
}
Beispiel #9
0
CoreAliasManager::CoreAliasManager(CoreSession *parent)
    : AliasManager(parent)
{
    CoreSession *session = qobject_cast<CoreSession *>(parent);
    if (!session) {
        qWarning() << "CoreAliasManager: unable to load Aliases. Parent is not a Coresession!";
        loadDefaults();
        return;
    }

    initSetAliases(Core::getUserSetting(session->user(), "Aliases").toMap());
    if (isEmpty())
        loadDefaults();

    // we store our settings whenever they change
    connect(this, SIGNAL(updatedRemotely()), SLOT(save()));
}
SettingsDialog_Hole_Filling_Fill::SettingsDialog_Hole_Filling_Fill(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);

    loadDefaults();
    loadFromSettings();
}
SettingsDialog_Skeleton_Extraction::SettingsDialog_Skeleton_Extraction(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);

    loadDefaults();
    loadFromSettings();
}
VerticalLine::VerticalLine ()
{
  defaultColor.setNamedColor("red");
  helpFile = "verticalline.html";
  type = "VerticalLine";

  loadDefaults();
}
Beispiel #13
0
Factory::Factory(RootObject* root)
    : _root(root)
{
    _scene = dynamic_cast<Scene*>(_root);

    loadDefaults();
    registerObjects();
}
SettingsDialog_Hole_Filling_Position_Crossing_Point::SettingsDialog_Hole_Filling_Position_Crossing_Point(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);

    loadDefaults();
    loadFromSettings();
}
Beispiel #15
0
void KOTodoEditor::newTodo()
{
    kdDebug(5850) << k_funcinfo << endl;
    init();
    mTodo = 0;
    mCalendar = 0;
    setCaption(i18n("New To-do"));
    loadDefaults();
}
Beispiel #16
0
Ball::Ball()
{
  x = 0.f;
  y = 0.f;
  radius = 100.f;
  speed = 5.f;

  loadDefaults();
}
Beispiel #17
0
 /*public*/ void EngineModels::dispose() {
     _engineHorsepowerHashTable.clear();
     _engineLengthHashTable.clear();
     _engineTypeHashTable.clear();
     _engineWeightHashTable.clear();
     _engineBunitHashTable.clear();
     RollingStockAttribute::dispose();
     loadDefaults();
 }
Beispiel #18
0
Ball::Ball(float x, float y, float radius)
{
  this->x = x;
  this->y = y;
  this->radius = radius;
  this->speed = 5.f;

  loadDefaults();
}
Beispiel #19
0
SettingsDialogJCW::SettingsDialogJCW(QWidget *parent, QString &saveLocation)
    : QDialog(parent), saveLocation_(saveLocation)
{
    setupUi(this);

	connect(pushButtonBrowse, SIGNAL(clicked()), this, SLOT(setFilename()));

    loadDefaults();
    loadFromSettings();
}
ramCameraManager::ramCameraManager()
{
	last_camera_id = 0;
	
	active_camera = createCamera<ofEasyCam>();

	loadDefaults();
	
	ofAddListener(ofEvents().update, this, &ramCameraManager::update);
}
Beispiel #21
0
SellArrow::SellArrow ()
{
  defaultColor.setNamedColor("red");
  helpFile = "sellarrow.html";
  identifierLabel = "Identifier";
  priceLabel = "Price";
  type = "SellArrow";
  
  loadDefaults();
}
Beispiel #22
0
static void loadSystemParams(void)
{

u08 EEaddr;
s08 eeStatus = FALSE;
u08 i;
systemVarsType sVars;

	// Leo la configuracion:  Intento leer hasta 3 veces.
	EEaddr = EEADDR_START_PARAMS;
	for (i=0; i<3; i++) {
		eeStatus = paramLoad(&sVars, EEaddr, sizeof(systemVarsType));
		if (eeStatus == TRUE) break;
	}

	vTaskDelay( 100 / portTICK_RATE_MS );

	// Confirmo que pude leer bien.
	if ( (eeStatus == FALSE) || (sVars.initByte != 0x49) ) {
		// No pude leer la EE correctamente o es la primera vez que arranco.
		// Inicializo a default.
		snprintf_P( &cmd_printfBuff,CHAR128,PSTR("loadSystemParams::Load EE error: default !!\r\n\0") );
		logPrintStr(LOG_NONE, &cmd_printfBuff);

		loadDefaults(&sVars);
		// Almaceno en la EE para el proximo arranque.
		paramStore(&sVars, EEaddr, sizeof(systemVars));

	} else {
		// Pude leer la eeprom correctamente.
		snprintf_P( &cmd_printfBuff,CHAR128,PSTR("loadSystemParams::Load config ok !!\r\n\0") );
		logPrintStr(LOG_NONE, &cmd_printfBuff);
	}

	// Siempre debo arrancar con esto en FALSE para aguantar a las tareas.
	sVars.initStatus = FALSE;

	sVars.wrkMode = WK_NORMAL;
	strncpy_P(sVars.dlgIp, PSTR("000.000.000.000\0"),16);
	sVars.csq = 0;
	sVars.dbm = 0;
	sVars.dcd = 0;
	sVars.ri = 0;
	sVars.termsw = 0;

	// Actualizo el systemVars.
	if (xSemaphoreTake( sem_systemVars, MSTOTAKESYSTEMVARSSEMPH ) == pdTRUE ) {
		memcpy(&systemVars, &sVars, sizeof(systemVarsType));
		xSemaphoreGive( sem_systemVars );
	}

	snprintf_P( &cmd_printfBuff,CHAR128,PSTR("loadSystemParams::Config analogs=%d\r\n\0"), NRO_CHANNELS );
	logPrintStr(LOG_NONE, &cmd_printfBuff);

}
Beispiel #23
0
EditMode::EditMode(QWidget* parent, QLCFixtureMode* mode) : QDialog(parent)
{
	Q_ASSERT(mode != NULL);

	/* Edit the given mode */
	m_mode = new QLCFixtureMode(mode->fixtureDef(), mode);

	setupUi(this);
	init();
	loadDefaults();
}
SettingsDialog::SettingsDialog(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);
    connect(exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
    connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
    connect(restoreToDefaultButton, SIGNAL(clicked()), this, SLOT(restoreHomeToDefault()));
    connect(cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
    connect(standardFontButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
    connect(fixedFontButton, SIGNAL(clicked()), this, SLOT(chooseFixedFont()));
	connect(comboBoxStyle, SIGNAL(currentIndexChanged(int)), this,   SLOT(setAppStyle(int)));
    connect(showPasswordsButton, SIGNAL(clicked()), this, SLOT(showPasswords()));
    connect(chkUserAgent, SIGNAL(stateChanged ( int ) ), this, SLOT(useUserAgent(int)));
    connect(buttonSearchProviders, SIGNAL(clicked() ), this, SLOT( showSearchProviders() ) );
    connect(buttonEditShortcuts, SIGNAL(clicked() ), this, SLOT( editShortcuts() ) );
    connect(btnExtView, SIGNAL(clicked() ), this, SLOT( chooseExtViewer() ) );
    connect(btnStylePath, SIGNAL(clicked() ), this, SLOT( chooseStylePath() ) );

    connect(proxyAuto, SIGNAL(stateChanged ( int ) ), this, SLOT(setAutoProxy(int)));
    connect(proxySupport, SIGNAL(toggled( bool ) ), this, SLOT(setProxyEnabled(bool)));

	connect(btnAddAd, SIGNAL(clicked() ), this, SLOT( addBlockAd() ) );
	connect(btnEditAd, SIGNAL(clicked() ), this, SLOT( editBlockAd() ) );
	connect(btnDelAd, SIGNAL(clicked() ), this, SLOT( removeBlockAd() ) );
	connect(btnDelAds, SIGNAL(clicked() ), this, SLOT( removeBlockAds() ) );

	connect(btnBlockMostAds, SIGNAL(clicked() ), this, SLOT( blockMostAds() ) );
	connect(btnBlockMostCnts, SIGNAL(clicked() ), this, SLOT( blockMostCnts() ) );

	connect(btnAddAdEx, SIGNAL(clicked() ), this, SLOT( addBlockAdEx() ) );
	connect(btnEditAdEx, SIGNAL(clicked() ), this, SLOT( editBlockAdEx() ) );
	connect(btnDelAdEx, SIGNAL(clicked() ), this, SLOT( removeBlockAdEx() ) );

    loadDefaults();
    loadFromSettings();
	
	fontChanged = false;
	connect(tbGoBack, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbGoForward, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbAddBook, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbHome, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbRefresh, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbAppStyle, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbPrivMode, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbPrefs, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbImages, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbProxy, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbCompatibility, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbReset, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbInspect, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbBookmarks, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbTextSize, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
	connect(tbVirtKeyb, SIGNAL(clicked()), this, SLOT( checkAddressBarButtons() ));
}
Beispiel #25
0
SettingsDialog::SettingsDialog(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);
    connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
    connect(standardFontButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
    connect(fixedFontButton, SIGNAL(clicked()), this, SLOT(chooseFixedFont()));

    loadDefaults();
    loadFromSettings();
}
Beispiel #26
0
EditMode::EditMode(QWidget* parent, QLCFixtureDef* fixtureDef) : QDialog(parent)
{
	Q_ASSERT(fixtureDef != NULL);

	/* Create a new mode for the given fixture */
	m_mode = new QLCFixtureMode(fixtureDef);

	setupUi(this);
	init();
	loadDefaults();
}
Beispiel #27
0
PluginSelector::PluginSelector(KDialog * parent)
  : KPluginSelector(parent)
{
    KService::List offers = KServiceTypeTrader::self()->query("KGet/Plugin");

    addPlugins(KPluginInfo::fromServices(offers), KPluginSelector::ReadConfigFile, i18n("Plugins"), "Service", KGlobal::config());

    load();

    connect(parent, SIGNAL(accepted()), SLOT(saveState()));
    connect(parent, SIGNAL(rejected()), SLOT(loadDefaults()));
}
void GameStateConfigBase::logicDefaults() {
	defaults_confirm->logic();
	if (defaults_confirm->confirmClicked) {
		FULLSCREEN = false;
		loadDefaults();
		loadMiscSettings();
		inpt->defaultQwertyKeyBindings();
		inpt->defaultJoystickBindings();
		update();
		defaults_confirm->visible = false;
		defaults_confirm->confirmClicked = false;
	}
}
Beispiel #29
0
OutputMap::OutputMap(QObject* parent, int universes) : QObject(parent)
{
	m_universes = universes;
	m_dummyOut = NULL;
	m_blackout = false;

	m_universeArray = new QByteArray(universes * 512, 0);

	initPatch();

	load();
	loadDefaults();
}
Beispiel #30
0
	void IconManager::loadTheme(const IconTheme &iconTheme)
	{
		loadDefaults();

		QHashIterator<QString, QString> it(iconTheme.icons());
		while(it.hasNext()) {
			it.next();

			m_icons.insert(it.key(), QPixmap(it.value()));
		}

		emit themeLoaded();
	}