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

tdeprint

  • tdeprint
kxmlcommand.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 KXMLCOMMAND_H
21#define KXMLCOMMAND_H
22
23#include <tqdom.h>
24#include <tqmap.h>
25#include <tqobject.h>
26
27#include <tdelibs_export.h>
28
29class DrMain;
30class DrGroup;
31class DrBase;
32
33class TDEPRINT_EXPORT KXmlCommand : public TQObject
34{
35 friend class KXmlCommandManager;
36
37public:
38 ~KXmlCommand();
39
40 TQString name() const;
41 void setName(const TQString&);
42 TQString command();
43 void setCommand(const TQString&);
44 DrMain* driver();
45 DrMain* takeDriver();
46 void setDriver(DrMain*);
47 TQString io(bool io_input = true, bool io_pipe = false);
48 void setIo(const TQString&, bool io_input = true, bool io_pipe = false);
49 TQString description();
50 void setDescription(const TQString&);
51 TQString mimeType();
52 void setMimeType(const TQString&);
53 bool acceptMimeType(const TQString&);
54 TQStringList inputMimeTypes();
55 void setInputMimeTypes(const TQStringList&);
56 TQStringList requirements();
57 void setRequirements(const TQStringList&);
58 TQString comment();
59 void setComment( const TQString& );
60 bool isValid();
61
62 TQString buildCommand(const TQMap<TQString,TQString>& opts, bool pipein = true, bool pipeout = true);
63 void setOptions(const TQMap<TQString,TQString>& opts);
64 void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
65
66protected:
67 void init();
68 void loadXml();
69 void saveXml();
70 void loadDesktop();
71 void saveDesktop();
72 void check(bool use_xml = false);
73 DrGroup* parseGroup(const TQDomElement& e, DrGroup *grp = 0);
74 DrBase* parseArgument(const TQDomElement& e);
75 void parseIO(const TQDomElement& e, int n);
76 TQDomElement createIO(TQDomDocument&, int, const TQString&);
77 TQDomElement createGroup(TQDomDocument&, DrGroup*);
78 TQDomElement createElement(TQDomDocument&, DrBase*);
79
80 // use protected constructor to only allow the manager to
81 // create KXmlCommand object.
82 KXmlCommand(const TQString& xmlId = TQString::null);
83
84private:
85 class KXmlCommandPrivate;
86 KXmlCommandPrivate *d;
87};
88
89class TDEPRINT_EXPORT KXmlCommandManager : public TQObject
90{
91public:
92 enum IO_CheckType { None = 0, Basic, Advanced };
93
94 KXmlCommandManager();
95 ~KXmlCommandManager();
96
97 KXmlCommand* loadCommand(const TQString& xmlId, bool check = false);
98 void saveCommand(KXmlCommand *xmlCmd);
99 TQStringList commandList();
100 TQStringList commandListWithDescription();
101 TQString selectCommand(TQWidget *parent = 0);
102
103 TQStringList autoConvert(const TQString& mimesrc, const TQString& mimedest);
104 int insertCommand(TQStringList& list, const TQString& filtername, bool defaultToStart = true);
105 bool checkCommand(const TQString&, int inputCheck = Advanced, int outputCheck = Advanced, TQString *msg = 0);
106 bool configure(KXmlCommand*, TQWidget *parent = 0);
107 void cleanUp();
108
109 static KXmlCommandManager* self();
110
111protected:
112 void preload();
113 KXmlCommand* command(const TQString&) const;
114
115private:
116 class KXmlCommandManagerPrivate;
117 KXmlCommandManagerPrivate *d;
118 static KXmlCommandManager *m_self;
119};
120
121#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.