[rkward-cvs] rkward/rkward rkconsole.cpp,1.4,1.5 rkkonsole.cpp,1.2,1.3 rkward.cpp,1.75,1.76 rkward.h,1.30,1.31 rkwatch.cpp,1.34,1.35 rkwatch.h,1.14,1.15

Pierre ecoch at users.sourceforge.net
Fri Apr 15 20:03:12 UTC 2005


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

Modified Files:
	rkconsole.cpp rkkonsole.cpp rkward.cpp rkward.h rkwatch.cpp 
	rkwatch.h 
Log Message:
console and watch divorced.

Index: rkwatch.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkwatch.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** rkwatch.cpp	15 Apr 2005 14:15:29 -0000	1.34
--- rkwatch.cpp	15 Apr 2005 20:03:09 -0000	1.35
***************
*** 25,29 ****
  #include "rkeditormanager.h"
  #include "windows/rkcommandeditorwindow.h"
- #include "rkconsole.h"
  
  #include <qtextedit.h>
--- 25,28 ----
***************
*** 41,96 ****
  RKwatch::RKwatch(RInterface *parent) : RKToggleWidget () {
  	RK_TRACE (APP);
- 	QGridLayout *grid = new QGridLayout (this, 2, 1);
  	
- 	QSplitter *splitter = new QSplitter (QSplitter::Vertical, this);
- 	grid->addWidget (splitter, 1, 0);
- 
- 	QWidget *layout_widget = new QWidget (splitter);
- 	QHBoxLayout *bottom_hbox = new QHBoxLayout (layout_widget, 0, 6);
  	
! 	watch = new QTextEdit (splitter);
  	watch->setTextFormat (PlainText);
  	watch->setReadOnly (true);
- 	
- 	console = new RKConsole(layout_widget);
- 	bottom_hbox->addWidget (console);
- 	connect (console, SIGNAL (userCommandRunning (RCommand *)), this, SLOT (consoleCommandRunning (RCommand *)));
- 	
- 	// add run & reset buttons
- 	QHBoxLayout *button_hbox = new QHBoxLayout (0, 0, 6);
- 	bottom_hbox->addLayout (button_hbox);
- 	
- 	interrupt_command = new QPushButton (i18n ("&Interrupt"), layout_widget);
- 	connect (interrupt_command, SIGNAL (clicked ()), this, SLOT (interruptCommand ()));
- 	interrupt_command->setEnabled (false);
- 	button_hbox->addWidget (interrupt_command);
  
! 	// construct menu-bar
! 	KMenuBar *menu = new KMenuBar (this);
! 	QPopupMenu *watch_menu = new QPopupMenu (this);
! 	watch_menu->setItemEnabled (watch_menu->insertItem (i18n ("&Print Log"), 0, 0), false);
! 	watch_menu->setItemEnabled (watch_menu->insertItem (i18n ("Export Log"), 0, 0), false);
! 	watch_menu->insertItem (i18n ("&Clear Log"), this, SLOT (clearWatch ()));
! 	watch_menu->insertSeparator ();
! 	watch_menu->insertItem (i18n ("Configure"), this, SLOT (configureWatch ()));
! 	menu->insertItem (i18n ("Watch"), watch_menu);
! 
! 	menu->setFixedHeight (menu->height ());
! 	
! 	grid->addWidget (menu, 0, 0);
  
! // resize, set caption
! 	resize (QSize (600, 520).expandedTo (minimumSizeHint ()));
! 	setCaption (i18n ("Console"));
  	
  	clearWatch ();
  	
  	r_inter = parent;
- 	user_command = 0;
  }
  
  RKwatch::~RKwatch(){
  	RK_TRACE (APP);
- 	delete commands;
  }
  
--- 40,61 ----
  RKwatch::RKwatch(RInterface *parent) : RKToggleWidget () {
  	RK_TRACE (APP);
  	
  	
! 	watch = new QTextEdit (this);
  	watch->setTextFormat (PlainText);
  	watch->setReadOnly (true);
  
! 	pLayout = new QHBoxLayout( this, 0, -1, "layout");
! 	pLayout->addWidget(watch);
  
! 	setCaption (i18n ("Command log"));
  	
  	clearWatch ();
  	
  	r_inter = parent;
  }
  
  RKwatch::~RKwatch(){
  	RK_TRACE (APP);
  }
  
