summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/opluginloader.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/libopie2/opiecore/opluginloader.h b/libopie2/opiecore/opluginloader.h
index 421d1f6..6166b75 100644
--- a/libopie2/opiecore/opluginloader.h
+++ b/libopie2/opiecore/opluginloader.h
@@ -91,97 +91,91 @@ protected:
91 void readConfig(); 91 void readConfig();
92 virtual List plugins( const QString& dir, bool sorted, bool disabled )const; 92 virtual List plugins( const QString& dir, bool sorted, bool disabled )const;
93 void setPluginDirs( const QStringList& ); 93 void setPluginDirs( const QStringList& );
94 void setPluginDir( const QString& ); 94 void setPluginDir( const QString& );
95 bool isSorted()const; 95 bool isSorted()const;
96 void setSafeMode(const QString& app = QString::null, bool b = false); 96 void setSafeMode(const QString& app = QString::null, bool b = false);
97 static QString unlibify( const QString& str ); 97 static QString unlibify( const QString& str );
98 98
99private: 99private:
100 QStringList languageList(); 100 QStringList languageList();
101 void installTranslators(const QString& type); 101 void installTranslators(const QString& type);
102 QString m_dir; 102 QString m_dir;
103 QStringList m_plugDirs; 103 QStringList m_plugDirs;
104 QStringList m_languages; 104 QStringList m_languages;
105 bool m_autoDelete : 1; 105 bool m_autoDelete : 1;
106 bool m_isSafeMode : 1; 106 bool m_isSafeMode : 1;
107 bool m_isSorted : 1; 107 bool m_isSorted : 1;
108 QPtrDict<QLibrary> m_library; 108 QPtrDict<QLibrary> m_library;
109 109
110 struct Private; 110 struct Private;
111 Private* d; 111 Private* d;
112}; 112};
113 113
114/** 114/**
115 * \brief The class to load your QCOM+ plugins 115 * \brief The class to load your QCOM+ plugins
116 * 116 *
117 * This class takes care of activation and even the order 117 * This class takes care of activation and even the order
118 * if you need it. It is normally good to place a .directory file 118 * if you need it. It is normally good to place a .directory file
119 * into your plugin directory if you need order of activation. 119 * into your plugin directory if you need order of activation.
120 * 120 *
121 * You'll create the OPluginLoader and then use it to load the filtered 121 * You'll create the OPluginLoader and then use it to load the filtered
122 * plugins. 122 * plugins.
123 * 123 *
124 * There is also a GUI for the configuration and a Manager to write the 124 * There is also a GUI for the configuration and a Manager to write the
125 * mentioned .directory file 125 * mentioned .directory file
126 * 126 *
127 * On crash the safe mode is activated for the next run. You can then decide 127 * On crash the safe mode is activated for the next run. You can then decide
128 * if you want to load plugins or come up with the Configuration on 128 * if you want to load plugins or come up with the Configuration on
129 * next start yourself then. 129 * next start yourself then.
130 * 130 *
131 * @since 1.2 131 * @since 1.2
132 */ 132 */
133class OPluginLoader : public OGenericPluginLoader { 133class OPluginLoader : public OGenericPluginLoader {
134public: 134public:
135 OPluginLoader( const QString& name, bool sorted = false ); 135 OPluginLoader( const QString& name, bool sorted = false );
136 ~OPluginLoader(); 136 ~OPluginLoader();
137 137
138 template<class IFace> 138 template<class IFace>
139 IFace* load( const QString& name, const QUuid& );
140 template<class IFace>
141 IFace* load( const OPluginItem& item, const QUuid& ); 139 IFace* load( const OPluginItem& item, const QUuid& );
142}; 140};
143 141
144/** 142/**
145 * \brief A class to manager order and activation of plugins 143 * \brief A class to manager order and activation of plugins
146 * 144 *
147 * Manage order and activation. This is used by the Opie::Ui::OPluginConfig 145 * Manage order and activation. This is used by the Opie::Ui::OPluginConfig
148 * This class controls the activation and order of plugins depending 146 * This class controls the activation and order of plugins depending
149 * on the OPluginLoader you supply. 147 * on the OPluginLoader you supply.
150 * 148 *
151 * @see OPluginConfig 149 * @see OPluginConfig
152 * 150 *
153 */ 151 */
154class OPluginManager { 152class OPluginManager {
155public: 153public:
156 OPluginManager( OGenericPluginLoader* , const QString& name); 154 OPluginManager( OGenericPluginLoader* , const QString& name);
157 OPluginManager( OConfig* conf, const QString&, 155 OPluginManager( OConfig* conf, const QString&,
158 const QCString& group, const OPluginItem::List& ); 156 const QCString& group, const OPluginItem::List& );
159 ~OPluginManager(); 157 ~OPluginManager();
160 158
161 QString name(); 159 QString name();
162 void setName( const QString& ); 160 void setName( const QString& );
163 161
164 void setPosition( const OPluginItem& ); 162 void setPosition( const OPluginItem& );
165 void enable( const OPluginItem& ); 163 void enable( const OPluginItem& );
166 void disable( const OPluginItem& ); 164 void disable( const OPluginItem& );
167 void setEnabled( const OPluginItem&, bool = true); 165 void setEnabled( const OPluginItem&, bool = true);
168 166
169 void load(); 167 void load();
170 void save(); 168 void save();
171}; 169};
172 170
173template<class IFace>
174IFace* OPluginLoader::load( const QString& name, const QUuid& uid ) {
175 return static_cast<IFace*>( OGenericPluginLoader::load( item, uid ) );
176}
177 171
178template<class IFace> 172template<class IFace>
179IFace* OPluginLoader::load( const OPluginItem& item, const QUuid& uid ) { 173IFace* OPluginLoader::load( const OPluginItem& item, const QUuid& uid ) {
180 return static_cast<IFace*>( OGenericPluginLoader::load( item, uid ) ); 174 return static_cast<IFace*>( OGenericPluginLoader::load( item, uid ) );
181} 175}
182 176
183} 177}
184} 178}
185 179
186 180
187#endif 181#endif