kmjob.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KMJOB_H
00022 #define KMJOB_H
00023
00024 #if !defined( _KDEPRINT_COMPILE ) && defined( __GNUC__ )
00025 #warning internal header, do not use except if you are a KDEPrint developer
00026 #endif
00027
00028 #include <qstring.h>
00029 #include <qvaluevector.h>
00030 #include <kdeprint/kmobject.h>
00031
00039 class KMJob : public KMObject
00040 {
00041 public:
00042 enum JobAction {
00043 Remove = 0x01,
00044 Move = 0x02,
00045 Hold = 0x04,
00046 Resume = 0x08,
00047 Restart = 0x10,
00048 ShowCompleted = 0x20,
00049 All = 0xFF
00050 };
00051 enum JobState {
00052 Printing = 1,
00053 Queued = 2,
00054 Held = 3,
00055 Error = 4,
00056 Cancelled = 5,
00057 Aborted = 6,
00058 Completed = 7,
00059 Unknown = 8
00060 };
00061 enum JobType {
00062 System = 0,
00063 Threaded = 1
00064 };
00065
00066 KMJob();
00067 KMJob(const KMJob& j);
00068
00069 KMJob& operator=(const KMJob& j);
00070 void copy(const KMJob& j);
00071 QString pixmap();
00072 QString stateString();
00073 bool isCompleted() const { return (m_state >= Cancelled && m_state <= Completed); }
00074 bool isActive() const { return !isCompleted(); }
00075
00076
00077 int id() const { return m_ID; }
00078 void setId(int id) { m_ID = id; }
00079 const QString& name() const { return m_name; }
00080 void setName(const QString& s) { m_name = s; }
00081 const QString& printer() const { return m_printer; }
00082 void setPrinter(const QString& s) { m_printer = s; }
00083 const QString& owner() const { return m_owner; }
00084 void setOwner(const QString& s) { m_owner = s; }
00085 int state() const { return m_state; }
00086 void setState(int s) { m_state = s; }
00087 int size() const { return m_size; }
00088 void setSize(int s) { m_size = s; }
00089 const QString& uri() const { return m_uri; }
00090 void setUri(const QString& s) { m_uri = s; }
00091 int type() const { return m_type; }
00092 void setType(int t) { m_type = t; }
00093 int pages() const { return m_pages; }
00094 void setPages(int p) { m_pages = p; };
00095 int processedPages() const { return m_processedpages; }
00096 void setProcessedPages(int p) { m_processedpages = p; }
00097 int processedSize() const { return m_processedsize; }
00098 void setProcessedSize(int s) { m_processedsize = s; }
00099 bool isRemote() const { return m_remote; }
00100 void setRemote(bool on) { m_remote = on; }
00101
00102 QString attribute(int i) const { return m_attributes[i]; }
00103 void setAttribute(int i, const QString& att) { m_attributes[i] = att; }
00104 int attributeCount() const { return m_attributes.size(); }
00105 void setAttributeCount(int c) { m_attributes.resize(c); }
00106
00107 protected:
00108 void init();
00109
00110 protected:
00111
00112 int m_ID;
00113 QString m_name;
00114 QString m_printer;
00115 QString m_owner;
00116 int m_state;
00117 int m_size;
00118 int m_type;
00119 int m_pages;
00120 int m_processedsize;
00121 int m_processedpages;
00122 bool m_remote;
00123
00124
00125 QString m_uri;
00126 QValueVector<QString> m_attributes;
00127 };
00128
00129 #endif
This file is part of the documentation for kdeprint Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Mar 4 22:45:13 2004 by
doxygen 1.3.6-20040222 written by
Dimitri van Heesch, © 1997-2003