summaryrefslogtreecommitdiffstats
path: root/kdeprint/kdeprint_part
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
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kdeprint/kdeprint_part
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.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/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/kdeprint_part')
-rw-r--r--kdeprint/kdeprint_part/Makefile.am24
-rw-r--r--kdeprint/kdeprint_part/kdeprint_part.desktop85
-rw-r--r--kdeprint/kdeprint_part/kdeprint_part.rc28
-rw-r--r--kdeprint/kdeprint_part/printpart.cpp81
-rw-r--r--kdeprint/kdeprint_part/printpart.h59
5 files changed, 277 insertions, 0 deletions
diff --git a/kdeprint/kdeprint_part/Makefile.am b/kdeprint/kdeprint_part/Makefile.am
new file mode 100644
index 000000000..9646fab6d
--- /dev/null
+++ b/kdeprint/kdeprint_part/Makefile.am
@@ -0,0 +1,24 @@
+AM_CPPFLAGS = -D_KDEPRINT_COMPILE
+
+kde_module_LTLIBRARIES = libkdeprint_part.la
+
+libkdeprint_part_la_SOURCES = printpart.cpp
+libkdeprint_part_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined
+libkdeprint_part_la_LIBADD = -lkdeprint_management $(LIB_KPARTS)
+
+noinst_HEADERS = printpart.h
+
+METASOURCES = AUTO
+INCLUDES = $(all_includes)
+
+# service
+myservice_DATA = kdeprint_part.desktop
+myservicedir = $(kde_servicesdir)
+
+# UI file
+myrcfile_DATA = kdeprint_part.rc
+myrcfiledir = $(kde_datadir)/kdeprint_part
+
+messages: rc.cpp
+ $(EXTRACTRC) kdeprint_part.rc >> rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kdeprint_part.pot
diff --git a/kdeprint/kdeprint_part/kdeprint_part.desktop b/kdeprint/kdeprint_part/kdeprint_part.desktop
new file mode 100644
index 000000000..b49f26d03
--- /dev/null
+++ b/kdeprint/kdeprint_part/kdeprint_part.desktop
@@ -0,0 +1,85 @@
+[Desktop Entry]
+Type=Service
+Name=Print Management Tool
+Name[af]=Drukker Bestuur Program
+Name[ar]=أداة ادارة الطباعة
+Name[az]=Çap Edici İdarə Vasitəsi
+Name[be]=Кіраўнік друку
+Name[bg]=Управление на печата
+Name[bn]=মুদ্রণ ম্যানেজমেন্ট টুল
+Name[br]=Ostilh mererezh moulañ
+Name[bs]=Alat za upravljanje štampom
+Name[ca]=Eina per a gestionar la impressió
+Name[cs]=Správce tiskáren
+Name[csb]=Sprôwianié wëdrëkama
+Name[cy]=Erfyn Rheoli Argraffu
+Name[da]=Udskriftshåndteringsværktøj
+Name[de]=Druckerverwaltung
+Name[el]=Εργαλείο διαχείρισης εκτυπώσεων
+Name[eo]=Printadministrilo
+Name[es]=Herramienta de gestión de la impresión
+Name[et]=Trükkimise seadistused
+Name[eu]=Inprimaketa kudeatzeko tresna
+Name[fa]=ابزار مدیریت چاپ
+Name[fi]=Tulostuksenhallinta
+Name[fr]=Gestionnaire d'impression
+Name[fy]=Helpprogramma foar printbehear
+Name[ga]=Uirlis Bhainisteoireacht Priontála
+Name[gl]=Ferramenta de Xestión da Impresión
+Name[he]=כלי ניהול הדפסה
+Name[hi]=प्रिंटर प्रबंधन औज़ार
+Name[hr]=Alat za upravljanje ispisom
+Name[hu]=Nyomtatáskezelő eszköz
+Name[is]=Prentunartól
+Name[it]=Strumento di gestione della stampa
+Name[ja]=印刷マネージメントツール
+Name[ka]=ბეჭდვის მართვა
+Name[kk]=Басып шығаруды басқару
+Name[km]=ឧបករណ៍​គ្រប់គ្រង​ការ​បោះពុម្ព
+Name[ko]=휴대폰 관리 도구
+Name[lo]=ເຄື່ອງມືຈັດການພິມ
+Name[lt]=Spausdinimo valdymo įrankis
+Name[lv]=Drukas Menedžmenta Rīks
+Name[mk]=Алатка за менаџмент на печатење
+Name[mn]=Хэвлэгч удирдах хэлбэр
+Name[ms]=Cetak Alat Pengurusan
+Name[mt]=Għodda għall-immaniġġjar tal-printing
+Name[nb]=Verktøy for utskriftsbehandling
+Name[nds]=Druckers un Opgaven plegen
+Name[ne]=मुद्रण व्यवस्थापन उपकरण
+Name[nl]=Hulpprogramma voor printerbeheer
+Name[nn]=Utskriftshandsaming
+Name[nso]=Sebereka sa Taolo ya Kgatiso
+Name[pa]=ਛਾਪਣ (ਪਰਿੰਟ) ਪਰਬੰਧਨ ਸੰਦ
+Name[pl]=Zarządzanie wydrukiem
+Name[pt]=Ferramenta de Gestão de Impressões
+Name[pt_BR]=Ferramenta para Gerenciamento de Impressão
+Name[ro]=Administrare tipărire
+Name[ru]=Управление печатью
+Name[rw]=Gucapa Igikoresho cy'Ubuyobozi
+Name[se]=Čálihangieđahalli
+Name[sk]=Nástroj na správu tlače
+Name[sl]=Orodje za upravljanje tiskanja
+Name[sr]=Алат за управљање штампом
+Name[sr@Latn]=Alat za upravljanje štampom
+Name[sv]=Verktyg för utskriftshantering
+Name[ta]=அச்சு மேலாண்மைக் கருவி
+Name[tg]=Тафсири мудирияти чоп
+Name[th]=เครื่องมือจัดการงานพิมพ์
+Name[tr]=Yazdırma Yönetim Aracı
+Name[tt]=Bastıru İdäneñ Qoralı
+Name[uk]=Засіб керування друком
+Name[uz]=Bosib chiqarishni boshqarish vositasi
+Name[uz@cyrillic]=Босиб чиқаришни бошқариш воситаси
+Name[ven]=Tshishumiswa tsha vhulanguli ha phirinthara
+Name[vi]=Công cụ Quản lý In ấn
+Name[wa]=Usteye po manaedjî l' imprimaedje
+Name[xh]=Isixhobo Sophatho soshicilelo
+Name[zh_CN]=打印管理工具
+Name[zh_TW]=列印管理工具
+Name[zu]=Ithuluzi Lokuphathwa Koshicilelo
+MimeType=print/manager
+ServiceTypes=Browser/View,KParts/ReadOnlyPart
+X-KDE-Library=libkdeprint_part
+Icon=printmgr
+InitialPreference=12
diff --git a/kdeprint/kdeprint_part/kdeprint_part.rc b/kdeprint/kdeprint_part/kdeprint_part.rc
new file mode 100644
index 000000000..bb1db8edf
--- /dev/null
+++ b/kdeprint/kdeprint_part/kdeprint_part.rc
@@ -0,0 +1,28 @@
+<!DOCTYPE kpartgui>
+<kpartgui name="kdeprint_part">
+<ToolBar name="Kdeprint-Toolbar" newline="false"><text>Print Manager Toolbar</text>
+ <Action name="printer_add" />
+ <Action name="printer_add_special" />
+ <Separator lineSeparator="true" />
+ <Action name="printer_state_change" />
+ <Action name="printer_spool_change" />
+ <Separator />
+ <Action name="printer_hard_default" />
+ <Action name="printer_soft_default" />
+ <Action name="printer_remove" />
+ <Separator />
+ <Action name="printer_configure" />
+ <Action name="printer_test" />
+ <Separator lineSeparator="true" />
+ <Action name="server_configure" />
+ <Action name="server_restart" />
+ <Separator lineSeparator="true" />
+ <Action name="manager_configure" />
+ <Action name="view_refresh" />
+ <Separator lineSeparator="true" />
+ <Action name="view_printerinfos" />
+ <Action name="view_change" />
+ <Action name="orientation_change" />
+ <Action name="view_pfilter" />
+</ToolBar>
+</kpartgui>
diff --git a/kdeprint/kdeprint_part/printpart.cpp b/kdeprint/kdeprint_part/printpart.cpp
new file mode 100644
index 000000000..535c0e7e0
--- /dev/null
+++ b/kdeprint/kdeprint_part/printpart.cpp
@@ -0,0 +1,81 @@
+/*
+ * This file is part of the KDE libraries
+ * Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ **/
+
+#include "printpart.h"
+
+#include <kdeprint/kmmainview.h>
+#include <kdeprint/kiconselectaction.h>
+#include <kaction.h>
+#include <klocale.h>
+#include <kinstance.h>
+#include <kiconloader.h>
+#include <kaboutdata.h>
+#include <kdebug.h>
+#include <kparts/genericfactory.h>
+#include <qwidget.h>
+
+typedef KParts::GenericFactory<PrintPart> PrintPartFactory;
+K_EXPORT_COMPONENT_FACTORY( libkdeprint_part, PrintPartFactory )
+
+PrintPart::PrintPart(QWidget *parentWidget, const char * /*widgetName*/ ,
+ QObject *parent, const char *name,
+ const QStringList & /*args*/ )
+: KParts::ReadOnlyPart(parent, name)
+{
+ setInstance(PrintPartFactory::instance());
+ instance()->iconLoader()->addAppDir("kdeprint");
+ m_extension = new PrintPartExtension(this);
+
+ m_view = new KMMainView(parentWidget, "MainView", actionCollection());
+ m_view->setFocusPolicy(QWidget::ClickFocus);
+ m_view->enableToolbar(false);
+ setWidget(m_view);
+
+ initActions();
+}
+
+PrintPart::~PrintPart()
+{
+}
+
+KAboutData *PrintPart::createAboutData()
+{
+ return new KAboutData(I18N_NOOP("kdeprint_part"), I18N_NOOP("A Konqueror Plugin for Print Management"), "0.1");
+}
+
+bool PrintPart::openFile()
+{
+ return true;
+}
+
+void PrintPart::initActions()
+{
+ setXMLFile("kdeprint_part.rc");
+}
+
+PrintPartExtension::PrintPartExtension(PrintPart *parent)
+: KParts::BrowserExtension(parent, "PrintPartExtension")
+{
+}
+
+PrintPartExtension::~PrintPartExtension()
+{
+}
+
+#include "printpart.moc"
diff --git a/kdeprint/kdeprint_part/printpart.h b/kdeprint/kdeprint_part/printpart.h
new file mode 100644
index 000000000..afba3c277
--- /dev/null
+++ b/kdeprint/kdeprint_part/printpart.h
@@ -0,0 +1,59 @@
+/*
+ * This file is part of the KDE libraries
+ * Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ **/
+
+#ifndef PRINTPART_H
+#define PRINTPART_H
+
+#include <kparts/part.h>
+#include <kparts/browserextension.h>
+
+class PrintPartExtension;
+class KMMainView;
+class KAboutData;
+
+class PrintPart : public KParts::ReadOnlyPart
+{
+ Q_OBJECT
+public:
+ PrintPart(QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name,
+ const QStringList & );
+ virtual ~PrintPart();
+
+ static KAboutData *createAboutData();
+
+protected:
+ bool openFile();
+ void initActions();
+
+private:
+ PrintPartExtension *m_extension;
+ KMMainView *m_view;
+};
+
+class PrintPartExtension : public KParts::BrowserExtension
+{
+ Q_OBJECT
+ friend class PrintPart;
+public:
+ PrintPartExtension(PrintPart *parent);
+ virtual ~PrintPartExtension();
+};
+
+#endif