Finish basic functionality

This commit is contained in:
LoudSnorer 2023-05-27 07:52:10 -04:00
parent 14aabf133b
commit d511d1b8d4
4 changed files with 13 additions and 1 deletions

View File

@ -27,6 +27,7 @@ AppWideSetting::AppWideSetting(Preferences *pref) : PrefSettings(pref)
// initPref(STR_AS_GraphSnapshots, true);
initPref(STR_AS_IncludeSerial, false);
initPref(STR_AS_MonochromePrinting, false);
initPref(STR_AS_AllowDisableSessions, false);
initPref(STR_AS_ShowPieChart, false);
m_animations = initPref(STR_AS_Animations, true).toBool();
m_squareWavePlots = initPref(STR_AS_SquareWave, false).toBool();

View File

@ -311,7 +311,9 @@ void DailySearchTab::populateControl() {
commandList->addItem(calculateMaxSize(tr("Daily Duration"),ST_DAILY_USAGE));
commandList->addItem(calculateMaxSize(tr("Session Duration" ),ST_SESSION_LENGTH));
commandList->addItem(calculateMaxSize(tr("Days Skipped"),ST_DAYS_SKIPPED));
commandList->addItem(calculateMaxSize(tr("Disabled Sessions"),ST_DISABLED_SESSIONS));
if ( AppSetting->allowDisableSessions() ) {
commandList->addItem(calculateMaxSize(tr("Disabled Sessions"),ST_DISABLED_SESSIONS));
}
commandList->addItem(calculateMaxSize(tr("Number of Sessions"),ST_SESSIONS_QTY));
//commandList->insertSeparator(commandList->count()); // separate from events

View File

@ -292,6 +292,8 @@ void MainWindow::SetupGUI()
ui->tabWidget->addTab(help, tr("Help Browser"));
#endif
setupRunning = false;
m_allowDisableSessions = AppSetting->allowDisableSessions();
}
void MainWindow::logMessage(QString msg)
@ -1398,6 +1400,12 @@ void MainWindow::on_action_Preferences_triggered()
setApplicationFont();
if (m_allowDisableSessions != AppSetting->allowDisableSessions() ) {
m_allowDisableSessions = AppSetting->allowDisableSessions();
reloadProfile();
};
if (daily) {
daily->RedrawGraphs();
}

View File

@ -404,6 +404,7 @@ private:
// gGraphView *SnapshotGraph;
QString bookmarkFilter;
bool m_restartRequired;
bool m_allowDisableSessions = false;
volatile bool m_inRecalculation;
void PopulatePurgeMenu();