1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
/*
*
* $Id: k3bplugin.h 619556 2007-01-03 17:38:12Z trueg $
* Copyright (C) 2003 Sebastian Trueg <[email protected]>
*
* This file is part of the K3b project.
* Copyright (C) 1998-2007 Sebastian Trueg <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* See the file "COPYING" for the exact licensing terms.
*/
#ifndef _K3B_PLUGIN_H_
#define _K3B_PLUGIN_H_
#include <tqobject.h>
#include <kgenericfactory.h>
#include "k3b_export.h"
#define K3B_PLUGIN_SYSTEM_VERSION 3
class K3bPluginConfigWidget;
class TQWidget;
class K3bPluginInfo
{
friend class K3bPluginManager;
public:
K3bPluginInfo() {
}
K3bPluginInfo( TQString libraryName,
TQString name,
TQString author,
TQString email,
TQString comment,
TQString version,
TQString licence )
: m_libraryName(libraryName),
m_name(name),
m_author(author),
m_email(email),
m_comment(comment),
m_version(version),
m_licence(licence) {
}
const TQString& name() const { return m_name; }
const TQString& author() const { return m_author; }
const TQString& email() const { return m_email; }
const TQString& comment() const { return m_comment; }
const TQString& version() const { return m_version; }
const TQString& licence() const { return m_licence; }
const TQString& libraryName() const { return m_libraryName; }
private:
TQString m_libraryName;
TQString m_name;
TQString m_author;
TQString m_email;
TQString m_comment;
TQString m_version;
TQString m_licence;
};
/**
* Base class for all plugins. You may use the K3bPluginFactory to make your plugin available.
*/
class LIBK3B_EXPORT K3bPlugin : public TQObject
{
TQ_OBJECT
friend class K3bPluginManager;
public:
K3bPlugin( TQObject* parent = 0, const char* name = 0 );
virtual ~K3bPlugin();
const K3bPluginInfo& pluginInfo() const { return m_pluginInfo; }
/**
* Version of the plugin system this plugin was written for.
*/
virtual int pluginSystemVersion() const = 0;
/**
* The plugin group.
*/
virtual TQString group() const = 0;
/**
* Returns a widget which configures the plugin.
*
* The caller has to destroy the widget
*/
virtual K3bPluginConfigWidget* createConfigWidget( TQWidget* parent = 0, const char* name = 0 ) const;
private:
K3bPluginInfo m_pluginInfo;
};
#endif
|