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

korgac

  • sources
  • kde-4.12
  • 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 popupItemMenu( const QPoint &point );
98 
99  protected:
100  void keyPressEvent( QKeyEvent *e );
101  void closeEvent( QCloseEvent * );
102 
103  private:
104  static KDateTime triggerDateForIncidence( const KCalCore::Incidence::Ptr &inc,
105  const QDateTime &reminderAt,
106  QString &displayStr );
107 
108  // Removes each Incidence-X group that has one of the specified uids
109  void removeFromConfig( const QList<Akonadi::Item::Id> & );
110 
111  // Opens through dbus, @deprecated
112  bool openIncidenceEditorThroughKOrganizer( const KCalCore::Incidence::Ptr &incidence );
113 
114  // opens directly
115  bool openIncidenceEditorNG( const Akonadi::Item &incidence );
116 
117  bool startKOrganizer();
118  ReminderTreeItem *searchByItem( const Akonadi::Item &incidence );
119  void setTimer();
120  void dismiss( QList<ReminderTreeItem *> selections );
121  int activeCount();
122  QList<ReminderTreeItem *> selectedItems() const;
123  void updateButtons();
124  void toggleDetails( QTreeWidgetItem *item );
125  void showDetails( QTreeWidgetItem *item );
126 
127  Akonadi::ETMCalendar::Ptr mCalendar;
128  QVBoxLayout *mTopLayout;
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
AlarmDialog::AlarmDialog
AlarmDialog(const Akonadi::ETMCalendar::Ptr &calendar, QWidget *parent=0)
Definition: alarmdialog.cpp:142
AlarmDialog::slotUser1
void slotUser1()
Definition: alarmdialog.cpp:376
AlarmDialog::reminderCount
void reminderCount(int count)
AlarmDialog::closeEvent
void closeEvent(QCloseEvent *)
Definition: alarmdialog.cpp:773
KDialog
AlarmDialog::eventNotification
void eventNotification()
Definition: alarmdialog.cpp:593
AlarmDialog::show
void show()
Definition: alarmdialog.cpp:540
AlarmDialog::accept
void accept()
Definition: alarmdialog.cpp:854
AlarmDialog::suspend
void suspend()
Definition: alarmdialog.cpp:462
AlarmDialog::slotUser2
void slotUser2()
Definition: alarmdialog.cpp:381
AlarmDialog::slotSave
void slotSave()
Definition: alarmdialog.cpp:721
AlarmDialog::keyPressEvent
void keyPressEvent(QKeyEvent *e)
Definition: alarmdialog.cpp:921
AlarmDialog::slotOk
void slotOk()
Definition: alarmdialog.cpp:371
AlarmDialog::~AlarmDialog
~AlarmDialog()
Definition: alarmdialog.cpp:283
AlarmDialog::dismissCurrent
void dismissCurrent()
Definition: alarmdialog.cpp:391
AlarmDialog
Definition: alarmdialog.h:58
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:892
AlarmDialog::edit
void edit()
Definition: alarmdialog.cpp:439
AlarmDialog::wakeUp
void wakeUp()
Definition: alarmdialog.cpp:688
AlarmDialog::dismissAll
void dismissAll()
Definition: alarmdialog.cpp:403
AlarmDialog::setRemindAt
void setRemindAt(const QDateTime &dt)
AlarmDialog::addIncidence
void addIncidence(const Akonadi::Item &incidence, const QDateTime &reminderAt, const QString &displayText)
Definition: alarmdialog.cpp:318
AlarmDialog::slotUser3
void slotUser3()
Definition: alarmdialog.cpp:386
AlarmDialog::suspendAll
void suspendAll()
Definition: alarmdialog.cpp:576
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:50 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

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