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

kontact

  • sources
  • kde-4.14
  • kdepim
  • kontact
  • plugins
  • specialdates
sdsummarywidget.h
Go to the documentation of this file.
1 /*
2  This file is part of Kontact.
3 
4  Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
5  Copyright (c) 2004,2009 Allen Winter <winter@kde.org>
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 Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of Qt, and distribute the resulting executable,
23  without including the source code for Qt in the source distribution.
24 */
25 
26 #ifndef SDSUMMARYWIDGET_H
27 #define SDSUMMARYWIDGET_H
28 
29 #include <KCalCore/Event>
30 
31 #include <KontactInterface/Summary>
32 #include <Akonadi/Calendar/ETMCalendar>
33 
34 namespace KHolidays {
35  class HolidayRegion;
36 }
37 
38 namespace KontactInterface {
39  class Plugin;
40 }
41 
42 class QDate;
43 class QGridLayout;
44 class QLabel;
45 class SDEntry;
46 class KJob;
47 
48 class SDSummaryWidget : public KontactInterface::Summary
49 {
50  Q_OBJECT
51 
52  public:
53  SDSummaryWidget( KontactInterface::Plugin *plugin, QWidget *parent );
54  ~SDSummaryWidget();
55 
56  QStringList configModules() const;
57  void configUpdated();
58  void updateSummary( bool force = false )
59  {
60  Q_UNUSED( force );
61  updateView();
62  }
63 
64  protected:
65  virtual bool eventFilter( QObject *obj, QEvent *e );
66 
67  private slots:
68  void updateView();
69  void popupMenu( const QString &url );
70  void mailContact( const QString &url );
71  void viewContact( const QString &url );
72  void slotBirthdayJobFinished( KJob *job );
73  void slotItemFetchJobDone(KJob* job);
74 
75  private:
76  int span( const KCalCore::Event::Ptr &event ) const;
77  int dayof( const KCalCore::Event::Ptr &event, const QDate &date ) const;
78  bool initHolidays();
79  void dateDiff( const QDate &date, int &days, int &years ) const;
80 
81  Akonadi::ETMCalendar::Ptr mCalendar;
82 
83  QGridLayout *mLayout;
84  QList<QLabel*> mLabels;
85  KontactInterface::Plugin *mPlugin;
86 
87  int mDaysAhead;
88  bool mShowBirthdaysFromKAB;
89  bool mShowBirthdaysFromCal;
90  bool mShowAnniversariesFromKAB;
91  bool mShowAnniversariesFromCal;
92  bool mShowHolidays;
93  bool mShowSpecialsFromCal;
94  bool mShowMineOnly;
95  bool mJobRunning;
96  QList<SDEntry> mDates;
97  void createLabels();
98 
99  KHolidays::HolidayRegion *mHolidays;
100 };
101 
102 #endif
QEvent
QWidget
SDSummaryWidget::updateSummary
void updateSummary(bool force=false)
Definition: sdsummarywidget.h:58
SDSummaryWidget::SDSummaryWidget
SDSummaryWidget(KontactInterface::Plugin *plugin, QWidget *parent)
Definition: sdsummarywidget.cpp:130
date
time_t date() const
QGridLayout
QObject
QDate
SDSummaryWidget::configModules
QStringList configModules() const
Definition: sdsummarywidget.cpp:747
QString
QList< QLabel * >
QStringList
SDSummaryWidget::eventFilter
virtual bool eventFilter(QObject *obj, QEvent *e)
Definition: sdsummarywidget.cpp:703
SDSummaryWidget
Definition: sdsummarywidget.h:48
QLabel
KJob
SDSummaryWidget::configUpdated
void configUpdated()
Definition: sdsummarywidget.cpp:177
SDSummaryWidget::~SDSummaryWidget
~SDSummaryWidget()
Definition: sdsummarywidget.cpp:172
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kontact

Skip menu "kontact"
  • 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