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

List:       kde-commits
Subject:    kdewebdev/quanta/src
From:       Andras Mantia <amantia () kde ! org>
Date:       2005-02-02 10:27:46
Message-ID: 20050202102746.3A6411BA98 () office ! kde ! org
[Download RAW message or body]

CVS commit by amantia: 

DCOP methods to add files/folders to the project.


  M +2 -0      dcopwindowmanagerif.h   1.18
  M +16 -0     quanta.cpp   1.692
  M +2 -0      quanta.h   1.292


--- kdewebdev/quanta/src/dcopwindowmanagerif.h  #1.17:1.18
@@ -37,4 +37,6 @@ class DCOPWindowManagerIf : virtual publ
   virtual QString documentFolderForURL(const QString &url) = 0;
   virtual QString urlWithPreviewPrefix(const QString &url) = 0;
+  virtual void addFileToProject(const QString &url) = 0;
+  virtual void addFolderToProject(const QString &url) = 0;
 };
 

--- kdewebdev/quanta/src/quanta.cpp  #1.691:1.692
@@ -3751,4 +3751,20 @@ QString QuantaApp::urlWithPreviewPrefix(
 }
 
+void QuantaApp::addFileToProject(const QString &url)
+{
+  if (Project::ref()->hasProject())
+  {
+    Project::ref()->slotInsertFile(KURL::fromPathOrURL(url));
+  }
+}
+
+void QuantaApp::addFolderToProject(const QString &url)
+{
+  if (Project::ref()->hasProject())
+  {
+    Project::ref()->slotAddDirectory(KURL::fromPathOrURL(url), true);
+  }
+}
+
 void QuantaApp::slotAutosaveTimer()
 {

--- kdewebdev/quanta/src/quanta.h  #1.291:1.292
@@ -157,4 +157,6 @@ public:
   QString documentFolderForURL(const QString &url);
   QString urlWithPreviewPrefix(const QString &url);
+  void addFileToProject(const QString &url);
+  void addFolderToProject(const QString &url);
   /** Capture DCOP signals from KXsldbgPart or similar plugin */
   void newCursorPosition(const QString &file, int lineNumber, int columnNumber);


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

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