[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/utils/kpager
From: Pino Toscano <pino () kde ! org>
Date: 2015-11-18 23:33:39
Message-ID: E1ZzCEN-0007gf-3G () scm ! kde ! org
[Download RAW message or body]
SVN commit 1444545 by pino:
switch from KXmlGuiWindow to KMainWindow
the main window does not really need all the xmlgui features; the only
thing needed is an action collection, now created manually
M +10 -2 kpager.cpp
M +6 -2 kpager.h
--- trunk/extragear/utils/kpager/kpager.cpp #1444544:1444545
@@ -69,10 +69,13 @@
}
KPagerMainWindow::KPagerMainWindow(QWidget *parent)
- : KXmlGuiWindow(parent)
+ : KMainWindow(parent)
{
m_reallyClose=false;
+ m_actionCollection = new KActionCollection(this);
+ m_actionCollection->addAssociatedWidget(this);
+
m_pPager = new KPager(this);
setCentralWidget(m_pPager);
@@ -126,6 +129,11 @@
{
}
+KActionCollection* KPagerMainWindow::actionCollection() const
+{
+ return m_actionCollection;
+}
+
extern bool closed_by_sm;
bool KPagerMainWindow::queryClose()
@@ -159,7 +167,7 @@
void KPagerMainWindow::showEvent( QShowEvent *ev )
{
timeout->stop();
- KXmlGuiWindow::showEvent(ev);
+ KMainWindow::showEvent(ev);
}
void KPagerMainWindow::reallyClose()
--- trunk/extragear/utils/kpager/kpager.h #1444544:1444545
@@ -27,15 +27,16 @@
#define __KPAGER_H
#include <QHash>
-#include <kxmlguiwindow.h>
+#include <kmainwindow.h>
#include <kwindowinfo.h>
class KPager;
class QMenu;
+class KActionCollection;
//#define HAVE_FIXED_KMENU_TITLE
-class KPagerMainWindow : public KXmlGuiWindow
+class KPagerMainWindow : public KMainWindow
{
Q_OBJECT
@@ -43,6 +44,8 @@
KPagerMainWindow(QWidget *parent = 0);
~KPagerMainWindow();
+ KActionCollection* actionCollection() const;
+
public Q_SLOTS:
// DBus interface
virtual void showAt(int x, int y);
@@ -59,6 +62,7 @@
KPager *m_pPager;
class QTimer *timeout;
bool m_reallyClose;
+ KActionCollection *m_actionCollection;
};
class KPager : public QWidget
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic