Esempio n. 1
0
bool TestImporter::GetSettingsList( QVector< Setting >* settings )
{
	settings->push_back( Setting( "", "forbid-u-turn", "forbids u-turns", "" ) );
	settings->push_back( Setting( "", "u-turn-penalty", "penalized u-turns", "seconds" ) );

	return true;
}
Esempio n. 2
0
void VSCMainWindows::SetupConnections()
{
    connect(m_pMainArea, SIGNAL(tabCloseRequested(int)), this, SLOT(MainCloseTab(int)));
    connect(m_pDeviceList, SIGNAL(SurveillanceClicked()), this, SLOT(AddSurveillance()));
    connect(m_pDeviceList, SIGNAL(CameraAddClicked()), this, SLOT(AddCamera()));
    connect(m_pDeviceList, SIGNAL(PlaybackClicked()), this, SLOT(AddPlayback()));
    connect(m_pDeviceList, SIGNAL(SearchClicked()), this, SLOT(Search()));
    connect(m_pDeviceList, SIGNAL(RecorderClicked()), this, SLOT(AddRecorder()));
    connect(m_pDeviceList, SIGNAL(SiteAddClicked()), this, SLOT(AddSite()));

    
    connect(m_pDeviceList, SIGNAL(CameraEditClicked(int)), this, SLOT(EditCamera(int)));
    connect(m_pDeviceList, SIGNAL(CameraDeleteClicked(int)), this, SLOT(DeleteCamera(int)));

    connect(m_pDeviceList, SIGNAL(SiteEditClicked(int)), this, SLOT(EditSite(int)));
    connect(m_pDeviceList, SIGNAL(SiteDeleteClicked(int)), this, SLOT(DeleteSite(int)));


    /* Disk edit */
    connect(m_pDeviceList, SIGNAL(DiskEditClicked()), this, SLOT(EditDisk()));
	

    //connect(this, SIGNAL(CameraDeleted()), m_pDeviceList, SLOT(CameraTreeUpdated()));
    connect(m_pToolBar->ui.pbFullScreen, SIGNAL(clicked()), this, SLOT(SetFullScreen()));
    connect(m_pToolBar->ui.pbAbout, SIGNAL(clicked()), this, SLOT(about()));
    connect(m_pToolBar->ui.pbAlarm, SIGNAL(clicked()), this, SLOT(AddEvent()));
    connect(m_pToolBar->ui.pbSetting, SIGNAL(clicked()), this, SLOT(Setting()));
    connect(m_pEventThread, SIGNAL(EventNotifyNoParam()), m_pToolBar, SLOT(NewAlarm()));

}
Esempio n. 3
0
VSCPanel::VSCPanel(QWidget *parent, Qt::WindowFlags flags)
    : QWidget(parent, flags)
{
	ui.setupUi(this);
	setAcceptDrops(true);
	setMouseTracking(true);
	ui.scrollArea->setBackgroundRole(QPalette::Light);

	/* Setup connection */
	connect(ui.pbView, SIGNAL(clicked()), this, SIGNAL(AddSurveillance()));
	connect(ui.pbSearch, SIGNAL(clicked()), this, SIGNAL(Search()));
	connect(ui.pbMining, SIGNAL(clicked()), this, SIGNAL(AddDmining()));
	connect(ui.pbEmap, SIGNAL(clicked()), this, SIGNAL(AddEmap()));
	connect(ui.pbRecordPlan, SIGNAL(clicked()), this, SIGNAL(AddRecordPlan())); 

	connect(ui.pbRecorder, SIGNAL(clicked()), this, SIGNAL(AddRecorder()));
	connect(ui.pbCamera, SIGNAL(clicked()), this, SIGNAL(AddCamera()));

	connect(ui.pbSetting, SIGNAL(clicked()), this, SIGNAL(Setting()));
	connect(ui.pbAlarm, SIGNAL(clicked()), this, SIGNAL(AddEvent()));
	connect(ui.pbVIPC, SIGNAL(clicked()), this, SIGNAL(AddVIPC()));

	connect(ui.pbTasklist, SIGNAL(clicked()), this, SLOT(UpdateTaskList()));


	UpdateTaskList();
}
Esempio n. 4
0
void Myazo::SaveSetting(void)
{
	Json::Item Setting(Json::Type::Hash);
	Setting.Hash().insert(Json::JsonHashPair(L"userid",UserID));
	Setting.Hash().insert(Json::JsonHashPair(L"password",PassWord));
	WriteSettingFile(Json::ToString(Setting));
	return;
}
Esempio n. 5
0
	void Settings::LoadFromXml(xml_node& node) {

		settings = map<string, Setting>();

		for (auto settingNode : node.children("setting")) {
			auto set = Setting();
			set.LoadFromXml(settingNode);
			settings[set.name] = set;
		}
	}
Esempio n. 6
0
AGIPane::AGIPane(wxWindow* parent, int* args,ReadData* d, PCPPane* p,int h) :
    wxGLCanvas(parent, wxID_ANY, args, wxDefaultPosition, wxSize(h*100,h*100), wxFULL_REPAINT_ON_RESIZE)
{
    m_context = new wxGLContext(this);
    data = d;
    ag = new Agi(d);
    pcp = p;
   Setting();
    // To avoid flashing on MSW
    SetBackgroundStyle(wxBG_STYLE_CUSTOM);
}
Esempio n. 7
0
bool GuiButtonCardDetail::Create(light::weak_raw_ptr<light::view::DirectX> pDirectX, light::weak_raw_ptr<GuiCard> pGui, const std::wstring& file_name, const std::wstring& strTextureName, light::POSITION_INT Pos, Gui::Callback callback, const TCHAR* szClickSound /* = NULL */, const TCHAR* szOverSound /* = NULL */)
{
	m_GuiCard = pGui;

	if(m_GuiCard.get())
	{
		m_GuiCard->Create(pDirectX, Pos);
	}

	Setting(pDirectX, callback, Pos, szClickSound, szOverSound); 
	return Load(file_name, strTextureName);
}
Esempio n. 8
0
void    key_GetPassword(void)
{
  if (bKey == bKEY_ENTER)
  {
    if (enKeyboard == KBD_ENTER)
    {
      enKeyboard = KBD_INPUT2;

      ShowHi(szPassword);
      ShowLo(szMaskPass);

      ClearPassTwo();
      ibX = 3;
    }
    else if (enKeyboard == KBD_INPUT2)
    { 
      if ((memcmp(mpbPassOne, mpbPassTwo, 10) == 0) || SuperUser())
      {       
        enKeyboard = KBD_BEGIN;
        OK();

        boSetPassword = true;
        SaveCache(&chSetPassword);

        enGlobal = GLB_REPROGRAM;
        Setting();

//        AddSysRecord(EVE_PASSWORD);
      }
      else 
      {
        enKeyboard = KBD_ENTER;
        LongBeep();

        Error();
      }
    }
  }


  else if (bKey < 10)
  {
    if (enKeyboard == KBD_INPUT2)
    {
      if (ibX < 13)
      {
        mpbPassTwo[ibX-3] = bKey;
        szLo[ibX++] = '*';
      }
    }
  }
  else Beep();
}
int main(int argc, char** argv) {
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
	glutInitWindowSize(1800, 1000);
	glutInitWindowPosition(0, 0);
	glutCreateWindow("임다솜_3D당구게임_Ver2_C++로 구현");
	glClearColor(0.0, 0.0, 0.0, 1.0);

	Init();				//객체를 생성하고 초기 설정을 진행합니다.
	Setting();			//glut 메소드를 이용하여 Input에 대한 이벤트리스너를 세팅하고, 화면을 그리기 위한 메소드와 타이머를 세팅합니다.
	glutMainLoop();		//glut가 메인루프를 진행하면 화면을 그림과 동시에 게임이 시작됩니다.

	return 0;
}
Esempio n. 10
0
void listToSetting(list<Setting> *_setting, Setting dst[])
{
	list<Setting>::iterator it;
	int size = ARRAY_LENGTH(_setting);

	int count = 0;
	for (it = _setting->begin(); it != _setting->end(); ++it, count++)
	{
		if (count >= size) break;

		dst[count] = Setting(it->groupName, it->name, it->data);
		debug("", dst[count]);
	}	
}
Esempio n. 11
0
 void WalletDb::store_setting(const string& name, const variant& value)
 {
     auto orec = lookup_setting(name);
     if (orec.valid())
     {
         orec->value = value;
         settings[name] = *orec;
         store_and_reload_entry( *orec );
     }
     else
     {
         auto rec = WalletSettingEntry( Setting(name, value), new_wallet_entry_index() );
         settings[name] = rec;
         store_and_reload_entry( rec );
     }
 }
