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

korgac

  • sources
  • kde-4.14
  • kdepim
  • korgac
alarmdialog.h
Go to the documentation of this file.
1 /*
2  This file is part of the KDE reminder agent.
3 
4  Copyright (c) 2000 Cornelius Schumacher <schumacher@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  As a special exception, permission is given to link this program
21  with any edition of Qt, and distribute the resulting executable,
22  without including the source code for Qt in the source distribution.
23 */
24 #ifndef KORGAC_ALARMDIALOG_H
25 #define KORGAC_ALARMDIALOG_H
26 
27 #include <Akonadi/Calendar/ETMCalendar>
28 #include <Akonadi/Item>
29 #include <KDialog>
30 #include <KCalCore/Incidence>
31 #include <KDateTime>
32 
33 #include <QPoint>
34 #include <QTimer>
35 
36 namespace Akonadi {
37  class Item;
38 }
39 
40 namespace KPIMIdentities {
41  class IdentityManager;
42 }
43 
44 namespace CalendarSupport {
45  class IncidenceViewer;
46 }
47 
48 class ReminderTreeItem;
49 
50 class KComboBox;
51 
52 class QDateTime;
53 class QTreeWidget;
54 class QTreeWidgetItem;
55 class QSpinBox;
56 class QVBoxLayout;
57 
58 class AlarmDialog : public KDialog
59 {
60  Q_OBJECT
61  public:
62  explicit AlarmDialog( const Akonadi::ETMCalendar::Ptr &calendar, QWidget *parent = 0 );
63  ~AlarmDialog();
64 
65  void addIncidence( const Akonadi::Item &incidence, const QDateTime &reminderAt,
66  const QString &displayText );
67  void setRemindAt( const QDateTime &dt );
68  void eventNotification();
69 
70  public slots:
71  void slotOk(); // suspend
72  void slotUser1(); // edit
73  void slotUser2(); // dismiss all
74  void slotUser3(); // dismiss selected
75  void slotSave();
76  void wakeUp();
77  void show();
78  void edit();
79  void suspend();
80  void suspendAll();
81  void dismissAll();
82  void dismissCurrent();
83  /*reimp*/
84  void accept();
85 
90  void slotCalendarChanged();
91 
92  signals:
93  void reminderCount( int count );
94 
95  private Q_SLOTS:
96  void update();
97  void updateButtons();
98 
99  protected:
100  void keyPressEvent( QKeyEvent *e );
101  void closeEvent( QCloseEvent * );
102 
103  private:
104  typedef QList<ReminderTreeItem *> ReminderList;
105 
106  static KDateTime triggerDateForIncidence( const KCalCore::Incidence::Ptr &inc,
107  const QDateTime &reminderAt,
108  QString &displayStr );
109 
110  // Removes each Incidence-X group that has one of the specified uids
111  void removeFromConfig( const QList<Akonadi::Item::Id> & );
112 
113  // Opens through dbus, @deprecated
114  bool openIncidenceEditorThroughKOrganizer( const KCalCore::Incidence::Ptr &incidence );
115 
116  // opens directly
117  bool openIncidenceEditorNG( const Akonadi::Item &incidence );
118 
119  bool startKOrganizer();
120  ReminderTreeItem *searchByItem( const Akonadi::Item &incidence );
121  void setTimer();
122  void dismiss(ReminderList selections );
123  int activeCount();
124  ReminderList selectedItems() const;
125  void toggleDetails( QTreeWidgetItem *item );
126  void showDetails( QTreeWidgetItem *item );
127 
128  Akonadi::ETMCalendar::Ptr mCalendar;
129  QTreeWidget *mIncidenceTree;
130  CalendarSupport::IncidenceViewer *mDetailView;
131  KPIMIdentities::IdentityManager *mIdentityManager;
132 
133  QPoint mPos;
134  QSpinBox *mSuspendSpin;
135  KComboBox *mSuspendUnit;
136  QTimer mSuspendTimer;
137  QTreeWidgetItem *mLastItem;
138 };
139 
140 #endif
QWidget
AlarmDialog::AlarmDialog
AlarmDialog(const Akonadi::ETMCalendar::Ptr &calendar, QWidget *parent=0)
Definition: alarmdialog.cpp:126
AlarmDialog::slotUser1
void slotUser1()
Definition: alarmdialog.cpp:358
AlarmDialog::reminderCount
void reminderCount(int count)
AlarmDialog::closeEvent
void closeEvent(QCloseEvent *)
Definition: alarmdialog.cpp:761
QPoint
KDialog
AlarmDialog::eventNotification
void eventNotification()
Definition: alarmdialog.cpp:581
AlarmDialog::show
void show()
Definition: alarmdialog.cpp:528
AlarmDialog::accept
void accept()
Definition: alarmdialog.cpp:837
AlarmDialog::suspend
void suspend()
Definition: alarmdialog.cpp:450
QCloseEvent
AlarmDialog::slotUser2
void slotUser2()
Definition: alarmdialog.cpp:369
QTreeWidget
AlarmDialog::slotSave
void slotSave()
Definition: alarmdialog.cpp:709
QTimer
AlarmDialog::keyPressEvent
void keyPressEvent(QKeyEvent *e)
Definition: alarmdialog.cpp:904
AlarmDialog::slotOk
void slotOk()
Definition: alarmdialog.cpp:353
QVBoxLayout
AlarmDialog::~AlarmDialog
~AlarmDialog()
Definition: alarmdialog.cpp:268
QString
QList
AlarmDialog::dismissCurrent
void dismissCurrent()
Definition: alarmdialog.cpp:379
AlarmDialog
Definition: alarmdialog.h:58
QSpinBox
AlarmDialog::slotCalendarChanged
void slotCalendarChanged()
If an incidence changed, for example in korg, we must update the date and summary shown in the list v...
Definition: alarmdialog.cpp:875
AlarmDialog::edit
void edit()
Definition: alarmdialog.cpp:427
AlarmDialog::wakeUp
void wakeUp()
Definition: alarmdialog.cpp:676
QKeyEvent
QTreeWidgetItem
AlarmDialog::dismissAll
void dismissAll()
Definition: alarmdialog.cpp:391
AlarmDialog::setRemindAt
void setRemindAt(const QDateTime &dt)
AlarmDialog::addIncidence
void addIncidence(const Akonadi::Item &incidence, const QDateTime &reminderAt, const QString &displayText)
Definition: alarmdialog.cpp:303
QDateTime
AlarmDialog::slotUser3
void slotUser3()
Definition: alarmdialog.cpp:374
AlarmDialog::suspendAll
void suspendAll()
Definition: alarmdialog.cpp:564
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

korgac

Skip menu "korgac"
  • Main Page
  • Namespace List
  • 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