[Bug 71274] documentation not printebal from kdevelop

Alexander Dymo cloudtemple at mksat.net
Mon Apr 12 23:28:05 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=71274      
cloudtemple mksat net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From cloudtemple mksat net  2004-04-12 23:27 -------
CVS commit by dymo: 

Added printing functionality to the documentation viewer.
CCMAIL: 71274-done bugs kde org


  A            documentation_partui.rc   1.1
  M +1 -1      Makefile.am   1.42
  M +14 -1     documentationpart.cpp   1.20
  M +2 -0      documentationpart.h   1.13


--- kdevelop/src/Makefile.am  #1.41:1.42
 @ -10,5 +10,5  @
 
 rcdir = $(kde_datadir)/kdevelop
-rc_DATA = kdevelopui.rc eventsrc
+rc_DATA = kdevelopui.rc eventsrc documentation_partui.rc
 
 # default KDevelop configuration

--- kdevelop/src/documentationpart.cpp  #1.19:1.20
 @ -3,8 +3,11  @
 
 #include <kaction.h>
+#include <kstdaction.h>
+#include <kstddirs.h>
 #include <klocale.h>
 #include <kpopupmenu.h>
 #include <kiconloader.h>
 #include <kmainwindow.h>
+#include <khtmlview.h>
 
 #include "kdevmainwindow.h"
 @ -19,4 +22,6  @ DocumentationPart::DocumentationPart()
   : KHTMLPart(0L, 0L, 0L, "DocumentationPart", BrowserViewGUI )
 {
+  setXMLFile(locate("data", "kdevelop/documentation_partui.rc"), true);
+  
   connect(browserExtension(), SIGNAL(openURLRequestDelayed(const KURL &,const KParts::URLArgs &)),
           this, SLOT(openURLRequest(const KURL &)) );
 @ -26,5 +31,5  @ DocumentationPart::DocumentationPart()
   connect(this, SIGNAL(canceled(const QString &)), this, SLOT(slotCancelled(const QString &)));
 
-  KActionCollection * actions = new KActionCollection( this );
+  KActionCollection * actions = actionCollection();// new KActionCollection( this );
   reloadAction = new KAction( i18n( "Reload" ), "reload", 0,
     this, SLOT( slotReload() ), actions, "doc_reload" );
 @ -36,4 +41,5  @ DocumentationPart::DocumentationPart()
     this, SLOT( slotDuplicate() ), actions, "doc_dup" );
   duplicateAction->setWhatsThis(i18n("<b>Duplicate window</b><p>Opens current document in a new window."));
+  printAction = KStdAction::print(this, SLOT(slotPrint()), actions, "print_doc");
 
   connect( this, SIGNAL(popupMenu(const QString &, const QPoint &)), this, SLOT(popup(const QString &, const QPoint &)));
 @ -75,4 +81,6  @ void DocumentationPart::popup( const QSt
   stopAction->plug(m_popup);
   m_popup->insertSeparator();
+  printAction->plug(m_popup);
+  m_popup->insertSeparator();
 
 /*  if (!url.isEmpty())
 @ -313,3 +321,8  @ void DocumentationPart::slotDuplicate( )
 }
 
+void DocumentationPart::slotPrint( )
+{
+    view()->print();
+}
+
 #include "documentationpart.moc"

--- kdevelop/src/documentationpart.h  #1.12:1.13
 @ -35,4 +35,5  @ private slots:
   void slotStop();
   void slotDuplicate();
+  void slotPrint();
 
 private:
 @ -42,4 +43,5  @ private:
   KAction *reloadAction;
   KAction *duplicateAction;
+  KAction *printAction;
 };




More information about the KDevelop-devel mailing list