[rkward-cvs] rkward/rkward/windows rkhelpwindow.cpp,1.5,1.6 rkhelpwindow.h,1.5,1.6

Pierre ecoch at users.sourceforge.net
Sun Apr 3 16:23:41 UTC 2005


Update of /cvsroot/rkward/rkward/rkward/windows
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5482/rkward/windows

Modified Files:
	rkhelpwindow.cpp rkhelpwindow.h 
Log Message:
Now we use KParts properly. Some parts of the interface still need to be adaped.

Index: rkhelpwindow.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/windows/rkhelpwindow.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rkhelpwindow.cpp	3 Apr 2005 13:26:19 -0000	1.5
--- rkhelpwindow.cpp	3 Apr 2005 16:23:38 -0000	1.6
***************
*** 34,45 ****
  
  
! RKHelpWindow::RKHelpWindow(QWidget *parent, const char *name)
   : KMdiChildView(parent, name)
  {
  	khtmlpart = new KHTMLPart(this,0,0,0,KHTMLPart::BrowserViewGUI);
  	khtmlpart->setSelectable(true);
! 	khtmlpart->view()->setIcon(SmallIcon("help"));
  	khtmlpart->view()->setName("Help"); 
! 	khtmlpart->view()->setCaption(i18n("Help")); 
  
  	(RKGlobals::rkApp()->m_manager)->addPart(khtmlpart,false);
--- 34,47 ----
  
  
! RKHelpWindow::RKHelpWindow(QWidget *parent, const char *name, bool output)
   : KMdiChildView(parent, name)
  {
  	khtmlpart = new KHTMLPart(this,0,0,0,KHTMLPart::BrowserViewGUI);
  	khtmlpart->setSelectable(true);
! 	/*khtmlpart->view()->setIcon(SmallIcon("help"));
  	khtmlpart->view()->setName("Help"); 
! 	khtmlpart->view()->setCaption(i18n("Help")); */
! 	
! 	iShowOutput=output;
  
  	(RKGlobals::rkApp()->m_manager)->addPart(khtmlpart,false);
***************
*** 67,72 ****
  	if (QFile::exists( url.path() )) {
  		khtmlpart->openURL(url);
! 		setTabCaption(url.fileName());
! 		setCaption(url.prettyURL());
  		return(true);
  	}
--- 69,80 ----
  	if (QFile::exists( url.path() )) {
  		khtmlpart->openURL(url);
! 		if (iShowOutput) {
! 			setTabCaption(i18n("Output"));
! 			setCaption(i18n("Output"));
! 		}
! 		else {
! 			setTabCaption(url.fileName());
! 			setCaption(url.prettyURL());
! 		}
  		return(true);
  	}
***************
*** 83,88 ****
  void RKHelpWindow::slotOpenURLRequest(const KURL &url, const KParts::URLArgs & )
  {
! 	khtmlpart->openURL(url);
! 	setTabCaption(url.fileName());
! 	setCaption(url.prettyURL());
  }
--- 91,94 ----
  void RKHelpWindow::slotOpenURLRequest(const KURL &url, const KParts::URLArgs & )
  {
! 	openURL (url);
  }

Index: rkhelpwindow.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/windows/rkhelpwindow.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rkhelpwindow.h	3 Apr 2005 13:26:19 -0000	1.5
--- rkhelpwindow.h	3 Apr 2005 16:23:38 -0000	1.6
***************
*** 36,40 ****
  Q_OBJECT
  public:
!     RKHelpWindow(QWidget *parent = 0, const char *name = 0);
  
      ~RKHelpWindow();
--- 36,40 ----
  Q_OBJECT
  public:
!     RKHelpWindow(QWidget *parent = 0, const char *name = 0, bool output=false);
  
      ~RKHelpWindow();
***************
*** 46,49 ****
--- 46,52 ----
      QBoxLayout* pLayout;
      KParts::ReadOnlyPart *m_khtmlpart;
+ 
+     /** Are we showing the output? */
+     bool iShowOutput;
  };
  





More information about the rkward-tracker mailing list