***************
*** 130,137 ****
  void RKwatch::addOutput (RCommand *command) {
  	RK_TRACE (APP);
! 	if (command == user_command){
! 		user_command = 0;
! 		interrupt_command->setEnabled (false);
! 	}
  	if (!RKSettingsModuleWatch::shouldShowOutput (command)) {
  		if (!command->failed ()) {
--- 95,99 ----
  void RKwatch::addOutput (RCommand *command) {
  	RK_TRACE (APP);
! 
  	if (!RKSettingsModuleWatch::shouldShowOutput (command)) {
  		if (!command->failed ()) {
***************
*** 183,191 ****
  }
  
! void RKwatch::interruptCommand () {
! 	RK_TRACE (APP);
! 	
! 	RKGlobals::rInterface ()->cancelCommand (user_command);
! }
  
  
--- 145,149 ----
  }
  
! 
  
  
***************
*** 199,222 ****
  	RK_TRACE (APP);
  	
- 	console->flush ();
  	
  	watch->setText ("");
  
  	// set a fixed width font
!     QFont font ("Courier");
  	watch->setCurrentFont (font);
  	watch->setWordWrap (QTextEdit::NoWrap);
  }
  
! void RKwatch::consoleCommandRunning (RCommand *command) {
! 	RK_TRACE (APP);
! 	
! 	if (command) {
! 		user_command = command;
! 		interrupt_command->setEnabled (true);
! 	} else {
! 		user_command = 0;
! 		interrupt_command->setEnabled (false);
! 	}
! }
  
--- 157,169 ----
  	RK_TRACE (APP);
  	
  	
  	watch->setText ("");
  
  	// set a fixed width font
! 	QFont font ("Courier");
  	watch->setCurrentFont (font);
  	watch->setWordWrap (QTextEdit::NoWrap);
  }
  
! 
  

Index: rkwatch.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkwatch.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** rkwatch.h	15 Apr 2005 14:15:29 -0000	1.14
--- rkwatch.h	15 Apr 2005 20:03:09 -0000	1.15
***************
*** 29,33 ****
  class QTextEdit;
  class RKCommandEditor;
! class RKConsole;
  
  /**
--- 29,33 ----
  class QTextEdit;
  class RKCommandEditor;
! class QBoxLayout;
  
  /**
***************
*** 45,56 ****
  	void addOutput (RCommand *command);
  public slots:
- /** Clears commands-textedit */
- 	void interruptCommand ();
  /** configures the watch-window */
  	void configureWatch ();
  /** clears the watch-window */
  	void clearWatch ();
- /** Submits command from the RKConsole */
- 	void consoleCommandRunning (RCommand *command);
  
  private:
--- 45,52 ----
***************
*** 59,69 ****
  	RInterface *r_inter;
  
- 	RKConsole *console;
- 	RKCommandEditor *commands;
  	QTextEdit *watch;
! 	QPushButton *submit;
! 	QPushButton *submit_selected;
! 	QPushButton *interrupt_command;
! 	RCommand *user_command;
  };
  
--- 55,60 ----
  	RInterface *r_inter;
  
  	QTextEdit *watch;
! 	QBoxLayout* pLayout;
  };
  

Index: rkconsole.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkconsole.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkconsole.cpp	15 Apr 2005 14:15:29 -0000	1.4
--- rkconsole.cpp	15 Apr 2005 20:03:09 -0000	1.5
***************
*** 37,40 ****
--- 37,42 ----
  	setFont (font);
  	
+ 	setCaption(i18n("R Console"));
+ 	
  	prefix = "> ";
  	command_incomplete = false;

Index: rkward.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** rkward.cpp	7 Apr 2005 06:01:12 -0000	1.75
--- rkward.cpp	15 Apr 2005 20:03:09 -0000	1.76
***************
*** 78,81 ****
--- 78,82 ----
  #include "khelpdlg.h"
  #include "rkkonsole.h"
