~ubuntu-branches/ubuntu/oneiric/kdeplasma-addons/oneiric

« back to all changes in this revision

Viewing changes to applets/fuzzy-clock/fuzzyClock.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-11-26 13:35:18 UTC
  • mto: (0.4.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 84.
  • Revision ID: james.westby@ubuntu.com-20101126133518-remqkgqjafk2a4jc
Tags: upstream-4.5.80
ImportĀ upstreamĀ versionĀ 4.5.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
 
71
71
    m_locale = KGlobal::locale();
72
72
 
 
73
    clockConfigChanged();
 
74
 
 
75
    //By default we use the smallest readable font.
 
76
    m_fontDate = QFont ( KGlobalSettings::smallestReadableFont() );
 
77
 
 
78
    m_margin = 2;
 
79
    m_verticalSpacing = 2;
 
80
 
 
81
    Plasma::DataEngine* timeEngine = dataEngine("time");
 
82
    timeEngine->connectSource(currentTimezone(), this, 6000, Plasma::AlignToMinute);
 
83
 
 
84
    connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(updateColors()));
 
85
}
 
86
 
 
87
void Clock::clockConfigChanged()
 
88
{
73
89
    KConfigGroup cg = config();
74
90
 
75
91
    m_showTimezone = cg.readEntry("showTimezone", false);
93
109
    m_fontTime.setItalic(m_fontTimeItalic);
94
110
 
95
111
    m_adjustToHeight = cg.readEntry("adjustToHeight", 1);
96
 
 
97
 
    //By default we use the smallest readable font.
98
 
    m_fontDate = QFont ( KGlobalSettings::smallestReadableFont() );
99
 
 
100
 
    m_margin = 2;
101
 
    m_verticalSpacing = 2;
102
 
 
103
 
    Plasma::DataEngine* timeEngine = dataEngine("time");
104
 
    timeEngine->connectSource(currentTimezone(), this, 6000, Plasma::AlignToMinute);
105
 
 
106
 
    connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(updateColors()));
107
112
}
108
113
 
109
114
Qt::Orientations Clock::expandingDirections() const