Game3Controller(int identifier, int windowWidth, int windowsHeight) : BaseGameController(identifier, "Game3", windowWidth, windowsHeight, ofColor(255, 127, 43)) { addRenderer(new CurvesBackgroundRenderer(0,0,windowWidth, windowsHeight)); addRenderer(new CurversRenderer(0,0,windowWidth, windowsHeight)); }
StDiagnostics::StDiagnostics(const StHandle<StResourceManager>& theResMgr, const StNativeWin_t theParentWin, const StHandle<StOpenInfo>& theOpenInfo) : StApplication(theResMgr, theParentWin, theOpenInfo) { myTitle = "sView - Stereoscopic Device Diagnostics"; params.IsFullscreen = new StBoolParam(false); params.IsFullscreen->signals.onChanged.connect(this, &StDiagnostics::doFullscreen); myGUI = new StDiagnosticsGUI(this); #if defined(__ANDROID__) addRenderer(new StOutInterlace (myResMgr, theParentWin)); addRenderer(new StOutAnaglyph (myResMgr, theParentWin)); addRenderer(new StOutDistorted (myResMgr, theParentWin)); #else addRenderer(new StOutAnaglyph (myResMgr, theParentWin)); addRenderer(new StOutDual (myResMgr, theParentWin)); addRenderer(new StOutIZ3D (myResMgr, theParentWin)); addRenderer(new StOutInterlace (myResMgr, theParentWin)); addRenderer(new StOutDistorted (myResMgr, theParentWin)); addRenderer(new StOutPageFlipExt(myResMgr, theParentWin)); #endif // create actions StHandle<StAction> anAction; anAction = new StActionBool(stCString("DoFullscreen"), params.IsFullscreen); addAction(Action_Fullscreen, anAction, ST_VK_F, ST_VK_RETURN); anAction = new StActionIntSlot(stCString("DoStereoModeOn"), stSlot(this, &StDiagnostics::doStereoMode), 1); addAction(Action_StereoModeOn, anAction, ST_VK_S); anAction = new StActionIntSlot(stCString("DoStereoModeOff"), stSlot(this, &StDiagnostics::doStereoMode), 0); addAction(Action_StereoModeOff, anAction, ST_VK_M); }
QgsRendererV2Registry::QgsRendererV2Registry() { // add default renderers addRenderer( new QgsRendererV2Metadata( "singleSymbol", QObject::tr( "Single Symbol" ), QgsSingleSymbolRendererV2::create, QgsSingleSymbolRendererV2::createFromSld ) ); addRenderer( new QgsRendererV2Metadata( "categorizedSymbol", QObject::tr( "Categorized" ), QgsCategorizedSymbolRendererV2::create ) ); addRenderer( new QgsRendererV2Metadata( "graduatedSymbol", QObject::tr( "Graduated" ), QgsGraduatedSymbolRendererV2::create ) ); addRenderer( new QgsRendererV2Metadata( "RuleRenderer", QObject::tr( "Rule-based" ), QgsRuleBasedRendererV2::create, QgsRuleBasedRendererV2::createFromSld ) ); addRenderer( new QgsRendererV2Metadata( "pointDisplacement", QObject::tr( "Point displacement" ), QgsPointDisplacementRenderer::create ) ); addRenderer( new QgsRendererV2Metadata( "invertedPolygonRenderer", QObject::tr( "Inverted polygons" ), QgsInvertedPolygonRenderer::create ) ); addRenderer( new QgsRendererV2Metadata( "heatmapRenderer", QObject::tr( "Heatmap" ), QgsHeatmapRenderer::create ) ); }
void PropertyBoxObject::addRenderer() { if (renderers->GetSelectedText() == "Renderer") { addRenderer(ComponentTypes::STANDARD); return; } if (renderers->GetSelectedText() == "Animation") { addRenderer(ComponentTypes::SCML); return; } }
void Graph::construct() { int i; centralWidget=new QTabWidget(this); centralWidget->setTabsClosable(false); setWidget(centralWidget); connect(centralWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(clearRenderer(int))); for(i=0; i<6; i++) renderers[i] = new HistogramOpenGLRenderer(this); renderers[RED]->setPrimaryColor(1.0, 0.0, 0.0); renderers[RED]->setSecondaryColor(1.0, 1.0, 1.0); renderers[GREEN]->setPrimaryColor(0.0, 1.0, 0.0); renderers[GREEN]->setSecondaryColor(1.0, 1.0, 1.0); renderers[BLUE]->setPrimaryColor(0.0, 0.0, 1.0); renderers[BLUE]->setSecondaryColor(1.0, 1.0, 1.0); renderers[HUE]->setPrimaryColor(0.3, 0.4, 0.5); renderers[HUE]->setSecondaryColor(1.0, 1.0, 1.0); renderers[SATURATION]->setPrimaryColor(0.5, 0.5, 0.5); renderers[SATURATION]->setSecondaryColor(1.0, 1.0, 1.0); renderers[VALUE]->setPrimaryColor(0.5, 0.4, 0.3); renderers[VALUE]->setSecondaryColor(1.0, 1.0, 1.0); addRenderer(Main::instance().translate("MainWindow", "Red"), renderers[RED]); addRenderer(Main::instance().translate("MainWindow", "Green"), renderers[GREEN]); addRenderer(Main::instance().translate("MainWindow", "Blue"), renderers[BLUE]); addRenderer(Main::instance().translate("MainWindow", "Hue"), renderers[HUE]); addRenderer(Main::instance().translate("MainWindow", "Saturation"), renderers[SATURATION]); addRenderer(Main::instance().translate("MainWindow", "Value"), renderers[VALUE]); centralWidget->setCurrentIndex(0); }
void PropertyBoxObject::build() { box = sfg::Box::Create(sfg::Box::VERTICAL); box->SetSpacing(3.0f); sfg::Button::Ptr _export = sfg::Button::Create("Export"); _export->GetSignal(sfg::Button::OnLeftClick).Connect(&LevelObject::exportObject, object); box->Pack(_export,false); sfg::Box::Ptr boxGeneral = sfg::Box::Create(sfg::Box::VERTICAL); { sfg::Box::Ptr nameBox = sfg::Box::Create(); { nameBox->Pack(sfg::Label::Create("Name:")); name = sfg::Entry::Create(); name->GetSignal(sfg::Entry::OnKeyPress).Connect(&PropertyBoxObject::setObjectName, this); nameBox->Pack(name); } boxGeneral->Pack(nameBox); sfg::Box::Ptr positionBox = sfg::Box::Create(); { positionBox->Pack(sfg::Label::Create("Position: ")); std::stringstream ss; ss << object->getPosition().x; positionX = sfg::Entry::Create(ss.str()); positionX->SetRequisition(sf::Vector2f(20.0f, 0.0f)); positionX->GetSignal(sfg::Widget::OnKeyPress).Connect(&PropertyBoxObject::setObjectPosition, this); positionBox->Pack(positionX); ss.str(""); ss << object->getPosition().y; positionY = sfg::Entry::Create(ss.str()); positionY->SetRequisition(sf::Vector2f(20.0f, 0.0f)); positionY->GetSignal(sfg::Widget::OnKeyPress).Connect(&PropertyBoxObject::setObjectPosition, this); positionBox->Pack(positionY); } boxGeneral->Pack(positionBox, false); sfg::Box::Ptr centerBox = sfg::Box::Create(); { centerBox->Pack(sfg::Label::Create("Center: ")); std::stringstream ss; ss << object->getCenter().x; centerX = sfg::Entry::Create(ss.str()); centerX->SetRequisition(sf::Vector2f(20.0f, 0.0f)); centerX->GetSignal(sfg::Widget::OnKeyPress).Connect(&PropertyBoxObject::setObjectCenter, this); centerBox->Pack(centerX); ss.str(""); ss << object->getCenter().y; centerY = sfg::Entry::Create(ss.str()); centerY->SetRequisition(sf::Vector2f(20.0f, 0.0f)); centerY->GetSignal(sfg::Widget::OnKeyPress).Connect(&PropertyBoxObject::setObjectCenter, this); centerBox->Pack(centerY); } boxGeneral->Pack(centerBox, false); sfg::Box::Ptr orientationBox = sfg::Box::Create(); { orientationBox->Pack(sfg::Label::Create("Orientation:")); orientation = sfg::ComboBox::Create(); orientation->AppendItem("Left"); orientation->AppendItem("Right"); orientation->GetSignal(sfg::ComboBox::OnSelect).Connect(&PropertyBoxObject::setObjectOrientation, this); orientationBox->Pack(orientation); } boxGeneral->Pack(orientationBox, false); } box->Pack(boxGeneral); box->Pack(sfg::Label::Create("AI")); box->Pack(sfg::Separator::Create()); deleteAi = sfg::Button::Create("delete"); deleteAi->GetSignal(sfg::Button::OnLeftClick).Connect(&PropertyBoxObject::doDeleteAi, this); deleteAi->Show(false); ais = sfg::ComboBox::Create(); ais->AppendItem("Plattform"); ais->AppendItem("Swing"); ais->AppendItem("Bubble"); ais->AppendItem("Jumper"); ais->AppendItem("Player"); ais->AppendItem("Enemy"); ais->AppendItem("Event"); ais->AppendItem("Shroom"); ais->AppendItem("Particle"); ais->AppendItem("Bomb"); ais->AppendItem(""); aBox = sfg::Box::Create(sfg::Box::VERTICAL); aBox->Pack(deleteAi); ais->GetSignal(sfg::ComboBox::OnSelect).Connect(&PropertyBoxObject::addAi, this); aBox->Pack(ais); if (object->getAiComponent()) { addAi(object->getAiComponent()->getType()); } box->Pack(aBox); box->Pack(sfg::Label::Create("RENDERER")); box->Pack(sfg::Separator::Create()); deleteRenderer = sfg::Button::Create("delete"); deleteRenderer->GetSignal(sfg::Button::OnLeftClick).Connect(&PropertyBoxObject::doDeleteRenderer, this); deleteRenderer->Show(false); renderers = sfg::ComboBox::Create(); renderers->AppendItem("Renderer"); renderers->AppendItem("Animation"); renderers->AppendItem(""); rBox = sfg::Box::Create(sfg::Box::VERTICAL); rBox->Pack(deleteRenderer); renderers->GetSignal(sfg::ComboBox::OnSelect).Connect(&PropertyBoxObject::addRenderer, this); rBox->Pack(renderers); if (object->getRendererComponent()) { addRenderer(object->getRendererComponent()->getType()); } box->Pack(rBox); box->Pack(sfg::Label::Create("BODY")); box->Pack(sfg::Separator::Create()); bBox = sfg::Box::Create(sfg::Box::VERTICAL); deleteBody = sfg::Button::Create("delete"); deleteBody->GetSignal(sfg::Button::OnLeftClick).Connect(&PropertyBoxObject::doDeleteBody, this); deleteBody->Show(false); bBox->Pack(deleteBody); addBody = sfg::Button::Create("Add Body"); addBody->GetSignal(sfg::Button::OnLeftClick).Connect(&PropertyBoxObject::doAddBody, this); bBox->Pack(addBody); if (object->hasBody) { doAddBody(); } else { addBody->Show(true); } box->Pack(bBox); }
QgsRendererRegistry::QgsRendererRegistry() { // add default renderers addRenderer( new QgsRendererMetadata( QStringLiteral( "nullSymbol" ), QObject::tr( "No symbols" ), QgsNullSymbolRenderer::create ) ); addRenderer( new QgsRendererMetadata( QStringLiteral( "singleSymbol" ), QObject::tr( "Single symbol" ), QgsSingleSymbolRenderer::create, QgsSingleSymbolRenderer::createFromSld ) ); addRenderer( new QgsRendererMetadata( QStringLiteral( "categorizedSymbol" ), QObject::tr( "Categorized" ), QgsCategorizedSymbolRenderer::create ) ); addRenderer( new QgsRendererMetadata( QStringLiteral( "graduatedSymbol" ), QObject::tr( "Graduated" ), QgsGraduatedSymbolRenderer::create ) ); addRenderer( new QgsRendererMetadata( QStringLiteral( "RuleRenderer" ), QObject::tr( "Rule-based" ), QgsRuleBasedRenderer::create, QgsRuleBasedRenderer::createFromSld ) ); addRenderer( new QgsRendererMetadata( QStringLiteral( "pointDisplacement" ), QObject::tr( "Point displacement" ), QgsPointDisplacementRenderer::create, QIcon(), nullptr, QgsRendererAbstractMetadata::PointLayer ) ); addRenderer( new QgsRendererMetadata( QStringLiteral( "pointCluster" ), QObject::tr( "Point cluster" ), QgsPointClusterRenderer::create, QIcon(), nullptr, QgsRendererAbstractMetadata::PointLayer ) ); addRenderer( new QgsRendererMetadata( QStringLiteral( "invertedPolygonRenderer" ), QObject::tr( "Inverted polygons" ), QgsInvertedPolygonRenderer::create, QIcon(), nullptr, QgsRendererAbstractMetadata::PolygonLayer ) ); addRenderer( new QgsRendererMetadata( QStringLiteral( "heatmapRenderer" ), QObject::tr( "Heatmap" ), QgsHeatmapRenderer::create, QIcon(), nullptr, QgsRendererAbstractMetadata::PointLayer ) ); addRenderer( new QgsRendererMetadata( QStringLiteral( "25dRenderer" ), QObject::tr( "2.5 D" ), Qgs25DRenderer::create, QIcon(), nullptr, QgsRendererAbstractMetadata::PolygonLayer ) ); }