[rkward-cvs] rkward/rkward helpdlg.ui,1.1,1.2 khelpdlg.cpp,1.1,1.2 khelpdlg.h,1.1,1.2 rkoutputwindow.cpp,1.5,1.6 rkoutputwindow.h,1.3,1.4 rkward.cpp,1.58,1.59

Pierre ecoch at users.sourceforge.net
Sun Feb 27 10:38:58 UTC 2005


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

Modified Files:
	helpdlg.ui khelpdlg.cpp khelpdlg.h rkoutputwindow.cpp 
	rkoutputwindow.h rkward.cpp 
Log Message:
Adding functions to view graphs in the output window.

Index: rkoutputwindow.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkoutputwindow.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rkoutputwindow.h	27 Aug 2004 10:53:50 -0000	1.3
--- rkoutputwindow.h	27 Feb 2005 10:38:56 -0000	1.4
***************
*** 21,24 ****
--- 21,25 ----
  
  class QTextBrowser;
+ class KHTMLPart;
  
  /**
***************
*** 38,43 ****
  	void configureOutput ();
  	void clearOutput ();
  private:
! 	QTextBrowser *browser;
  };
  
--- 39,45 ----
  	void configureOutput ();
  	void clearOutput ();
+ 	void refreshOutput ();
  private:
! 	KHTMLPart *khtmlpart;
  };
  

Index: khelpdlg.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/khelpdlg.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** khelpdlg.cpp	25 Feb 2005 22:28:26 -0000	1.1
--- khelpdlg.cpp	27 Feb 2005 10:38:56 -0000	1.2
***************
*** 32,36 ****
  #define GET_HELP_URL 1
  #define HELP_SEARCH 2
! 
  
  KHelpDlg::KHelpDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
--- 32,36 ----
  #define GET_HELP_URL 1
  #define HELP_SEARCH 2
! #define GET_INSTALLED_PACKAGES 3
  
  KHelpDlg::KHelpDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
***************
*** 40,46 ****
--- 40,48 ----
  	// HACK : I should'nt have to do that.
  	resultsList->removeColumn(0);
+ 	
  	resultsList->addColumn (i18n ("Topic"));
  	resultsList->addColumn (i18n ("Title"));
  	resultsList->addColumn (i18n ("Package"));
+ 	packagesList->insertItem (i18n("All"));
  }
  
***************
*** 52,63 ****
  {
  	QString agrep = "FALSE";
- 	QString ignoreCase = "TRUE";
  	if(fuzzyCheckBox->isChecked ()==TRUE){
  		agrep="NULL";
  	}
  	if(caseSensitiveCheckBox->isChecked ()==TRUE){
  		ignoreCase="FALSE";
  	}
  	
  	
  	QString s = ".rk.get.search.results(\"";
--- 54,73 ----
  {
  	QString agrep = "FALSE";
  	if(fuzzyCheckBox->isChecked ()==TRUE){
  		agrep="NULL";
  	}
+ 	
+ 	QString ignoreCase = "TRUE";
  	if(caseSensitiveCheckBox->isChecked ()==TRUE){
  		ignoreCase="FALSE";
  	}
  	
+ 	QString package = "NULL";
+ 	if(packagesList->currentItem()!=0){
+ 		package="\"";
+ 		package.append(packagesList->currentText());
+ 		package.append("\"");
+ 	}
+ 	
  	
  	QString s = ".rk.get.search.results(\"";
***************
*** 67,73 ****
--- 77,87 ----
  	s.append(", ignore.case=");
  	s.append(ignoreCase);
+ 	s.append(", package=");
+ 	s.append(package);
  	s.append(")");
  
  	RKGlobals::rInterface ()->issueCommand (s, RCommand::App | RCommand::Sync | RCommand::GetStringVector, "", this, HELP_SEARCH, chain);
+ 	
+ 	field->insertItem(field->currentText());
  }
  
***************
*** 84,87 ****
--- 98,107 ----
  }
  
+ void KHelpDlg::slotPackageListActivated()
+ {
+ 	RKGlobals::rInterface ()->issueCommand (".rk.get.installed.packages ()", RCommand::App | RCommand::Sync | RCommand::GetStringVector, "", this, GET_INSTALLED_PACKAGES, chain);
+ }
+ 
+ 
  
  void KHelpDlg::rCommandDone (RCommand *command) {
***************
*** 101,105 ****
  			return;
  		}
! 	} else {
  		RK_ASSERT (false);
  	}
--- 121,132 ----
  			return;
  		}
! 	} else if (command->getFlags () == GET_INSTALLED_PACKAGES) {
! 		// FIXME : the following causes RKWard to crash (?).
! 		RK_ASSERT ((command->stringVectorLength () % 4) == 0);
! 		int count = (command->stringVectorLength () / 4);
! 		for (int i=0; i < count; ++i) {
! 			packagesList->insertItem(command->getStringVector ()[i]);
! 		}
! 	}else {
  		RK_ASSERT (false);
  	}

Index: helpdlg.ui
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/helpdlg.ui,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** helpdlg.ui	25 Feb 2005 22:28:26 -0000	1.1
--- helpdlg.ui	27 Feb 2005 10:38:56 -0000	1.2
***************
*** 9,14 ****
              <x>0</x>
              <y>0</y>
!             <width>601</width>
!             <height>276</height>
          </rect>
      </property>
--- 9,14 ----
              <x>0</x>
              <y>0</y>
!             <width>743</width>
!             <height>378</height>
          </rect>
      </property>
***************
*** 22,26 ****
          <widget class="QLayoutWidget" row="0" column="0">
              <property name="name">
!                 <cstring>layout28</cstring>
              </property>
              <vbox>
--- 22,26 ----
          <widget class="QLayoutWidget" row="0" column="0">
              <property name="name">
!                 <cstring>layout58</cstring>
              </property>
              <vbox>
***************
*** 30,34 ****
                  <widget class="QLayoutWidget">
                      <property name="name">
!                         <cstring>layout27</cstring>
                      </property>
                      <hbox>
--- 30,34 ----
                  <widget class="QLayoutWidget">
                      <property name="name">
!                         <cstring>layout57</cstring>
                      </property>
                      <hbox>
***************
*** 38,42 ****
                          <widget class="QLayoutWidget">
                              <property name="name">
!                                 <cstring>layout26</cstring>
                              </property>
                              <vbox>
--- 38,42 ----
                          <widget class="QLayoutWidget">
                              <property name="name">
!                                 <cstring>layout52</cstring>
                              </property>
                              <vbox>
***************
*** 44,104 ****
                                      <cstring>unnamed</cstring>
                                  </property>
!                                 <widget class="QLayoutWidget">
                                      <property name="name">
!                                         <cstring>layout25</cstring>
                                      </property>
-                                     <hbox>
-                                         <property name="name">
-                                             <cstring>unnamed</cstring>
-                                         </property>
-                                         <widget class="QSplitter">
-                                             <property name="name">
-                                                 <cstring>splitter3</cstring>
-                                             </property>
-                                             <property name="orientation">
-                                                 <enum>Horizontal</enum>
-                                             </property>
-                                             <widget class="QLabel">
-                                                 <property name="name">
-                                                     <cstring>textLabel1</cstring>
-                                                 </property>
-                                                 <property name="maximumSize">
-                                                     <size>
-                                                         <width>32767</width>
-                                                         <height>32767</height>
-                                                     </size>
-                                                 </property>
-                                                 <property name="text">
-                                                     <string>Find:</string>
-                                                 </property>
-                                             </widget>
-                                             <widget class="QComboBox">
-                                                 <property name="name">
-                                                     <cstring>field</cstring>
-                                                 </property>
-                                                 <property name="editable">
-                                                     <bool>true</bool>
-                                                 </property>
-                                             </widget>
-                                         </widget>
-                                         <widget class="QPushButton">
-                                             <property name="name">
-                                                 <cstring>findButton</cstring>
-                                             </property>
-                                             <property name="maximumSize">
-                                                 <size>
-                                                     <width>120</width>
-                                                     <height>32767</height>
-                                                 </size>
-                                             </property>
-                                             <property name="text">
-                                                 <string>Find</string>
-                                             </property>
-                                         </widget>
-                                     </hbox>
                                  </widget>
                                  <widget class="QLayoutWidget">
                                      <property name="name">
!                                         <cstring>layout21</cstring>
                                      </property>
                                      <hbox>
--- 44,104 ----
                                      <cstring>unnamed</cstring>
                                  </property>
!                                 <widget class="QLabel">
                                      <property name="name">
!                                         <cstring>textLabel1</cstring>
!                                     </property>
!                                     <property name="sizePolicy">
!                                         <sizepolicy>
!                                             <hsizetype>4</hsizetype>
!                                             <vsizetype>5</vsizetype>
!                                             <horstretch>0</horstretch>
!                                             <verstretch>0</verstretch>
!                                         </sizepolicy>
!                                     </property>
!                                     <property name="maximumSize">
!                                         <size>
!                                             <width>32767</width>
!                                             <height>32767</height>
!                                         </size>
!                                     </property>
!                                     <property name="text">
!                                         <string>Find:</string>
!                                     </property>
!                                 </widget>
!                                 <widget class="QLabel">
!                                     <property name="name">
!                                         <cstring>textLabel2</cstring>
!                                     </property>
!                                     <property name="maximumSize">
!                                         <size>
!                                             <width>32767</width>
!                                             <height>32767</height>
!                                         </size>
!                                     </property>
!                                     <property name="text">
!                                         <string>Fields:</string>
!                                     </property>
!                                 </widget>
!                             </vbox>
!                         </widget>
!                         <widget class="QLayoutWidget">
!                             <property name="name">
!                                 <cstring>layout56</cstring>
!                             </property>
!                             <vbox>
!                                 <property name="name">
!                                     <cstring>unnamed</cstring>
!                                 </property>
!                                 <widget class="QComboBox">
!                                     <property name="name">
!                                         <cstring>field</cstring>
!                                     </property>
!                                     <property name="editable">
!                                         <bool>true</bool>
                                      </property>
                                  </widget>
                                  <widget class="QLayoutWidget">
                                      <property name="name">
!                                         <cstring>layout54</cstring>
                                      </property>
                                      <hbox>
***************
*** 106,123 ****
                                              <cstring>unnamed</cstring>
                                          </property>
-                                         <widget class="QLabel">
-                                             <property name="name">
-                                                 <cstring>textLabel2</cstring>
-                                             </property>
-                                             <property name="maximumSize">
-                                                 <size>
-                                                     <width>32767</width>
-                                                     <height>32767</height>
-                                                 </size>
-                                             </property>
-                                             <property name="text">
-                                                 <string>Fields:</string>
-                                             </property>
-                                         </widget>
                                          <widget class="QComboBox">
                                              <property name="name">
--- 106,109 ----
***************
*** 129,132 ****
--- 115,126 ----
                                                  <cstring>textLabel3</cstring>
                                              </property>
+                                             <property name="sizePolicy">
+                                                 <sizepolicy>
+                                                     <hsizetype>4</hsizetype>
+                                                     <vsizetype>5</vsizetype>
+                                                     <horstretch>0</horstretch>
+                                                     <verstretch>0</verstretch>
+                                                 </sizepolicy>
+                                             </property>
                                              <property name="maximumSize">
                                                  <size>
***************
*** 136,140 ****
                                              </property>
                                              <property name="text">
!                                                 <string>Packages:</string>
                                              </property>
                                          </widget>
--- 130,134 ----
                                              </property>
                                              <property name="text">
!                                                 <string>Package:</string>
                                              </property>
                                          </widget>
***************
*** 150,154 ****
                          <widget class="QLayoutWidget">
                              <property name="name">
!                                 <cstring>layout7</cstring>
                              </property>
                              <vbox>
--- 144,148 ----
                          <widget class="QLayoutWidget">
                              <property name="name">
!                                 <cstring>layout40</cstring>
                              </property>
                              <vbox>
***************
*** 160,163 ****
--- 154,165 ----
                                          <cstring>caseSensitiveCheckBox</cstring>
                                      </property>
+                                     <property name="sizePolicy">
+                                         <sizepolicy>
+                                             <hsizetype>4</hsizetype>
+                                             <vsizetype>0</vsizetype>
+                                             <horstretch>0</horstretch>
+                                             <verstretch>0</verstretch>
+                                         </sizepolicy>
+                                     </property>
                                      <property name="maximumSize">
                                          <size>
***************
*** 189,192 ****
--- 191,218 ----
                              </vbox>
                          </widget>
+                         <widget class="QLayoutWidget">
+                             <property name="name">
+                                 <cstring>layout55</cstring>
+                             </property>
+                             <vbox>
+                                 <property name="name">
+                                     <cstring>unnamed</cstring>
+                                 </property>
+                                 <widget class="QPushButton">
+                                     <property name="name">
+                                         <cstring>findButton</cstring>
+                                     </property>
+                                     <property name="maximumSize">
+                                         <size>
+                                             <width>120</width>
+                                             <height>32767</height>
+                                         </size>
+                                     </property>
+                                     <property name="text">
+                                         <string>Find</string>
+                                     </property>
+                                 </widget>
+                             </vbox>
+                         </widget>
                      </hbox>
                  </widget>
***************
*** 214,217 ****
--- 240,251 ----
                          <cstring>resultsList</cstring>
                      </property>
+                     <property name="sizePolicy">
+                         <sizepolicy>
+                             <hsizetype>7</hsizetype>
+                             <vsizetype>7</vsizetype>
+                             <horstretch>0</horstretch>
+                             <verstretch>0</verstretch>
+                         </sizepolicy>
+                     </property>
                  </widget>
              </vbox>
***************
*** 232,235 ****
--- 266,275 ----
          <slot>slotResultsListDblClicked(QListViewItem*,const QPoint&,int)</slot>
      </connection>
+     <connection>
+         <sender>packagesList</sender>
+         <signal>activated(int)</signal>
+         <receiver>helpDlg</receiver>
+         <slot>slotPackagesListActivated(int)</slot>
+     </connection>
  </connections>
  <includes>
***************
*** 239,242 ****
--- 279,283 ----
      <slot>slotFindButtonClicked()</slot>
      <slot>slotResultsListDblClicked( QListViewItem *, const QPoint &, int )</slot>
+     <slot>slotPackagesListActivated(int)</slot>
  </slots>
  <layoutdefaults spacing="6" margin="11"/>

Index: rkoutputwindow.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkoutputwindow.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rkoutputwindow.cpp	27 Aug 2004 10:53:50 -0000	1.5
--- rkoutputwindow.cpp	27 Feb 2005 10:38:56 -0000	1.6
***************
*** 18,28 ****
  
  #include <qlayout.h>
- #include <qtextbrowser.h>
  #include <qpopupmenu.h>
  #include <qfile.h>
  
  #include <klocale.h>
  #include <kmenubar.h>
  
  #include "settings/rksettingsmodulelogfiles.h"
  #include "settings/rksettings.h"
--- 18,31 ----
  
  #include <qlayout.h>
  #include <qpopupmenu.h>
  #include <qfile.h>
+ #include <qscrollview.h>
  
  #include <klocale.h>
  #include <kmenubar.h>
  
+ #include <khtmlview.h>
+ #include <khtml_part.h>
+ 
  #include "settings/rksettingsmodulelogfiles.h"
  #include "settings/rksettings.h"
***************
*** 33,38 ****
  	RK_TRACE (OUTPUT);
  	QGridLayout *grid = new QGridLayout (this, 2, 1);
! 	browser = new QTextBrowser (this);
! 	grid->addWidget (browser, 1, 0);
  	
  	setCaption (i18n ("Output Window"));
--- 36,42 ----
  	RK_TRACE (OUTPUT);
  	QGridLayout *grid = new QGridLayout (this, 2, 1);
! 	
! 	khtmlpart = new KHTMLPart (this);
! 	grid->addWidget (khtmlpart->view(), 1, 0);
  	
  	setCaption (i18n ("Output Window"));
***************
*** 41,54 ****
  	KMenuBar *menu = new KMenuBar (this);
  	QPopupMenu *output_menu = new QPopupMenu (this);
! 	output_menu->setItemEnabled (output_menu->insertItem (i18n ("&Print Output"), 0, 0), false);
! 	output_menu->setItemEnabled (output_menu->insertItem (i18n ("Export Output"), 0, 0), false);
! 	output_menu->insertItem (i18n ("&Clear Output"), this, SLOT (clearOutput ()));
  	output_menu->insertSeparator ();
! 	output_menu->insertItem (i18n ("Configure"), this, SLOT (configureOutput ()));
  	menu->insertItem (i18n ("Output"), output_menu);
  	
- 	QPopupMenu *help_menu = new QPopupMenu (this);
- 	help_menu->setItemEnabled (help_menu->insertItem (i18n ("Sorry, no help available so far"), 0, 0), false);
- 	menu->insertItem (i18n ("Help"), help_menu);
  
  	grid->addWidget (menu, 0, 0);
--- 45,57 ----
  	KMenuBar *menu = new KMenuBar (this);
  	QPopupMenu *output_menu = new QPopupMenu (this);
! 	output_menu->setItemEnabled (output_menu->insertItem (i18n ("&Print"), 0, 0), false);
! 	output_menu->setItemEnabled (output_menu->insertItem (i18n ("&Export"), 0, 0), false);
! 	output_menu->insertItem (i18n ("&Clear"), this, SLOT (clearOutput ()));
  	output_menu->insertSeparator ();
! 	output_menu->insertItem (i18n ("&Refresh"), this, SLOT (refreshOutput ()));
! 	output_menu->insertSeparator ();
! 	output_menu->insertItem (i18n ("&Configure"), this, SLOT (configureOutput ()));
  	menu->insertItem (i18n ("Output"), output_menu);
  	
  
  	grid->addWidget (menu, 0, 0);
***************
*** 62,73 ****
  void RKOutputWindow::checkNewInput () {
  	RK_TRACE (OUTPUT);
! 	browser->setSource (RKSettingsModuleLogfiles::filesPath() + "/rk_out.html");
! 	browser->reload ();
! 	browser->scrollToBottom ();
  }
  
  void RKOutputWindow::configureOutput () {
  	RK_TRACE (OUTPUT);
! 	RKSettings::configureSettings (RKSettings::Output, this);
  }
  
--- 65,78 ----
  void RKOutputWindow::checkNewInput () {
  	RK_TRACE (OUTPUT);
! 	KURL url(RKSettingsModuleLogfiles::filesPath() + "/rk_out.html");
! 	if (QFile::exists( url.path() )) {
! 		khtmlpart->openURL(url);
! 		// Here we should scroll to the bottom of the page 
! 	}
  }
  
  void RKOutputWindow::configureOutput () {
  	RK_TRACE (OUTPUT);
! 	RKSettings::configureSettings (RKSettings::Output, this); 
  }
  
***************
*** 79,81 ****
--- 84,91 ----
  }
  
+ void RKOutputWindow::refreshOutput () {
+ 	RK_TRACE (OUTPUT);
+ 	checkNewInput ();
+ }
+ 
  #include "rkoutputwindow.moc"

Index: rkward.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** rkward.cpp	25 Feb 2005 22:28:26 -0000	1.58
--- rkward.cpp	27 Feb 2005 10:38:56 -0000	1.59
***************
*** 52,56 ****
  #include "rkward.h"
  #include "rkeditormanager.h"
! #include "rkdocmanager.h"
  #include "core/rkmodificationtracker.h"
  #include "dataeditor/rkeditor.h"
--- 52,56 ----
  #include "rkward.h"
  #include "rkeditormanager.h"
! #include "rkdocmanager.h" 
  #include "core/rkmodificationtracker.h"
  #include "dataeditor/rkeditor.h"
***************
*** 160,164 ****
  	output->hide ();*/
  
