• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

klettres

  • sources
  • kde-4.14
  • kdeedu
  • klettres
  • src
timer.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Michael Goettsche *
3  * michael.goettsche@kdemail.net *
4  * Copyright (C) 2006 by Anne-Marie Mahfouf *
5  * annemarie.mahfouf@free.fr *
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program; if not, write to the *
19  * Free Software Foundation, Inc., *
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
21  ***************************************************************************/
22 
23 #include "timer.h"
24 
25 
26 #include <KLocale>
27 
28 #include "prefs.h"
29 
30 Timer::Timer()
31  :QWidget()
32 {
33  ui_timer.setupUi(this);
34  ui_timer.timeGrownLabel->setText(QString::number(Prefs::grownTimer()) + ' ' + i18n("tenths of second"));
35  ui_timer.timeKidLabel->setText(QString::number(Prefs::kidTimer()) + ' ' + i18n("tenths of second"));
36  connect(ui_timer.kcfg_GrownTimer, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged()));
37  connect(ui_timer.kcfg_KidTimer, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged()));
38 }
39 
40 
41 void Timer::sliderValueChanged()
42 {
43  ui_timer.timeKidLabel->setText(QString::number(ui_timer.kcfg_KidTimer->value()) + ' ' + i18n("tenths of second"));
44  ui_timer.timeGrownLabel->setText(QString::number(ui_timer.kcfg_GrownTimer->value()) + ' ' + i18n("tenths of second"));
45 }
46 
47 
48 #include "timer.moc"
QWidget
prefs.h
Timer::sliderValueChanged
void sliderValueChanged()
When the QSlider value changes.
Definition: timer.cpp:41
timer.h
QString::number
QString number(int n, int base)
Prefs::grownTimer
static int grownTimer()
Get Grown-up Timer.
Definition: prefs.h:169
Prefs::kidTimer
static int kidTimer()
Get Kid Timer.
Definition: prefs.h:150
Timer::ui_timer
Ui::timerui ui_timer
Definition: timer.h:44
Timer::Timer
Timer()
Constructor.
Definition: timer.cpp:30
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

klettres

Skip menu "klettres"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal