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

tdeprint

  • tdeprint
kmjob.h
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (c) 2001 Michael Goffioul <tdeprint@swing.be>
4  *
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License version 2 as published by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  **/
20 
21 #ifndef KMJOB_H
22 #define KMJOB_H
23 
24 #if !defined( _TDEPRINT_COMPILE ) && defined( __GNUC__ )
25 #warning internal header, do not use except if you are a TDEPrint developer
26 #endif
27 
28 #include <tqstring.h>
29 #include <tqvaluevector.h>
30 #include <tdeprint/kmobject.h>
31 #include <tdelibs_export.h>
32 
40 class TDEPRINT_EXPORT KMJob : public KMObject
41 {
42 public:
43  enum JobAction {
44  Remove = 0x01,
45  Move = 0x02,
46  Hold = 0x04,
47  Resume = 0x08,
48  Restart = 0x10,
49  ShowCompleted = 0x20,
50  All = 0xFF
51  };
52  enum JobState {
53  Printing = 1,
54  Queued = 2,
55  Held = 3,
56  Error = 4,
57  Cancelled = 5,
58  Aborted = 6,
59  Completed = 7,
60  Unknown = 8
61  };
62  enum JobType {
63  System = 0,
64  Threaded = 1
65  };
66 
67  KMJob();
68  KMJob(const KMJob& j);
69 
70  KMJob& operator=(const KMJob& j);
71  void copy(const KMJob& j);
72  TQString pixmap();
73  TQString stateString();
74  bool isCompleted() const { return (m_state >= Cancelled && m_state <= Completed); }
75  bool isActive() const { return !isCompleted(); }
76 
77  // inline access functions
78  int id() const { return m_ID; }
79  void setId(int id) { m_ID = id; }
80  const TQString& name() const { return m_name; }
81  void setName(const TQString& s) { m_name = s; }
82  const TQString& printer() const { return m_printer; }
83  void setPrinter(const TQString& s) { m_printer = s; }
84  const TQString& owner() const { return m_owner; }
85  void setOwner(const TQString& s) { m_owner = s; }
86  int state() const { return m_state; }
87  void setState(int s) { m_state = s; }
88  int size() const { return m_size; }
89  void setSize(int s) { m_size = s; }
90  const TQString& uri() const { return m_uri; }
91  void setUri(const TQString& s) { m_uri = s; }
92  int type() const { return m_type; }
93  void setType(int t) { m_type = t; }
94  int pages() const { return m_pages; }
95  void setPages(int p) { m_pages = p; };
96  int processedPages() const { return m_processedpages; }
97  void setProcessedPages(int p) { m_processedpages = p; }
98  int processedSize() const { return m_processedsize; }
99  void setProcessedSize(int s) { m_processedsize = s; }
100  bool isRemote() const { return m_remote; }
101  void setRemote(bool on) { m_remote = on; }
102 
103  TQString attribute(int i) const { return m_attributes[i]; }
104  void setAttribute(int i, const TQString& att) { m_attributes[i] = att; }
105  int attributeCount() const { return m_attributes.size(); }
106  void setAttributeCount(int c) { m_attributes.resize(c); }
107 
108 protected:
109  void init();
110 
111 protected:
112  // normal members
113  int m_ID;
114  TQString m_name;
115  TQString m_printer;
116  TQString m_owner;
117  int m_state;
118  int m_size;
119  int m_type;
120  int m_pages;
121  int m_processedsize;
122  int m_processedpages;
123  bool m_remote;
124 
125  // internal members
126  TQString m_uri;
127  TQValueVector<TQString> m_attributes;
128 };
129 
130 #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.1
This website is maintained by Timothy Pearson.