KoDocumentIface.h
1/* This file is part of the KDE project
2 Copyright (C) 2000 David Faure <faure@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License.
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 __KoDocumentIface_h__
21#define __KoDocumentIface_h__
22
23#include <dcopobject.h>
24#include <tqvaluelist.h>
25#include <dcopref.h>
26#include <koffice_export.h>
27class KoDocument;
29
39class KOFFICECORE_EXPORT KoDocumentIface : public DCOPObject
40{
41 K_DCOP
42public:
43
44 KoDocumentIface( KoDocument * doc, const char * name = 0 );
46
51 static TQCString newIfaceName();
52
53k_dcop:
57 TQString url();
58
64 void openURL( TQString url );
65
69 bool isLoading();
70
74 bool isModified();
75
79 int viewCount();
80
84 DCOPRef view( int idx );
85
89 DCOPRef action( const TQCString &name );
93 QCStringList actions();
97 TQMap<TQCString,DCOPRef> actionMap();
98
102 void save();
103
107 void saveAs( const TQString & url );
108
109 void setOutputMimeType( const TQCString & mimetype );
110
111 TQString documentInfoAuthorName() const;
112 TQString documentInfoEmail() const;
113 TQString documentInfoCompanyName() const;
114 TQString documentInfoTitle() const;
115 TQString documentInfoAbstract() const;
116 TQString documentInfoKeywords() const;
117 TQString documentInfoSubject() const;
118 TQString documentInfoTelephone() const;
119 TQString documentInfoTelephoneWork() const;
120 TQString documentInfoTelephoneHome() const;
121 TQString documentInfoFax() const;
122 TQString documentInfoCountry() const;
123 TQString documentInfoPostalCode() const;
124 TQString documentInfoCity() const;
125 TQString documentInfoStreet() const;
126 TQString documentInfoInitial() const;
127 TQString documentInfoAuthorPostion() const;
128 void setDocumentInfoAuthorName(const TQString & text);
129 void setDocumentInfoEmail(const TQString &text);
130 void setDocumentInfoCompanyName(const TQString &text);
131 void setDocumentInfoTelephone(const TQString &text);
132 void setDocumentInfoTelephoneWork(const TQString &text);
133 void setDocumentInfoTelephoneHome(const TQString &text);
134 void setDocumentInfoFax(const TQString &text);
135 void setDocumentInfoCountry(const TQString &text);
136 void setDocumentInfoTitle(const TQString & text);
137 void setDocumentInfoPostalCode(const TQString &text);
138 void setDocumentInfoCity(const TQString & text);
139 void setDocumentInfoStreet(const TQString &text);
140 void setDocumentInfoAbstract(const TQString &text);
141 void setDocumentInfoInitial(const TQString & text);
142 void setDocumentInfoKeywords(const TQString & text );
143 void setDocumentInfoSubject(const TQString & text);
144 void setDocumentInfoAuthorPosition(const TQString & text);
145
146public:
147 virtual QCStringList functionsDynamic();
148 virtual bool processDynamic( const TQCString &fun, const TQByteArray &data,
149 TQCString& replyType, TQByteArray &replyData );
150
151protected:
152 KoDocument * m_pDoc;
153 KDCOPActionProxy *m_actionProxy;
154};
155
156#endif
157
virtual bool processDynamic(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData)
virtual QCStringList functionsDynamic()
DCOP interface for any KOffice document Use KoApplicationIface to get hold of an existing document's ...
The KOffice document class.
Definition KoDocument.h:61