Esempio n. 12
0
void VSCMainWindows::SetupConnections()
{
	connect(m_pMainArea, SIGNAL(tabCloseRequested(int)), this, SLOT(MainCloseTab(int)));
	connect(m_pDeviceList, SIGNAL(SurveillanceClicked()), this, SLOT(AddSurveillance()));
	connect(m_pDeviceList, SIGNAL(CameraAddClicked()), this, SLOT(AddCamera()));
	connect(m_pDeviceList, SIGNAL(EmapClicked()), this, SLOT(AddEmap()));
	connect(m_pDeviceList, SIGNAL(DminingClicked()), this, SLOT(AddDmining()));
	connect(m_pDeviceList, SIGNAL(SearchClicked()), this, SLOT(Search()));
	connect(m_pDeviceList, SIGNAL(RecorderClicked()), this, SLOT(AddRecorder()));


	connect(m_pDeviceList, SIGNAL(CameraEditClicked(int)), this, SLOT(EditCamera(int)));
	connect(m_pDeviceList, SIGNAL(CameraDeleteClicked(int)), this, SLOT(DeleteCamera(int)));

	/* VIPC */
	connect(m_pDeviceList, SIGNAL(VIPCAddClicked()), this, SLOT(AddVIPC()));
	connect(m_pDeviceList, SIGNAL(VIPCEditClicked(int)), this, SLOT(EditVIPC(int)));
	connect(m_pDeviceList, SIGNAL(VIPCDeleteClicked(int)), this, SLOT(DeleteVIPC(int)));

	/* Camera Group */
	connect(m_pDeviceList, SIGNAL(VGroupAddClicked()), this, SLOT(AddVGroup()));
	connect(m_pDeviceList, SIGNAL(VGroupEditClicked(int)), this, SLOT(EditVGroup(int)));
	connect(m_pDeviceList, SIGNAL(VGroupDeleteClicked(int)), this, SLOT(DeleteVGroup(int)));
	connect(m_pDeviceList, SIGNAL(VGroupMapClicked()), this, SLOT(MapVGroup()));


	/* Disk edit */
	connect(m_pDeviceList, SIGNAL(DiskEditClicked()), this, SLOT(EditDisk()));

	/* View */
	connect(m_pDeviceList, SIGNAL(ViewDeleteClicked(int)), this, SLOT(DeleteView(int)));

	/* VMS */
	connect(m_pDeviceList, SIGNAL(VMSDeleteClicked(int)), this, SLOT(DeleteVMS(int)));


	//connect(this, SIGNAL(CameraDeleted()), m_pDeviceList, SLOT(CameraTreeUpdated()));
	connect(m_pToolBar->ui.pbFullScreen, SIGNAL(clicked()), this, SLOT(SetFullScreen()));
	connect(m_pToolBar->ui.pbAbout, SIGNAL(clicked()), this, SLOT(about()));
	connect(m_pToolBar->ui.pbAlarm, SIGNAL(clicked()), this, SLOT(AddEvent()));
	connect(m_pToolBar->ui.pbSetting, SIGNAL(clicked()), this, SLOT(Setting()));
	connect(m_pToolBar->ui.pbUser, SIGNAL(clicked()), this, SLOT(UserStatus()));
	connect(m_pEventThread, SIGNAL(EventNotifyNoParam()), m_pToolBar, SLOT(NewAlarm()));

}
Esempio n. 13
0
void Start()
{
	menu sub_menu(std::make_tuple(100,150,"腕立てスタート"),
						std::make_tuple(100,250,"設定"));
	bool return_flag=false;
	while(!ScreenFlip()&&!ProcessMessage()&&!ClearDrawScreen()){
		sub_menu.effectiving();
		
		switch(sub_menu.Drow_menus()){
		case 0:
			begin(sub_menu);
			return;
		case 1:
			Setting(sub_menu);
			return;
		case -1:
			;
		}
	}
}
Esempio n. 14
0
void DifficultySettings::Restore(idRestoreGame* savefile)
{
	Clear(); // always clear before loading

	int num;
	savefile->ReadInt(num);
	for (int i = 0; i < num; i++)
	{
		idStr className;
		savefile->ReadString(className);

		// Insert an empty structure into the map
		SettingsMap::iterator inserted = _settings.insert(
			SettingsMap::value_type(className.c_str(), Setting())
		);

		// Now restore the struct itself
		inserted->second.Restore(savefile);
	}
	savefile->ReadInt(num);
	for (int i = 0; i<num; i++)
	{	//restore the whole map
		idStr className;
		savefile->ReadString(className);

		int k;
		savefile->ReadInt(k);
		InheritanceChain chain;
		for (int j = 0; j<k; j++) {
			idStr str;
			savefile->ReadString(str);
			chain.push_back(std::string(str.c_str()));
		}

		_inheritanceChains[std::string(className.c_str())] = chain;
	}
	savefile->ReadInt(_level);
}
Esempio n. 15
0
bool CMain::GameLoop(){
	int dnum;

	StartDemo();

	if (PLAYDATA_NUM>0){
		CLoad PlayDataLoad;
			char path[256]; strcpy_s(path, "tenyu_data/save");
			PlayDataLoad.LoadPlayData(path, PlayData);
	}

	while(1){
		switch(Title()){
		case TITLE_FIRSTSTART:
			Opening();
			return Playing();

		case TITLE_LOADSTART:
			if (PLAYDATA_NUM>0 && (dnum = ChooseData()) != -1){
				return Playing(dnum);
			}
			break;

		case TITLE_SETTING:
			Setting();
			break;
		
		case TITLE_GAMEEND:
			return false;

		default:
			WarningDx("Warning->Unexpected matter happend [back to title]->GameLoop()", __FILE__, __LINE__);
		}
	}

	return true;
}
Esempio n. 16
0
bool MapnikRenderer::GetSettingsList( QVector< Setting >* settings )
{
	settings->push_back( Setting( "", "mapnik-theme", "mapnik theme file", "filename" ) );
	return true;
}
Esempio n. 17
0
Settings::Settings(int argc, char ** argv, QSettings * pAppSettings)
: m_pAppSettings(pAppSettings)
{
	Setting::SettingData sDefault, * vecEnum;
	QStringList listStrings;
	unsigned int i, iEnum;

	ExtractParamsFromCmdLine(argc, argv);

	if (m_pAppSettings)
		m_pAppSettings->setPath(SETTINGS_COMPANY, SETTINGS_PACKAGE);

	sDefault.bValue = SETTINGS_GENERAL_LOGGING_DEFAULT;
	m_sSettings[SETTINGS_GENERAL_LOGGING_NUM] = Setting(SETTINGS_GENERAL_LOGGING, Setting::SettingTypeBool, sDefault);

	sDefault.bValue = SETTINGS_GENERAL_LOADMAPS_DEFAULT;
	m_sSettings[SETTINGS_GENERAL_LOADMAPS_NUM] = Setting(SETTINGS_GENERAL_LOADMAPS, Setting::SettingTypeBool, sDefault);

	sDefault.bValue = SETTINGS_GENERAL_NETWORK_DEFAULT;
	m_sSettings[SETTINGS_GENERAL_NETWORK_NUM] = Setting(SETTINGS_GENERAL_NETWORK, Setting::SettingTypeBool, sDefault);

	sDefault.iValue = SETTINGS_GENERAL_ADDRESSES_DEFAULT;
	m_sSettings[SETTINGS_GENERAL_ADDRESSES_NUM] = Setting(SETTINGS_GENERAL_ADDRESSES, Setting::SettingTypeInt, sDefault);

	sDefault.bValue = SETTINGS_APPEARANCE_FILLWATER_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_FILLWATER_NUM] = Setting(SETTINGS_APPEARANCE_FILLWATER, Setting::SettingTypeBool, sDefault);

	sDefault.bValue = SETTINGS_APPEARANCE_SHOWCOMPASS_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_SHOWCOMPASS_NUM] = Setting(SETTINGS_APPEARANCE_SHOWCOMPASS, Setting::SettingTypeBool, sDefault);

	sDefault.bValue = SETTINGS_APPEARANCE_SHOWSCALE_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_SHOWSCALE_NUM] = Setting(SETTINGS_APPEARANCE_SHOWSCALE, Setting::SettingTypeBool, sDefault);

	sDefault.bValue = SETTINGS_APPEARANCE_SHOWMARKERS_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_SHOWMARKERS_NUM] = Setting(SETTINGS_APPEARANCE_SHOWMARKERS, Setting::SettingTypeBool, sDefault);

	sDefault.bValue = SETTINGS_APPEARANCE_SHOWTRACKS_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_SHOWTRACKS_NUM] = Setting(SETTINGS_APPEARANCE_SHOWTRACKS, Setting::SettingTypeBool, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_BG_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_BG_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_BG, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_FG_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_FG_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_FG, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_SMROAD_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_SMROAD_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_SMROAD, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_LGROAD_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_LGROAD_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_LGROAD, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_PRIMARY_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_PRIMARY_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_PRIMARY, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_HIGHWAY_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_HIGHWAY_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_HIGHWAY, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_RAIL_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_RAIL_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_RAIL, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_WATER_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_WATER_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_WATER, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_LANDBOUNDS_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_LANDBOUNDS_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_LANDBOUNDS, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_WATERBOUNDS_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_WATERBOUNDS_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_WATERBOUNDS, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_MISCBOUNDS_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_MISCBOUNDS_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_MISCBOUNDS, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_LANDMARK_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_LANDMARK_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_LANDMARK, Setting::SettingTypeColor, sDefault);

	sDefault.strValue = SETTINGS_APPEARANCE_COLOR_PHYSICAL_DEFAULT;
	m_sSettings[SETTINGS_APPEARANCE_COLOR_PHYSICAL_NUM] = Setting(SETTINGS_APPEARANCE_COLOR_PHYSICAL, Setting::SettingTypeColor, sDefault);

	sDefault.bValue = SETTINGS_NETWORK_AUTOSERVER_DEFAULT;
	m_sSettings[SETTINGS_NETWORK_AUTOSERVER_NUM] = Setting(SETTINGS_NETWORK_AUTOSERVER, Setting::SettingTypeBool, sDefault);

	sDefault.strValue = SETTINGS_NETWORK_INITFILE_DEFAULT;
	m_sSettings[SETTINGS_NETWORK_INITFILE_NUM] = Setting(SETTINGS_NETWORK_INITFILE, Setting::SettingTypeFile, sDefault);

	sDefault.strValue = SETTINGS_NETWORK_INITARGS_DEFAULT;
	m_sSettings[SETTINGS_NETWORK_INITARGS_NUM] = Setting(SETTINGS_NETWORK_INITARGS, Setting::SettingTypeText, sDefault);

	sDefault.strValue = SETTINGS_NETWORK_CLOSEFILE_DEFAULT;
	m_sSettings[SETTINGS_NETWORK_CLOSEFILE_NUM] = Setting(SETTINGS_NETWORK_CLOSEFILE, Setting::SettingTypeFile, sDefault);

	sDefault.strValue = SETTINGS_NETWORK_CLOSEARGS_DEFAULT;
	m_sSettings[SETTINGS_NETWORK_CLOSEARGS_NUM] = Setting(SETTINGS_NETWORK_CLOSEARGS, Setting::SettingTypeText, sDefault);

	sDefault.strValue = SETTINGS_NETWORK_DEVICENAME_DEFAULT;
	m_sSettings[SETTINGS_NETWORK_DEVICENAME_NUM] = Setting(SETTINGS_NETWORK_DEVICENAME, Setting::SettingTypeText, sDefault);

	sDefault.strValue = SETTINGS_NETWORK_DEVICETYPE_DEFAULT;
	iEnum = SETTINGS_NETWORK_DEVICETYPE_LIST_SIZE;
	vecEnum = new Setting::SettingData[iEnum];
	for (i = 0; i < iEnum; i++) {
		vecEnum[i].strValue = SETTINGS_NETWORK_DEVICETYPES[i];
		listStrings.push_back(SETTINGS_NETWORK_DEVICETYPE_LIST[i]);
	}
	m_sSettings[SETTINGS_NETWORK_DEVICETYPE_NUM] = Setting(SETTINGS_NETWORK_DEVICETYPE, (Setting::SettingType)(Setting::SettingTypeText | Setting::SettingTypeList), sDefault, NULL, NULL, vecEnum, iEnum);
	m_sSettings[SETTINGS_NETWORK_DEVICETYPE_NUM].m_listEnumStrings = listStrings;
	delete[] vecEnum;
	listStrings.clear();

	sDefault.strValue = SETTINGS_NETWORK_IPADDRESS_DEFAULT;
	m_sSettings[SETTINGS_NETWORK_IPADDRESS_NUM] = Setting(SETTINGS_NETWORK_IPADDRESS, Setting::SettingTypeIP, sDefault);

	sDefault.strValue = SETTINGS_NETWORK_IPSUBNET_DEFAULT;
	m_sSettings[SETTINGS_NETWORK_IPSUBNET_NUM] = Setting(SETTINGS_NETWORK_IPSUBNET, Setting::SettingTypeIP, sDefault);

	sDefault.iValue = SETTINGS_NETWORK_TXPOWER_DEFAULT;
	m_sSettings[SETTINGS_NETWORK_TXPOWER_NUM] = Setting(SETTINGS_NETWORK_TXPOWER, Setting::SettingTypeInt, sDefault);

	sDefault.iValue = SETTINGS_NETWORK_TXRATE_DEFAULT;
	m_sSettings[SETTINGS_NETWORK_TXRATE_NUM] = Setting(SETTINGS_NETWORK_TXRATE, Setting::SettingTypeInt, sDefault);

	sDefault.iValue = SETTINGS_HYBRIDNETWORK_MODE_DEFAULT;
	iEnum = SETTINGS_HYBRIDNETWORK_MODE_LIST_SIZE;
	vecEnum = new Setting::SettingData[iEnum];
	for (i = 0; i < iEnum; i++) {
		vecEnum[i].iValue = SETTINGS_HYBRIDNETWORK_MODES[i];
		listStrings.push_back(SETTINGS_HYBRIDNETWORK_MODE_LIST[i]);
	}
	m_sSettings[SETTINGS_HYBRIDNETWORK_MODE_NUM] = Setting(SETTINGS_HYBRIDNETWORK_MODE, (Setting::SettingType)(Setting::SettingTypeInt | Setting::SettingTypeList), sDefault, NULL, NULL, vecEnum, iEnum);
	m_sSettings[SETTINGS_HYBRIDNETWORK_MODE_NUM].m_listEnumStrings = listStrings;
	delete[] vecEnum;
	listStrings.clear();

