summaryrefslogtreecommitdiffstats
path: root/korganizer/plugins/printing
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/plugins/printing')
-rw-r--r--korganizer/plugins/printing/Makefile.am1
-rw-r--r--korganizer/plugins/printing/journal/Makefile.am14
-rw-r--r--korganizer/plugins/printing/journal/calprintjournalconfig_base.ui201
-rw-r--r--korganizer/plugins/printing/journal/journalprint.cpp135
-rw-r--r--korganizer/plugins/printing/journal/journalprint.desktop95
-rw-r--r--korganizer/plugins/printing/journal/journalprint.h63
-rw-r--r--korganizer/plugins/printing/list/Makefile.am14
-rw-r--r--korganizer/plugins/printing/list/calprintlistconfig_base.ui186
-rw-r--r--korganizer/plugins/printing/list/listprint.cpp116
-rw-r--r--korganizer/plugins/printing/list/listprint.desktop95
-rw-r--r--korganizer/plugins/printing/list/listprint.h61
-rw-r--r--korganizer/plugins/printing/whatsnext/Makefile.am14
-rw-r--r--korganizer/plugins/printing/whatsnext/calprintwhatsnextconfig_base.ui176
-rw-r--r--korganizer/plugins/printing/whatsnext/whatsnextprint.cpp115
-rw-r--r--korganizer/plugins/printing/whatsnext/whatsnextprint.desktop95
-rw-r--r--korganizer/plugins/printing/whatsnext/whatsnextprint.h61
-rw-r--r--korganizer/plugins/printing/year/Makefile.am14
-rw-r--r--korganizer/plugins/printing/year/calprintyearconfig_base.ui200
-rw-r--r--korganizer/plugins/printing/year/yearprint.cpp204
-rw-r--r--korganizer/plugins/printing/year/yearprint.desktop84
-rw-r--r--korganizer/plugins/printing/year/yearprint.h65
21 files changed, 2009 insertions, 0 deletions
diff --git a/korganizer/plugins/printing/Makefile.am b/korganizer/plugins/printing/Makefile.am
new file mode 100644
index 000000000..5e53a9ff7
--- /dev/null
+++ b/korganizer/plugins/printing/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = journal year
diff --git a/korganizer/plugins/printing/journal/Makefile.am b/korganizer/plugins/printing/journal/Makefile.am
new file mode 100644
index 000000000..6238b1f18
--- /dev/null
+++ b/korganizer/plugins/printing/journal/Makefile.am
@@ -0,0 +1,14 @@
+INCLUDES = -I$(top_srcdir)/korganizer/interfaces -I$(top_srcdir)/korganizer/printing -I$(top_srcdir) $(all_includes)
+
+kde_module_LTLIBRARIES = libkorg_journalprint.la
+
+libkorg_journalprint_la_SOURCES =calprintjournalconfig_base.ui journalprint.cpp
+libkorg_journalprint_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries)
+libkorg_journalprint_la_LIBADD = $(LIB_KDECORE) $(LIB_KDEUI) $(top_builddir)/korganizer/printing/libkorg_stdprinting.la
+
+noinst_HEADERS =
+
+servicedir = $(kde_servicesdir)/korganizer
+service_DATA = journalprint.desktop
+
+METASOURCES = AUTO
diff --git a/korganizer/plugins/printing/journal/calprintjournalconfig_base.ui b/korganizer/plugins/printing/journal/calprintjournalconfig_base.ui
new file mode 100644
index 000000000..bee91a368
--- /dev/null
+++ b/korganizer/plugins/printing/journal/calprintjournalconfig_base.ui
@@ -0,0 +1,201 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>CalPrintJournalConfig_Base</class>
+<comment>Configuration page for the print journal mode.</comment>
+<author>Reinhold Kainhofer &lt;[email protected]&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>CalPrintJournal_Base</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>337</width>
+ <height>247</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>CalPrintJournal_Base</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>mDateRangeGroup</cstring>
+ </property>
+ <property name="title">
+ <string>Date &amp;&amp; Time Range</string>
+ </property>
+ <property name="selectedId" stdset="0">
+ <number>1</number>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>mAllJournals</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;All journal entries</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>0</number>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>mRangeJournals</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>Date &amp;range:</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>15</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>mFromDateLabel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Start date:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mFromDate</cstring>
+ </property>
+ </widget>
+ <widget class="KDateEdit">
+ <property name="name">
+ <cstring>mFromDate</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>mToDateLabel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;End date:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mToDate</cstring>
+ </property>
+ </widget>
+ <widget class="KDateEdit">
+ <property name="name">
+ <cstring>mToDate</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>324</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>201</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>KDateEdit</class>
+ <header location="local">libkdepim/kdateedit.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="PNG" length="826">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000030149444154789cb59531681b5718c77f0e377c070e3c810a3a70e0041eac51852e0a19e45134830a1d9a4c69a04bc8928e990a693a640e1d0c8642b08742321894c1507991b484c890902bb8701a047760c3bd21701fe4201dde49b6a41a32b8df72dcbbeffdbefffbbfefbd5b1b0c07cce266ebe667ae2006c3c1dada0cdc3be87d6e6c35b0d692a409d9c7ec8b20d65ae29398d19b1114e7e3de4ce98b3f5e10dc0053cf0951b4506496e1b964bf7ce6c585d9054c62d01d617ca48be0596553cf496d8f2c8b01c5f795fc93904e85ec4c01a152857a5d9175d0b2805c872080f18595ccc1499a10a225d4e2fbc2877786fe81253ab6c04c8d106e09db5d43ab0d146e5c64d1a23938fb98a185cea1c33eecfd9eba49eb427dcb201e245365f2b7b2fb5b4a3a31dcb927178afe07d86901df870fefa4842aed6f6b74ba42e52b4014d580e1eb9cbd9d94de7e4aad16d2f9be02d805f0b5e532f927a1ffcacea1777f122a8105b164a7c25faf323a5d9f1f1fd600e1e5bec59e2d4b5c7ef5209d0ad17b8b31864e57c0b3e0815ac3ee33253ab664a770ff5185d1a1cb8d2267d3e58aa1dc7d2508cbe597d0e74fdd269aaaf0f52d414c4ea3e9762c996869e42560d7a72e41c4799a2586e74f95e8d8151481fa86efbe7b3398ac58b1a2b8527589f15451ad303ac2293542ad6648a796278f13a27185e4c4754310facb98c53a79e19a3fdc1426ff28c3d7399d1f7cb25343eb96106cf83c790ce9c4f2eb831855c55485663327992eb6dc8a6259874ed700b0b793323cccb9ffa842b30d6133e3e75fea989ac15a8b16ca76b746b0b92278d919774c5b6d48a78697fb29bbcf52468742a32120909c24e899ce67beed5be2db01e22d1e9485bb620e47f9ee9e606a21bd3f5d3744c7e7c54d55e87443867d8b554515ac5db4620e8e4f62263170fd1cdee90aad7640141992891b0f367c9adfe4049bb07d3b7022bd8c687c0978f46684ee084150b65ac1fcca94591b7a90a496e4c095164fb016a2b192a497795cc0f84817aebe25f7bf70ccc54a575c555c03f78ffa5fc0570d1f0c076bff0232285a0901e2257b0000000049454e44ae426082</data>
+ </image>
+</images>
+<tabstops>
+ <tabstop>mFromDate</tabstop>
+ <tabstop>mToDate</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kdateedit.h</includehint>
+ <includehint>kdateedit.h</includehint>
+</includehints>
+</UI>
diff --git a/korganizer/plugins/printing/journal/journalprint.cpp b/korganizer/plugins/printing/journal/journalprint.cpp
new file mode 100644
index 000000000..31b1b10b6
--- /dev/null
+++ b/korganizer/plugins/printing/journal/journalprint.cpp
@@ -0,0 +1,135 @@
+/*
+ This file is part of KOrganizer.
+
+ Copyright (c) 2004 Reinhold Kainhofer <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ As a special exception, permission is given to link this program
+ with any edition of Qt, and distribute the resulting executable,
+ without including the source code for Qt in the source distribution.
+*/
+
+#ifndef KORG_NOPRINTER
+
+#include "journalprint.h"
+
+#include "calprintpluginbase.h"
+#include <libkcal/journal.h>
+#include <libkcal/calendar.h>
+#include <libkdepim/kdateedit.h>
+#include <kconfig.h>
+#include <kdebug.h>
+
+#include <qbuttongroup.h>
+
+#include "calprintjournalconfig_base.h"
+
+
+class JournalPrintFactory : public KOrg::PrintPluginFactory {
+ public:
+ KOrg::PrintPlugin *create() { return new CalPrintJournal; }
+};
+
+K_EXPORT_COMPONENT_FACTORY( libkorg_journalprint, JournalPrintFactory )
+
+
+/**************************************************************
+ * Print Journal
+ **************************************************************/
+
+QWidget *CalPrintJournal::createConfigWidget( QWidget *w )
+{
+ return new CalPrintJournalConfig_Base( w );
+}
+
+void CalPrintJournal::readSettingsWidget()
+{
+ CalPrintJournalConfig_Base *cfg =
+ dynamic_cast<CalPrintJournalConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ mFromDate = cfg->mFromDate->date();
+ mToDate = cfg->mToDate->date();
+ mUseDateRange = (cfg->mDateRangeGroup->selectedId() == 1);
+ }
+}
+
+void CalPrintJournal::setSettingsWidget()
+{
+ CalPrintJournalConfig_Base *cfg =
+ dynamic_cast<CalPrintJournalConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ cfg->mFromDate->setDate( mFromDate );
+ cfg->mToDate->setDate( mToDate );
+
+ cfg->mDateRangeGroup->setButton( (mUseDateRange)?1:0 );
+ }
+}
+
+void CalPrintJournal::loadConfig()
+{
+ if ( mConfig ) {
+ mUseDateRange = mConfig->readBoolEntry( "JournalsInRange", false );
+ }
+ setSettingsWidget();
+}
+
+void CalPrintJournal::saveConfig()
+{
+ kdDebug(5850) << "CalPrintJournal::saveConfig()" << endl;
+
+ readSettingsWidget();
+ if ( mConfig ) {
+ mConfig->writeEntry( "JournalsInRange", mUseDateRange );
+ }
+}
+
+void CalPrintJournal::setDateRange( const QDate& from, const QDate& to )
+{
+ CalPrintPluginBase::setDateRange( from, to );
+ CalPrintJournalConfig_Base *cfg =
+ dynamic_cast<CalPrintJournalConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ cfg->mFromDate->setDate( from );
+ cfg->mToDate->setDate( to );
+ }
+}
+
+void CalPrintJournal::print( QPainter &p, int width, int height )
+{
+ int x=0, y=0;
+ Journal::List journals( mCalendar->journals() );
+ if ( mUseDateRange ) {
+ Journal::List allJournals = journals;
+ journals.clear();
+ Journal::List::Iterator it = allJournals.begin();
+ for ( ; it != allJournals.end(); ++it ) {
+ QDate dt = (*it)->dtStart().date();
+ if ( mFromDate <= dt && dt <= mToDate ) {
+ journals.append( *it );
+ }
+ }
+ }
+
+ drawHeader( p, i18n("Journal entries"), QDate(), QDate(), QRect( 0, 0, width, headerHeight() ) );
+ y = headerHeight() + 15;
+
+ Journal::List::Iterator it = journals.begin();
+ for ( ; it != journals.end(); ++it ) {
+ drawJournal( *it, p, x, y, width, height );
+ }
+}
+
+#endif
diff --git a/korganizer/plugins/printing/journal/journalprint.desktop b/korganizer/plugins/printing/journal/journalprint.desktop
new file mode 100644
index 000000000..081f73d6d
--- /dev/null
+++ b/korganizer/plugins/printing/journal/journalprint.desktop
@@ -0,0 +1,95 @@
+[Desktop Entry]
+X-KDE-Library=libkorg_journalprint
+Name=Journal Print Style
+Name[af]=Joernaal druk styl
+Name[bg]=Стил на отпечатване на календар
+Name[ca]=Estil d'impressió del diari
+Name[cs]=Tiskový styl deníku
+Name[da]=Journal udskriftsstil
+Name[de]=Journal Druckstil
+Name[el]=Στυλ εκτύπωσης χρονικού
+Name[eo]=Ĵurnal-Presostilo
+Name[es]=Estilo de impresión del diario
+Name[et]=Päeviku trükkimise stiil
+Name[eu]=Egunkariak inprimatzeko estiloa
+Name[fa]=سبک چاپ نشریه
+Name[fi]=Päiväkirjan tulostustyyli
+Name[fr]=Impression en journal
+Name[fy]=Printstyl foar journaals
+Name[gl]=Imprimir en Estilo Xornal
+Name[hu]=Naplónyomtatási stílus
+Name[is]=Dagbókarprentstíll
+Name[it]=Stile di stampa a diario
+Name[ja]=ジャーナル印刷スタイル
+Name[ka]=ჟურნალის ბეჭდვის სტილი
+Name[kk]=Күнделікті басу стилі
+Name[km]=រចនាប័ទ្ម​បោះពុម្ព​ទិនានុប្បវត្តិ
+Name[lt]=Dienyno spausdinimo stilius
+Name[ms]=Gaya Cetak Jurnal
+Name[nb]=Utskriftsstil for dagbok
+Name[nds]=Daagbook-Druckstil
+Name[ne]=जर्नल मुद्रण शैली
+Name[nl]=Printstijl voor journaals
+Name[nn]=Utskriftsstil for dagbok
+Name[pl]=Styl drukowania dziennika
+Name[pt]=Estilo de Impressão em Diário
+Name[pt_BR]=Estilo de Impressão de Diário
+Name[ru]=Журнал
+Name[sk]=Štýl tlače žurnálu
+Name[sl]=Dnevniški slog tiskanja
+Name[sr]=Дневнички стил штампе
+Name[sr@Latn]=Dnevnički stil štampe
+Name[sv]=Journal-utskriftsstil
+Name[ta]=செய்தி அச்சுப்பாணி
+Name[tr]=Günlük Yazdırma Tarzı
+Name[uk]=Стиль друку журналом
+Name[zh_CN]=日记打印样式
+Name[zh_TW]=日誌列印風格
+Comment=This plugin allows you to print out journal entries (diary entries).
+Comment[af]=Hierdie inprop module maak dit moontlik om joernaal inskrywings (dagboek inskrywings) te druk.
+Comment[bg]=Приставката служи за печат на дневника.
+Comment[ca]=Aquest endollable us permet imprimir entrades del diari.
+Comment[cs]=tento modul umožňuje tisk položek deníku.
+Comment[da]=Dette plugin gør at du kan udskrive journalindgange (dagbogsindgange).
+Comment[de]=Mit diesem Modul können Journaleinträge (Tagebucheinträge) gedruckt werden.
+Comment[el]=Αυτό το πρόσθετο σας επιτρέπει να εκτυπώνετε καταχωρήσεις χρονικού.
+Comment[es]=Esta extensión le permite imprimir entradas del diario.
+Comment[et]=See plugin võimaldab trükkida päeviku sissekandeid.
+Comment[eu]=Plugin honek egunkarien sarrerak (eguneroko sarrerak) inprimatzeko aukera ematen dizu.
+Comment[fa]=این وصله، به شما اجازه می‌دهد که مدخلهای نشریه )مدخلهای روزانه( را چاپ کنید.
+Comment[fi]=Tämä liitännäinen mahdollistaa päiväkirjan tulostuksen.
+Comment[fr]=Ce module vous permet d'imprimer l'ensemble de vos journaux personnels
+Comment[fy]=Dizze plugin makket it mooglik journalen út te printsjen (deiboekitems).
+Comment[gl]=Este engadido permítelle imprimir as entradas do xornal (entradas do diario).
+Comment[hu]=Ez a modul naplóbejegyzések kinyomtatását teszi lehetővé.
+Comment[is]=Þetta íforrit gerir þér kleyft að prenta út dagbókarfærslur.
+Comment[it]=Questo plugin ti permette di stampare le registrazioni del diario.
+Comment[ja]=このプラグインにより、ジャーナル (日誌) のエントリを印刷できるようになります。
+Comment[ka]=ეს მოდული საშუალებას გაძლევთ ამობეჭდოთ ჟურნალის შემადგენლობა (დღიურის ელემენტები)
+Comment[kk]=Бұл күнделіктің жазуларын басып шығаратын модулі.
+Comment[km]=កម្មវិធី​ជំនួយ​នេះ​អនុញ្ញាត​ឲ្យ​អ្នក​បោះពុម្ព​ធាតុ​ទិនានុប្បវត្តិ (ធាតុ​កំណត់ហេតុ​ប្រចាំ​ថ្ងៃ) ។
+Comment[lt]=Šis priedas leidžia spausdinti dienyno įrašus.
+Comment[ms]=Plugin ini membenarkan anda mencetak entri jurnal (entri diari).
+Comment[nb]=Med dette programtillegget kan du skrive ut oppføringer i dagboka.
+Comment[nds]=Mit dit Moduul köönt Daagbook-Indrääg utdruckt warrn.
+Comment[ne]=यो प्लगइनले तपाईँलाई जर्नल प्रविष्टि मुद्रण गर्न अनुमति दिन्छ (दैनिक विवरण प्रविष्टि) ।
+Comment[nl]=Deze plugin maakt het mogelijk om journalen uit te printen (dagboekitems).
+Comment[nn]=Dette programtillegget lèt deg skriva ut dagboksoppføringar.
+Comment[pl]=Ta wtyczka pozwala drukować wpisy dziennika.
+Comment[pt]=Este diário permite-lhe imprimir os itens de diário.
+Comment[pt_BR]=Esse estilo lhe permite imprimir entradas de diário
+Comment[ru]=Этот модуль позволяет печатать журнал в виде дневника.
+Comment[sk]=Tento modul umožní vytlačiť položky žurnálu (denníkové položky).
+Comment[sl]=Ta vstavek vam omogoča natis vnosov v dnevnik.
+Comment[sr]=Овај прикључак вам омогућава да одштампате уносе из дневника.
+Comment[sr@Latn]=Ovaj priključak vam omogućava da odštampate unose iz dnevnika.
+Comment[sv]=Det här insticksprogrammet gör att du kan skriva ut journalanteckningar (dagboksanteckningar).
+Comment[ta]=இந்த சொருகுப்பொருள் இதழ் உள்ளீடுகளை அச்சிட உங்களை அனுமதிக்கிறது (நாள் குறிப்பேடு உள்ளீடுகள்).
+Comment[tr]=Bu eklenti, günlük girişlerinizi yazıcıdan çıkartmanızı sağlar.
+Comment[uk]=Цей журнал надає можливість друкувати записи журналу (записи щоденника).
+Comment[zh_CN]=此插件允许您打印日记项目。
+Comment[zh_TW]=此外掛程式讓您印出日誌項目。
+Type=Service
+ServiceTypes=Calendar/Plugin,KOrganizer/PrintPlugin
+X-KDE-KOrganizer-HasSettings=false
+X-KDE-PluginInterfaceVersion=2
diff --git a/korganizer/plugins/printing/journal/journalprint.h b/korganizer/plugins/printing/journal/journalprint.h
new file mode 100644
index 000000000..fb91759f1
--- /dev/null
+++ b/korganizer/plugins/printing/journal/journalprint.h
@@ -0,0 +1,63 @@
+/*
+ This file is part of KOrganizer.
+
+ Copyright (c) 2004 Reinhold Kainhofer <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ As a special exception, permission is given to link this program
+ with any edition of Qt, and distribute the resulting executable,
+ without including the source code for Qt in the source distribution.
+*/
+#ifndef JOURNALPRINT_H
+#define JOURNALPRINT_H
+
+#include <klocale.h>
+#include "calprintpluginbase.h"
+
+#ifndef KORG_NOPRINTER
+namespace KCal {
+class Calendar;
+}
+
+using namespace KCal;
+using namespace KOrg;
+
+class CalPrintJournal : public CalPrintPluginBase
+{
+ public:
+ CalPrintJournal():CalPrintPluginBase() {}
+ virtual ~CalPrintJournal() {}
+ virtual QString description() { return i18n("Print &journal"); }
+ virtual QString info() { return i18n("Prints all journals for a given date range"); }
+ virtual int sortID() { return CalPrinterBase::Journallist; }
+ virtual bool enabled() { return true; }
+ virtual QWidget *createConfigWidget( QWidget* );
+
+ public:
+ virtual void print(QPainter &p, int width, int height);
+ virtual void readSettingsWidget();
+ virtual void setSettingsWidget();
+ virtual void loadConfig();
+ virtual void saveConfig();
+ virtual void setDateRange( const QDate& from, const QDate& to );
+
+ protected:
+ bool mUseDateRange;
+};
+
+
+#endif
+#endif
diff --git a/korganizer/plugins/printing/list/Makefile.am b/korganizer/plugins/printing/list/Makefile.am
new file mode 100644
index 000000000..cd41be7ed
--- /dev/null
+++ b/korganizer/plugins/printing/list/Makefile.am
@@ -0,0 +1,14 @@
+INCLUDES = -I$(top_srcdir)/korganizer/interfaces -I$(top_srcdir)/korganizer/printing -I$(top_srcdir) $(all_includes)
+
+kde_module_LTLIBRARIES = libkorg_listprint.la
+
+libkorg_listprint_la_SOURCES = calprintlistconfig_base.ui listprint.cpp
+libkorg_listprint_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries)
+libkorg_listprint_la_LIBADD = $(LIB_KDECORE) $(LIB_KDEUI) $(top_builddir)/korganizer/printing/libkorg_stdprinting.la
+
+noinst_HEADERS =
+
+servicedir = $(kde_servicesdir)/korganizer
+service_DATA = listprint.desktop
+
+METASOURCES = AUTO
diff --git a/korganizer/plugins/printing/list/calprintlistconfig_base.ui b/korganizer/plugins/printing/list/calprintlistconfig_base.ui
new file mode 100644
index 000000000..cea873e6a
--- /dev/null
+++ b/korganizer/plugins/printing/list/calprintlistconfig_base.ui
@@ -0,0 +1,186 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>CalPrintListConfig_Base</class>
+<comment>Configuration page for the print list mode.</comment>
+<author>Reinhold Kainhofer &lt;[email protected]&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>CalPrintList_Base</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>427</width>
+ <height>171</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>CalPrintList_Base</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>mDateRangeGroup</cstring>
+ </property>
+ <property name="title">
+ <string>Date &amp;&amp; Time Range</string>
+ </property>
+ <property name="selectedId" stdset="0">
+ <number>-1</number>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>15</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>mFromDateLabel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Start date:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mFromDate</cstring>
+ </property>
+ </widget>
+ <widget class="KDateEdit">
+ <property name="name">
+ <cstring>mFromDate</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>mToDateLabel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;End date:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mToDate</cstring>
+ </property>
+ </widget>
+ <widget class="KDateEdit">
+ <property name="name">
+ <cstring>mToDate</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>324</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Print Incidences of Type</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>mEvents</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Events</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>mTodos</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;To-dos</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>mJournals</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Journals</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<tabstops>
+ <tabstop>mFromDate</tabstop>
+ <tabstop>mToDate</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/korganizer/plugins/printing/list/listprint.cpp b/korganizer/plugins/printing/list/listprint.cpp
new file mode 100644
index 000000000..0221f1c67
--- /dev/null
+++ b/korganizer/plugins/printing/list/listprint.cpp
@@ -0,0 +1,116 @@
+/*
+ This file is part of KOrganizer.
+
+ Copyright (c) 2004 Reinhold Kainhofer <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ As a special exception, permission is given to link this program
+ with any edition of Qt, and distribute the resulting executable,
+ without including the source code for Qt in the source distribution.
+*/
+
+#ifndef KORG_NOPRINTER
+
+#include "listprint.h"
+
+#include "calprintpluginbase.h"
+#include <libkcal/event.h>
+#include <libkcal/todo.h>
+#include <libkcal/calendar.h>
+#include <libkdepim/kdateedit.h>
+#include <kconfig.h>
+#include <kdebug.h>
+
+#include <qbuttongroup.h>
+
+#include "calprintlistconfig_base.h"
+
+
+class ListPrintFactory : public KOrg::PrintPluginFactory {
+ public:
+ KOrg::PrintPlugin *create() { return new CalPrintList; }
+};
+
+K_EXPORT_COMPONENT_FACTORY( libkorg_listprint, ListPrintFactory )
+
+
+
+/**************************************************************
+ * Print Day
+ **************************************************************/
+
+QWidget *CalPrintList::createConfigWidget( QWidget *w )
+{
+ return new CalPrintListConfig_Base( w );
+}
+
+void CalPrintList::readSettingsWidget()
+{
+ CalPrintListConfig_Base *cfg =
+ dynamic_cast<CalPrintListConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ mFromDate = cfg->mFromDate->date();
+ mToDate = cfg->mToDate->date();
+ mUseDateRange = (cfg->mDateRangeGroup->selectedId() == 1);
+ }
+}
+
+void CalPrintList::setSettingsWidget()
+{
+ CalPrintListConfig_Base *cfg =
+ dynamic_cast<CalPrintListConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ cfg->mFromDate->setDate( mFromDate );
+ cfg->mToDate->setDate( mToDate );
+
+ cfg->mDateRangeGroup->setButton( (mUseDateRange)?1:0 );
+ }
+}
+
+void CalPrintList::loadConfig()
+{
+ if ( mConfig ) {
+ mUseDateRange = mConfig->readBoolEntry( "ListsInRange", false );
+ }
+ setSettingsWidget();
+}
+
+void CalPrintList::saveConfig()
+{
+ kdDebug(5850) << "CalPrintList::saveConfig()" << endl;
+
+ readSettingsWidget();
+ if ( mConfig ) {
+ mConfig->writeEntry( "ListsInRange", mUseDateRange );
+ }
+}
+
+void CalPrintList::setDateRange( const QDate& from, const QDate& to )
+{
+ CalPrintPluginBase::setDateRange( from, to );
+ CalPrintListConfig_Base *cfg =
+ dynamic_cast<CalPrintListConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ cfg->mFromDate->setDate( from );
+ cfg->mToDate->setDate( to );
+ }
+}
+
+void CalPrintList::print( QPainter &p, int width, int height )
+{
+}
+
+#endif
diff --git a/korganizer/plugins/printing/list/listprint.desktop b/korganizer/plugins/printing/list/listprint.desktop
new file mode 100644
index 000000000..7688a2c52
--- /dev/null
+++ b/korganizer/plugins/printing/list/listprint.desktop
@@ -0,0 +1,95 @@
+[Desktop Entry]
+X-KDE-Library=libkorg_listprint
+Name=List Print Style
+Name[af]=Lys druk styl
+Name[bg]=Печат като списък
+Name[ca]=Estil d'impressió en llista
+Name[cs]=Styl deníku - seznam
+Name[da]=Listeudskriftsstil
+Name[de]=Listen Druckstil
+Name[el]=Στυλ εκτύπωσης λίστας
+Name[eo]=List-Presostilo
+Name[es]=Estilo de impresión de la lista
+Name[et]=Nimekirja trükkimise stiil
+Name[eu]=Zerrenda inprimatzeko estiloa
+Name[fa]=سبک چاپ فهرست
+Name[fi]=Listatulostustyyli
+Name[fr]=Impression en liste
+Name[fy]=Printstyl foar listen
+Name[gl]=Imprimir en Estilo de Lista
+Name[hu]=Eseménylista kinyomtatása
+Name[is]=Listaprentstíll
+Name[it]=Stile di stampa ad elenco
+Name[ja]=リスト印刷スタイル
+Name[ka]=ბეჭდვის სტილის სია
+Name[kk]=Тізімді басу стилі
+Name[km]=រចនាប័ទ្ម​បោះពុម្ព​បញ្ជី
+Name[lt]=Sąrašo spausdinimo stilius
+Name[ms]=Gaya Cetakan Senarai
+Name[nb]=Utskriftsstil for liste
+Name[nds]=Listen-Druckstil
+Name[ne]=सूची मुद्रण शैली
+Name[nl]=Printstijl voor lijsten
+Name[nn]=Utskriftsstil for dagbøker
+Name[pl]=Styl drukowania listy
+Name[pt]=Estilo de Impressão em Lista
+Name[pt_BR]=Estilo de Impressão em Lista
+Name[ru]=Список
+Name[sk]=Štýl tlače zoznamu
+Name[sl]=Slog tiskanja v obliki list
+Name[sr]=Листајући стил штампе
+Name[sr@Latn]=Listajući stil štampe
+Name[sv]=List-utskriftsstil
+Name[ta]=அச்சு பாணியை பட்டியலிடு
+Name[tr]=Liste Yazdırma Tarzı
+Name[uk]=Стиль друку списком
+Name[zh_CN]=列表打印样式
+Name[zh_TW]=清單列印風格
+Comment=This plugin allows you to print out events and to-dos in list form.
+Comment[af]=Hierdie inprop module druk afsprake en te-doen items in lys vorm.
+Comment[bg]=Приставката служи за печат на събитията и задачите в списъчна форма.
+Comment[ca]=Aquest endollable permet imprimir esdeveniments i tasques pendents en forma de llista.
+Comment[cs]=tento modul umožňuje tisknout události a úlohy do seznamu.
+Comment[da]=Dette plugin gør at du kan udskrive begivenheder og opgaver på en liste.
+Comment[de]=Mit diesem Modul können Ereignisse und Aufgaben in Listenform ausgedruckt werden.
+Comment[el]=Αυτό το πρόσθετο σας επιτρέπει να εκτυπώνετε λίστες γεγονότων και προς υλοποίηση λίστες σε μορφή λίστας.
+Comment[es]=Esta extensión le permite imprimir eventos y tareas pendientes en forma de lista.
+Comment[et]=See plugin võimaldab trükkida sündmusi ja ülesandeid nimekirjana.
+Comment[eu]=Plugin honek gertaerak eta egitekoak zerrenda moduan inprimatzeko aukera ematen dizu.
+Comment[fa]=این وصله به شما اجازه می‌دهد که رویدادها و کارهای انجامی را در برگۀ فهرست چاپ کنید.
+Comment[fi]=Tämä liitännäinen mahdollistaa tapahtumien ja tehtävien tulostuksen listana.
+Comment[fr]=Ce module vous permet d'imprimer les évènements et les tâches sous forme de liste
+Comment[fy]=Dizze plugin makket it mooglik om eveneminten en taken yn list foar út te printen.
+Comment[gl]=Este plugin permítelle imprimir os eventos e as tarefas e forma de lista.
+Comment[hu]=Ezzel a modullal listaként kinyomtathatók a feladatok és események.
+Comment[is]=Þetta íforrit gerir þér kleyft að prenta út lista með atburðum og verkþáttum.
+Comment[it]=Questo plugin ti permette di stampare eventi e cose da fare in modalità elenco.
+Comment[ja]=このプラグインにより、リストフォーム内のイベントや To-Do を印刷できるようになります。
+Comment[ka]=ეს მოდული საშუალებას გაძლევთ სიის ფორმით ამობეჭდოთ მოვლენები და დავალებები.
+Comment[kk]=Бұл оқиғалар мен жоспарларды тізім түрінде басатын модулі.
+Comment[km]=កម្មវិធី​ជំនួយ​នេះ​អនុញ្ញាត​ឲ្យ​អ្នក​បោះពុម្ព​ព្រឹត្តិការណ៍ និង​ការងារ​ត្រូវ​ធ្វើក្នុង​ទម្រង់​ជា​បញ្ជី ។
+Comment[lt]=Šis priedas leidžia spausdinti įvykius ir darbus sąrašo forma.
+Comment[ms]=Plugin ini membenarkan anda mencetak peristiwa dan tugasan dalam borang senarai.
+Comment[nb]=Med dette programtillegget kan du skrive ut hendelser og gjørelister på liste-form.
+Comment[nds]=Mit dit Moduul köönt Begeefnissen un Opgaven as Listen utdruckt warrn.
+Comment[ne]=यो प्लगइनले तपाईँलाई घटना मुद्रण गर्न र सूची फारममा गर्नुपर्ने कार्यहरू गर्न अनुमति दिन्छ ।
+Comment[nl]=Deze plugin maakt het mogelijk om evenementen en taken in lijstvorm uit te printen.
+Comment[nn]=Dette programtillegget lèt deg skriva ut hendingar og hugselister på listeform.
+Comment[pl]=Ta wtyczka pozwala drukować zdarzenia i zadania w postaci listy.
+Comment[pt]=Este 'plugin' permite-lhe imprimir os eventos e os itens por-fazer no formato de uma lista.
+Comment[pt_BR]=Este plug-in permite que você imprima eventos e pendências em forma de lista.
+Comment[ru]=Этот модуль позволяет печатать список событий и задач.
+Comment[sk]=Tento modul umožní vytlačiť udalosti a úlohy vo forme zoznamu.
+Comment[sl]=Ta vstavek vam omogoča natis dogodkov in čakajočih opravil v obliki seznama.
+Comment[sr]=Овај прикључак вам омогућава да одштампате догађаје и обавезе у облику листе.
+Comment[sr@Latn]=Ovaj priključak vam omogućava da odštampate događaje i obaveze u obliku liste.
+Comment[sv]=Det här insticksprogrammet gör att du kan skriva ut händelser och uppgifter i en lista.
+Comment[ta]=இந்த சொருகுப்பொருள் பட்டியல் படிவத்தில் உள்ள செய்திகள் மற்றும் செய்யவேண்டியவைகளை அச்சிட உங்களை அனுமதிக்கிறது.
+Comment[tr]=Bu eklenti, olayları ve yapılacaklar listesini bir liste biçiminde yazdırmanızı sağlar.
+Comment[uk]=Цей втулок дозволяє друкувати події і завдання у вигляді списку.
+Comment[zh_CN]=此插件允许您以列表格式打印事件和待办事宜。
+Comment[zh_TW]=此外掛程式允許您以清單格式印出事件與待辦事項。
+Type=Service
+ServiceTypes=Calendar/Plugin,KOrganizer/PrintPlugin
+X-KDE-KOrganizer-HasSettings=false
+X-KDE-PluginInterfaceVersion=2
diff --git a/korganizer/plugins/printing/list/listprint.h b/korganizer/plugins/printing/list/listprint.h
new file mode 100644
index 000000000..dc370ba86
--- /dev/null
+++ b/korganizer/plugins/printing/list/listprint.h
@@ -0,0 +1,61 @@
+/*
+ This file is part of KOrganizer.
+
+ Copyright (c) 2004 Reinhold Kainhofer <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ As a special exception, permission is given to link this program
+ with any edition of Qt, and distribute the resulting executable,
+ without including the source code for Qt in the source distribution.
+*/
+#ifndef LISTPRINT_H
+#define LISTPRINT_H
+
+#include <klocale.h>
+#include "calprintpluginbase.h"
+
+#ifndef KORG_NOPRINTER
+namespace KCal {
+class Calendar;
+}
+
+using namespace KCal;
+
+class CalPrintList : public CalPrintPluginBase
+{
+ public:
+ CalPrintList():CalPrintPluginBase() {}
+ virtual ~CalPrintList() {}
+ virtual QString description() { return i18n("Print list"); }
+ virtual QString info() { return i18n("Prints a list of events and to-dos"); }
+ virtual int sortID() { return 950; }
+ virtual QWidget *createConfigWidget( QWidget* );
+
+ public:
+ virtual void print(QPainter &p, int width, int height);
+ virtual void readSettingsWidget();
+ virtual void setSettingsWidget();
+ virtual void loadConfig();
+ virtual void saveConfig();
+ virtual void setDateRange( const QDate& from, const QDate& to );
+
+ protected:
+ bool mUseDateRange;
+};
+
+
+#endif
+#endif
diff --git a/korganizer/plugins/printing/whatsnext/Makefile.am b/korganizer/plugins/printing/whatsnext/Makefile.am
new file mode 100644
index 000000000..f1b1d5aab
--- /dev/null
+++ b/korganizer/plugins/printing/whatsnext/Makefile.am
@@ -0,0 +1,14 @@
+INCLUDES = -I$(top_srcdir)/korganizer/interfaces -I$(top_srcdir)/korganizer/printing -I$(top_srcdir) $(all_includes)
+
+kde_module_LTLIBRARIES = libkorg_whatsnextprint.la
+
+libkorg_whatsnextprint_la_SOURCES = calprintwhatsnextconfig_base.ui whatsnextprint.cpp
+libkorg_whatsnextprint_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries)
+libkorg_whatsnextprint_la_LIBADD = $(LIB_KDECORE) $(LIB_KDEUI) $(top_builddir)/korganizer/printing/libkorg_stdprinting.la
+
+noinst_HEADERS =
+
+servicedir = $(kde_servicesdir)/korganizer
+service_DATA = whatsnextprint.desktop
+
+METASOURCES = AUTO
diff --git a/korganizer/plugins/printing/whatsnext/calprintwhatsnextconfig_base.ui b/korganizer/plugins/printing/whatsnext/calprintwhatsnextconfig_base.ui
new file mode 100644
index 000000000..c93e48ed6
--- /dev/null
+++ b/korganizer/plugins/printing/whatsnext/calprintwhatsnextconfig_base.ui
@@ -0,0 +1,176 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>CalPrintWhatsNextConfig_Base</class>
+<comment>Configuration page for the print whatsnext mode.</comment>
+<author>Reinhold Kainhofer &lt;[email protected]&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>CalPrintWhatsNext_Base</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>337</width>
+ <height>247</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>CalPrintWhatsNext_Base</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>mDateRangeGroup</cstring>
+ </property>
+ <property name="title">
+ <string>Date &amp;&amp; Time Range</string>
+ </property>
+ <property name="selectedId" stdset="0">
+ <number>-1</number>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>15</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>mFromDateLabel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Start date:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mFromDate</cstring>
+ </property>
+ </widget>
+ <widget class="KDateEdit">
+ <property name="name">
+ <cstring>mFromDate</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>mToDateLabel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;End date:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mToDate</cstring>
+ </property>
+ </widget>
+ <widget class="KDateEdit">
+ <property name="name">
+ <cstring>mToDate</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>324</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>201</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>KDateEdit</class>
+ <header location="local">libkdepim/kdateedit.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="PNG" length="826">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000030149444154789cb59531681b5718c77f0e377c070e3c810a3a70e0041eac51852e0a19e45134830a1d9a4c69a04bc8928e990a693a640e1d0c8642b08742321894c1507991b484c890902bb8701a047760c3bd21701fe4201dde49b6a41a32b8df72dcbbeffdbefffbbfefbd5b1b0c07cce266ebe667ae2006c3c1dada0cdc3be87d6e6c35b0d692a409d9c7ec8b20d65ae29398d19b1114e7e3de4ce98b3f5e10dc0053cf0951b4506496e1b964bf7ce6c585d9054c62d01d617ca48be0596553cf496d8f2c8b01c5f795fc93904e85ec4c01a152857a5d9175d0b2805c872080f18595ccc1499a10a225d4e2fbc2877786fe81253ab6c04c8d106e09db5d43ab0d146e5c64d1a23938fb98a185cea1c33eecfd9eba49eb427dcb201e245365f2b7b2fb5b4a3a31dcb927178afe07d86901df870fefa4842aed6f6b74ba42e52b4014d580e1eb9cbd9d94de7e4aad16d2f9be02d805f0b5e532f927a1ffcacea1777f122a8105b164a7c25faf323a5d9f1f1fd600e1e5bec59e2d4b5c7ef5209d0ad17b8b31864e57c0b3e0815ac3ee33253ab664a770ff5185d1a1cb8d2267d3e58aa1dc7d2508cbe597d0e74fdd269aaaf0f52d414c4ea3e9762c996869e42560d7a72e41c4799a2586e74f95e8d8151481fa86efbe7b3398ac58b1a2b8527589f15451ad303ac2293542ad6648a796278f13a27185e4c4754310facb98c53a79e19a3fdc1426ff28c3d7399d1f7cb25343eb96106cf83c790ce9c4f2eb831855c55485663327992eb6dc8a6259874ed700b0b793323cccb9ffa842b30d6133e3e75fea989ac15a8b16ca76b746b0b92278d919774c5b6d48a78697fb29bbcf52468742a32120909c24e899ce67beed5be2db01e22d1e9485bb620e47f9ee9e606a21bd3f5d3744c7e7c54d55e87443867d8b554515ac5db4620e8e4f62263170fd1cdee90aad7640141992891b0f367c9adfe4049bb07d3b7022bd8c687c0978f46684ee084150b65ac1fcca94591b7a90a496e4c095164fb016a2b192a497795cc0f84817aebe25f7bf70ccc54a575c555c03f78ffa5fc0570d1f0c076bff0232285a0901e2257b0000000049454e44ae426082</data>
+ </image>
+</images>
+<tabstops>
+ <tabstop>mFromDate</tabstop>
+ <tabstop>mToDate</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kdateedit.h</includehint>
+ <includehint>kdateedit.h</includehint>
+</includehints>
+</UI>
diff --git a/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp b/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp
new file mode 100644
index 000000000..48dd30436
--- /dev/null
+++ b/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp
@@ -0,0 +1,115 @@
+/*
+ This file is part of KOrganizer.
+
+ Copyright (c) 2004 Reinhold Kainhofer <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ As a special exception, permission is given to link this program
+ with any edition of Qt, and distribute the resulting executable,
+ without including the source code for Qt in the source distribution.
+*/
+
+#ifndef KORG_NOPRINTER
+
+#include "whatsnextprint.h"
+
+#include "calprintpluginbase.h"
+#include <libkcal/event.h>
+#include <libkcal/todo.h>
+#include <libkcal/calendar.h>
+#include <libkdepim/kdateedit.h>
+#include <kconfig.h>
+#include <kdebug.h>
+
+#include <qbuttongroup.h>
+
+#include "calprintwhatsnextconfig_base.h"
+
+
+class WhatsNextPrintFactory : public KOrg::PrintPluginFactory {
+ public:
+ KOrg::PrintPlugin *create() { return new CalPrintWhatsNext; }
+};
+
+K_EXPORT_COMPONENT_FACTORY( libkorg_whatsnextprint, WhatsNextPrintFactory )
+
+
+/**************************************************************
+ * Print What's Next
+ **************************************************************/
+
+QWidget *CalPrintWhatsNext::createConfigWidget( QWidget *w )
+{
+ return new CalPrintWhatsNextConfig_Base( w );
+}
+
+void CalPrintWhatsNext::readSettingsWidget()
+{
+ CalPrintWhatsNextConfig_Base *cfg =
+ dynamic_cast<CalPrintWhatsNextConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ mFromDate = cfg->mFromDate->date();
+ mToDate = cfg->mToDate->date();
+ mUseDateRange = (cfg->mDateRangeGroup->selectedId() == 1);
+ }
+}
+
+void CalPrintWhatsNext::setSettingsWidget()
+{
+ CalPrintWhatsNextConfig_Base *cfg =
+ dynamic_cast<CalPrintWhatsNextConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ cfg->mFromDate->setDate( mFromDate );
+ cfg->mToDate->setDate( mToDate );
+
+ cfg->mDateRangeGroup->setButton( (mUseDateRange)?1:0 );
+ }
+}
+
+void CalPrintWhatsNext::loadConfig()
+{
+ if ( mConfig ) {
+ mUseDateRange = mConfig->readBoolEntry( "WhatsNextsInRange", false );
+ }
+ setSettingsWidget();
+}
+
+void CalPrintWhatsNext::saveConfig()
+{
+ kdDebug(5850) << "CalPrintWhatsNext::saveConfig()" << endl;
+
+ readSettingsWidget();
+ if ( mConfig ) {
+ mConfig->writeEntry( "WhatsNextsInRange", mUseDateRange );
+ }
+}
+
+void CalPrintWhatsNext::setDateRange( const QDate& from, const QDate& to )
+{
+ CalPrintPluginBase::setDateRange( from, to );
+ CalPrintWhatsNextConfig_Base *cfg =
+ dynamic_cast<CalPrintWhatsNextConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ cfg->mFromDate->setDate( from );
+ cfg->mToDate->setDate( to );
+ }
+}
+
+void CalPrintWhatsNext::print( QPainter &p, int width, int height )
+{
+}
+
+#endif
diff --git a/korganizer/plugins/printing/whatsnext/whatsnextprint.desktop b/korganizer/plugins/printing/whatsnext/whatsnextprint.desktop
new file mode 100644
index 000000000..50131734e
--- /dev/null
+++ b/korganizer/plugins/printing/whatsnext/whatsnextprint.desktop
@@ -0,0 +1,95 @@
+[Desktop Entry]
+X-KDE-Library=libkorg_whatsnextprint
+Name=What's Next Print Style
+Name[af]=Wat is volgende - druk styl
+Name[bg]=Стил за отпечатване на "Какво следва"
+Name[ca]=Estil d'impressió Què toca ara?
+Name[cs]=Styl deníku - co je nového
+Name[da]=Hvad er det næste-udskriftsstil
+Name[de]=Was-kommt-als-nächstes Druckstil
+Name[el]=Στυλ εκτύπωσης 'Τί νέο υπάρχει'
+Name[eo]="Kio postsekvas"-Presostilo
+Name[es]=Estilo de impresión de «Qué es lo siguiente»
+Name[et]="Mis järgmiseks?" trükkimise stiil
+Name[eu]="Zer da hurrengoa" inprimatzeko estiloa
+Name[fa]=سبک چاپ بعدی چیست
+Name[fi]=Mitä seuraavaksi -tulostustyyli
+Name[fr]=Impression de la suite du programme
+Name[fy]=Printstyl foar Wat komt der no
+Name[gl]=Imprimir en Estilo Qué Vén Agora
+Name[hu]=A közeljövő eseményeinek kinyomtatása
+Name[is]=Hvað er næst prentstíll
+Name[it]=Stile di stampa "cosa viene dopo"
+Name[ja]=次は何? 印刷スタイル
+Name[ka]=ბეჭდვის სტილი "შემდეგი რა არის?"
+Name[kk]="Не істеу?" бетін басу стилі
+Name[km]=រចនាប័ទ្ម​បោះពុម្ព​ការងារ​បន្តបន្ទាប់
+Name[lt]=Ateinančių įvykių spausdinimo stilius
+Name[ms]=Gaya Cetak Apa Seterusnya
+Name[nb]=Utskriftsstil for Hva Nå
+Name[nds]=Druckstil för "Wat kummt nu"-Indrääg
+Name[ne]=पछिल्लो मुद्रण शैली कुन हो
+Name[nl]=Printstijl voor Wat komt er nu
+Name[nn]=Utskriftsstil for «Kva no»
+Name[pl]=Styl drukowania "Do dalej"
+Name[pt]=Estilo de Impressão "O Que Se Segue"
+Name[pt_BR]=Estilo de impressão "A Seguir"
+Name[ru]=Предстоящие задачи
+Name[sk]=Štýl tlače Čo nasleduje
+Name[sl]=Slog tiskanja v obliki »Kaj je naslednje«
+Name[sr]=Стил штампе „Шта је следеће“
+Name[sr@Latn]=Stil štampe „Šta je sledeće“
+Name[sv]=Vad står på tur-utskriftsstil
+Name[ta]=அடுத்டு என்ன அச்சுப் பாணி
+Name[tr]=Sıradaki Nedir Yazdırma Tarzı
+Name[uk]=Стиль друку "Що далі?"
+Name[zh_CN]=下步安排打印样式
+Name[zh_TW]=「下一個是什麼」列印風格
+Comment=This plugin allows you to print out a list of all upcoming events and to-dos.
+Comment[af]=Hierdie inprop module druk 'n lys van al die opkomende afsprake en te-doen itemme.
+Comment[bg]=Приставката служи за печат на бъдещи събития и задачи в списъчна форма.
+Comment[ca]=Aquest endollable us permet imprimir una llista de tots els esdeveniments i tasques pendents propers.
+Comment[cs]=Tento modul umožňuje tisk seznamu všech budoucích událostí a úkolů.
+Comment[da]=Dette plugin gør at du kan udskrive en liste med alle kommende begivenheder og opgaver.
+Comment[de]=Mit diesem Modul kann eine Liste der als nächstes anliegenden Ereignisse und Aufgaben gedruckt werden
+Comment[el]=Αυτό το πρόσθετο σας επιτρέπει να εκτυπώνετε μία λίστα γεγονότων ή προς υλοποίηση εργασιών.
+Comment[es]=Esta extensión le permite imprimir una lista de todos los eventos y tareas pendientes futuros.
+Comment[et]=See plugin võimaldab trükkida kõigi eelseisvate sündmuste ja ülesannete nimekirja.
+Comment[eu]=Plugin honek gertatuko diren gertaera eta egitekoen zerrenda bat inprimatzeko aukera ematen dizu.
+Comment[fa]=این وصله به شما اجازه می‌دهد که فهرستی از همۀ رویدادها و کارهای انجامی که بالا می‌آیند را چاپ کنید.
+Comment[fi]=Tämä liitännäinen mahdollistaa tulevien tapahtumien ja tehtävien tulostuksen listana.
+Comment[fr]=Ce module vous permet d'imprimer la liste des prochaines évènements et des prochaines tâches.
+Comment[fy]=Dizze plugin makket it mooglik om in list fan alle kommende eveneminten en taken út te printsjen.
+Comment[gl]=Este engadido permítelle imprimir unha lista de todos os eventos e tarefas por vir.
+Comment[hu]=Ezzel a modullal kinyomtathatók a rövidesen aktuálissá váló feladatok és események.
+Comment[is]=Þetta íforrit gerir þér kleyft að prenta út lista yfir alla væntanlega atburði og verkþætti.
+Comment[it]=Questo plugin vi permette di stampare una lista dei prossimi eventi e cose da fare.
+Comment[ja]=このプラグインにより、将来のすべてのイベントや To-Do のリストを印刷できるようになります。
+Comment[ka]=ეს მოდული საშუალებას გაძლევთ ამობეჭდოთ მომავალი მოვლენები და დავალებები.
+Comment[kk]=Бұл келер оқиғалар мен жоспарлар тізімін басып шығаратын модулі.
+Comment[km]=កម្មវិធី​ជំនួយ​នេះ​អនុញ្ញាត​ឲ្យ​អ្នក​បោះពុម្ព​បញ្ជី​នៃ​ព្រឹត្តិការណ៍ និង​ការងារ​ត្រូវ​ធ្វើ​បន្តបន្ទាប់
+Comment[lt]=Šis priedas leidžia spausdinti sąrašą visų artėjančių įvykių ir darbų.
+Comment[ms]=Plugin ini membenarkan anda mencetak senarai semua peristiwa dan tugasan mendatang.
+Comment[nb]=Med dette programtillegget kan du skrive ut en liste over kommende hendelser og ting som skal gjøres.
+Comment[nds]=Mit dit Moduul kann en List vun de direktemang nakamen Begeefnissen un Opgaven utdruckt warrn.
+Comment[ne]=यो प्लगइनले तपाईँलाई सबै पछि हुने घटना र गर्नुपर्ने कार्यहरुको सूचीको मुद्रण गर्न अनुमति दिन्छ ।
+Comment[nl]=Deze plugin maakt het mogelijk om een lijst van alle komende evenementen en taken uit te printen.
+Comment[nn]=Dette programtillegget lèt deg skriva ut ei liste over alle dei komande hendingane og oppføringane i hugselista.
+Comment[pl]=Ta wtyczka pozwala wydrukować wszystkie przyszłe zdarzenia i zadania.
+Comment[pt]=Este 'plugin' permite-lhe imprimir uma lista com todos os eventos e itens por-fazer próximos.
+Comment[pt_BR]=Este plug-in permite que você imprima uma lista de todos os eventos e pendências que estão por vir.
+Comment[ru]=Этот модуль позволяет печатать список будущих событий и задач.
+Comment[sk]=Tento modul umožní vytlačiť zoznam všetkých nadchádzajúcich udalostí a úloh.
+Comment[sl]=Ta vstavek vam omogoča natis seznama vseh prihahajočih dogodkov in čakajočih opravil.
+Comment[sr]=Овај прикључак вам омогућава да одштампате листу свих наступајућих догађаја и обавеза.
+Comment[sr@Latn]=Ovaj priključak vam omogućava da odštampate listu svih nastupajućih događaja i obaveza.
+Comment[sv]=Det här insticksprogrammet gör att du kan skriva ut en lista med alla kommande händelser och uppgifter.
+Comment[ta]=இந்த சொருகுப்பொருள் ஒரு வரப்போகும் நிகழ்வுகளின் பட்டியல் மற்றும் செய்யவேண்டியவைகளை அச்சிட உங்களை அனுமதிக்கிறது.
+Comment[tr]=Bu eklenti, sıradaki olayları ve yapılacaklar listesini bir liste biçiminde yazdırmanızı sağlar.
+Comment[uk]=Цей втулок дозволяє друкувати список всіх майбутніх подій та завдань.
+Comment[zh_CN]=此插件允许您打印所有即将到达的事件和代办事宜。
+Comment[zh_TW]=此外掛程式允許您印出即將發生的事件與待辦事項清單。
+Type=Service
+ServiceTypes=Calendar/Plugin,KOrganizer/PrintPlugin
+X-KDE-KOrganizer-HasSettings=false
+X-KDE-PluginInterfaceVersion=2
diff --git a/korganizer/plugins/printing/whatsnext/whatsnextprint.h b/korganizer/plugins/printing/whatsnext/whatsnextprint.h
new file mode 100644
index 000000000..bdba1f71b
--- /dev/null
+++ b/korganizer/plugins/printing/whatsnext/whatsnextprint.h
@@ -0,0 +1,61 @@
+/*
+ This file is part of KOrganizer.
+
+ Copyright (c) 2004 Reinhold Kainhofer <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ As a special exception, permission is given to link this program
+ with any edition of Qt, and distribute the resulting executable,
+ without including the source code for Qt in the source distribution.
+*/
+#ifndef WHATSNEXTPRINT_H
+#define WHATSNEXTPRINT_H
+
+#include <klocale.h>
+#include "calprintpluginbase.h"
+
+#ifndef KORG_NOPRINTER
+namespace KCal {
+class Calendar;
+}
+
+using namespace KCal;
+
+class CalPrintWhatsNext : public CalPrintPluginBase
+{
+ public:
+ CalPrintWhatsNext():CalPrintPluginBase() {}
+ virtual ~CalPrintWhatsNext() {}
+ virtual QString description() { return i18n("Print What's Next"); }
+ virtual QString info() { return i18n("Prints a list of all upcoming events and todos."); }
+ virtual int sortID() { return 50; }
+ virtual QWidget *createConfigWidget( QWidget* );
+
+ public:
+ virtual void print(QPainter &p, int width, int height);
+ virtual void readSettingsWidget();
+ virtual void setSettingsWidget();
+ virtual void loadConfig();
+ virtual void saveConfig();
+ virtual void setDateRange( const QDate& from, const QDate& to );
+
+ protected:
+ bool mUseDateRange;
+};
+
+
+#endif
+#endif
diff --git a/korganizer/plugins/printing/year/Makefile.am b/korganizer/plugins/printing/year/Makefile.am
new file mode 100644
index 000000000..f51e29e61
--- /dev/null
+++ b/korganizer/plugins/printing/year/Makefile.am
@@ -0,0 +1,14 @@
+INCLUDES = -I$(top_srcdir)/korganizer/interfaces -I$(top_srcdir)/korganizer/printing -I$(top_srcdir) $(all_includes)
+
+kde_module_LTLIBRARIES = libkorg_yearlyprint.la
+
+libkorg_yearlyprint_la_SOURCES =calprintyearconfig_base.ui yearprint.cpp
+libkorg_yearlyprint_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries)
+libkorg_yearlyprint_la_LIBADD = $(LIB_KDECORE) $(LIB_KDEUI) $(top_builddir)/korganizer/printing/libkorg_stdprinting.la
+
+noinst_HEADERS =
+
+servicedir = $(kde_servicesdir)/korganizer
+service_DATA = yearprint.desktop
+
+METASOURCES = AUTO
diff --git a/korganizer/plugins/printing/year/calprintyearconfig_base.ui b/korganizer/plugins/printing/year/calprintyearconfig_base.ui
new file mode 100644
index 000000000..43d906d6c
--- /dev/null
+++ b/korganizer/plugins/printing/year/calprintyearconfig_base.ui
@@ -0,0 +1,200 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>CalPrintYearConfig_Base</class>
+<comment>Configuration page for the yearly print mode.</comment>
+<author>Reinhold Kainhofer &lt;[email protected]&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>CalPrintYear_Base</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>340</width>
+ <height>237</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>CalPrintYear_Base</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>mDateRangeGroup</cstring>
+ </property>
+ <property name="title">
+ <string>Yearly print options</string>
+ </property>
+ <property name="selectedId" stdset="0">
+ <number>-1</number>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>mYearLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Print &amp;Year:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mYear</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>mPagesLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Number of &amp;pages:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mPages</cstring>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>mYear</cstring>
+ </property>
+ <property name="maxValue">
+ <number>2500</number>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>2007</number>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>120</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>mPages</cstring>
+ </property>
+ </widget>
+ <spacer row="1" column="2">
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>131</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>mDisplayOptionsGroup</cstring>
+ </property>
+ <property name="title">
+ <string>Display Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>mSubDaysLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Show sub-day events as:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>mHolidaysLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Show holidays as:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>Text</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Time Boxes</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>mSubDays</cstring>
+ </property>
+ <property name="currentItem">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>Text</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Time Boxes</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>mHolidays</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/korganizer/plugins/printing/year/yearprint.cpp b/korganizer/plugins/printing/year/yearprint.cpp
new file mode 100644
index 000000000..d71cd9f08
--- /dev/null
+++ b/korganizer/plugins/printing/year/yearprint.cpp
@@ -0,0 +1,204 @@
+/*
+ This file is part of KOrganizer.
+
+ Copyright (c) 2004 Reinhold Kainhofer <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ As a special exception, permission is given to link this program
+ with any edition of Qt, and distribute the resulting executable,
+ without including the source code for Qt in the source distribution.
+*/
+
+#ifndef KORG_NOPRINTER
+
+#include "calprintyearconfig_base.h"
+#include "yearprint.h"
+
+#include <libkcal/calendar.h>
+
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kcalendarsystem.h>
+#include <klocale.h>
+
+#include <qcheckbox.h>
+#include <qspinbox.h>
+#include <qcombobox.h>
+#include <qpainter.h>
+
+class YearPrintFactory : public KOrg::PrintPluginFactory {
+ public:
+ KOrg::PrintPlugin *create() { return new CalPrintYear; }
+};
+
+K_EXPORT_COMPONENT_FACTORY( libkorg_yearlyprint, YearPrintFactory )
+
+
+/**************************************************************
+ * Print Year
+ **************************************************************/
+
+QWidget *CalPrintYear::createConfigWidget( QWidget *w )
+{
+ return new CalPrintYearConfig_Base( w );
+}
+
+void CalPrintYear::readSettingsWidget()
+{
+ CalPrintYearConfig_Base *cfg =
+ dynamic_cast<CalPrintYearConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ mYear = cfg->mYear->value();
+ mPages = cfg->mPages->currentText().toInt();
+ mSubDaysEvents = (cfg->mSubDays->currentItem()==0)?Text:TimeBoxes;
+ mHolidaysEvents = (cfg->mHolidays->currentItem()==0)?Text:TimeBoxes;
+ }
+}
+
+void CalPrintYear::setSettingsWidget()
+{
+ CalPrintYearConfig_Base *cfg =
+ dynamic_cast<CalPrintYearConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ const KCalendarSystem *calsys = calendarSystem();
+ QDate start;
+ calsys->setYMD( start, mYear, 1, 1 );
+ int months = calsys->monthsInYear( start );
+ int pages=0, prevPages=0;
+ for ( int i=1; i<= months; ++i ) {
+ pages = (months-1)/i + 1;
+ if ( pages != prevPages ) {
+ prevPages = pages;
+ cfg->mPages->insertItem( QString::number( pages ), 0 );
+ }
+ }
+
+ cfg->mYear->setValue( mYear );
+ cfg->mPages->setCurrentText( QString::number( mPages ) );
+
+ cfg->mSubDays->setCurrentItem( (mSubDaysEvents==Text)?0:1 );
+ cfg->mHolidays->setCurrentItem( (mHolidaysEvents==Text)?0:1 );
+ }
+}
+
+void CalPrintYear::loadConfig()
+{
+ if ( mConfig ) {
+ mYear = mConfig->readNumEntry( "Year", 2007 );
+ mPages = mConfig->readNumEntry( "Pages", 1 );
+ mSubDaysEvents = mConfig->readNumEntry( "ShowSubDayEventsAs", TimeBoxes );
+ mHolidaysEvents = mConfig->readNumEntry( "ShowHolidaysAs", Text );
+ }
+ setSettingsWidget();
+}
+
+void CalPrintYear::saveConfig()
+{
+ kdDebug(5850) << "CalPrintYear::saveConfig()" << endl;
+
+ readSettingsWidget();
+ if ( mConfig ) {
+ mConfig->writeEntry( "Year", mYear );
+ mConfig->writeEntry( "Pages", mPages );
+ mConfig->writeEntry( "Pages", mPages );
+ mConfig->writeEntry( "ShowSubDayEventsAs", mSubDaysEvents );
+ mConfig->writeEntry( "ShowHolidaysAs", mHolidaysEvents );
+ }
+}
+
+KPrinter::Orientation CalPrintYear::defaultOrientation()
+{
+ return ( mPages == 1 )?(KPrinter::Landscape):(KPrinter::Portrait);
+}
+
+
+void CalPrintYear::setDateRange( const QDate& from, const QDate& to )
+{
+ CalPrintPluginBase::setDateRange( from, to );
+ CalPrintYearConfig_Base *cfg =
+ dynamic_cast<CalPrintYearConfig_Base*>( mConfigWidget );
+ if ( cfg ) {
+ cfg->mYear->setValue( from.year() );
+ }
+}
+
+void CalPrintYear::print( QPainter &p, int width, int height )
+{
+kdDebug()<<"CalPrintYear::print, width: "<<width<<", height: "<<height<<endl;
+ QRect headerBox( 0, 0, width, headerHeight() );
+kdDebug()<<"headerBox: "<<headerBox<<endl;
+ const KCalendarSystem *calsys = calendarSystem();
+ KLocale *locale = KGlobal::locale();
+ if ( !calsys || !locale ) return;
+
+ QDate start;
+ calsys->setYMD( start, mYear, 1, 1 );
+
+ // Determine the nr of months and the max nr of days per month (dependent on
+ // calendar system!!!!)
+ QDate temp( start );
+ int months = calsys->monthsInYear( start );
+ int maxdays = 1;
+ for ( int i = 1; i< months; ++i ) {
+ maxdays = QMAX( maxdays, temp.daysInMonth() );
+ temp = calsys->addMonths( temp, 1 );
+ }
+
+ // Now determine the months per page so that the printout fits on
+ // exactly mPages pages
+ int monthsPerPage = (months-1) / mPages + 1;
+ int pages = (months-1) / monthsPerPage + 1;
+ int thismonth = 0;
+ temp = start;
+ for ( int page = 0; page < pages; ++page ) {
+ if ( page > 0 ) {
+ mPrinter->newPage();
+ }
+ QDate end( calsys->addMonths( start, monthsPerPage ) );
+ end = calsys->addDays( end, -1 );
+ QString title;
+ if ( orientation() == KPrinter::Landscape ) {
+ title = i18n("date from - to", "%1 - %2");
+ } else {
+ title = i18n("date from -\nto", "%1 -\n%2");
+ }
+ drawHeader( p, title
+ .arg( locale->formatDate( start ) )
+ .arg( locale->formatDate( end ) ),
+ calsys->addMonths( start, -1), calsys->addMonths( start, monthsPerPage ),
+ headerBox );
+
+ QRect monthesBox( headerBox );
+ monthesBox.setTop( monthesBox.bottom() + padding() );
+ monthesBox.setBottom( height );
+
+ drawBox( p, BOX_BORDER_WIDTH, monthesBox );
+ float monthwidth = float(monthesBox.width()) / float( monthsPerPage );
+
+ for ( int j=0; j<monthsPerPage; ++j ) {
+ if ( ++thismonth > months ) break;
+ int xstart = int(j*monthwidth + 0.5);
+ int xend = int((j+1)*monthwidth + 0.5);
+ QRect monthBox( xstart, monthesBox.top(), xend-xstart, monthesBox.height() );
+ drawMonth( p, temp, monthBox, maxdays, mSubDaysEvents, mHolidaysEvents );
+
+ temp = calsys->addMonths( temp, 1 );
+ }
+ start = calsys->addMonths( start, monthsPerPage );
+ }
+}
+
+#endif
diff --git a/korganizer/plugins/printing/year/yearprint.desktop b/korganizer/plugins/printing/year/yearprint.desktop
new file mode 100644
index 000000000..5edafedc2
--- /dev/null
+++ b/korganizer/plugins/printing/year/yearprint.desktop
@@ -0,0 +1,84 @@
+[Desktop Entry]
+X-KDE-Library=libkorg_yearlyprint
+Name=Yearly Print Style
+Name[af]=Druk styl: Jaarliks
+Name[bg]=Стил за отпечатване на годишно разписание
+Name[ca]=Estil d'impressió anual
+Name[cs]=Roční tiskový styl
+Name[da]=Yearly udskriftsstil
+Name[de]=Jahres-Druckstil
+Name[el]=Στυλ ετήσιας εκτύπωσης
+Name[eo]=Pojara Presostilo
+Name[es]=Estilo de impresión del diario
+Name[et]=Aastakalendri trükkimise stiil
+Name[fa]=سبک چاپ نشریه
+Name[fr]=Impression annuelle
+Name[fy]=Printstyl foar jierkalinder
+Name[gl]=Estilo de impresión anual
+Name[hu]=Éves naptár nyomtatási stílus
+Name[is]=Ársyfirlitsprentstíll
+Name[it]=Stile di stampa annuale
+Name[ja]=年毎印刷スタイル
+Name[kk]=Жылдық басу стилі
+Name[km]=រចនាប័ទ្ម​បោះពុម្ព​ប្រចាំ​ឆ្នាំ
+Name[lt]=Metų spausdinimo stilius
+Name[nb]=Utskriftsstil for kalender
+Name[nds]=Johrkalenner-Druckstil
+Name[ne]=वार्षिक मुद्रण शैली
+Name[nl]=Printstijl voor jaarkalender
+Name[pl]=Styl drukowania roku
+Name[pt]=Estilo de Impressão em Anuário
+Name[pt_BR]=Estilo de Impressão de Calendário Anual
+Name[ru]=Календарь на год
+Name[sk]=Štýl tlače pre rok
+Name[sl]=Letni slog tiskanja
+Name[sr]=Годишњи стил штампе
+Name[sr@Latn]=Godišnji stil štampe
+Name[sv]=Årlig utskriftsstil
+Name[tr]=Yıllık Yazdırma Stili
+Name[uk]=Стиль друку щорічником
+Name[zh_CN]=按年打印样式
+Name[zh_TW]=年度列印風格
+Comment=This plugin allows you to print out a yearly calendar.
+Comment[af]=Hierdie inprop module maak dit moontlik om 'n kalender vir 'n hele jaar te druk.
+Comment[bg]=Приставката служи за печат на годишния календар.
+Comment[ca]=Aquest endollable us permet imprimir un calendari anual.
+Comment[cs]=Tento modul umožňuje tisk ročního kalendáře.
+Comment[da]=Dette plugin gør at du kan udskrive en årlig kalender
+Comment[de]=Mit diesem Modul können Jahresübersichten gedruckt werden.
+Comment[el]=Αυτό το πρόσθετο σας επιτρέπει να εκτυπώσετε ένα ετήσιο ημερολόγιο.
+Comment[es]=Este plugin le permite imprimir entradas del diario.
+Comment[et]=See plugin võimaldab trükkida terve aasta kalendri.
+Comment[fa]=این وصله، به شما اجازه می‌دهد که مدخلهای نشریه )مدخلهای روزانه( را چاپ کنید.
+Comment[fr]=Ce module vous permet d'imprimer l'ensemble de l'année
+Comment[fy]=Dizze plugin makket it mooglik om in jierkalinder út te printsjen.
+Comment[gl]=Este engadido permítelle imprimir un calendario anual.
+Comment[hu]=Ez a modul egy egész éves naptár kinyomtatását teszi lehetővé.
+Comment[is]=Þetta íforrit gerir þér kleyft að prenta út dagbókarfærslur fyrir allt árið.
+Comment[it]=Questo plugin ti permette di stampare un calendario annuale.
+Comment[ja]=このプラグインにより、年毎のカレンダーを印刷できるようになります。
+Comment[kk]=Бұл жылдық күнтізбені басып шығаратын модулі.
+Comment[km]=កម្មវិធី​ជំនួយ​នេះ​អនុញ្ញាត​ឲ្យ​អ្នក​បោះពុម្ព​​ប្រតិទិន​ប្រចាំ​ឆ្នាំ ។
+Comment[lt]=Šis priedas leidžia spausdinti metų kalendorių.
+Comment[mk]=Овој приклучок Ви овозможува да испечатите годишен календар.
+Comment[nb]=Med dette programtillegget kan du skrive ut en årskalender.
+Comment[nds]=Mit dit Moduul kannst Du en Kalenner för't hele Johr utdrucken.
+Comment[ne]=यो प्लगइनले तपाईँलाई वार्षिक पात्रो मुद्रण गर्न अनुमति दिन्छ ।
+Comment[nl]=Deze plugin maakt het mogelijk om een jaarkalender af te drukken.
+Comment[pl]=Ta wtyczka pozwala drukować roczny kalendarz.
+Comment[pt]=Este 'plugin' permite-lhe imprimir um calendário anual.
+Comment[pt_BR]=Este plug-in permite imprimir um calendário anual.
+Comment[ru]=Этот модуль позволяет печатать календарь на год.
+Comment[sk]=Tento modul vám umožní vytlačiť kalendár na rok.
+Comment[sl]=Ta vstavek vam omogoča natis letnega koledarja.
+Comment[sr]=Овај прикључак вам омогућава да одштампате годишњи календар.
+Comment[sr@Latn]=Ovaj priključak vam omogućava da odštampate godišnji kalendar.
+Comment[sv]=Det här insticksprogrammet gör att du kan skriva ut en årlig kalender.
+Comment[tr]=Bu eklenti, yıllık takvimi yazıcıdan çıkartmanızı sağlar.
+Comment[uk]=Цей журнал надає можливість друкувати щорічний календар.
+Comment[zh_CN]=此插件允许您打印年历。
+Comment[zh_TW]=此外掛程式讓您印出年曆。
+Type=Service
+ServiceTypes=Calendar/Plugin,KOrganizer/PrintPlugin
+X-KDE-KOrganizer-HasSettings=false
+X-KDE-PluginInterfaceVersion=2
diff --git a/korganizer/plugins/printing/year/yearprint.h b/korganizer/plugins/printing/year/yearprint.h
new file mode 100644
index 000000000..3191150b2
--- /dev/null
+++ b/korganizer/plugins/printing/year/yearprint.h
@@ -0,0 +1,65 @@
+/*
+ This file is part of KOrganizer.
+
+ Copyright (c) 2004 Reinhold Kainhofer <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ As a special exception, permission is given to link this program
+ with any edition of Qt, and distribute the resulting executable,
+ without including the source code for Qt in the source distribution.
+*/
+#ifndef YEARPRINT_H
+#define YEARPRINT_H
+
+#include <klocale.h>
+#include "calprintpluginbase.h"
+
+#ifndef KORG_NOPRINTER
+namespace KCal {
+class Calendar;
+}
+
+using namespace KCal;
+
+class CalPrintYear : public CalPrintPluginBase
+{
+ public:
+ CalPrintYear():CalPrintPluginBase() {}
+ virtual ~CalPrintYear() {}
+ virtual QString description() { return i18n("Print &Year"); }
+ virtual QString info() { return i18n("Prints a calendar for an entire year"); }
+ virtual int sortID() { return 900; }
+ virtual bool enabled() { return true; }
+ virtual QWidget *createConfigWidget( QWidget* );
+ virtual KPrinter::Orientation defaultOrientation();
+
+ public:
+ virtual void print(QPainter &p, int width, int height);
+ virtual void readSettingsWidget();
+ virtual void setSettingsWidget();
+ virtual void loadConfig();
+ virtual void saveConfig();
+ virtual void setDateRange( const QDate& from, const QDate& to );
+
+ protected:
+ int mYear;
+ int mPages;
+ int mSubDaysEvents, mHolidaysEvents;
+};
+
+
+#endif
+#endif