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

kontact

todosummarywidget.h

Go to the documentation of this file.
00001 /*
00002   This file is part of Kontact.
00003 
00004   Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
00005   Copyright (c) 2005-2006 Allen Winter <winter@kde.org>
00006 
00007   This program is free software; you can redistribute it and/or modify
00008   it under the terms of the GNU General Public License as published by
00009   the Free Software Foundation; either version 2 of the License, or
00010   (at your option) any later version.
00011 
00012   This program is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015   GNU General Public License for more details.
00016 
00017   You should have received a copy of the GNU General Public License along
00018   with this program; if not, write to the Free Software Foundation, Inc.,
00019   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020 
00021   As a special exception, permission is given to link this program
00022   with any edition of Qt, and distribute the resulting executable,
00023   without including the source code for Qt in the source distribution.
00024 */
00025 
00026 #ifndef TODO_SUMMARYWIDGET_H
00027 #define TODO_SUMMARYWIDGET_H
00028 
00029 #include <kontactinterfaces/summary.h>
00030 #include <QList>
00031 
00032 namespace KCal {
00033   class CalendarResources;
00034   class Todo;
00035 }
00036 
00037 class TodoPlugin;
00038 
00039 class QEvent;
00040 class QGridLayout;
00041 class QLabel;
00042 class QWidget;
00043 
00044 class TodoSummaryWidget : public Kontact::Summary
00045 {
00046   Q_OBJECT
00047 
00048   public:
00049     TodoSummaryWidget( TodoPlugin *plugin, QWidget *parent );
00050     ~TodoSummaryWidget();
00051 
00052     int summaryHeight() const { return 3; }
00053     QStringList configModules() const;
00054 
00055   public slots:
00056     void updateSummary( bool force = false )
00057     {
00058       Q_UNUSED( force );
00059       updateView();
00060     }
00061 
00062   protected:
00063     virtual bool eventFilter( QObject *obj, QEvent *e );
00064 
00065   private slots:
00066     void updateView();
00067     void popupMenu( const QString &uid );
00068     void viewTodo( const QString &uid );
00069     void removeTodo( const QString &uid );
00070     void completeTodo( const QString &uid );
00071 
00072   private:
00073     TodoPlugin *mPlugin;
00074     QGridLayout *mLayout;
00075 
00076     bool mDaysToGo;
00077     bool mHideInProgress;
00078     bool mHideOverdue;
00079     bool mHideCompleted;
00080     bool mHideOpenEnded;
00081     bool mHideNotStarted;
00082 
00083     QList<QLabel*> mLabels;
00084     KCal::CalendarResources *mCalendar;
00085 
00086     // FIXME: could the following methods be moved into the KCal::Todo class?
00087 
00093     bool inProgress( KCal::Todo *todo );
00099     bool overdue( KCal::Todo *todo );
00105     bool starts( KCal::Todo *todo );
00111     bool completed( KCal::Todo *todo );
00117     bool openEnded( KCal::Todo *todo );
00123     bool notStarted( KCal::Todo *todo );
00124 
00130     const QString stateStr( KCal::Todo *todo );
00131 };
00132 
00133 #endif

kontact

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

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal