[rkward-cvs] SF.net SVN: rkward: [2055] branches/KDE4_port
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Oct 14 15:55:51 UTC 2007
Revision: 2055
http://rkward.svn.sourceforge.net/rkward/?rev=2055&view=rev
Author: tfry
Date: 2007-10-14 08:55:50 -0700 (Sun, 14 Oct 2007)
Log Message:
-----------
Two more files compile
Modified Paths:
--------------
branches/KDE4_port/TODO_KDE4
branches/KDE4_port/rkward/windows/rkfilebrowser.cpp
branches/KDE4_port/rkward/windows/rktoplevelwindowgui.cpp
Modified: branches/KDE4_port/TODO_KDE4
===================================================================
--- branches/KDE4_port/TODO_KDE4 2007-10-14 14:51:43 UTC (rev 2054)
+++ branches/KDE4_port/TODO_KDE4 2007-10-14 15:55:50 UTC (rev 2055)
@@ -37,3 +37,13 @@
rkworkplaceview
- does it work?
- does it have a sunken frame? Can we get rid of that?
+
+rkwindowcatcher
+ - does it work?
+ - does the "set fixed size" dialog work?
+ - does the "copy device to R object" dialog work?
+
+rkfilebrowser
+ - does it work?
+ - does the completion popup show up in a correct size?
+
Modified: branches/KDE4_port/rkward/windows/rkfilebrowser.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkfilebrowser.cpp 2007-10-14 14:51:43 UTC (rev 2054)
+++ branches/KDE4_port/rkward/windows/rkfilebrowser.cpp 2007-10-14 15:55:50 UTC (rev 2055)
@@ -22,11 +22,11 @@
#include <kurlcompletion.h>
#include <ktoolbar.h>
#include <krun.h>
+#include <kactioncollection.h>
#include <qdir.h>
#include <qlayout.h>
#include <q3vbox.h>
-#include <q3listbox.h>
//Added by qt3to4:
#include <QEvent>
#include <Q3VBoxLayout>
@@ -48,7 +48,7 @@
Q3VBoxLayout *layout = new Q3VBoxLayout (this);
layout_widget = new Q3VBox (this);
layout->addWidget (layout_widget);
- layout_widget->setFocusPolicy (QWidget::StrongFocus);
+ layout_widget->setFocusPolicy (Qt::StrongFocus);
RKDummyPart *part = new RKDummyPart (this, layout_widget);
setPart (part);
@@ -84,25 +84,25 @@
RK_TRACE (APP);
KToolBar *toolbar = new KToolBar (this);
- toolbar->setIconSize (16);
+ toolbar->setIconSize (QSize (16, 16));
urlbox = new KUrlComboBox (KUrlComboBox::Directories, true, this);
KUrlCompletion* cmpl = new KUrlCompletion (KUrlCompletion::DirCompletion);
urlbox->setCompletionObject (cmpl);
urlbox->setAutoDeleteCompletionObject (true);
urlbox->setSizePolicy (QSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed));
- urlbox->listBox ()->installEventFilter (this);
+// KDE4: do we need this (see eventFilter(), below) urlbox->listBox ()->installEventFilter (this);
dir = new KDirOperator (KUrl (), this);
dir->setView(KFile::Simple);
dir->setPreviewWidget (0);
- dir->actionCollection ()->action ("up")->plug (toolbar);
- dir->actionCollection ()->action ("back")->plug (toolbar);
- dir->actionCollection ()->action ("forward")->plug (toolbar);
- dir->actionCollection ()->action ("home")->plug (toolbar);
- dir->actionCollection ()->action ("short view")->plug (toolbar);
- dir->actionCollection ()->action ("detailed view")->plug (toolbar);
+ toolbar->addAction (dir->actionCollection ()->action ("up"));
+ toolbar->addAction (dir->actionCollection ()->action ("back"));
+ toolbar->addAction (dir->actionCollection ()->action ("forward"));
+ toolbar->addAction (dir->actionCollection ()->action ("home"));
+ toolbar->addAction (dir->actionCollection ()->action ("short view"));
+ toolbar->addAction (dir->actionCollection ()->action ("detailed view"));
connect (dir, SIGNAL (urlEntered (const KUrl &)), this, SLOT (urlChangedInView (const KUrl &)));
connect (urlbox, SIGNAL (returnPressed (const QString &)), this, SLOT (urlChangedInCombo (const QString &)));
@@ -120,38 +120,38 @@
void RKFileBrowserWidget::setURL (const QString &url) {
RK_TRACE (APP);
- urlbox->setURL (url);
- dir->setURL (url, true);
+ urlbox->setUrl (url);
+ dir->setUrl (url, true);
}
void RKFileBrowserWidget::urlChangedInView (const KUrl &url) {
RK_TRACE (APP);
- urlbox->setURL (url);
+ urlbox->setUrl (url);
}
void RKFileBrowserWidget::urlChangedInCombo (const QString &url) {
RK_TRACE (APP);
- dir->setURL (url, true);
+ dir->setUrl (url, true);
}
void RKFileBrowserWidget::urlChangedInCombo (const KUrl &url) {
RK_TRACE (APP);
- dir->setURL (url, true);
+ dir->setUrl (url, true);
}
bool RKFileBrowserWidget::eventFilter (QObject *watched, QEvent *e) {
// don't trace
-
+/* KDE4: do we still need this?
// fix size of popup (copied from katefileselector.cpp)
Q3ListBox *lb = urlbox->listBox ();
if (watched == lb && e->type() == QEvent::Show) {
int add = lb->height() < lb->contentsHeight() ? lb->verticalScrollBar()->width() : 0;
int w = qMin (topLevelWidget ()->width(), lb->contentsWidth() + add);
lb->resize (w, lb->height());
- }
+ } */
return QWidget::eventFilter (watched, e);
}
@@ -171,7 +171,7 @@
if (item->name (true).endsWith (".rdata")) {
RKWardMainWindow::getMain ()->fileOpenAskSave (item->url ());
} else {
- new KRun (item->url (), item->mode (), item->isLocalFile ());
+ new KRun (item->url (), topLevelWidget(), item->mode (), item->isLocalFile ());
}
}
}
Modified: branches/KDE4_port/rkward/windows/rktoplevelwindowgui.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rktoplevelwindowgui.cpp 2007-10-14 14:51:43 UTC (rev 2054)
+++ branches/KDE4_port/rkward/windows/rktoplevelwindowgui.cpp 2007-10-14 15:55:50 UTC (rev 2055)
@@ -20,6 +20,7 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <k3aboutapplication.h>
+#include <kactioncollection.h>
#include "../rkconsole.h"
#include "../robjectbrowser.h"
@@ -45,32 +46,49 @@
setXMLFile ("rktoplevelwindowgui.rc");
// help menu
- KAction *help_invoke_r_help = new KAction (i18n ("Help on R"), 0, 0, this, SLOT (invokeRHelp ()), actionCollection(), "invoke_r_help");
- KAction *show_help_search = new KAction (i18n ("Search R Help"), 0, 0, this, SLOT (showHelpSearch ()), actionCollection(), "show_help_search");
- KAction *show_rkward_help = KStandardAction::helpContents (this, SLOT (showRKWardHelp ()), actionCollection(), "rkward_help");
+ QAction *help_invoke_r_help = actionCollection ()->addAction ("invoke_r_help", this, SLOT(invokeRHelp()));
+ help_invoke_r_help->setText (i18n ("Help on R"));
+ QAction *show_help_search = actionCollection ()->addAction ("show_help_search", this, SLOT(showHelpSearch()));
+ show_help_search->setText (i18n ("Search R Help"));
+ QAction *show_rkward_help = actionCollection ()->addAction (KStandardAction::HelpContents, "rkward_help", this, SLOT (showRKWardHelp()));
show_rkward_help->setText (i18n ("Help on RKWard"));
- KStandardAction::aboutApp (this, SLOT (showAboutApplication ()), actionCollection(), "about_app");
- KStandardAction::whatsThis (for_window, SLOT (whatsThis ()), actionCollection(), "whats_this");
- KStandardAction::reportBug (this, SLOT (reportRKWardBug ()), actionCollection(), "report_bug");
+ actionCollection ()->addAction (KStandardAction::AboutApp, "about_app", this, SLOT (showAboutApplication()));
+ actionCollection ()->addAction (KStandardAction::WhatsThis, "whats_this", for_window, SLOT (whatsThis()));
+ actionCollection ()->addAction (KStandardAction::ReportBug, "report_bug", this, SLOT (reportRKWardBug()));
- help_invoke_r_help->setStatusText (i18n ("Shows the R help index"));
- show_help_search->setStatusText (i18n ("Shows/raises the R Help Search window"));
- show_rkward_help->setStatusText (i18n ("Show help on RKWard"));
+ help_invoke_r_help->setStatusTip (i18n ("Shows the R help index"));
+ show_help_search->setStatusTip (i18n ("Shows/raises the R Help Search window"));
+ show_rkward_help->setStatusTip (i18n ("Show help on RKWard"));
// window menu
- new KAction (i18n ("Show/Hide Workspace Browser"), 0, KShortcut ("Alt+1"), this, SLOT (toggleWorkspace()), actionCollection (), "window_show_workspace");
- new KAction (i18n ("Show/Hide Filesystem Browser"), 0, KShortcut ("Alt+2"), this, SLOT (toggleFilebrowser()), actionCollection (), "window_show_filebrowser");
- new KAction (i18n ("Show/Hide Command Log"), 0, KShortcut ("Alt+3"), this, SLOT (toggleCommandLog()), actionCollection (), "window_show_commandlog");
- new KAction (i18n ("Show/Hide Pending Jobs"), 0, KShortcut ("Alt+4"), this, SLOT (togglePendingJobs()), actionCollection (), "window_show_pendingjobs");
- new KAction (i18n ("Show/Hide Console"), 0, KShortcut ("Alt+5"), this, SLOT (toggleConsole()), actionCollection (), "window_show_console");
- new KAction (i18n ("Show/Hide R Help Search"), 0, KShortcut ("Alt+6"), this, SLOT (toggleHelpSearch()), actionCollection (), "window_show_helpsearch");
- new KAction (i18n ("Activate Document view"), 0, KShortcut ("Alt+0"), this, SLOT (activateDocumentView()), actionCollection (), "window_activate_docview");
+ QAction *action;
+ action = actionCollection ()->addAction ("window_show_workspace", this, SLOT(toggleWorkspace()));
+ action->setText (i18n ("Show/Hide Workspace Browser"));
+ action->setShortcut (Qt::AltModifier + Qt::Key_1);
+ action = actionCollection ()->addAction ("window_show_filebrowser", this, SLOT(toggleFilebrowser()));
+ action->setText (i18n ("Show/Hide Filesystem Browser"));
+ action->setShortcut (Qt::AltModifier + Qt::Key_2);
+ action = actionCollection ()->addAction ("window_show_commandlog", this, SLOT(toggleCommandLog()));
+ action->setText (i18n ("Show/Hide Command Log"));
+ action->setShortcut (Qt::AltModifier + Qt::Key_3);
+ action = actionCollection ()->addAction ("window_show_pendingjobs", this, SLOT(togglePendingJobs()));
+ action->setText (i18n ("Show/Hide Pending Jobs"));
+ action->setShortcut (Qt::AltModifier + Qt::Key_4);
+ action = actionCollection ()->addAction ("window_show_console", this, SLOT(toggleConsole()));
+ action->setText (i18n ("Show/Hide Console"));
+ action->setShortcut (Qt::AltModifier + Qt::Key_5);
+ action = actionCollection ()->addAction ("window_show_helpsearch", this, SLOT(toggleHelpSearch()));
+ action->setText (i18n ("Show/Hide R Help Search"));
+ action->setShortcut (Qt::AltModifier + Qt::Key_6);
+ action = actionCollection ()->addAction ("window_activate_docview", this, SLOT(activateDocumentView()));
+ action->setText (i18n ("Activate Document view"));
+ action->setShortcut (Qt::AltModifier + Qt::Key_0);
- new KAction (i18n ("Show &Output"), 0, 0, this, SLOT (slotOutputShow ()), actionCollection (), "output_show");
+ action = actionCollection ()->addAction ("output_show", this, SLOT (slotOutputShow()));
+ action->setText (i18n ("Show &Output"));
- actionCollection ()->setWidget (for_window);
- actionCollection ()->setHighlightingEnabled (true);
+ actionCollection ()->setAssociatedWidget (for_window);
}
RKTopLevelWindowGUI::~RKTopLevelWindowGUI () {
@@ -120,7 +138,7 @@
void RKTopLevelWindowGUI::showRKWardHelp () {
RK_TRACE (APP);
- RKWorkplace::mainWorkplace ()->openHelpWindow ("rkward://page/rkward_welcome", true);
+ RKWorkplace::mainWorkplace ()->openHelpWindow (KUrl ("rkward://page/rkward_welcome"), true);
}
void RKTopLevelWindowGUI::toggleHelpSearch () {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list