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

korganizer

  • sources
  • kde-4.14
  • kdepim
  • korganizer
  • views
  • whatsnextview
kowhatsnextview.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2001 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 
25 #include "kowhatsnextview.h"
26 #include <QVBoxLayout>
27 
28 KOWhatsNextView::KOWhatsNextView( QWidget *parent )
29  : KOrg::BaseView( parent )
30 {
31  mView = new EventViews::WhatsNextView( this );
32  QVBoxLayout *topLayout = new QVBoxLayout( this );
33  topLayout->addWidget(mView);
34 
35  connect( mView, SIGNAL(incidenceSelected(Akonadi::Item,QDate)),
36  SIGNAL(incidenceSelected(Akonadi::Item,QDate)) );
37 
38  connect( mView, SIGNAL(showIncidenceSignal(Akonadi::Item)),
39  SIGNAL(showIncidenceSignal(Akonadi::Item)) );
40 
41  connect( mView, SIGNAL(editIncidenceSignal(Akonadi::Item)),
42  SIGNAL(editIncidenceSignal(Akonadi::Item)) );
43 
44  connect( mView, SIGNAL(deleteIncidenceSignal(Akonadi::Item)),
45  SIGNAL(deleteIncidenceSignal(Akonadi::Item)) );
46 
47  connect( mView, SIGNAL(cutIncidenceSignal(Akonadi::Item)),
48  SIGNAL(cutIncidenceSignal(Akonadi::Item)) );
49 
50  connect( mView, SIGNAL(copyIncidenceSignal(Akonadi::Item)),
51  SIGNAL(copyIncidenceSignal(Akonadi::Item)) );
52 
53  connect( mView, SIGNAL(pasteIncidenceSignal()),
54  SIGNAL(pasteIncidenceSignal()) );
55 
56  connect( mView, SIGNAL(toggleAlarmSignal(Akonadi::Item)),
57  SIGNAL(toggleAlarmSignal(Akonadi::Item)) );
58 
59  connect( mView, SIGNAL(toggleTodoCompletedSignal(Akonadi::Item)),
60  SIGNAL(toggleTodoCompletedSignal(Akonadi::Item)) );
61 
62  connect( mView, SIGNAL(copyIncidenceToResourceSignal(Akonadi::Item,Akonadi::Collection)),
63  SIGNAL(copyIncidenceToResourceSignal(Akonadi::Item,Akonadi::Collection)) );
64 
65  connect( mView, SIGNAL(moveIncidenceToResourceSignal(Akonadi::Item,Akonadi::Collection)),
66  SIGNAL(moveIncidenceToResourceSignal(Akonadi::Item,Akonadi::Collection)) );
67 
68  connect( mView, SIGNAL(dissociateOccurrencesSignal(Akonadi::Item,QDate)),
69  SIGNAL(dissociateOccurrencesSignal(Akonadi::Item,QDate)) );
70 
71  connect( mView, SIGNAL(newEventSignal()),
72  SIGNAL(newEventSignal()) );
73 
74  connect( mView, SIGNAL(newEventSignal(QDate)),
75  SIGNAL(newEventSignal(QDate)) );
76 
77  connect( mView, SIGNAL(newEventSignal(QDateTime)),
78  SIGNAL(newEventSignal(QDateTime)) );
79 
80  connect( mView, SIGNAL(newEventSignal(QDateTime,QDateTime)),
81  SIGNAL(newEventSignal(QDateTime,QDateTime)) );
82 
83  connect( mView, SIGNAL(newTodoSignal(QDate)),
84  SIGNAL(newTodoSignal(QDate)) );
85 
86  connect( mView, SIGNAL(newSubTodoSignal(Akonadi::Item)),
87  SIGNAL(newSubTodoSignal(Akonadi::Item)) );
88 
89  connect( mView, SIGNAL(newJournalSignal(QDate)),
90  SIGNAL(newJournalSignal(QDate)) );
91 }
92 
93 KOWhatsNextView::~KOWhatsNextView()
94 {
95 }
96 
97 int KOWhatsNextView::currentDateCount() const
98 {
99  return mView->currentDateCount();
100 }
101 
102 void KOWhatsNextView::updateView()
103 {
104  mView->updateView();
105 }
106 
107 void KOWhatsNextView::showDates( const QDate &start, const QDate &end, const QDate &dummy )
108 {
109  mView->showDates( start, end, dummy );
110 }
111 
112 void KOWhatsNextView::showIncidences( const Akonadi::Item::List &incidenceList, const QDate &date )
113 {
114  mView->showIncidences( incidenceList, date );
115 }
116 
117 void KOWhatsNextView::changeIncidenceDisplay( const Akonadi::Item &,
118  Akonadi::IncidenceChanger::ChangeType )
119 {
120  updateView();
121 }
122 
123 CalendarSupport::CalPrinterBase::PrintType KOWhatsNextView::printType() const
124 {
125  // If up to three days are selected, use day style, otherwise week
126  if ( currentDateCount() <= 3 ) {
127  return CalendarSupport::CalPrinterBase::Day;
128  } else {
129  return CalendarSupport::CalPrinterBase::Week;
130  }
131 }
132 
133 void KOWhatsNextView::setCalendar( const Akonadi::ETMCalendar::Ptr &cal )
134 {
135  KOrg::BaseView::setCalendar( cal );
136  mView->setCalendar( cal );
137 }
138 
KOWhatsNextView::KOWhatsNextView
KOWhatsNextView(QWidget *parent=0)
Definition: kowhatsnextview.cpp:28
QWidget
KOrg::BaseView::incidenceSelected
void incidenceSelected(const Akonadi::Item &, const QDate)
KOWhatsNextView::updateView
virtual void updateView()
Definition: kowhatsnextview.cpp:102
KOWhatsNextView::changeIncidenceDisplay
void changeIncidenceDisplay(const Akonadi::Item &, Akonadi::IncidenceChanger::ChangeType)
Definition: kowhatsnextview.cpp:117
KOrg::BaseView::toggleAlarmSignal
void toggleAlarmSignal(const Akonadi::Item &)
instructs the receiver to toggle the alarms of the Incidence.
KOWhatsNextView::~KOWhatsNextView
~KOWhatsNextView()
Definition: kowhatsnextview.cpp:93
KOrg::BaseView::newTodoSignal
void newTodoSignal(const QDate &)
KOrg::BaseView::setCalendar
virtual void setCalendar(const Akonadi::ETMCalendar::Ptr &cal)
Definition: baseview.cpp:68
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
KOrg::BaseView::dissociateOccurrencesSignal
void dissociateOccurrencesSignal(const Akonadi::Item &, const QDate &)
Dissociate from a recurring incidence the occurrence on the given date to a new incidence or dissocia...
KOrg::BaseView::editIncidenceSignal
void editIncidenceSignal(const Akonadi::Item &)
instructs the receiver to begin editing the incidence specified in some manner.
KOrg::BaseView::showIncidenceSignal
void showIncidenceSignal(const Akonadi::Item &)
instructs the receiver to show the incidence in read-only mode.
QVBoxLayout
KOWhatsNextView::setCalendar
void setCalendar(const Akonadi::ETMCalendar::Ptr &)
Definition: kowhatsnextview.cpp:133
QDate
KOrg::BaseView::copyIncidenceSignal
void copyIncidenceSignal(const Akonadi::Item &)
instructs the receiver to copy the incidence
KOrg::BaseView::newSubTodoSignal
void newSubTodoSignal(const Akonadi::Item &)
KOrg::BaseView::cutIncidenceSignal
void cutIncidenceSignal(const Akonadi::Item &)
instructs the receiver to cut the Incidence
KOrg::BaseView::toggleTodoCompletedSignal
void toggleTodoCompletedSignal(const Akonadi::Item &)
instructs the receiver to toggle the completion state of the Incidence (which must be a Todo type)...
KOrg::BaseView::deleteIncidenceSignal
void deleteIncidenceSignal(const Akonadi::Item &)
instructs the receiver to delete the Incidence in some manner; some possibilities include automatical...
KOrg::BaseView::copyIncidenceToResourceSignal
void copyIncidenceToResourceSignal(const Akonadi::Item &, const Akonadi::Collection &)
Copy the incidence to the specified resource.
KOrg::BaseView::moveIncidenceToResourceSignal
void moveIncidenceToResourceSignal(const Akonadi::Item &, const Akonadi::Collection &)
Move the incidence to the specified resource.
KOWhatsNextView::printType
virtual CalendarSupport::CalPrinterBase::PrintType printType() const
Definition: kowhatsnextview.cpp:123
KOrg::BaseView::newEventSignal
void newEventSignal()
instructs the receiver to create a new event in given collection.
KOWhatsNextView::showDates
virtual void showDates(const QDate &start, const QDate &end, const QDate &preferredMonth)
Definition: kowhatsnextview.cpp:107
KOWhatsNextView::showIncidences
virtual void showIncidences(const Akonadi::Item::List &incidenceList, const QDate &date)
Definition: kowhatsnextview.cpp:112
KOWhatsNextView::currentDateCount
virtual int currentDateCount() const
Returns the number of currently shown dates.
Definition: kowhatsnextview.cpp:97
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KOrg::BaseView::newJournalSignal
void newJournalSignal(const QDate &)
kowhatsnextview.h
QDateTime
KOrg::BaseView::pasteIncidenceSignal
void pasteIncidenceSignal()
instructs the receiver to paste the incidence
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

korganizer

Skip menu "korganizer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

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