+ #include "rkconsole.h"
  #include "debug.h"
  
***************
*** 161,166 ****
  	object_browser = new RObjectBrowser ();
  	
! 	output = new RKOutputWindow (0);
! 	/*output->showMaximized ();
  	output->hide ();*/
  
--- 162,167 ----
  	object_browser = new RObjectBrowser ();
  	
! 	/*output = new RKOutputWindow (0);
! 	output->showMaximized ();
  	output->hide ();*/
  
***************
*** 198,204 ****
  	addToolWindow(object_browser,KDockWidget::DockLeft, getMainDockWidget(), 30 , i18n ("Existing objects in your workspace.") , i18n ("Workspace"));
  	
! 	RKGlobals::rInterface ()->watch->setName("Console");
! 	RKGlobals::rInterface ()->watch->setIcon(SmallIcon("konsole"));
  	addToolWindow(RKGlobals::rInterface ()->watch,KDockWidget::DockBottom, getMainDockWidget(), 10);
  	
  	/*
--- 199,210 ----
  	addToolWindow(object_browser,KDockWidget::DockLeft, getMainDockWidget(), 30 , i18n ("Existing objects in your workspace.") , i18n ("Workspace"));
  	
! 	RKGlobals::rInterface ()->watch->setName("Command log");
! 	RKGlobals::rInterface ()->watch->setIcon(SmallIcon("text_block"));
  	addToolWindow(RKGlobals::rInterface ()->watch,KDockWidget::DockBottom, getMainDockWidget(), 10);
+ 
+ 	console = new RKConsole(0);
+ 	console->setIcon(SmallIcon("konsole"));
+ 	console->setName("r_console");
+ 	addToolWindow(console,KDockWidget::DockBottom, getMainDockWidget(), 10);
  	
  	/*
***************
*** 216,219 ****
--- 222,226 ----
  	konsole = new RKKonsole(0);
  	konsole->setIcon(SmallIcon("konsole"));
+ 	console->setName("terminal");
  	addToolWindow(konsole,KDockWidget::DockBottom, getMainDockWidget(), 10);
  

Index: rkkonsole.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkkonsole.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkkonsole.cpp	6 Apr 2005 14:01:46 -0000	1.2
--- rkkonsole.cpp	15 Apr 2005 20:03:09 -0000	1.3
***************
*** 12,15 ****
--- 12,16 ----
  #include "rkkonsole.h"
  #include <kde_terminal_interface.h>
+ #include <klocale.h>
  #include "windows/rkcommandeditorwindow.h"
  #include "debug.h"
***************
*** 20,24 ****
  
  RKKonsole::RKKonsole(QWidget *parent) :RKToggleWidget (parent){
!   
    QVBoxLayout *layout = new QVBoxLayout (this);
    KLibFactory* factory = KLibLoader::self()->factory( "libkonsolepart" );
--- 21,27 ----
  
  RKKonsole::RKKonsole(QWidget *parent) :RKToggleWidget (parent){
! 
!   setCaption(i18n("Terminal"));
! 
    QVBoxLayout *layout = new QVBoxLayout (this);
    KLibFactory* factory = KLibLoader::self()->factory( "libkonsolepart" );

Index: rkward.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** rkward.h	6 Apr 2005 11:49:46 -0000	1.30
--- rkward.h	15 Apr 2005 20:03:09 -0000	1.31
***************
*** 49,53 ****
  class RKCommandEditorWindow;
  class KHelpDlg;
! class RKKonsole ; 
  class QSplitter;
  
--- 49,54 ----
  class RKCommandEditorWindow;
  class KHelpDlg;
! class RKKonsole;
! class RKConsole;
  class QSplitter;
  
***************
*** 285,288 ****
--- 286,290 ----
  	KHelpDlg *helpDlg;
  	RKKonsole * konsole ;
+ 	RKConsole * console;
  	
  	KURL *initial_url;





More information about the rkward-tracker mailing list