• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeprint
 

tdeprint

  • tdeprint
kmjobmanager.h
1/*
2 * This file is part of the KDE libraries
3 * Copyright (c) 2001 Michael Goffioul <tdeprint@swing.be>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License version 2 as published by the Free Software Foundation.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 **/
19
20#ifndef KMJOBMANAGER_H
21#define KMJOBMANAGER_H
22
23#if !defined( _TDEPRINT_COMPILE ) && defined( __GNUC__ )
24#warning internal header, do not use except if you are a TDEPrint developer
25#endif
26
27#include <tqobject.h>
28#include <tqptrlist.h>
29#include <tqdict.h>
30#include <tqvaluelist.h>
31
32#include <tdelibs_export.h>
33
34class KMJob;
35class KMThreadJob;
36class TDEActionCollection;
37class TDEAction;
38
46class TDEPRINT_EXPORT KMJobManager : public TQObject
47{
48 TQ_OBJECT
49
50public:
51 enum JobType { ActiveJobs = 0, CompletedJobs = 1 };
52 struct JobFilter
53 {
54 JobFilter() { m_type[0] = m_type[1] = 0; m_isspecial = false; }
55 int m_type[2];
56 bool m_isspecial;
57 };
58
59 KMJobManager(TQObject *parent = 0, const char *name = 0);
60 virtual ~KMJobManager();
61
62 static KMJobManager* self();
63
64 void addPrinter(const TQString& pr, JobType type = ActiveJobs, bool isSpecial = false);
65 void removePrinter(const TQString& pr, JobType type = ActiveJobs);
66 void clearFilter();
67 TQDict<JobFilter>* filter();
68 int limit();
69 void setLimit(int val);
70
71 //KMJob* findJob(int ID);
72 KMJob* findJob(const TQString& uri);
73 //bool sendCommand(int ID, int action, const TQString& arg = TQString::null);
74 bool sendCommand(const TQString& uri, int action, const TQString& arg = TQString::null);
75 bool sendCommand(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
76 const TQPtrList<KMJob>& jobList(bool reload = true);
77 void addJob(KMJob*);
78 KMThreadJob* threadJob();
79
80 virtual int actions();
81 virtual TQValueList<TDEAction*> createPluginActions(TDEActionCollection*);
82 virtual void validatePluginActions(TDEActionCollection*, const TQPtrList<KMJob>&);
83 virtual bool doPluginAction(int, const TQPtrList<KMJob>&);
84
85protected:
86 void discardAllJobs();
87 void removeDiscardedJobs();
88
89protected:
90 virtual bool listJobs(const TQString& prname, JobType type, int limit = 0);
91 virtual bool sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
92 bool sendCommandThreadJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
93
94protected:
95 TQPtrList<KMJob> m_jobs;
96 TQDict<JobFilter> m_filter;
97 KMThreadJob *m_threadjob;
98};
99
100inline TQDict<KMJobManager::JobFilter>* KMJobManager::filter()
101{ return &m_filter; }
102
103inline void KMJobManager::clearFilter()
104{ m_filter.clear(); }
105
106inline KMThreadJob* KMJobManager::threadJob()
107{ return m_threadjob; }
108
109#endif

tdeprint

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

tdeprint

Skip menu "tdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeprint by doxygen 1.9.4
This website is maintained by Timothy Pearson.