!     QString dummy = "Before you start bashing at it: Please note that this is merely a technology preview release. You might acutally be able to use it for some very simple tasks, but chances are it's of hardly any practical value so far. It does not do much good. It might do some very bad things (don't let it touch valuable data!). It's lacking in many respects. If you would like to help improve it, or simply get in contact, visit:\nhttp://rkward.sourceforge.net\nAll comments are welcome.";
  	KMessageBox::information (this, dummy, "Before you complain...", "state_of_rkward");
  	
--- 160,164 ----
  	output->hide ();*/
  
!     QString dummy = "Before you start bashing at it: please note that this is merely a technology preview release. You might acutally be able to use it for some very simple tasks, but chances are it's of hardly any practical value so far. It does not do much good. It might do some very bad things (don't let it touch valuable data!). It's lacking in many respects. If you would like to help improve it, or simply get in contact, visit:\nhttp://rkward.sourceforge.net\nAll comments are welcome.";
  	KMessageBox::information (this, dummy, "Before you complain...", "state_of_rkward");
  	
***************
*** 203,206 ****
--- 203,207 ----
  	
  	helpDlg = new KHelpDlg(0);
+ 	helpDlg->setIcon(SmallIcon("help"));
  	addToolWindow(helpDlg,KDockWidget::DockBottom, getMainDockWidget(), 10);
  	
***************
*** 1082,1086 ****
  		editRedo->setEnabled(true);
  		editPaste->setEnabled(true);
- 		fileOpen->setEnabled(true);
  		fileSave->setEnabled(true);
  		fileSaveAs->setEnabled(true);
--- 1083,1086 ----
***************
*** 1096,1100 ****
  		editRedo->setEnabled(false);
  		editPaste->setEnabled(false);
- 		fileOpen->setEnabled(false);
  		fileSave->setEnabled(false);
  		fileSaveAs->setEnabled(false);
--- 1096,1099 ----

Index: khelpdlg.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/khelpdlg.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** khelpdlg.h	25 Feb 2005 22:28:26 -0000	1.1
--- khelpdlg.h	27 Feb 2005 10:38:56 -0000	1.2
***************
*** 39,42 ****
--- 39,43 ----
    virtual void          slotFindButtonClicked();
    virtual void          slotResultsListDblClicked( QListViewItem *item, const QPoint &, int );
+   virtual void          slotPackageListActivated();
    
  protected:





More information about the rkward-tracker mailing list