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

kalarm

  • sources
  • kde-4.14
  • kdepim
  • kalarm
timeselector.h
Go to the documentation of this file.
1 /*
2  * timeselector.h - widget to optionally set a time period
3  * Program: kalarm
4  * Copyright © 2004,2005,2007,2008,2010,2011 by David Jarvie <djarvie@kde.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef TIMESELECTOR_H
22 #define TIMESELECTOR_H
23 
24 #include "timeperiod.h"
25 #include <QFrame>
26 
27 class CheckBox;
28 class ComboBox;
29 
30 
31 class TimeSelector : public QFrame
32 {
33  Q_OBJECT
34  public:
35  TimeSelector(const QString& selectText, const QString& selectWhatsThis,
36  const QString& valueWhatsThis, bool allowHourMinute, QWidget* parent);
37  ComboBox* createSignCombo();
38  bool isChecked() const;
39  void setChecked(bool on);
40 #ifdef USE_AKONADI
41  KCalCore::Duration period() const;
42  void setPeriod(const KCalCore::Duration&, bool dateOnly, TimePeriod::Units defaultUnits);
43 #else
44  KCal::Duration period() const;
45  void setPeriod(const KCal::Duration&, bool dateOnly, TimePeriod::Units defaultUnits);
46 #endif
47  TimePeriod::Units units() const { return mPeriod->units(); }
48  void setUnits(TimePeriod::Units units) { mPeriod->setUnits(units); }
49  void setReadOnly(bool);
50  bool isDateOnly() const { return mPeriod->isDateOnly(); }
51  void setDateOnly(bool dateOnly = true);
52  void setMaximum(int hourmin, int days);
53  void setFocusOnCount();
54 
55  signals:
56  void toggled(bool); // selection checkbox has been toggled
57 #ifdef USE_AKONADI
58  void valueChanged(const KCalCore::Duration&); // value has changed
59 #else
60  void valueChanged(const KCal::Duration&); // value has changed
61 #endif
62 
63  protected slots:
64  void selectToggled(bool);
65 #ifdef USE_AKONADI
66  void periodChanged(const KCalCore::Duration&);
67 #else
68  void periodChanged(const KCal::Duration&);
69 #endif
70 
71  private:
72  CheckBox* mSelect;
73  TimePeriod* mPeriod;
74  ComboBox* mSignWidget;
75  bool mReadOnly; // the widget is read only
76 };
77 
78 #endif // TIMESELECTOR_H
79 
80 // vim: et sw=4:
QWidget
TimeSelector::setMaximum
void setMaximum(int hourmin, int days)
Definition: timeselector.cpp:115
TimeSelector::isDateOnly
bool isDateOnly() const
Definition: timeselector.h:50
TimeSelector::isChecked
bool isChecked() const
Definition: timeselector.cpp:101
TimePeriod::Units
Units
TimeSelector::valueChanged
void valueChanged(const KCal::Duration &)
TimeSelector::setUnits
void setUnits(TimePeriod::Units units)
Definition: timeselector.h:48
TimeSelector::units
TimePeriod::Units units() const
Definition: timeselector.h:47
TimeSelector::setReadOnly
void setReadOnly(bool)
Definition: timeselector.cpp:89
TimeSelector::setChecked
void setChecked(bool on)
Definition: timeselector.cpp:106
timeperiod.h
TimePeriod::setUnits
void setUnits(Units units)
TimeSelector::periodChanged
void periodChanged(const KCal::Duration &)
Definition: timeselector.cpp:174
TimeSelector::toggled
void toggled(bool)
TimeSelector::setFocusOnCount
void setFocusOnCount()
Definition: timeselector.cpp:152
CheckBox
TimePeriod
QString
QFrame
TimeSelector::selectToggled
void selectToggled(bool)
Definition: timeselector.cpp:160
TimeSelector::TimeSelector
TimeSelector(const QString &selectText, const QString &selectWhatsThis, const QString &valueWhatsThis, bool allowHourMinute, QWidget *parent)
Definition: timeselector.cpp:41
TimeSelector::setDateOnly
void setDateOnly(bool dateOnly=true)
Definition: timeselector.cpp:120
TimePeriod::isDateOnly
bool isDateOnly() const
TimeSelector
Definition: timeselector.h:31
TimeSelector::setPeriod
void setPeriod(const KCal::Duration &, bool dateOnly, TimePeriod::Units defaultUnits)
Definition: timeselector.cpp:140
ComboBox
TimeSelector::createSignCombo
ComboBox * createSignCombo()
Definition: timeselector.cpp:78
QObject::parent
QObject * parent() const
TimePeriod::units
Units units() const
TimeSelector::period
KCal::Duration period() const
Definition: timeselector.cpp:129
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalarm

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

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