[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdevelop/lib/interfaces
From:       Alexander Dymo <cloudtemple () mksat ! net>
Date:       2004-12-12 22:32:51
Message-ID: 20041212223251.352BD1BB68 () office ! kde ! org
[Download RAW message or body]

CVS commit by dymo: 

Added KDevPlugin::pluginController() method.
Added profileResources() and profileResourcesRecursive methods and profileChanged \
signal to KDevPluginController. Plugins can use the signal and those methods to \
benefit from a profile-enabled shell.


  M +5 -0      kdevplugin.cpp   1.26
  M +3 -0      kdevplugin.h   1.33
  M +12 -0     kdevplugincontroller.cpp   1.2
  M +24 -1     kdevplugincontroller.h   1.3


--- kdevelop/lib/interfaces/kdevplugincontroller.cpp  #1.1:1.2
@@ -36,2 +36,14 @@ KTrader::OfferList KDevPluginController:
     return query("KDevelop/Plugin", constraint);
 }
+
+KURL::List KDevPluginController::profileResources(const QString &/*nameFilter*/)
+{
+    return KURL::List();
+}
+
+KURL::List KDevPluginController::profileResourcesRecursive(const QString \
&/*nameFilter*/) +{
+    return KURL::List();
+}
+
+#include "kdevplugincontroller.moc"

--- kdevelop/lib/interfaces/kdevplugincontroller.h  #1.2:1.3
@@ -20,4 +20,7 @@
 #define KDEVPLUGINCONTROLLER_H
 
+#include <qobject.h>
+
+#include <kurl.h>
 #include <ktrader.h>
 
@@ -33,6 +36,7 @@ The base class for KDevelop plugin contr
 Plugin controller is responsible for quering, loading and unloading available \
                plugins.
 */
-class KDevPluginController
+class KDevPluginController: public QObject
 {
+    Q_OBJECT
 public:
     
@@ -71,4 +75,23 @@ public:
     static KTrader::OfferList queryPlugins(const QString &constraint);
     
+    /**Reimplement this function only if your shell supports plugin profiles.
+    @return The list of URLs to the profile resources (files) with given @p \
extension. +    @param nameFilter Name filter for files. @see QDir::setNameFilter \
documentation +    for name filters syntax.*/    
+    virtual KURL::List profileResources(const QString &nameFilter);
+    
+    /**Reimplement this function only if your shell supports plugin profiles.
+    @return The list of URLs to the resources (files) with given @p extension.
+    This list is obtained by a recursive search that process given profile
+    and all it's subprofiles.
+    @param nameFilter Name filter for files. @see QDir::setNameFilter documentation
+    for name filters syntax.*/
+    virtual KURL::List profileResourcesRecursive(const QString &nameFilter);
+    
+signals:
+    /**Emitted when a plugin profile was changed (reloaded, other profile opened, \
etc.). +    Should work only on shells with plugin profiles support.*/
+    void profileChanged();
+    
 protected:
     /**Constructor.*/

--- kdevelop/lib/interfaces/kdevplugin.cpp  #1.25:1.26
@@ -104,4 +104,9 @@ KDevPartController *KDevPlugin::partCont
 }
 
+KDevPluginController *KDevPlugin::pluginController() const
+{
+    return m_api->pluginController();
+}
+
 void KDevPlugin::restorePartialProjectSession(const QDomElement* /*el*/)
 {

--- kdevelop/lib/interfaces/kdevplugin.h  #1.32:1.33
@@ -148,4 +148,7 @@ public:
     KDevPartController *partController() const;
 
+    /**@return A reference to the plugin controller which is used to manipulate \
loaded plugin.*/ +    virtual KDevPluginController *pluginController() const;
+    
     /**@return A reference to the code repository (accessor to persistant symbol \
stores).*/  KDevCodeRepository* codeRepository() const;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic