Ignore:
Timestamp:
Jul 17, 2012, 12:17:25 PM (13 years ago)
Author:
Michael Ankele <ankele@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
2aafe8
Parents:
b82101
git-author:
Michael Ankele <ankele@…> (06/05/12 10:14:59)
git-committer:
Michael Ankele <ankele@…> (07/17/12 12:17:25)
Message:

GL: saving color settings (domainBox, dreinBein)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp

    rb82101 rc7e000  
    2424#include <QtGui/QToolBar>
    2525#include <Qt/qtimer.h>
     26#include <Qt/qsettings.h>
    2627#include <Qt3D/qglbuilder.h>
    2728#include <Qt3D/qglscenenode.h>
     
    113114void GLWorldView::createDomainBox()
    114115{
     116  QSettings settings;
     117  settings.beginGroup("WorldView");
     118  QColor colorFrame = settings.value("domainBoxColorFrame", QColor(150,160,200,255)).value<QColor>();
     119  QColor colorAmbient = settings.value("domainBoxColorAmbient", QColor(50,60,100,255)).value<QColor>();
     120  QColor colorDiffuse = settings.value("domainBoxColorDiffuse", QColor(150,160,200,180)).value<QColor>();
     121  settings.setValue("domainBoxColorFrame", colorFrame);
     122  settings.setValue("domainBoxColorAmbient", colorAmbient);
     123  settings.setValue("domainBoxColorDiffuse", colorDiffuse);
     124  settings.endGroup();
     125
    115126  domainBoxMaterial = new QGLMaterial;
    116127  domainBoxMaterial->setAmbientColor(QColor(0,0,0,255));
    117128  domainBoxMaterial->setDiffuseColor(QColor(0,0,0,255));
    118   domainBoxMaterial->setEmittedLight(QColor(150,160,200,255));
     129  domainBoxMaterial->setEmittedLight(colorFrame);
    119130
    120131
    121132  QGLMaterial *material = new QGLMaterial;
    122   material->setAmbientColor(QColor(50,60,100,255));
    123   material->setDiffuseColor(QColor(150,160,200,180));
     133  material->setAmbientColor(colorAmbient);
     134  material->setDiffuseColor(colorDiffuse);
    124135
    125136  QGLBuilder builder;
     
    135146void GLWorldView::createDreiBein()
    136147{
     148  QSettings settings;
     149  settings.beginGroup("WorldView");
     150  QColor colorX = settings.value("dreiBeinColorX", QColor(255,50,50,255)).value<QColor>();
     151  QColor colorY = settings.value("dreiBeinColorY", QColor(50,255,50,255)).value<QColor>();
     152  QColor colorZ = settings.value("dreiBeinColorZ", QColor(50,50,255,255)).value<QColor>();
     153  settings.setValue("dreiBeinColorX", colorX);
     154  settings.setValue("dreiBeinColorY", colorY);
     155  settings.setValue("dreiBeinColorZ", colorZ);
     156  settings.setValue("dreiBeinEnabled", true);
     157  settings.endGroup();
     158
    137159  // Create 3 color for the 3 axes.
    138160  dreiBeinMaterial[0] = new QGLMaterial;
    139   dreiBeinMaterial[0]->setColor(QColor(255,50,50,255));
     161  dreiBeinMaterial[0]->setColor(colorX);
    140162  dreiBeinMaterial[1] = new QGLMaterial;
    141   dreiBeinMaterial[1]->setColor(QColor(50,255,50,255));
     163  dreiBeinMaterial[1]->setColor(colorY);
    142164  dreiBeinMaterial[2] = new QGLMaterial;
    143   dreiBeinMaterial[2]->setColor(QColor(50,50,255,255));
     165  dreiBeinMaterial[2]->setColor(colorZ);
    144166
    145167  // Create the basic meshes (cylinder and cone).
Note: See TracChangeset for help on using the changeset viewer.