[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets
From: Andre Moreira Magalhaes <andrunko () yahoo ! com ! br>
Date: 2008-01-22 12:49:15
Message-ID: 1201006155.066419.28855.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 764724 by andrunko:
Improve clocks config dialogs.
Standardize strings (Eg. Show seconds in both clocks).
Improved layout.
Add the possibility to use local timezone on analog clock.
Other small improvements.
M +8 -2 analog-clock/clock.cpp
M +114 -39 analog-clock/clockConfig.ui
M +0 -1 digital-clock/clock.cpp
M +24 -11 digital-clock/clockConfig.ui
--- trunk/KDE/kdebase/workspace/plasma/applets/analog-clock/clock.cpp \
#764723:764724 @@ -50,7 +50,6 @@
: Plasma::Containment(parent, args),
m_showTimeString(false),
m_showSecondHand(false),
- m_timezone("Local"),
m_dialog(0)
{
setHasConfigurationInterface(true);
@@ -149,6 +148,8 @@
}
ui.timeZones->setSelected(m_timezone, true);
+ ui.timeZones->setEnabled(m_timezone != "Local");
+ ui.localTimeZone->setChecked(m_timezone == "Local");
ui.showTimeStringCheckBox->setChecked(m_showTimeString);
ui.showSecondHandCheckBox->setChecked(m_showSecondHand);
m_dialog->show();
@@ -165,7 +166,11 @@
update();
QStringList tzs = ui.timeZones->selection();
- if (tzs.count() > 0) {
+ if (ui.localTimeZone->checkState() == Qt::Checked) {
+ dataEngine("time")->disconnectSource(m_timezone, this);
+ m_timezone = "Local";
+ cg.writeEntry("timezone", m_timezone);
+ } else if (tzs.count() > 0) {
//TODO: support multiple timezones
QString tz = tzs.at(0);
if (tz != m_timezone) {
@@ -176,6 +181,7 @@
} else if (m_timezone != "Local") {
dataEngine("time")->disconnectSource(m_timezone, this);
m_timezone = "Local";
+ cg.writeEntry("timezone", m_timezone);
}
connectToEngine();
--- trunk/KDE/kdebase/workspace/plasma/applets/analog-clock/clockConfig.ui \
#764723:764724 @@ -5,53 +5,111 @@
<rect>
<x>0</x>
<y>0</y>
- <width>350</width>
- <height>367</height>
+ <width>400</width>
+ <height>300</height>
</rect>
</property>
<property name="minimumSize" >
<size>
- <width>350</width>
- <height>200</height>
+ <width>400</width>
+ <height>300</height>
</size>
</property>
<layout class="QVBoxLayout" >
<item>
- <widget class="KTimeZoneWidget" name="timeZones" >
- <property name="minimumSize" >
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Appearance</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QCheckBox" name="showSecondHandCheckBox" >
+ <property name="toolTip" >
+ <string>Show the seconds</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Check this if you want to show the seconds.</string>
+ </property>
+ <property name="text" >
+ <string>Show &seconds</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="showTimeStringCheckBox" >
+ <property name="toolTip" >
+ <string>Show the time in text</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Check this if you want to show the time as a text \
within the clock.</string> + </property>
+ <property name="text" >
+ <string>Also show the time in text</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>Timezones</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QCheckBox" name="localTimeZone" >
+ <property name="text" >
+ <string>Use &local timezone</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KTimeZoneWidget" name="timeZones" >
+ <property name="minimumSize" >
+ <size>
+ <width>300</width>
+ <height>150</height>
+ </size>
+ </property>
+ <column>
+ <property name="text" >
+ <string>Area</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Region</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Comment</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
</item>
- <item>
- <widget class="QCheckBox" name="showSecondHandCheckBox" >
- <property name="toolTip" >
- <string>Display the second hand</string>
- </property>
- <property name="whatsThis" >
- <string>Check this if you want to display the second hand in order \
to see the seconds.</string>
- </property>
- <property name="text" >
- <string>Display seconds</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="showTimeStringCheckBox" >
- <property name="toolTip" >
- <string>Display the time as a string</string>
- </property>
- <property name="whatsThis" >
- <string>Check this if you want to display the time as a string \
within the clock.</string>
- </property>
- <property name="text" >
- <string>Also display the time in text</string>
- </property>
- </widget>
- </item>
</layout>
</widget>
<customwidgets>
@@ -62,5 +120,22 @@
</customwidget>
</customwidgets>
<resources/>
- <connections/>
+ <connections>
+ <connection>
+ <sender>localTimeZone</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>timeZones</receiver>
+ <slot>setDisabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>
--- trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clock.cpp \
#764723:764724 @@ -181,7 +181,6 @@
ui.timeZones->setEnabled(m_timezone != "Local");
ui.localTimeZone->setChecked(m_timezone == "Local");
- ui.timeZones->setSelected(m_timezone, true);
m_dialog->show();
}
--- trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clockConfig.ui \
#764723:764724 @@ -5,14 +5,14 @@
<rect>
<x>0</x>
<y>0</y>
- <width>420</width>
- <height>428</height>
+ <width>400</width>
+ <height>300</height>
</rect>
</property>
<property name="minimumSize" >
<size>
- <width>420</width>
- <height>320</height>
+ <width>400</width>
+ <height>300</height>
</size>
</property>
<layout class="QGridLayout" >
@@ -24,12 +24,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
- <size>
- <width>400</width>
- <height>300</height>
- </size>
- </property>
<property name="currentIndex" >
<number>0</number>
</property>
@@ -109,16 +103,35 @@
</item>
<item row="8" column="0" >
<widget class="QCheckBox" name="secondsCheckbox" >
+ <property name="toolTip" >
+ <string>Show the seconds</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Check this if you want to show the seconds.</string>
+ </property>
<property name="text" >
<string>Show &seconds</string>
</property>
</widget>
</item>
+ <item row="8" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
<widget class="QWidget" name="TimezonesTab" >
<attribute name="title" >
- <string>Timezones</string>
+ <string>Ti&mezones</string>
</attribute>
<layout class="QVBoxLayout" >
<item>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic