[rkward-cvs] SF.net SVN: rkward: [2051] branches/KDE4_port/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Oct 14 13:43:34 UTC 2007
Revision: 2051
http://rkward.svn.sourceforge.net/rkward/?rev=2051&view=rev
Author: tfry
Date: 2007-10-14 06:43:34 -0700 (Sun, 14 Oct 2007)
Log Message:
-----------
rkworkplace compiles
Modified Paths:
--------------
branches/KDE4_port/rkward/dataeditor/rkeditor.h
branches/KDE4_port/rkward/rkward.cpp
branches/KDE4_port/rkward/windows/rkworkplace.cpp
branches/KDE4_port/rkward/windows/rkworkplace.h
Modified: branches/KDE4_port/rkward/dataeditor/rkeditor.h
===================================================================
--- branches/KDE4_port/rkward/dataeditor/rkeditor.h 2007-10-14 13:26:25 UTC (rev 2050)
+++ branches/KDE4_port/rkward/dataeditor/rkeditor.h 2007-10-14 13:43:34 UTC (rev 2051)
@@ -22,7 +22,6 @@
#include "../core/robject.h"
#include <kparts/part.h>
-#include <k3mdichildview.h>
#include "../windows/rkmdiwindow.h"
Modified: branches/KDE4_port/rkward/rkward.cpp
===================================================================
--- branches/KDE4_port/rkward/rkward.cpp 2007-10-14 13:26:25 UTC (rev 2050)
+++ branches/KDE4_port/rkward/rkward.cpp 2007-10-14 13:43:34 UTC (rev 2051)
@@ -130,12 +130,9 @@
initActions();
initStatusBar();
- KMdiChildView *dummy = new KMdiChildView (this);
- Q3VBoxLayout *layout = new Q3VBoxLayout (dummy);
- addWindow (dummy);
- new RKWorkplace (dummy);
+ new RKWorkplace (this);
RKWorkplace::mainWorkplace ()->initActions (actionCollection (), "prev_window", "next_window", "left_window", "right_window");
- layout->addWidget (RKWorkplace::mainWorkplace ()->view ());
+ setCentralWidget (RKWorkplace::mainWorkplace ());
connect (RKWorkplace::mainWorkplace ()->view (), SIGNAL (captionChanged (const QString &)), this, SLOT (setCaption (const QString &)));
///////////////////////////////////////////////////////////////////
Modified: branches/KDE4_port/rkward/windows/rkworkplace.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkworkplace.cpp 2007-10-14 13:26:25 UTC (rev 2050)
+++ branches/KDE4_port/rkward/windows/rkworkplace.cpp 2007-10-14 13:43:34 UTC (rev 2051)
@@ -21,8 +21,10 @@
#include <kmessagebox.h>
#include <klocale.h>
#include <kiconloader.h>
-#include <KHBox>
-#include <KVBox>
+#include <khbox.h>
+#include <kvbox.h>
+#include <kglobalsettings.h>
+#include <kactioncollection.h>
#include "detachedwindowcontainer.h"
#include "rkcommandeditorwindow.h"
@@ -52,15 +54,14 @@
// static
RKWorkplace *RKWorkplace::main_workplace = 0;
-RKWorkplace::RKWorkplace (QWidget *parent) : QObject (parent) {
+RKWorkplace::RKWorkplace (QWidget *parent) : QWidget (parent) {
RK_TRACE (APP);
RK_ASSERT (main_workplace == 0);
main_workplace = this;
/* Splitter setup contains heavy copying from Kate's katemdi! */
- hbox = new KHBox (this);
- setCentralWidget (hbox);
+ KHBox *hbox = new KHBox (this);
tool_window_bars[KMultiTabBar::Left] = new RKToolWindowBar (KMultiTabBar::Left, hbox);
horiz_splitter = new QSplitter (Qt::Horizontal, hbox);
@@ -174,7 +175,7 @@
for (RKWorkplaceObjectList::const_iterator it = windows.constBegin (); it != windows.constEnd (); ++it) {
if ((*it)->type == RKMDIWindow::CommandEditorWindow) {
KUrl ourl = static_cast<RKCommandEditorWindow *> (*it)->url ();
- if (url.equals (ourl, true)) {
+ if (url == ourl) {
(*it)->activate ();
return true;
}
@@ -208,7 +209,7 @@
if (only_once) {
RKWorkplaceObjectList help_windows = getObjectList (RKMDIWindow::HelpWindow, RKMDIWindow::AnyWindowState);
for (RKWorkplaceObjectList::const_iterator it = help_windows.constBegin (); it != help_windows.constEnd (); ++it) {
- if (static_cast<RKHelpWindow *> (*it)->url ().equals (url, true)) {
+ if (static_cast<RKHelpWindow *> (*it)->url ().equals (url, KUrl::CompareWithoutTrailingSlash | KUrl::CompareWithoutFragment)) {
(*it)->activate ();
return;
}
@@ -544,13 +545,16 @@
void RKMDIWindowHistory::initActions (KActionCollection *ac, const char *prev_id, const char *next_id) {
RK_TRACE (APP);
- KShortcut prev_short ("Alt+<");
- prev_short.append (KKey (Qt::ALT | Qt::Key_Comma)); // "Alt+," does not work, as "," has a special meaning.
- prev_action = new KAction (i18n ("Previous Window"), QIcon (RKCommonFunctions::getRKWardDataDir () + "icons/window_back.png"), prev_short, this, SLOT (prev ()), ac, prev_id);
+ prev_action = (KAction*) ac->addAction (prev_id, this, SLOT (prev()));
+ prev_action->setText (i18n ("Previous Window"));
+ prev_action->setIcon (QIcon (RKCommonFunctions::getRKWardDataDir () + "icons/window_back.png"));
+ prev_action->setShortcut (KShortcut (Qt::AltModifier + Qt::Key_Less, Qt::AltModifier + Qt::Key_Comma));
- KShortcut next_short ("Alt+>");
- next_short.append (KKey (Qt::ALT | Qt::Key_Period));
- next_action = new KAction (i18n ("Next Window"), QIcon (RKCommonFunctions::getRKWardDataDir () + "icons/window_forward.png"), next_short, this, SLOT (next ()), ac, next_id);
+ next_action = (KAction*) ac->addAction (next_id, this, SLOT (next()));
+ next_action->setText (i18n ("Next Window"));
+ next_action->setIcon (QIcon (RKCommonFunctions::getRKWardDataDir () + "icons/window_forward.png"));
+ next_action->setShortcut (KShortcut (Qt::AltModifier + Qt::Key_Greater, Qt::AltModifier + Qt::Key_Period));
+
updateActions ();
}
Modified: branches/KDE4_port/rkward/windows/rkworkplace.h
===================================================================
--- branches/KDE4_port/rkward/windows/rkworkplace.h 2007-10-14 13:26:25 UTC (rev 2050)
+++ branches/KDE4_port/rkward/windows/rkworkplace.h 2007-10-14 13:43:34 UTC (rev 2051)
@@ -64,7 +64,7 @@
/** This class (only one instance will probably be around) keeps track of which windows are opened in the workplace, which are detached, etc. Also it is responsible for creating and manipulating those windows.
It also provides a QWidget (RKWorkplace::view ()), which actually manages the document windows (only those, so far. I.e. this is a half-replacement for KMdi, which will be gone in KDE 4). Currently layout of the document windows is always tabbed. */
-class RKWorkplace : public QObject, public RCommandReceiver {
+class RKWorkplace : public QWidget, public RCommandReceiver {
Q_OBJECT
public:
/** ctor.
@@ -178,8 +178,8 @@
void restoreWorkplaceItem (const QString &desc);
RKMDIWindowHistory *history;
- QSplitter horiz_splitter;
- QSplitter vert_splitter;
+ QSplitter *horiz_splitter;
+ QSplitter *vert_splitter;
RKToolWindowBar* tool_window_bars[4];
};
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