本文整理汇总了C++中StHandle::changeValues方法的典型用法代码示例。如果您正苦于以下问题:C++ StHandle::changeValues方法的具体用法?C++ StHandle::changeValues怎么用?C++ StHandle::changeValues使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StHandle
的用法示例。
在下文中一共展示了StHandle::changeValues方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: aLangMap
StOutAnaglyph::StOutAnaglyph(const StNativeWin_t theParentWindow)
: StWindow(theParentWindow),
mySettings(new StSettings(ST_OUT_PLUGIN_NAME)),
myFrBuffer(new StGLStereoFrameBuffer()),
myStereoProgram(NULL),
mySimpleAnaglyph("Anaglyph Simple"),
myGrayAnaglyph("Anaglyph Gray"),
myTrueAnaglyph("Anaglyph True"),
myOptimAnaglyph("Anaglyph Optimized"),
myYellowAnaglyph("Anaglyph Yellow"),
myYellowDubiosAnaglyph("Anaglyph Yellow Dubios"),
myGreenAnaglyph("Anaglyph Green"),
myToSavePlacement(theParentWindow == (StNativeWin_t )NULL),
myToCompressMem(myInstancesNb.increment() > 1),
myIsBroken(false) {
StTranslations aLangMap(ST_OUT_PLUGIN_NAME);
myStereoProgram = &mySimpleAnaglyph;
// about string
StString& aTitle = aLangMap.changeValueId(STTR_PLUGIN_TITLE, "sView - Anaglyph Output module");
StString& aVerString = aLangMap.changeValueId(STTR_VERSION_STRING, "version");
StString& aDescr = aLangMap.changeValueId(STTR_PLUGIN_DESCRIPTION,
"(C) 2007-2014 Kirill Gavrilov <[email protected]>\nOfficial site: www.sview.ru\n\nThis library distributed under LGPL3.0");
myAbout = aTitle + '\n' + aVerString + ": " + StVersionInfo::getSDKVersionString() + "\n \n" + aDescr;
// devices list
StHandle<StOutDevice> aDevice = new StOutDevice();
aDevice->PluginId = ST_OUT_PLUGIN_NAME;
aDevice->DeviceId = "Anaglyph";
aDevice->Priority = ST_DEVICE_SUPPORT_LOW; // anaglyph could be run on every display...
aDevice->Name = aLangMap.changeValueId(STTR_ANAGLYPH_NAME, "Anaglyph glasses");
aDevice->Desc = aLangMap.changeValueId(STTR_ANAGLYPH_DESC, "Simple glasses with color-filters");
myDevices.add(aDevice);
// Glasses switch option
StHandle<StEnumParam> aGlasses = new StEnumParam(GLASSES_TYPE_REDCYAN,
aLangMap.changeValueId(STTR_ANAGLYPH_GLASSES, "Glasses type"));
aGlasses->changeValues().add(aLangMap.changeValueId(STTR_ANAGLYPH_REDCYAN, "Red-cyan"));
aGlasses->changeValues().add(aLangMap.changeValueId(STTR_ANAGLYPH_YELLOW, "Yellow-Blue"));
aGlasses->changeValues().add(aLangMap.changeValueId(STTR_ANAGLYPH_GREEN, "Green-Magenta"));
aGlasses->signals.onChanged.connect(this, &StOutAnaglyph::doSetShader);
params.Glasses = aGlasses;
// Red-cyan filter switch option
StHandle<StEnumParam> aFilterRC = new StEnumParam(REDCYAN_MODE_SIMPLE,
aLangMap.changeValueId(STTR_ANAGLYPH_REDCYAN_MENU, "Red-Cyan filter"));
aFilterRC->changeValues().add(aLangMap.changeValueId(STTR_ANAGLYPH_REDCYAN_SIMPLE, "Simple"));
aFilterRC->changeValues().add(aLangMap.changeValueId(STTR_ANAGLYPH_REDCYAN_OPTIM, "Optimized"));
aFilterRC->changeValues().add(aLangMap.changeValueId(STTR_ANAGLYPH_REDCYAN_GRAY, "Grayed"));
aFilterRC->changeValues().add(aLangMap.changeValueId(STTR_ANAGLYPH_REDCYAN_DARK, "Dark"));
aFilterRC->signals.onChanged.connect(this, &StOutAnaglyph::doSetShader);
params.RedCyan = aFilterRC;
// Amber-Blue filter switch option
StHandle<StEnumParam> aFilterAB = new StEnumParam(AMBERBLUE_MODE_SIMPLE,
aLangMap.changeValueId(STTR_ANAGLYPH_AMBERBLUE_MENU, "Yellow filter"));
aFilterAB->changeValues().add(aLangMap.changeValueId(STTR_ANAGLYPH_AMBERBLUE_SIMPLE, "Simple"));
aFilterAB->changeValues().add(aLangMap.changeValueId(STTR_ANAGLYPH_AMBERBLUE_DUBIOS, "Dubios"));
aFilterAB->signals.onChanged.connect(this, &StOutAnaglyph::doSetShader);
params.AmberBlue = aFilterAB;
// load window position
StRect<int32_t> aRect(256, 768, 256, 1024);
mySettings->loadInt32Rect(ST_SETTING_WINDOWPOS, aRect);
StWindow::setPlacement(aRect, true);
StWindow::setTitle("sView - Anaglyph Renderer");
// load glasses settings
mySettings->loadParam(ST_SETTING_GLASSES, params.Glasses);
mySettings->loadParam(ST_SETTING_REDCYAN, params.RedCyan);
mySettings->loadParam(ST_SETTING_AMBERBLUE, params.AmberBlue);
}
示例2: aLangMap
StOutIZ3D::StOutIZ3D(const StHandle<StResourceManager>& theResMgr,
const StNativeWin_t theParentWindow)
: StWindow(theResMgr, theParentWindow),
mySettings(new StSettings(theResMgr, ST_OUT_PLUGIN_NAME)),
myFrBuffer(new StGLStereoFrameBuffer()),
myToCompressMem(myInstancesNb.increment() > 1),
myIsBroken(false) {
const StSearchMonitors& aMonitors = StWindow::getMonitors();
StTranslations aLangMap(getResourceManager(), ST_OUT_PLUGIN_NAME);
// about string
StString& aTitle = aLangMap.changeValueId(STTR_PLUGIN_TITLE, "sView - iZ3D Output module");
StString& aVerString = aLangMap.changeValueId(STTR_VERSION_STRING, "version");
StString& aDescr = aLangMap.changeValueId(STTR_PLUGIN_DESCRIPTION,
"(C) {0} Kirill Gavrilov <{1}>\nOfficial site: {2}\n\nThis library is distributed under LGPL3.0");
myAbout = aTitle + '\n' + aVerString + " " + StVersionInfo::getSDKVersionString() + "\n \n"
+ aDescr.format("2009-2015", "[email protected]", "www.sview.ru");
// detect connected displays
int aSupportLevel = ST_DEVICE_SUPPORT_NONE;
for(size_t aMonIter = 0; aMonIter < aMonitors.size(); ++aMonIter) {
const StMonitor& aMon = aMonitors[aMonIter];
if(isFrontDisplay(aMon.getPnPId())
|| isBackDisplay (aMon.getPnPId())) {
aSupportLevel = ST_DEVICE_SUPPORT_PREFER; // we sure that iZ3D connected
break;
}/* else if(aMon.getPnPId() == IZ3D_MODEL_MATROXTH2GO0
|| aMon.getPnPId() == IZ3D_MODEL_MATROXTH2GO1) {
aSupportLevel = ST_DEVICE_SUPPORT_FULL; // is it possible
}*/
}
// devices list
StHandle<StOutDevice> aDevice = new StOutDevice();
aDevice->PluginId = ST_OUT_PLUGIN_NAME;
aDevice->DeviceId = "iZ3D";
aDevice->Priority = aSupportLevel;
aDevice->Name = aLangMap.changeValueId(STTR_IZ3D_NAME, "IZ3D Display");
aDevice->Desc = aLangMap.changeValueId(STTR_IZ3D_DESC, "IZ3D Display");
myDevices.add(aDevice);
// shader switch option
StHandle<StEnumParam> aGlasses = new StEnumParam(myShaders.getMode(),
aLangMap.changeValueId(STTR_PARAMETER_GLASSES, "iZ3D glasses"));
aGlasses->changeValues().add(aLangMap.changeValueId(STTR_PARAMETER_GLASSES_CLASSIC, "Classic"));
aGlasses->changeValues().add(aLangMap.changeValueId(STTR_PARAMETER_GLASSES_MODERN, "Modern"));
aGlasses->changeValues().add(aLangMap.changeValueId(STTR_PARAMETER_GLASSES_CLASSIC_FAST, "Classic (fast)"));
aGlasses->signals.onChanged.connect(&myShaders, &StOutIZ3DShaders::doSetMode);
params.Glasses = aGlasses;
// load window position
if(isMovable()) {
StRect<int32_t> aRect;
if(!mySettings->loadInt32Rect(ST_SETTING_WINDOWPOS, aRect)) {
aRect = defaultRect();
}
StWindow::setPlacement(aRect, true);
}
StWindow::setTitle("sView - iZ3D Renderer");
// load parameters
mySettings->loadParam(ST_SETTING_TABLE, params.Glasses);
// request slave window
StWindow::setAttribute(StWinAttr_SlaveCfg, StWinSlave_slaveSync);
}