/*
	sDefault.iValue = SETTINGS_HYBRIDNETWORK_MODE_DEFAULT;
	m_sSettings[SETTINGS_HYBRIDNETWORK_MODE_NUM] = Setting(SETTINGS_HYBRIDNETWORK_MODE, Setting::SettingTypeInt, sDefault);
*/
	sDefault.strValue = SETTINGS_HYBRIDNETWORK_IP_DEFAULT;
	m_sSettings[SETTINGS_HYBRIDNETWORK_IP_NUM] = Setting(SETTINGS_HYBRIDNETWORK_IP, Setting::SettingTypeIP, sDefault);

::fflush(stdout);
}
bool ContractionHierarchies::GetSettingsList( QVector< Setting >* settings )
{
	settings->push_back( Setting( "", "block-size", "sets block size of compressed graph to 2^x", "integer > 7" ) );
	return true;
}
Esempio n. 19
0
void AGIPane::ReCreate(){
    ag->ReCreate();
    Setting();
}
Esempio n. 20
0
SettingCategory Presets::category(string title)
{
	vector<Setting> settings;

	//PRESETS
	if(title=="Video")
	{
		sf::VideoMode desktop=sf::VideoMode::getDesktopMode();
		stringstream width;
		width << desktop.width;
		stringstream height;
		height << desktop.height;
		settings.push_back(Setting("Width", width.str(), Setting::Int));
		settings.push_back(Setting("Height", height.str(), Setting::Int));
		settings.push_back(Setting("VSync", "0", Setting::Bool));
		settings.push_back(Setting("Framecap", "60", Setting::Int));
		settings.push_back(Setting("Windowed", "0", Setting::Bool));
		settings.push_back(Setting("Border", "1", Setting::Bool));
		settings.push_back(Setting("Show FPS", "0", Setting::Bool));
	}
	/*else if(title.find("Controls")==0)
	{
		settings.push_back(Setting("Up", "Keyboard_Up", Setting::Input));
		settings.push_back(Setting("Down", "Keyboard_Down", Setting::Input));
		settings.push_back(Setting("Left", "Keyboard_Left", Setting::Input));
		settings.push_back(Setting("Right", "Keyboard_Right", Setting::Input));
		settings.push_back(Setting("Enter", "Keyboard_Return", Setting::Input));
		settings.push_back(Setting("Back", "Keyboard_Escape", Setting::Input));
	}*/
	else if(title=="Controls")
	{
		settings.push_back(Setting("Up", "Keyboard_Up", Setting::Input));
		settings.push_back(Setting("Down", "Keyboard_Down", Setting::Input));
		settings.push_back(Setting("Left", "Keyboard_Left", Setting::Input));
		settings.push_back(Setting("Right", "Keyboard_Right", Setting::Input));
		settings.push_back(Setting("Enter", "Keyboard_Return", Setting::Input));
		settings.push_back(Setting("Back", "Keyboard_Escape", Setting::Input));
	}

	return SettingCategory(title, settings);
}
Esempio n. 21
0
	virtual bool GetSettingsList( QVector< Setting >* settings )
	{
		settings->push_back( Setting( "i", "input", "input file", "filename" ) );
		settings->push_back( Setting( "o", "output", "output directory", "directory" ) );

		settings->push_back( Setting( "n", "name", "map package name", "string" ) );

		settings->push_back( Setting( "p", "plugins", "lists plugins", "" ) );

		settings->push_back( Setting( "pi", "importer", "importer plugin", "plugin name" ) );
		settings->push_back( Setting( "pro", "router", "router plugin", "plugin name" ) );
		settings->push_back( Setting( "pg", "gps-lookup", "gps lookup plugin", "plugin name" ) );
		settings->push_back( Setting( "pre", "renderer", "renderer plugin", "plugin name" ) );
		settings->push_back( Setting( "pa", "address-lookup", "address lookup plugin", "plugin name" ) );

		settings->push_back( Setting( "di", "do-importing", "runs importer", "" ) );
		settings->push_back( Setting( "dro", "do-routing", "creates routing module", "module name" ) );
		settings->push_back( Setting( "dre", "do-rendering", "creates rendering module", "module name" ) );
		settings->push_back( Setting( "da", "do-address-lookup", "creates address lookup module", "module name" ) );
		settings->push_back( Setting( "dc", "do-config", "writes main map config file", "" ) );
		settings->push_back( Setting( "dd", "do-del-tmp", "deletes temporary files", "" ) );
		settings->push_back( Setting( "m", "do-package", "packages modules", "" ) );
		settings->push_back( Setting( "mb", "module-block-size", "block size used for packaged map modules", "integer" ) );
		settings->push_back( Setting( "md", "module-dictionary-size", "block size used for packaged map modules", "integer" ) );

		settings->push_back( Setting( "l", "log", "writes log to file", "filename" ) );

		settings->push_back( Setting( "s", "settings", "use settings file", "settings filename" ) );

		settings->push_back( Setting( "v", "verbose", "verbose logging", "" ) );

		settings->push_back( Setting( "t", "threads", "number of threads", "integer" ) );

		settings->push_back( Setting( "h", "help", "displays this help page", "" ) );

		return true;
	}
