[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/libs/kofficecore
From: Thomas Zander <zander () kde ! org>
Date: 2007-04-17 8:39:44
Message-ID: 1176799184.395537.32250.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 654892 by zander:
Make compile
Refactor constructor to not depend on implementation details of KoMainWindow anymore
M +1 -1 KoMainWindow.cpp
M +4 -8 kkbdaccessextensions.cpp
M +3 -3 kkbdaccessextensions.h
--- trunk/koffice/libs/kofficecore/KoMainWindow.cpp #654891:654892
@@ -271,7 +271,7 @@
d->m_splitter->setObjectName( "mw-splitter" );
setCentralWidget( d->m_splitter );
// Keyboard accessibility enhancements.
- new KKbdAccessExtensions(this, "mw-panelSizer");
+ new KKbdAccessExtensions(actionCollection(), this);
// set up the action "list" for "Close all Views" (hacky :) (Werner)
QAction *closeAllViews = new KAction(KIcon("window-close"), i18n("&Close All Views"), this);
--- trunk/koffice/libs/kofficecore/kkbdaccessextensions.cpp #654891:654892
@@ -161,25 +161,21 @@
// List of the access key QLabels. If not 0, access keys are onscreen.
Q3PtrList<QLabel>* accessKeyLabels;
-
- // Pointer to the KMainWindow.
- KMainWindow* mainWindow;
};
-KKbdAccessExtensions::KKbdAccessExtensions(KMainWindow* parent, const char* /*name*/)
+KKbdAccessExtensions::KKbdAccessExtensions(KActionCollection *ac, QObject *parent)
: QObject( parent )
, d( new KKbdAccessExtensionsPrivate )
{
// kDebug() << "KKbdAccessExtensions::KKbdAccessExtensions: running." << endl;
- d->mainWindow = parent;
d->fwdAction = new KAction(i18n("Resize Panel Forward"), this);
- parent->actionCollection()->addAction("resize_panel_forward", d->fwdAction );
+ ac->addAction("resize_panel_forward", d->fwdAction );
d->fwdAction->setShortcut(KShortcut("F8"));
d->revAction = new KAction(i18n("Resize Panel Reverse"), this);
- parent->actionCollection()->addAction("resize_panel_reverse", d->revAction );
+ ac->addAction("resize_panel_reverse", d->revAction );
d->revAction->setShortcut(KShortcut("Shift+F8"));
d->accessKeysAction = new KAction(i18n("Access Keys"), this);
- parent->actionCollection()->addAction("access_keys", d->accessKeysAction );
+ ac->addAction("access_keys", d->accessKeysAction );
d->accessKeysAction->setShortcut(KShortcut("Alt+F8"));
// "Disable" the shortcuts so we can see them in eventFilter.
d->fwdAction->setEnabled(false);
--- trunk/koffice/libs/kofficecore/kkbdaccessextensions.h #654891:654892
@@ -113,10 +113,10 @@
public:
/** Constructor.
- * @param parent KMainWindow of the application. Required.
- * @param name (optional) Name of this object.
+ * @param ac the actionCollection this object works on.
+ * @param parent the parent for memory management puroposes
*/
- explicit KKbdAccessExtensions(KMainWindow* parent, const char* name = 0);
+ explicit KKbdAccessExtensions(KActionCollection *ac, QObject *parent = 0);
/** Destructor. */
virtual ~KKbdAccessExtensions();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic