Made Animations & Transitions preference turns new graphical stuff off

This commit is contained in:
Mark Watkins 2011-12-21 03:41:41 +10:00
parent 1a9ec935c3
commit 8aadf42cef
4 changed files with 14 additions and 8 deletions

View File

@ -2184,7 +2184,7 @@ void gGraphView::renderSomethingFun()
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(35.0f,(GLfloat)w/(GLfloat)h,0.1f,100.0f);
gluPerspective(45.0f,(GLfloat)w/(GLfloat)h,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
@ -2408,6 +2408,7 @@ bool gGraphView::renderGraphs()
}
void gGraphView::fadeOut()
{
if (!PROFILE.ExistsAndTrue("AnimationsAndTransitions")) return;
//if (m_fadingOut) {
// return;
// }
@ -2440,6 +2441,10 @@ void gGraphView::fadeOut()
void gGraphView::fadeIn(bool dir)
{
m_tooltip->cancel();
if (!PROFILE.ExistsAndTrue("AnimationsAndTransitions")) {
updateGL();
return;
}
if (m_fadingIn) {
m_fadingIn=false;
@ -2469,7 +2474,7 @@ void gGraphView::paintGL()
redrawtimer->stop();
}
bool something_fun=PROFILE.ExistsAndTrue("EmptyGraphFun");
bool something_fun=PROFILE.ExistsAndTrue("AnimationsAndTransitions");
if (width()<=0) return;
if (height()<=0) return;

View File

@ -135,6 +135,7 @@ MainWindow::MainWindow(QWidget *parent) :
if (!PROFILE.Exists("OxiDiscardThreshold")) PROFILE["OxiDiscardThreshold"]=10;
if (!PROFILE.Exists("ComplianceHours")) PROFILE["ComplianceHours"]=4;
if (!PROFILE.Exists("ShowCompliance")) PROFILE["ShowCompliance"]=true;
if (!PROFILE.Exists("AnimationsAndTransitions")) PROFILE["AnimationsAndTransitions"]=true;
//ui->actionUse_AntiAliasing->setChecked(PROFILE["UseAntiAliasing"].toBool());
ui->action_Link_Graph_Groups->setChecked(PROFILE["LinkGroups"].toBool());

View File

@ -171,7 +171,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent,Profile * _profile) :
general["GraphHeight"]=Preference(p_profile,"GraphHeight",PT_Spinbox,tr("Graph Height"),tr("Default Graph Height"),160);
general["MaskDescription"]=Preference(p_profile,"MaskDescription",PT_LineEdit,tr("Mask Description"),tr("Whatever you want to record about your mask."),QString());
general["HighResPrinting"]=Preference(p_profile,"HighResPrinting",PT_Checkbox,tr("High Resolution Printing"),tr("Use much slower but better quality high resolution printing."),true);
general["EmptyGraphFun"]=Preference(p_profile,"EmptyGraphFun",PT_Checkbox,tr("Less Boring Empty Graph Pages"),tr("Make empty graph pages more attractive."),false);
general["AnimationsAndTransitions"]=Preference(p_profile,"AnimationsAndTransitions",PT_Checkbox,tr("Animations and Transitions"),tr("Make empty graph pages, and switching days more attractive."),false);
general["ShowCompliance"]=Preference(p_profile,"ShowCompliance",PT_Checkbox,tr("Show Compliance Information"),tr("Allow compliance information to be shown."),true);
general["ComplianceHours"]=Preference(p_profile,"ComplianceHours",PT_Spinbox,tr("Compliance Hours"),tr("Regard days over this combined session length as compliant."),4.0);
@ -201,7 +201,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent,Profile * _profile) :
ui->skipEmptyDays->setChecked(general["SkipEmptyDays"].value().toBool());
ui->enableMultithreading->setChecked(general["EnableMultithreading"].value().toBool());
ui->cacheSessionData->setChecked(general["MemoryHog"].value().toBool());
ui->lessBoringEmptyGraphPages->setChecked(general["EmptyGraphFun"].value().toBool());
ui->animationsAndTransitionsCheckbox->setChecked(general["AnimationsAndTransitions"].value().toBool());
ui->complianceGroupbox->setChecked(general["ShowCompliance"].value().toBool());
ui->complianceHours->setValue(general["ComplianceHours"].value().toDouble());
@ -332,7 +332,7 @@ void PreferencesDialog::Save()
general["MemoryHog"].setValue(ui->cacheSessionData->isChecked());
general["MaskDescription"].setValue(ui->maskDescription->text());
general["HighResPrinting"].setValue(ui->highResolutionPrinting->isChecked());
general["EmptyGraphFun"].setValue(ui->lessBoringEmptyGraphPages->isChecked());
general["AnimationsAndTransitions"].setValue(ui->animationsAndTransitionsCheckbox->isChecked());
general["ShowCompliance"].setValue(ui->complianceGroupbox->isChecked());
general["ComplianceHours"].setValue(ui->complianceHours->value());

View File

@ -38,7 +38,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>6</number>
<number>7</number>
</property>
<widget class="QWidget" name="importTab">
<attribute name="title">
@ -1617,9 +1617,9 @@ this application to be unstable with this feature enabled.</string>
</widget>
</item>
<item>
<widget class="QCheckBox" name="lessBoringEmptyGraphPages">
<widget class="QCheckBox" name="animationsAndTransitionsCheckbox">
<property name="text">
<string>Less Boring Empty Graph Pages</string>
<string>Animation &amp;&amp; Transitions</string>
</property>
</widget>
</item>