summaryrefslogtreecommitdiffstats
path: root/korganizer/plugins/printing/list
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /korganizer/plugins/printing/list
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/plugins/printing/list')
-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
5 files changed, 472 insertions, 0 deletions
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;reinhold@kainhofer.com&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 <reinhold@kainhofer.com>
+
+ 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 <reinhold@kainhofer.com>
+
+ 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