[Kst] branches/work/kst/1.1/kst/kst
George Staikos
staikos at kde.org
Tue Oct 25 17:50:23 CEST 2005
SVN commit 474138 by staikos:
Add an option, default=on, that overrides plot timezone settings to UTC
BUG: 114364
M +3 -2 kst2dplot.cpp
M +6 -0 kstsettings.cpp
M +1 -0 kstsettings.h
M +27 -1 kstsettingsdlg.ui
M +3 -0 kstsettingsdlg.ui.h
--- branches/work/kst/1.1/kst/kst/kst2dplot.cpp #474137:474138
@@ -1354,8 +1354,9 @@
accuracy = 0;
}
}
-
- if (axisTimezoneLocal) {
+
+ if (KstSettings::globalSettings()->useUTC) {
+ } else if (axisTimezoneLocal) {
dJD += timezoneHrs() / 24.0;
} else {
dJD += axisTimezoneHrs / 24.0;
--- branches/work/kst/1.1/kst/kst/kstsettings.cpp #474137:474138
@@ -52,6 +52,8 @@
emailEncryption = EMailEncryptionNone;
emailAuthentication = EMailAuthenticationPLAIN;
+ useUTC = true;
+
printing.pageSize = QString::number((int)KPrinter::Letter);
printing.orientation = "Landscape";
printing.plotDateTimeFooter = "0";
@@ -105,6 +107,8 @@
printing.curveWidthAdjust = x.printing.curveWidthAdjust;
printing.monochrome = x.printing.monochrome;
+ useUTC = x.useUTC;
+
return *this;
}
@@ -138,6 +142,7 @@
cfg.writeEntry("Foreground Color", foregroundColor);
cfg.writeEntry("Prompt on Window Close", promptWindowClose);
cfg.writeEntry("Show QuickStart", showQuickStart);
+ cfg.writeEntry("Use UTC", useUTC);
cfg.setGroup("Grid Lines");
cfg.writeEntry("X Major", xMajor);
@@ -189,6 +194,7 @@
foregroundColor = cfg.readColorEntry("Foreground Color", &foregroundColor);
promptWindowClose = cfg.readBoolEntry("Prompt on Window Close", true);
showQuickStart = cfg.readBoolEntry("Show QuickStart", true);
+ useUTC = cfg.readBoolEntry("Use UTC", true);
cfg.setGroup("Grid Lines");
xMajor = cfg.readBoolEntry("X Major", false);
--- branches/work/kst/1.1/kst/kst/kstsettings.h #474137:474138
@@ -64,6 +64,7 @@
bool minorGridColorDefault : 1;
bool xAxisInterpret : 1;
bool yAxisInterpret : 1;
+ bool useUTC : 1;
QColor majorColor;
QColor minorColor;
--- branches/work/kst/1.1/kst/kst/kstsettingsdlg.ui #474137:474138
@@ -136,6 +136,25 @@
</widget>
<widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3">
<property name="name">
+ <cstring>_utc</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Display all times in UTC</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="3">
+ <property name="name">
<cstring>_promptWindowClose</cstring>
</property>
<property name="sizePolicy">
@@ -150,7 +169,7 @@
<string>Prompt before closing windows</string>
</property>
</widget>
- <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="4">
+ <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>_showQuickStart</cstring>
</property>
@@ -1049,6 +1068,12 @@
<receiver>KstSettingsDlg</receiver>
<slot>updateEMailSettings()</slot>
</connection>
+ <connection>
+ <sender>_utc</sender>
+ <signal>clicked()</signal>
+ <receiver>KstSettingsDlg</receiver>
+ <slot>setDirty()</slot>
+ </connection>
</connections>
<tabstops>
<tabstop>tabWidget2</tabstop>
@@ -1064,6 +1089,7 @@
<tabstop>_checkBoxXInterpret</tabstop>
<tabstop>_comboBoxXInterpret</tabstop>
<tabstop>_comboBoxXDisplay</tabstop>
+ <tabstop>_utc</tabstop>
<tabstop>_promptWindowClose</tabstop>
<tabstop>_showQuickStart</tabstop>
<tabstop>_source</tabstop>
--- branches/work/kst/1.1/kst/kst/kstsettingsdlg.ui.h #474137:474138
@@ -56,6 +56,7 @@
_checkBoxAuthentication->setChecked(settings->emailRequiresAuthentication);
_buttonGroupEncryption->setButton((int)settings->emailEncryption);
_buttonGroupAuthentication->setButton((int)settings->emailAuthentication);
+ _utc->setChecked(settings->useUTC);
}
@@ -107,6 +108,8 @@
s.emailSMTPPort = _kIntSpinBoxEMailPort->value();
s.emailRequiresAuthentication = _checkBoxAuthentication->isChecked();
+ s.useUTC = _utc->isChecked();
+
int value = _buttonGroupEncryption->id(_buttonGroupEncryption->selected());
if (value >= 0 && value < EMailEncryptionMAXIMUM) {
s.emailEncryption = (EMailEncryption)value;
More information about the Kst
mailing list