[rkward-cvs] rkward/rkward rkward.cpp,1.50,1.51 rkward.h,1.24,1.25 rkwardui.rc,1.13,1.14 robjectbrowser.cpp,1.12,1.13 robjectbrowser.h,1.6,1.7 robjectviewer.cpp,1.2,1.3
Pierre
ecoch at users.sourceforge.net
Wed Nov 3 14:53:44 UTC 2004
Update of /cvsroot/rkward/rkward/rkward
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25251
Modified Files:
rkward.cpp rkward.h rkwardui.rc robjectbrowser.cpp
robjectbrowser.h robjectviewer.cpp
Log Message:
Some marketing mainly (adding icons and more tollbars, etc.).
Index: robjectviewer.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/robjectviewer.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** robjectviewer.cpp 2 Sep 2004 15:08:50 -0000 1.2
--- robjectviewer.cpp 3 Nov 2004 14:53:42 -0000 1.3
***************
*** 18,24 ****
--- 18,27 ----
#include <qlayout.h>
+
#include <qtextedit.h>
#include <qfont.h>
+ #include <klocale.h>
+
#include "rbackend/rinterface.h"
#include "rkglobals.h"
***************
*** 38,48 ****
grid->addWidget (view_area, 0, 0);
! view_area->append ("Object name: " + object->getShortName ());
! view_area->append ("\nFull location: " + object->getFullName ());
if (object->isContainer ()) {
RContainerObject *cobj = static_cast<RContainerObject*> (object); // for convenience only
! view_area->append ("\nClasses: " + cobj->makeClassString (", "));
if (cobj->numDimensions ()) {
! QString dummy = "\nDimensions: " + QString ().setNum (cobj->getDimension (0));
for (int i=1; i < cobj->numDimensions (); ++i) {
dummy.append (", " + QString ().setNum (cobj->getDimension (i)));
--- 41,51 ----
grid->addWidget (view_area, 0, 0);
! view_area->append (i18n("Object name: ") + object->getShortName ());
! view_area->append (i18n("\nFull location: ") + object->getFullName ());
if (object->isContainer ()) {
RContainerObject *cobj = static_cast<RContainerObject*> (object); // for convenience only
! view_area->append (i18n("\nClasses: ") + cobj->makeClassString (", "));
if (cobj->numDimensions ()) {
! QString dummy = i18n("\nDimensions: ") + QString ().setNum (cobj->getDimension (0));
for (int i=1; i < cobj->numDimensions (); ++i) {
dummy.append (", " + QString ().setNum (cobj->getDimension (i)));
***************
*** 51,55 ****
}
}
! view_area->append ("\nResult of 'print (" + object->getFullName () + ")':\n");
RCommand *command = new RCommand ("print (" + object->getFullName () + ")", RCommand::App, "", this);
--- 54,58 ----
}
}
! view_area->append (i18n("\nResult of 'print (") + object->getFullName () + i18n(")':\n"));
RCommand *command = new RCommand ("print (" + object->getFullName () + ")", RCommand::App, "", this);
***************
*** 58,63 ****
destruct = false;
! caption = "Object-Viewer for object " + object->getShortName ();
! setCaption (caption + " - Waiting for results from R...");
resize (minimumSizeHint ().expandedTo (QSize (640, 480)));
show ();
--- 61,66 ----
destruct = false;
! caption = i18n("Object-Viewer for object ") + object->getShortName ();
! setCaption (caption + i18n(" - Waiting for results from R..."));
resize (minimumSizeHint ().expandedTo (QSize (640, 480)));
show ();
***************
*** 72,76 ****
view_area->append (command->output ());
if (command->hasError ()) {
! view_area->append ("\nSome error(s) occured: " + command->error ());
}
--- 75,79 ----
view_area->append (command->output ());
if (command->hasError ()) {
! view_area->append (i18n("\nSome error(s) occured: ") + command->error ());
}
Index: robjectbrowser.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/robjectbrowser.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** robjectbrowser.cpp 7 Sep 2004 22:23:13 -0000 1.12
--- robjectbrowser.cpp 3 Nov 2004 14:53:42 -0000 1.13
***************
*** 26,29 ****
--- 26,31 ----
#include <kmessagebox.h>
+ #include "rkward.h"
+ #include "windows/rkcommandeditorwindow.h"
#include "rkglobals.h"
#include "rkeditormanager.h"
***************
*** 55,58 ****
--- 57,63 ----
menu->insertItem (i18n ("Delete"), this, SLOT (popupDelete ()), 0, Delete);
+ connect (list_view, SIGNAL (doubleClicked ( QListViewItem *, const QPoint &, int )), this, SLOT (slotListDoubleClicked (QListViewItem *, const QPoint &, int)));
+
+
resize (minimumSizeHint ().expandedTo (QSize (400, 480)));
}
***************
*** 107,109 ****
--- 112,137 ----
}
+
+
+
+ void RObjectBrowser::slotListDoubleClicked(QListViewItem *item, const QPoint &pos, int)
+ {
+ RObject *object = list_view->findItemObject (item);
+
+ if (!object) return;
+ if (object == RKGlobals::rObjectList ()) return;
+
+ menu->setItemEnabled (Edit, RKGlobals::editorManager ()->canEditObject (object));
+ menu_object = object;
+
+ if (item==0)
+ return;
+
+ if ( (RKGlobals::rkApp()->activeWindow())->inherits("RKCommandEditorWindow") ) {
+ ( (RKCommandEditorWindow*)RKGlobals::rkApp()->activeWindow() )->insertText(menu_object->getFullName());
+ }
+ }
+
+
#include "robjectbrowser.moc"
+
Index: rkward.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** rkward.h 2 Nov 2004 18:51:30 -0000 1.24
--- rkward.h 3 Nov 2004 14:53:42 -0000 1.25
***************
*** 169,175 ****
void slotStatusMsg(const QString &text);
- /** creates an new RKCommandEditorWindow */
- void slotNewRKCommandEditorWindow ();
-
/** shows/hides the RKWatch-window */
void slotShowRKWatch ();
--- 169,172 ----
***************
*** 200,207 ****
--- 197,206 ----
void slotChildWindowCloseRequest (KMdiChildView * window);
void slotRunSelection();
+ void slotInterruptCommand();
void slotRunAll();
void slotEditUndo();
void slotEditRedo();
void slotViewActivated (KMdiChildView *window);
+ void slotOpenRecentCommandEditor(const KURL&);
private:
/** the configuration object of the application */
***************
*** 241,245 ****
KToggleAction* viewToolBar;
KToggleAction* viewStatusBar;
- KAction* window_new_rkcommandeditorwindow;
KToggleAction* showRKWatch;
KToggleAction* showRKOutput;
--- 240,243 ----
***************
*** 248,252 ****
KAction* runAll;
KAction* runSelection;
!
KAction* configure;
--- 246,250 ----
KAction* runAll;
KAction* runSelection;
! KAction* interruptCommand;
KAction* configure;
***************
*** 279,282 ****
--- 277,281 ----
bool getFilenameAndPath(const KURL &url,QString *fname);
void saveAsProcedure(RKCommandEditorWindow *editor);
+ void setEnabledActions(bool commandEditor);
signals:
void childWindowCloseRequest(KMdiChildView * window);
Index: rkward.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** rkward.cpp 2 Nov 2004 18:51:27 -0000 1.50
--- rkward.cpp 3 Nov 2004 14:53:42 -0000 1.51
***************
*** 105,116 ****
editCopy->setEnabled(false);
editPaste->setEnabled(false); */
! editUndo->setEnabled(false);
! editRedo->setEnabled(false);
! fileOpen->setEnabled(false);
! fileSave->setEnabled(false);
! fileSaveAs->setEnabled(false);
! runAll->setEnabled(false);
! runSelection->setEnabled(false);
! fileOpenRecent->setEnabled(false);
--- 105,109 ----
editCopy->setEnabled(false);
editPaste->setEnabled(false); */
! setEnabledActions(false);
***************
*** 119,123 ****
RKGlobals::manager = new RKEditorManager ();
KMdiChildView * editorManagerView = createWrapper(RKGlobals::editorManager (), i18n( "Object Editor"), i18n( "R Object Editor"));
! editorManagerView->setIcon(SmallIcon("inline_table"));
addWindow( editorManagerView );
--- 112,116 ----
RKGlobals::manager = new RKEditorManager ();
KMdiChildView * editorManagerView = createWrapper(RKGlobals::editorManager (), i18n( "Object Editor"), i18n( "R Object Editor"));
! editorManagerView->setIcon(SmallIcon("spreadsheet"));
addWindow( editorManagerView );
***************
*** 139,143 ****
--- 132,139 ----
connect (startup_timer, SIGNAL (timeout ()), this, SLOT (doPostInit ()));
+
+
+
}
***************
*** 307,312 ****
--- 303,310 ----
// TODO: is there a way to insert actions between standard actions without having to give all standard actions custom ids?
new_data_frame = new KAction (i18n ("data.frame"), 0, 0, this, SLOT (slotNewDataFrame ()), actionCollection (), "new_data_frame");
+ new_data_frame->setIcon("spreadsheet");
new_command_editor = KStdAction::openNew(this, SLOT(slotNewCommandEditor()), actionCollection(), "new_command_editor");
new_command_editor->setText (i18n ("New Command File"));
+ new_command_editor->setIcon("source");
fileOpen = KStdAction::open(this, SLOT(slotOpenCommandEditor()), actionCollection(), "file_openy");
***************
*** 341,348 ****
editPaste = KStdAction::paste(this, SLOT(slotEditPaste()), actionCollection(), "paste");
editPasteToTable = new KAction(i18n("Paste inside Table"), 0, 0, this, SLOT(slotEditPasteToTable()), actionCollection(), "paste_to_table");
editPasteToSelection = new KAction(i18n("Paste inside Selection"), 0, 0, this, SLOT(slotEditPasteToSelection()), actionCollection(), "paste_to_selection");
viewToolBar = KStdAction::showToolbar(this, SLOT(slotViewToolBar()), actionCollection());
viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()), actionCollection());
- window_new_rkcommandeditorwindow = new KAction (i18n ("New Command Editor window"), 0, 0, this, SLOT (slotNewRKCommandEditorWindow ()), actionCollection (), "windows_new_command_editor");
showRKWatch = new KToggleAction (i18n ("Show R Console-Window"), 0, 0, this, SLOT(slotShowRKWatch ()), actionCollection(), "windows_rkwatch");
showRKOutput = new KToggleAction (i18n ("Show Output-Window"), 0, 0, this, SLOT(slotShowRKOutput ()), actionCollection(), "windows_rkoutput");
--- 339,347 ----
editPaste = KStdAction::paste(this, SLOT(slotEditPaste()), actionCollection(), "paste");
editPasteToTable = new KAction(i18n("Paste inside Table"), 0, 0, this, SLOT(slotEditPasteToTable()), actionCollection(), "paste_to_table");
+ editPasteToTable->setIcon("frame_spreadsheet");
editPasteToSelection = new KAction(i18n("Paste inside Selection"), 0, 0, this, SLOT(slotEditPasteToSelection()), actionCollection(), "paste_to_selection");
+ editPasteToSelection->setIcon("frame_edit");
viewToolBar = KStdAction::showToolbar(this, SLOT(slotViewToolBar()), actionCollection());
viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()), actionCollection());
showRKWatch = new KToggleAction (i18n ("Show R Console-Window"), 0, 0, this, SLOT(slotShowRKWatch ()), actionCollection(), "windows_rkwatch");
showRKOutput = new KToggleAction (i18n ("Show Output-Window"), 0, 0, this, SLOT(slotShowRKOutput ()), actionCollection(), "windows_rkoutput");
***************
*** 350,355 ****
runAll = new KAction (i18n ("Run All"), 0, 0, this, SLOT (slotRunAll ()), actionCollection (), "run_all");
runSelection = new KAction (i18n ("Run Selection"), 0, 0, this, SLOT (slotRunSelection ()), actionCollection (), "run_selection");
!
configure = new KAction (i18n ("Configure Settings"), 0, 0, this, SLOT(slotConfigure ()), actionCollection(), "configure");
--- 349,357 ----
runAll = new KAction (i18n ("Run All"), 0, 0, this, SLOT (slotRunAll ()), actionCollection (), "run_all");
+ runAll->setIcon("package_system");
runSelection = new KAction (i18n ("Run Selection"), 0, 0, this, SLOT (slotRunSelection ()), actionCollection (), "run_selection");
! runSelection->setIcon("run");
! interruptCommand = new KAction (i18n ("Interrupt running command"), 0, 0, this, SLOT (slotInterruptCommand ()), actionCollection (), "interrupt");
! interruptCommand->setIcon("stop");
configure = new KAction (i18n ("Configure Settings"), 0, 0, this, SLOT(slotConfigure ()), actionCollection(), "configure");
***************
*** 373,381 ****
// use the absolute path to your rkwardui.rc file for testing purpose in createGUI();
! setXMLFile( "/home/pierre/rkward/rkward/rkward/rkwardui.rc" );
createShellGUI ( true );
! // is there a better way to change the name of the "File" menu?
! menuBar ()->changeItem (menuBar ()->idAt (0), i18n ("&Workspace"));
}
--- 375,385 ----
// use the absolute path to your rkwardui.rc file for testing purpose in createGUI();
! setXMLFile( "rkwardui.rc" );
createShellGUI ( true );
! //Is the following relevant now?
! // is there a better way to change the name of the "File" menu?
! // menuBar ()->changeItem (menuBar ()->idAt (0), i18n ("&Workspace"));
!
}
***************
*** 405,408 ****
--- 409,415 ----
config->writeEntry("Show Statusbar",viewStatusBar->isChecked());
config->writeEntry("ToolBarPos", (int) toolBar("mainToolBar")->barPos());
+ config->writeEntry("EditBarPos", (int) toolBar("editToolBar")->barPos());
+ config->writeEntry("RunBarPos", (int) toolBar("runToolBar")->barPos());
+
RKSettings::saveSettings (config);
***************
*** 433,436 ****
--- 440,451 ----
toolBar("mainToolBar")->setBarPos(toolBarPos);
+ KToolBar::BarPosition editBarPos;
+ editBarPos=(KToolBar::BarPosition) config->readNumEntry("EditBarPos", KToolBar::Top);
+ toolBar("editToolBar")->setBarPos(editBarPos);
+
+ KToolBar::BarPosition runBarPos;
+ runBarPos=(KToolBar::BarPosition) config->readNumEntry("RunBarPos", KToolBar::Top);
+ toolBar("runToolBar")->setBarPos(runBarPos);
+
QSize size=config->readSizeEntry("Geometry");
if(!size.isEmpty ())
***************
*** 728,735 ****
--- 743,754 ----
{
toolBar("mainToolBar")->hide();
+ toolBar("runToolBar")->hide();
+ toolBar("editToolBar")->hide();
}
else
{
toolBar("mainToolBar")->show();
+ toolBar("runToolBar")->show();
+ toolBar("editToolBar")->show();
}
***************
*** 765,773 ****
}
- void RKwardApp::slotNewRKCommandEditorWindow () {
- RK_TRACE (APP);
- new RKCommandEditorWindow ();
- }
-
void RKwardApp::slotShowRKWatch () {
RK_TRACE (APP);
--- 784,787 ----
***************
*** 1037,1043 ****
void RKwardApp::slotViewActivated (KMdiChildView * window)
{
! if (window->inherits("RKCommandEditorWindow")) {
editUndo->setEnabled(true);
editRedo->setEnabled(true);
fileOpen->setEnabled(true);
fileSave->setEnabled(true);
--- 1051,1077 ----
void RKwardApp::slotViewActivated (KMdiChildView * window)
{
! setEnabledActions(activeWindow()->inherits("RKCommandEditorWindow"));
! }
!
!
!
! void RKwardApp::slotOpenRecentCommandEditor(const KURL&)
! {
!
! }
!
! void RKwardApp::slotInterruptCommand()
! {
!
! }
!
!
!
! void RKwardApp::setEnabledActions(bool commandEditor)
! {
! if (commandEditor) {
editUndo->setEnabled(true);
editRedo->setEnabled(true);
+ editPaste->setEnabled(true);
fileOpen->setEnabled(true);
fileSave->setEnabled(true);
***************
*** 1045,1053 ****
--- 1079,1091 ----
runAll->setEnabled(true);
runSelection->setEnabled(true);
+ interruptCommand->setEnabled(true);
fileOpenRecent->setEnabled(true);
+ editPasteToSelection->setEnabled(false);
+ editPasteToTable->setEnabled(false);
}
else {
editUndo->setEnabled(false);
editRedo->setEnabled(false);
+ editPaste->setEnabled(false);
fileOpen->setEnabled(false);
fileSave->setEnabled(false);
***************
*** 1055,1059 ****
--- 1093,1100 ----
runAll->setEnabled(false);
runSelection->setEnabled(false);
+ interruptCommand->setEnabled(false);
fileOpenRecent->setEnabled(false);
+ editPasteToSelection->setEnabled(true);
+ editPasteToTable->setEnabled(true);
}
}
Index: robjectbrowser.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/robjectbrowser.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** robjectbrowser.h 2 Sep 2004 10:50:23 -0000 1.6
--- robjectbrowser.h 3 Nov 2004 14:53:42 -0000 1.7
***************
*** 25,28 ****
--- 25,30 ----
class QPopupMenu;
class RObject;
+ class RKCommandEditorWindow;
+
/**
***************
*** 49,52 ****
--- 51,55 ----
void popupDelete ();
void popupRename ();
+ void slotListDoubleClicked(QListViewItem *item, const QPoint &pos, int);
private:
friend class RKwardApp;
Index: rkwardui.rc
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkwardui.rc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** rkwardui.rc 2 Nov 2004 18:51:30 -0000 1.13
--- rkwardui.rc 3 Nov 2004 14:53:42 -0000 1.14
***************
*** 1,4 ****
<!DOCTYPE kpartgui>
! <kpartgui name="rkward" version="0.2.8">
<MenuBar>
<Menu name="file"><text>&File</text>
--- 1,4 ----
<!DOCTYPE kpartgui>
! <kpartgui name="rkward" version="0.3">
<MenuBar>
<Menu name="file"><text>&File</text>
***************
*** 27,31 ****
! <Menu name="edit" noMerge="1"><text>&Edit</text>
<Action name="undo"/>
<Action name="redo"/>
--- 27,31 ----
! <Menu name="edit"><text>&Edit</text>
<Action name="undo"/>
<Action name="redo"/>
***************
*** 50,61 ****
<Action name="configure"></Action>
</Menu>
- <Menu name="windows"><text>&Windows</text>
- <Action name="windows_new_command_editor"/>
- <Separator/>
- <Action name="windows_rkwatch"/>
- <Action name="windows_rkoutput"/>
- <Action name="windows_robjectbrowser"/>
- </Menu>
<Merge/>
</MenuBar>
</kpartgui>
--- 50,79 ----
<Action name="configure"></Action>
</Menu>
<Merge/>
</MenuBar>
+ <ToolBar fullWidth="true" name="mainToolBar">
+ <Action name="new_data_frame"/>
+ <Action name="new_command_editor"/>
+ <Separator/>
+ <Action name="file_openy"/>
+ <Action name="file_savey"/>
+ <Action name="file_save_asy"/>
+ </ToolBar>
+ <ToolBar fullWidth="true" name="editToolBar">
+ <Action name="undo"/>
+ <Action name="redo"/>
+ <Separator/>
+ <Action name="cut"/>
+ <Action name="copy"/>
+ <Action name="paste"/>
+ <Separator/>
+ <Action name="paste_to_selection"/>
+ <Action name="paste_to_table"/>
+ </ToolBar>
+ <ToolBar fullWidth="true" name="runToolBar">
+ <Action name="run_all"/>
+ <Action name="run_selection"/>
+ <Separator/>
+ <Action name="interrupt"/>
+ </ToolBar>
</kpartgui>
More information about the rkward-tracker
mailing list