Esempio n. 22
0
	void AssetsManager::OnInit() {

		string stringsPath = ofToDataPath(PATH_STRINGS);
		auto xmlDoc = LoadResourcesXml(stringsPath);

		if (xmlDoc) {
			for (auto stringNode : xmlDoc->child("resources").children("string")) {
				string key = stringNode.attribute("name").as_string();
				string value = stringNode.value();

				if (!key.empty() && !value.empty()) {
					strings[key] = value;
				}
			}
		}

		string dimensionsPath = ofToDataPath(PATH_DIMENSIONS);
		xmlDoc = LoadResourcesXml(dimensionsPath);
		if (xmlDoc) {
			for (auto dimenNode : xmlDoc->child("resources").children("string")) {
				string key = dimenNode.attribute("name").as_string();
				string value = dimenNode.value();

				if (!key.empty() && !value.empty()) {
					dimensions[key] = value;
				}
			}
		}

		string globalSettings = ofToDataPath(PATH_GLOBAL_SETTINGS);
		xmlDoc = LoadResourcesXml(globalSettings);
		if (xmlDoc) {
			auto resources = xmlDoc->child("resources");
			loadedGlobalSettings.LoadFromXml(resources);
		}

		string defaultSettings = ofToDataPath(PATH_DEFAULT_SETTINGS);
		xmlDoc = LoadResourcesXml(defaultSettings);
		if (xmlDoc) {
			auto resources = xmlDoc->child("resources");
			loadedDefaultSettings.LoadFromXml(resources);
		}

		string projectSettings = ofToDataPath(PATH_PROJECT_SETTINGS);
		xmlDoc = LoadResourcesXml(projectSettings);
		if (xmlDoc) {
			auto resources = xmlDoc->child("resources");
			loadedProjectSettings.LoadFromXml(resources);
		}

		string animationsPath = ofToDataPath(PATH_ANIMATIONS);
		xmlDoc = LoadResourcesXml(animationsPath);
		if (xmlDoc) {
			auto animLoader = AnimLoader();
			auto rootAnims = vector<spt<GeneralAnim>>();

			auto builder = [](void) {
				return new SheetAnim();
			};

			auto resources = xmlDoc->child("resources");
			animLoader.LoadAnimationsFromXml(resources, rootAnims, builder);


			// store animation
			for (spt<GeneralAnim> anim : rootAnims) {
				anim = static_pointer_cast<SheetAnim>(anim);
				StoreAnimation(anim);
			}
		}


		string attrAnimationsPath = ofToDataPath(PATH_ATTRANIMATIONS);
		xmlDoc = LoadResourcesXml(attrAnimationsPath);
		if (xmlDoc) {
			auto animLoader = AnimLoader();
			auto rootAnims = vector<spt<GeneralAnim>>();

			auto builder = [](void) {
				return new AttribAnim();
			};

			auto resources = xmlDoc->child("resources");
			animLoader.LoadAnimationsFromXml(resources, rootAnims, builder);

			// store animation
			for (spt<GeneralAnim> anim : rootAnims) {
				anim = static_pointer_cast<AttribAnim>(anim);
				StoreAnimation(anim);
			}
		}

		string transformsPath = ofToDataPath(PATH_TRANSFORMS);
		xmlDoc = LoadResourcesXml(transformsPath);
		if (xmlDoc) {
			auto resources = xmlDoc->child("resources");
			int indexCtr = 0;
			for (auto transNode : resources.children("transform")) {
				spt<TransformEnt> trans = spt<TransformEnt>(new TransformEnt());
				Setting defaultSet = GetDefaultSettings("transform");
				trans->LoadFromXml(transNode, defaultSet);

				COGASSERT(!trans->name.empty(), "Resources", "Transform entity on index %d in configuration file must have a name!", indexCtr);

				StoreEntity(trans->name, trans);
				indexCtr++;
			}
		}


		string behaviorsPath = ofToDataPath(PATH_BEHAVIORS);
		xmlDoc = LoadResourcesXml(behaviorsPath);
		if (xmlDoc) {
			auto resources = xmlDoc->child("resources");
			int indexCtr = 0;
			for (auto behNode : resources.children("behavior")) {
				spt<BehaviorEnt> ent = spt<BehaviorEnt>(new BehaviorEnt());

				auto dummySet = Setting();
				ent->LoadFromXml(behNode, dummySet);

				COGASSERT(!ent->name.empty(), "Resources", "Behavior entity on index %d in configuration file must have a name!", indexCtr);

				StoreEntity(ent->name, ent);
				indexCtr++;
			}
		}


		string spriteSheetsPath = ofToDataPath(PATH_SPRITESHEETS);
		xmlDoc = LoadResourcesXml(spriteSheetsPath);
		if (xmlDoc) {
			auto resources = xmlDoc->child("resources");

			for (auto sheetNode : resources.children("spriteatlas")) {

				string atlasName = sheetNode.attribute("name").as_string();
				string img = sheetNode.attribute("img").as_string();
				if (img.empty()) throw new IllegalArgumentException("Sprite atlas must have img specified!");

				auto spriteSheets = sheetNode.children("spritesheet");

				SpriteSheetBuilder bld;

				if (spriteSheets.begin() == spriteSheets.end()) {
					// no sprite sheet -> the sprite atlas itself is the only one sprite sheet 
					bld.LoadFromXml(sheetNode, img, atlasName);
					spt<SpriteSheet> spriteSheet = spt<SpriteSheet>(bld.Build());
					this->StoreSpriteSheet(spriteSheet);
				}
				else {
					for (auto spriteSheetDesc : spriteSheets) {
						bld.LoadFromXml(spriteSheetDesc, img, atlasName);
						spt<SpriteSheet> spriteSheet = spt<SpriteSheet>(bld.Build());
						this->StoreSpriteSheet(spriteSheet);
					}
				}
			}
		}
	}
Esempio n. 23
0
FileLoggingStrategy::FileLoggingStrategy()
    : _impl(nullptr)
{
    Setting("Logging.Filename").Register("default.log");
    this->_impl = new FileLoggingStrategy_Impl(this, Setting("Logging.Filename").AsString());
}