void StateGraphViewerPanel::renderToSVG(const wxString &Filename) { auto const Res = seec::Resource("TraceViewer") ["GUIText"]["Graph"]["RenderToSVG"]; if (!CurrentGraphSVG || CurrentGraphSVG->empty()) { wxMessageDialog Dlg(this, towxString(Res["NoGraphMessage"]), towxString(Res["NoGraphTitle"])); Dlg.ShowModal(); return; } wxTempFile Out(Filename); if (!Out.Write(*CurrentGraphSVG)) { wxMessageDialog Dlg(this, towxString(Res["GraphWriteFailedMessage"]), towxString(Res["GraphWriteFailedTitle"])); Dlg.ShowModal(); return; } if (!Out.Commit()) { Out.Discard(); return; } }
void tab_quality_video::updateControls(int what_to_update) { if (what_to_update == UPDATE_ALL) { //the rest for (int i = 5; i < 7; i++) { ctrl_qa_Boxes[i]->SetValue(intSettings[QA_CBOX[i].key]); } for (int i = 0; i < ctrl_vo_Boxes_size; i++) { ctrl_vo_Boxes[i]->SetValue(intSettings[VO_CBOX[i].key]); } } if (what_to_update == UPDATE_VIDEO_MODE || what_to_update == UPDATE_ALL) { ctrl_x_res->SetValue(wxString::Format( _("%d"),intSettings[RC_TEXT[0].key])); ctrl_y_res->SetValue(wxString::Format( _("%d"),intSettings[RC_TEXT[1].key])); } if (what_to_update == UPDATE_QA_BOXES || what_to_update == UPDATE_ALL) { //option 7-9 are not on presets for (int i = 0; i < 9; i++) { ctrl_qa_Boxes[i]->SetValue(intSettings[QA_CBOX[i].key]); } for (int i = 10; i < ctrl_qa_Boxes_size; i++) { ctrl_qa_Boxes[i]->SetValue(intSettings[QA_CBOX[i].key]); } m_enable_w4 = false; int waterOptIndex = 0; int waterSetting = intSettings[WR_COMBOX[0].key]; switch (waterSetting) { case 0: case 1: waterOptIndex = waterSetting; break; case 2: waterOptIndex = 3; break; case 3: waterOptIndex = 2; break; case 4: waterOptIndex = 4; m_enable_w4 = true; break; } ctrl_waterQ_CBox->SetValue(WR_COMBOX_CHOICES[waterOptIndex]); int useFSAA = intSettings[VO_SLI_EXT[0].key]; int FSAALev = intSettings[VO_SLI[0].key]; ctrl_fsaa_slider->SetValue((useFSAA == 1)? FSAALev: 0); switch (intSettings[VO_RBUT[0].key]) { case 16: { ctrl_z_radio1->SetValue(1); } break; case 24: { ctrl_z_radio2->SetValue(1); } break; } } if (what_to_update == UPDATE_W4_CONTROLS || what_to_update == UPDATE_ALL) { for ( unsigned int i = 0; i < m_w4_controls.size(); ++i ) { wxControl* tmp = m_w4_controls[i]; tmp->Enable( m_enable_w4 ); switch ( i ) { case 0: case 1: case 2: case 3: ( (wxCheckBox*)tmp )->SetValue( intSettings[W4_CONTROLS[i].key ] ); break; case 4:{ int val = intSettings[W4_CONTROLS[i].key ]; for ( unsigned int j = 0; j < sizeof(W4_TEXSIZE_CHOICES)/sizeof(W4_TEXSIZE_CHOICES[0]); ++j){ if ( W4_TEXSIZE_CHOICES[j] == towxString( val ) ) ( (wxComboBox*)tmp)->SetValue( W4_TEXSIZE_CHOICES[ j ] ); } } break; case 5: ( (wxComboBox*)tmp)->SetValue( W4_REFRACTION_CHOICES[ intSettings[W4_CONTROLS[i].key ] ] ); break; case 6: //doesn't work if catsed from wxControl like the others double tmpval = double(floatSettings[W4_CONTROLS[i].key ]) ; m_aniso_spin->SetValue(tmpval); break; } } } }