kdevelop/src

Alexander Dymo cloudtemple at mksat.net
Thu Sep 18 22:32:04 UTC 2003


CVS commit by dymo: 

Added the possibility to open documentation link in a new window by a RMB click.
Please tell me if I should leave as is or add a "real" RMB menu to the documentation part.
CCMAIL: kdevelop-devel at kdevelop.org


  M +9 -0      documentationpart.cpp   1.14
  M +2 -2      documentationpart.h   1.9


--- kdevelop/src/documentationpart.cpp  #1.13:1.14
@@ -13,6 +13,15 @@ DocumentationPart::DocumentationPart()
   connect(browserExtension(), SIGNAL(openURLRequestDelayed(const KURL &,const KParts::URLArgs &)),
           this, SLOT(openURLRequest(const KURL &)) );
+  connect( this, SIGNAL(popupMenu(const QString &, const QPoint &)), this, SLOT(popup(const QString &, const QPoint &)));
 }
 
+void DocumentationPart::popup( const QString & url, const QPoint & p )
+{
+//    qWarning("DocumentationPart::popup: %s", url.latin1());
+    KURL kurl (DocumentationPart::url().upURL());
+    kurl.addPath(url);
+    if (kurl.isValid())
+        PartController::getInstance()->showDocument(kurl, url);
+}
 
 void DocumentationPart::setContext(const QString &context)

--- kdevelop/src/documentationpart.h  #1.8:1.9
@@ -25,4 +25,5 @@ private slots:
  
   void openURLRequest(const KURL &url);
+  void popup( const QString & url, const QPoint & p );
 
 






More information about the KDevelop-devel mailing list