• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

  • tdeio
  • tdeio
kdatatool.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999, 2000 Torben Weis <weis@kde.org>
3 Copyright (C) 2001 David Faure <david@mandrakesoft.com>
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 as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
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 KDATATOOL_H
22#define KDATATOOL_H
23
24#include <tqobject.h>
25#include <tqvaluelist.h>
26
27#include <tdeaction.h>
28#include <kservice.h>
29
30class KDataTool;
31class TQPixmap;
32class TQStringList;
33class TDEInstance;
34
35// If you're only looking at implementing a data-tool, skip directly to the last
36// class definition, KDataTool.
37
47class TDEIO_EXPORT KDataToolInfo
48{
49public:
53 KDataToolInfo();
59 KDataToolInfo( const KService::Ptr& service, TDEInstance* instance );
63 KDataToolInfo( const KDataToolInfo& info );
67 KDataToolInfo& operator= ( const KDataToolInfo& info );
68
75 TQString dataType() const;
87 TQStringList mimeTypes() const;
88
93 bool isReadOnly() const;
94
100 TQPixmap icon() const TDE_DEPRECATED;
106 TQPixmap miniIcon() const TDE_DEPRECATED;
111 TQString iconName() const;
125 TQStringList userCommands() const;
137 TQStringList commands() const;
138
145 KDataTool* createTool( TQObject* parent = 0, const char* name = 0 ) const;
146
151 KService::Ptr service() const;
152
157 TDEInstance* instance() const { return m_instance; }
158
164 bool isValid() const;
165
174 static TQValueList<KDataToolInfo> query( const TQString& datatype, const TQString& mimetype, TDEInstance * instance );
175
176private:
177 KService::Ptr m_service;
178 TDEInstance* m_instance;
179private:
180 class KDataToolInfoPrivate* d;
181};
182
183
194class TDEIO_EXPORT KDataToolAction : public TDEAction
195{
196 TQ_OBJECT
197
198public:
208 KDataToolAction( const TQString & text, const KDataToolInfo & info, const TQString & command, TQObject * parent = 0, const char * name = 0);
209
220 static TQPtrList<TDEAction> dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot );
221
222signals:
228 void toolActivated( const KDataToolInfo & info, const TQString & command );
229
230protected:
231 virtual void slotActivated();
232
233private:
234 TQString m_command;
235 KDataToolInfo m_info;
236protected:
237 virtual void virtual_hook( int id, void* data );
238private:
239 class KDataToolActionPrivate* d;
240
241};
242
254class TDEIO_EXPORT KDataTool : public TQObject
255{
256 TQ_OBJECT
257
258public:
265 KDataTool( TQObject* parent = 0, const char* name = 0 );
266
270 void setInstance( TDEInstance* instance ) { m_instance = instance; }
271
277 TDEInstance* instance() const;
278
292 virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype) = 0;
293
294private:
295 TDEInstance * m_instance;
296protected:
297 virtual void virtual_hook( int id, void* data );
298private:
299 class KDataToolPrivate;
300 KDataToolPrivate * d;
301};
302
303#endif
KDataToolAction
This class helps applications implement support for KDataTool.
Definition: kdatatool.h:195
KDataToolAction::toolActivated
void toolActivated(const KDataToolInfo &info, const TQString &command)
Emitted when a tool has been activated.
KDataToolInfo
This is a convenience class for KService.
Definition: kdatatool.h:48
KDataToolInfo::instance
TDEInstance * instance() const
The instance of the service.
Definition: kdatatool.h:157
KDataTool
A generic tool that processes data.
Definition: kdatatool.h:255
KDataTool::run
virtual bool run(const TQString &command, void *data, const TQString &datatype, const TQString &mimetype)=0
Interface for 'running' this tool.

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • 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 tdeio/tdeio by doxygen 1.9.4
This website is maintained by Timothy Pearson.