mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
9852 lines
365 KiB
Diff
9852 lines
365 KiB
Diff
|
diff --git a/libs/command/kundo2stack.cpp b/libs/command/kundo2stack.cpp
|
||
|
index 1353ee4ed5..a1bf4c3e80 100644
|
||
|
--- a/libs/command/kundo2stack.cpp
|
||
|
+++ b/libs/command/kundo2stack.cpp
|
||
|
@@ -1399,7 +1399,7 @@ void KUndo2QStack::setStrokesN(int value)
|
||
|
|
||
|
|
||
|
|
||
|
-QAction* KUndo2Stack::createRedoAction(KActionCollection* actionCollection, const QString& actionName)
|
||
|
+QAction* KUndo2Stack::createRedoAction(KisKActionCollection* actionCollection, const QString& actionName)
|
||
|
{
|
||
|
QAction* action = KUndo2QStack::createRedoAction(actionCollection);
|
||
|
|
||
|
@@ -1418,7 +1418,7 @@ QAction* KUndo2Stack::createRedoAction(KActionCollection* actionCollection, cons
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-QAction* KUndo2Stack::createUndoAction(KActionCollection* actionCollection, const QString& actionName)
|
||
|
+QAction* KUndo2Stack::createUndoAction(KisKActionCollection* actionCollection, const QString& actionName)
|
||
|
{
|
||
|
QAction* action = KUndo2QStack::createUndoAction(actionCollection);
|
||
|
|
||
|
diff --git a/libs/command/kundo2stack.h b/libs/command/kundo2stack.h
|
||
|
index 8079b36757..d632c7691e 100644
|
||
|
--- a/libs/command/kundo2stack.h
|
||
|
+++ b/libs/command/kundo2stack.h
|
||
|
@@ -61,7 +61,7 @@
|
||
|
class QAction;
|
||
|
class KUndo2CommandPrivate;
|
||
|
class KUndo2Group;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
|
||
|
#ifndef QT_NO_UNDOCOMMAND
|
||
|
|
||
|
@@ -251,8 +251,8 @@ public:
|
||
|
explicit KUndo2Stack(QObject *parent = 0);
|
||
|
|
||
|
// functions from KUndoStack
|
||
|
- QAction* createRedoAction(KActionCollection* actionCollection, const QString& actionName = QString());
|
||
|
- QAction* createUndoAction(KActionCollection* actionCollection, const QString& actionName = QString());
|
||
|
+ QAction* createRedoAction(KisKActionCollection* actionCollection, const QString& actionName = QString());
|
||
|
+ QAction* createUndoAction(KisKActionCollection* actionCollection, const QString& actionName = QString());
|
||
|
};
|
||
|
|
||
|
#endif // QT_NO_UNDOSTACK
|
||
|
diff --git a/libs/flake/KoCanvasController.cpp b/libs/flake/KoCanvasController.cpp
|
||
|
index feed6d27b5..34d01ba815 100644
|
||
|
--- a/libs/flake/KoCanvasController.cpp
|
||
|
+++ b/libs/flake/KoCanvasController.cpp
|
||
|
@@ -27,10 +27,10 @@ public:
|
||
|
QPoint documentOffset;
|
||
|
qreal preferredCenterFractionX;
|
||
|
qreal preferredCenterFractionY;
|
||
|
- KActionCollection* actionCollection;
|
||
|
+ KisKActionCollection* actionCollection;
|
||
|
};
|
||
|
|
||
|
-KoCanvasController::KoCanvasController(KActionCollection* actionCollection)
|
||
|
+KoCanvasController::KoCanvasController(KisKActionCollection* actionCollection)
|
||
|
: d(new Private())
|
||
|
{
|
||
|
proxyObject = new KoCanvasControllerProxyObject(this);
|
||
|
@@ -110,7 +110,7 @@ void KoCanvasControllerProxyObject::updateDocumentSize(const QSize &newSize, boo
|
||
|
m_canvasController->updateDocumentSize(newSize, recalculateCenter);
|
||
|
}
|
||
|
|
||
|
-KActionCollection* KoCanvasController::actionCollection() const
|
||
|
+KisKActionCollection* KoCanvasController::actionCollection() const
|
||
|
{
|
||
|
return d->actionCollection;
|
||
|
}
|
||
|
diff --git a/libs/flake/KoCanvasController.h b/libs/flake/KoCanvasController.h
|
||
|
index a999f8dd4e..44535248db 100644
|
||
|
--- a/libs/flake/KoCanvasController.h
|
||
|
+++ b/libs/flake/KoCanvasController.h
|
||
|
@@ -19,7 +19,7 @@
|
||
|
#include <QPointF>
|
||
|
#include <QPointer>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class QRect;
|
||
|
class QRectF;
|
||
|
|
||
|
@@ -65,7 +65,7 @@ public:
|
||
|
* Constructor.
|
||
|
* @param actionCollection the action collection for this canvas
|
||
|
*/
|
||
|
- explicit KoCanvasController(KActionCollection* actionCollection);
|
||
|
+ explicit KoCanvasController(KisKActionCollection* actionCollection);
|
||
|
virtual ~KoCanvasController();
|
||
|
|
||
|
public:
|
||
|
@@ -283,7 +283,7 @@ public:
|
||
|
* Returns the action collection for the window
|
||
|
* @returns action collection for this window, can be 0
|
||
|
*/
|
||
|
- KActionCollection* actionCollection() const;
|
||
|
+ KisKActionCollection* actionCollection() const;
|
||
|
|
||
|
QPoint documentOffset() const;
|
||
|
|
||
|
@@ -427,7 +427,7 @@ class KRITAFLAKE_EXPORT KoDummyCanvasController : public KoCanvasController {
|
||
|
|
||
|
public:
|
||
|
|
||
|
- explicit KoDummyCanvasController(KActionCollection* actionCollection)
|
||
|
+ explicit KoDummyCanvasController(KisKActionCollection* actionCollection)
|
||
|
: KoCanvasController(actionCollection)
|
||
|
{}
|
||
|
|
||
|
diff --git a/libs/flake/KoCanvasControllerWidget.cpp b/libs/flake/KoCanvasControllerWidget.cpp
|
||
|
index be36935386..295f9306d9 100644
|
||
|
--- a/libs/flake/KoCanvasControllerWidget.cpp
|
||
|
+++ b/libs/flake/KoCanvasControllerWidget.cpp
|
||
|
@@ -148,7 +148,7 @@ void KoCanvasControllerWidget::Private::unsetCanvas()
|
||
|
}
|
||
|
|
||
|
////////////
|
||
|
-KoCanvasControllerWidget::KoCanvasControllerWidget(KActionCollection * actionCollection, KoCanvasSupervisor *observerProvider, QWidget *parent)
|
||
|
+KoCanvasControllerWidget::KoCanvasControllerWidget(KisKActionCollection * actionCollection, KoCanvasSupervisor *observerProvider, QWidget *parent)
|
||
|
: QAbstractScrollArea(parent)
|
||
|
, KoCanvasController(actionCollection)
|
||
|
, d(new Private(this, observerProvider))
|
||
|
diff --git a/libs/flake/KoCanvasControllerWidget.h b/libs/flake/KoCanvasControllerWidget.h
|
||
|
index 6eb61d76ba..91605e0aa2 100644
|
||
|
--- a/libs/flake/KoCanvasControllerWidget.h
|
||
|
+++ b/libs/flake/KoCanvasControllerWidget.h
|
||
|
@@ -33,7 +33,7 @@ public:
|
||
|
* @param actionCollection the action collection for this widget
|
||
|
* @param parent the parent this widget will belong to
|
||
|
*/
|
||
|
- explicit KoCanvasControllerWidget(KActionCollection * actionCollection, KoCanvasSupervisor *observerProvider, QWidget *parent = 0);
|
||
|
+ explicit KoCanvasControllerWidget(KisKActionCollection * actionCollection, KoCanvasSupervisor *observerProvider, QWidget *parent = 0);
|
||
|
~KoCanvasControllerWidget() override;
|
||
|
|
||
|
/**
|
||
|
diff --git a/libs/flake/KoToolFactoryBase.cpp b/libs/flake/KoToolFactoryBase.cpp
|
||
|
index ddbc2bdbbf..6ebc03d32c 100644
|
||
|
--- a/libs/flake/KoToolFactoryBase.cpp
|
||
|
+++ b/libs/flake/KoToolFactoryBase.cpp
|
||
|
@@ -44,7 +44,7 @@ KoToolFactoryBase::~KoToolFactoryBase()
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-QList<QAction *> KoToolFactoryBase::createActions(KActionCollection *actionCollection)
|
||
|
+QList<QAction *> KoToolFactoryBase::createActions(KisKActionCollection *actionCollection)
|
||
|
{
|
||
|
QList<QAction *> toolActions;
|
||
|
|
||
|
diff --git a/libs/flake/KoToolFactoryBase.h b/libs/flake/KoToolFactoryBase.h
|
||
|
index b9a1c0c00e..5ac36969ed 100644
|
||
|
--- a/libs/flake/KoToolFactoryBase.h
|
||
|
+++ b/libs/flake/KoToolFactoryBase.h
|
||
|
@@ -17,7 +17,7 @@
|
||
|
class KoCanvasBase;
|
||
|
class KoToolBase;
|
||
|
class QKeySequence;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class QAction;
|
||
|
|
||
|
/**
|
||
|
@@ -73,7 +73,7 @@ public:
|
||
|
* Create the actions for this tool. Actions are unique per window, not per
|
||
|
* tool instance; tool instances are unique per view/canvas.
|
||
|
*/
|
||
|
- QList<QAction *> createActions(KActionCollection *actionCollection);
|
||
|
+ QList<QAction *> createActions(KisKActionCollection *actionCollection);
|
||
|
|
||
|
/**
|
||
|
* Instantiate a new tool
|
||
|
diff --git a/libs/flake/KoToolManager.cpp b/libs/flake/KoToolManager.cpp
|
||
|
index f28d5f6672..db70a1078b 100644
|
||
|
--- a/libs/flake/KoToolManager.cpp
|
||
|
+++ b/libs/flake/KoToolManager.cpp
|
||
|
@@ -78,7 +78,7 @@ public:
|
||
|
toolActions.clear();
|
||
|
disabledGlobalActions.clear();
|
||
|
|
||
|
- KActionCollection *windowActionCollection = canvas->actionCollection();
|
||
|
+ KisKActionCollection *windowActionCollection = canvas->actionCollection();
|
||
|
|
||
|
if (!windowActionCollection) {
|
||
|
qWarning() << "We haven't got an action collection";
|
||
|
@@ -162,7 +162,7 @@ public:
|
||
|
|
||
|
//qDebug() << "............... deactivating previous tool because activating" << activeToolId;
|
||
|
|
||
|
- KActionCollection *windowActionCollection = canvas->actionCollection();
|
||
|
+ KisKActionCollection *windowActionCollection = canvas->actionCollection();
|
||
|
|
||
|
Q_FOREACH(const QString &action, toolActions) {
|
||
|
//qDebug() << "disabling" << action;
|
||
|
@@ -219,7 +219,7 @@ KoInputDevice KoToolManager::currentInputDevice() const
|
||
|
return d->inputDevice;
|
||
|
}
|
||
|
|
||
|
-void KoToolManager::registerToolActions(KActionCollection *ac, KoCanvasController *controller)
|
||
|
+void KoToolManager::registerToolActions(KisKActionCollection *ac, KoCanvasController *controller)
|
||
|
{
|
||
|
Q_ASSERT(controller);
|
||
|
Q_ASSERT(ac);
|
||
|
diff --git a/libs/flake/KoToolManager.h b/libs/flake/KoToolManager.h
|
||
|
index d1aa8e23bd..a4bd474d91 100644
|
||
|
--- a/libs/flake/KoToolManager.h
|
||
|
+++ b/libs/flake/KoToolManager.h
|
||
|
@@ -19,7 +19,7 @@ class KoShapeControllerBase;
|
||
|
class KoToolFactoryBase;
|
||
|
class KoCanvasBase;
|
||
|
class KoToolBase;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class KoShape;
|
||
|
class KoShapeLayer;
|
||
|
class QKeySequence;
|
||
|
@@ -140,7 +140,7 @@ public:
|
||
|
* @param ac the actionCollection that will be the parent of the actions.
|
||
|
* @param controller tools registered with this controller will have all their actions added as well.
|
||
|
*/
|
||
|
- void registerToolActions(KActionCollection *ac, KoCanvasController *controller);
|
||
|
+ void registerToolActions(KisKActionCollection *ac, KoCanvasController *controller);
|
||
|
|
||
|
/**
|
||
|
* Register a new canvas controller
|
||
|
diff --git a/libs/libkis/Krita.cpp b/libs/libkis/Krita.cpp
|
||
|
index 4c06ac4b44..80338dbabf 100644
|
||
|
--- a/libs/libkis/Krita.cpp
|
||
|
+++ b/libs/libkis/Krita.cpp
|
||
|
@@ -86,7 +86,7 @@ QList<QAction *> Krita::actions() const
|
||
|
if (!mainWindow) {
|
||
|
return QList<QAction*>();
|
||
|
}
|
||
|
- KActionCollection *actionCollection = mainWindow->actionCollection();
|
||
|
+ KisKActionCollection *actionCollection = mainWindow->actionCollection();
|
||
|
return actionCollection->actions();
|
||
|
}
|
||
|
|
||
|
@@ -96,7 +96,7 @@ QAction *Krita::action(const QString &name) const
|
||
|
if (!mainWindow) {
|
||
|
return 0;
|
||
|
}
|
||
|
- KActionCollection *actionCollection = mainWindow->actionCollection();
|
||
|
+ KisKActionCollection *actionCollection = mainWindow->actionCollection();
|
||
|
QAction *action = actionCollection->action(name);
|
||
|
return action;
|
||
|
}
|
||
|
diff --git a/libs/libqml/KisSketchView.cpp b/libs/libqml/KisSketchView.cpp
|
||
|
index 240155d372..c9e45791f9 100644
|
||
|
--- a/libs/libqml/KisSketchView.cpp
|
||
|
+++ b/libs/libqml/KisSketchView.cpp
|
||
|
@@ -58,7 +58,7 @@ public:
|
||
|
|
||
|
KisSketchView* q;
|
||
|
|
||
|
- KActionCollection *actionCollection;
|
||
|
+ KisKActionCollection *actionCollection;
|
||
|
|
||
|
QPointer<KisDocument> doc;
|
||
|
QPointer<KisViewManager> viewManager;
|
||
|
@@ -94,7 +94,7 @@ KisSketchView::KisSketchView(QQuickItem* parent)
|
||
|
setAcceptedMouseButtons(Qt::LeftButton | Qt::MiddleButton | Qt::RightButton);
|
||
|
setAcceptHoverEvents(true);
|
||
|
|
||
|
- d->actionCollection = new KActionCollection(this, "krita");
|
||
|
+ d->actionCollection = new KisKActionCollection(this, "krita");
|
||
|
d->viewManager = 0; //new KisViewManager(qApp->activeWindow(), d->actionCollection);
|
||
|
|
||
|
// QT5TODO
|
||
|
diff --git a/libs/ui/KisMainWindow.cpp b/libs/ui/KisMainWindow.cpp
|
||
|
index e51ed3fc60..6edc01cef6 100644
|
||
|
--- a/libs/ui/KisMainWindow.cpp
|
||
|
+++ b/libs/ui/KisMainWindow.cpp
|
||
|
@@ -262,7 +262,7 @@ public:
|
||
|
KActionMenu *documentMenu;
|
||
|
KActionMenu *workspaceMenu;
|
||
|
|
||
|
- KHelpMenu *helpMenu {0};
|
||
|
+ KisKHelpMenu *helpMenu {0};
|
||
|
|
||
|
KRecentFilesAction *recentFiles {0};
|
||
|
KisRecentDocumentsModelWrapper recentFilesModel;
|
||
|
@@ -499,20 +499,20 @@ KisMainWindow::KisMainWindow(QUuid uuid)
|
||
|
KAboutData aboutData(KAboutData::applicationData());
|
||
|
aboutData.setOrganizationDomain(app->organizationDomain().toUtf8());
|
||
|
|
||
|
- d->helpMenu = new KHelpMenu(this, aboutData, false);
|
||
|
+ d->helpMenu = new KisKHelpMenu(this, aboutData, false);
|
||
|
|
||
|
// workaround-less version:
|
||
|
- // d->helpMenu = new KHelpMenu(this, QString()/*unused*/, false);
|
||
|
+ // d->helpMenu = new KisKHelpMenu(this, QString()/*unused*/, false);
|
||
|
|
||
|
- // The difference between using KActionCollection->addAction() is that
|
||
|
+ // The difference between using KisKActionCollection->addAction() is that
|
||
|
// these actions do not get tied to the MainWindow. What does this all do?
|
||
|
- KActionCollection *actions = d->viewManager->actionCollection();
|
||
|
- QAction *helpContentsAction = d->helpMenu->action(KHelpMenu::menuHelpContents);
|
||
|
- QAction *whatsThisAction = d->helpMenu->action(KHelpMenu::menuWhatsThis);
|
||
|
- QAction *reportBugAction = d->helpMenu->action(KHelpMenu::menuReportBug);
|
||
|
- QAction *switchLanguageAction = d->helpMenu->action(KHelpMenu::menuSwitchLanguage);
|
||
|
- QAction *aboutAppAction = d->helpMenu->action(KHelpMenu::menuAboutApp);
|
||
|
- QAction *aboutKdeAction = d->helpMenu->action(KHelpMenu::menuAboutKDE);
|
||
|
+ KisKActionCollection *actions = d->viewManager->actionCollection();
|
||
|
+ QAction *helpContentsAction = d->helpMenu->action(KisKHelpMenu::menuHelpContents);
|
||
|
+ QAction *whatsThisAction = d->helpMenu->action(KisKHelpMenu::menuWhatsThis);
|
||
|
+ QAction *reportBugAction = d->helpMenu->action(KisKHelpMenu::menuReportBug);
|
||
|
+ QAction *switchLanguageAction = d->helpMenu->action(KisKHelpMenu::menuSwitchLanguage);
|
||
|
+ QAction *aboutAppAction = d->helpMenu->action(KisKHelpMenu::menuAboutApp);
|
||
|
+ QAction *aboutKdeAction = d->helpMenu->action(KisKHelpMenu::menuAboutKDE);
|
||
|
|
||
|
if (helpContentsAction) {
|
||
|
actions->addAction(helpContentsAction->objectName(), helpContentsAction);
|
||
|
@@ -569,7 +569,7 @@ KisMainWindow::KisMainWindow(QUuid uuid)
|
||
|
// Create and plug toolbar list for Settings menu
|
||
|
QList<QAction *> toolbarList;
|
||
|
Q_FOREACH (QWidget* it, guiFactory()->containers("ToolBar")) {
|
||
|
- KToolBar * toolBar = ::qobject_cast<KToolBar *>(it);
|
||
|
+ KisToolBar * toolBar = ::qobject_cast<KisToolBar *>(it);
|
||
|
if (toolBar) {
|
||
|
toolBar->setMovable(KisConfig(true).readEntry<bool>("LockAllDockerPanels", false));
|
||
|
|
||
|
@@ -1575,7 +1575,7 @@ void KisMainWindow::saveWindowSettings()
|
||
|
}
|
||
|
|
||
|
KSharedConfig::openConfig()->sync();
|
||
|
- resetAutoSaveSettings(); // Don't let KMainWindow override the good stuff we wrote down
|
||
|
+ resetAutoSaveSettings(); // Don't let KisKMainWindow override the good stuff we wrote down
|
||
|
|
||
|
}
|
||
|
|
||
|
@@ -1857,11 +1857,11 @@ void KisMainWindow::restoreWorkspace()
|
||
|
|
||
|
void KisMainWindow::openCommandBar()
|
||
|
{
|
||
|
- QList<KActionCollection *> actionCollections;
|
||
|
+ QList<KisKActionCollection *> actionCollections;
|
||
|
|
||
|
auto clients = guiFactory()->clients();
|
||
|
int actionsCount = 0;
|
||
|
- for (const KXMLGUIClient *c : clients) {
|
||
|
+ for (const KisKXMLGUIClient *c : clients) {
|
||
|
if (!c) {
|
||
|
continue;
|
||
|
}
|
||
|
@@ -1872,7 +1872,7 @@ void KisMainWindow::openCommandBar()
|
||
|
}
|
||
|
|
||
|
if (activeKisView()) {
|
||
|
- KActionCollection *layerActionCollection = new KActionCollection(0, "layeractions (disposable)");
|
||
|
+ KisKActionCollection *layerActionCollection = new KisKActionCollection(0, "layeractions (disposable)");
|
||
|
layerActionCollection->setComponentDisplayName(i18n("Layers/Masks"));
|
||
|
KisNodeActivationActionCreatorVisitor v(layerActionCollection, viewManager()->nodeManager());
|
||
|
activeKisView()->image()->rootLayer()->accept(v);
|
||
|
@@ -2184,7 +2184,7 @@ void KisMainWindow::renderAnimationAgain()
|
||
|
void KisMainWindow::slotConfigureToolbars()
|
||
|
{
|
||
|
saveWindowState();
|
||
|
- KEditToolBar edit(factory(), this);
|
||
|
+ KisKEditToolBar edit(factory(), this);
|
||
|
connect(&edit, SIGNAL(newToolBarConfig()), this, SLOT(slotNewToolbarConfig()));
|
||
|
(void) edit.exec();
|
||
|
applyToolBarLayout();
|
||
|
@@ -2200,7 +2200,7 @@ void KisMainWindow::slotNewToolbarConfig()
|
||
|
{
|
||
|
applyMainWindowSettings(d->windowStateConfig);
|
||
|
|
||
|
- KXMLGUIFactory *factory = guiFactory();
|
||
|
+ KisKXMLGUIFactory *factory = guiFactory();
|
||
|
Q_UNUSED(factory);
|
||
|
|
||
|
// Check if there's an active view
|
||
|
@@ -2215,7 +2215,7 @@ void KisMainWindow::slotToolbarToggled(bool toggle)
|
||
|
{
|
||
|
//dbgUI <<"KisMainWindow::slotToolbarToggled" << sender()->name() <<" toggle=" << true;
|
||
|
// The action (sender) and the toolbar have the same name
|
||
|
- KToolBar * bar = toolBar(sender()->objectName());
|
||
|
+ KisToolBar * bar = toolBar(sender()->objectName());
|
||
|
if (bar) {
|
||
|
if (toggle) {
|
||
|
bar->show();
|
||
|
@@ -2957,9 +2957,9 @@ void KisMainWindow::createActions()
|
||
|
|
||
|
void KisMainWindow::applyToolBarLayout()
|
||
|
{
|
||
|
- KToolBar::setToolBarsLocked(KisConfig(true).readEntry<bool>("LockAllDockerPanels", false));
|
||
|
+ KisToolBar::setToolBarsLocked(KisConfig(true).readEntry<bool>("LockAllDockerPanels", false));
|
||
|
|
||
|
- Q_FOREACH (KToolBar *toolBar, toolBars()) {
|
||
|
+ Q_FOREACH (KisToolBar *toolBar, toolBars()) {
|
||
|
toolBar->layout()->setSpacing(4);
|
||
|
toolBar->setStyleSheet("QToolBar { border: none }"); // has a border in "Fusion" style that people don't like
|
||
|
|
||
|
diff --git a/libs/ui/KisNodeActivationActionCreatorVisitor.cpp b/libs/ui/KisNodeActivationActionCreatorVisitor.cpp
|
||
|
index 697ec0e9cf..250bef917a 100644
|
||
|
--- a/libs/ui/KisNodeActivationActionCreatorVisitor.cpp
|
||
|
+++ b/libs/ui/KisNodeActivationActionCreatorVisitor.cpp
|
||
|
@@ -12,7 +12,7 @@
|
||
|
#include <QRect>
|
||
|
#include <kis_projection_leaf.h>
|
||
|
|
||
|
-KisNodeActivationActionCreatorVisitor::KisNodeActivationActionCreatorVisitor(KActionCollection *actionCollection, KisNodeManager *nodeManager)
|
||
|
+KisNodeActivationActionCreatorVisitor::KisNodeActivationActionCreatorVisitor(KisKActionCollection *actionCollection, KisNodeManager *nodeManager)
|
||
|
: m_nodeManager(nodeManager)
|
||
|
, m_actionCollection(actionCollection)
|
||
|
{
|
||
|
diff --git a/libs/ui/KisNodeActivationActionCreatorVisitor.h b/libs/ui/KisNodeActivationActionCreatorVisitor.h
|
||
|
index 12a4ac51f0..c53f244689 100644
|
||
|
--- a/libs/ui/KisNodeActivationActionCreatorVisitor.h
|
||
|
+++ b/libs/ui/KisNodeActivationActionCreatorVisitor.h
|
||
|
@@ -24,7 +24,7 @@
|
||
|
#include <QList>
|
||
|
#include <QAction>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class KisNodeManager;
|
||
|
|
||
|
class KisNodeActivationActionCreatorVisitor : public KisNodeVisitor
|
||
|
@@ -33,7 +33,7 @@ public:
|
||
|
|
||
|
using KisNodeVisitor::visit;
|
||
|
|
||
|
- KisNodeActivationActionCreatorVisitor(KActionCollection *actionCollection, KisNodeManager *nodeManager);
|
||
|
+ KisNodeActivationActionCreatorVisitor(KisKActionCollection *actionCollection, KisNodeManager *nodeManager);
|
||
|
~KisNodeActivationActionCreatorVisitor() {}
|
||
|
|
||
|
bool visit(KisNode* node) override {
|
||
|
@@ -89,7 +89,7 @@ private:
|
||
|
bool createAction(KisNode *node);
|
||
|
|
||
|
KisNodeManager *m_nodeManager {0};
|
||
|
- KActionCollection *m_actionCollection {0};
|
||
|
+ KisKActionCollection *m_actionCollection {0};
|
||
|
|
||
|
};
|
||
|
|
||
|
diff --git a/libs/ui/KisPart.cpp b/libs/ui/KisPart.cpp
|
||
|
index e5e66c687e..f8def694ca 100644
|
||
|
--- a/libs/ui/KisPart.cpp
|
||
|
+++ b/libs/ui/KisPart.cpp
|
||
|
@@ -91,7 +91,7 @@ public:
|
||
|
QList<QPointer<KisView> > views;
|
||
|
QList<QPointer<KisMainWindow> > mainWindows;
|
||
|
QList<QPointer<KisDocument> > documents;
|
||
|
- KActionCollection *actionCollection{0};
|
||
|
+ KisKActionCollection *actionCollection{0};
|
||
|
KisIdleWatcher idleWatcher;
|
||
|
KisAnimationCachePopulator animationCachePopulator;
|
||
|
|
||
|
@@ -515,7 +515,7 @@ void KisPart::updateShortcuts()
|
||
|
// Update any non-UI actionCollections. That includes:
|
||
|
// Now update the UI actions.
|
||
|
Q_FOREACH (KisMainWindow *mainWindow, d->mainWindows) {
|
||
|
- KActionCollection *ac = mainWindow->actionCollection();
|
||
|
+ KisKActionCollection *ac = mainWindow->actionCollection();
|
||
|
|
||
|
ac->updateShortcuts();
|
||
|
|
||
|
diff --git a/libs/ui/KisView.cpp b/libs/ui/KisView.cpp
|
||
|
index 6174f53c7c..e1941fdc38 100644
|
||
|
--- a/libs/ui/KisView.cpp
|
||
|
+++ b/libs/ui/KisView.cpp
|
||
|
@@ -114,7 +114,7 @@ public:
|
||
|
QPointer<KisDocument> document; // our KisDocument
|
||
|
QWidget *tempActiveWidget = 0;
|
||
|
|
||
|
- KActionCollection* actionCollection;
|
||
|
+ KisKActionCollection* actionCollection;
|
||
|
KisCoordinatesConverter viewConverter;
|
||
|
KisCanvasController canvasController;
|
||
|
KisCanvas2 canvas;
|
||
|
diff --git a/libs/ui/KisView.h b/libs/ui/KisView.h
|
||
|
index bcdc5f5402..f1341eb787 100644
|
||
|
--- a/libs/ui/KisView.h
|
||
|
+++ b/libs/ui/KisView.h
|
||
|
@@ -35,7 +35,7 @@ class KoCanvasResourceProvider;
|
||
|
|
||
|
// KDE classes
|
||
|
class QAction;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class KConfigGroup;
|
||
|
|
||
|
// Qt classes
|
||
|
diff --git a/libs/ui/KisViewManager.cpp b/libs/ui/KisViewManager.cpp
|
||
|
index 7d92fb7b88..8d79bd5322 100644
|
||
|
--- a/libs/ui/KisViewManager.cpp
|
||
|
+++ b/libs/ui/KisViewManager.cpp
|
||
|
@@ -146,7 +146,7 @@ class KisViewManager::KisViewManagerPrivate
|
||
|
|
||
|
public:
|
||
|
|
||
|
- KisViewManagerPrivate(KisViewManager *_q, KActionCollection *_actionCollection, QWidget *_q_parent)
|
||
|
+ KisViewManagerPrivate(KisViewManager *_q, KisKActionCollection *_actionCollection, QWidget *_q_parent)
|
||
|
: filterManager(_q)
|
||
|
, createTemplate(0)
|
||
|
, saveIncremental(0)
|
||
|
@@ -231,7 +231,7 @@ public:
|
||
|
KisCanvasResourceProvider canvasResourceProvider;
|
||
|
KoCanvasResourceProvider canvasResourceManager;
|
||
|
KisSignalCompressor guiUpdateCompressor;
|
||
|
- KActionCollection *actionCollection;
|
||
|
+ KisKActionCollection *actionCollection;
|
||
|
KisMirrorManager mirrorManager;
|
||
|
KisInputManager inputManager;
|
||
|
|
||
|
@@ -247,7 +247,7 @@ public:
|
||
|
bool blockUntilOperationsFinishedImpl(KisImageSP image, bool force);
|
||
|
};
|
||
|
|
||
|
-KisViewManager::KisViewManager(QWidget *parent, KActionCollection *_actionCollection)
|
||
|
+KisViewManager::KisViewManager(QWidget *parent, KisKActionCollection *_actionCollection)
|
||
|
: d(new KisViewManagerPrivate(this, _actionCollection, parent))
|
||
|
{
|
||
|
d->actionCollection = _actionCollection;
|
||
|
@@ -363,7 +363,7 @@ void KisViewManager::initializeResourceManager(KoCanvasResourceProvider *resourc
|
||
|
KoCanvasResource::BackgroundColor)));
|
||
|
}
|
||
|
|
||
|
-KActionCollection *KisViewManager::actionCollection() const
|
||
|
+KisKActionCollection *KisViewManager::actionCollection() const
|
||
|
{
|
||
|
return d->actionCollection;
|
||
|
}
|
||
|
diff --git a/libs/ui/KisViewManager.h b/libs/ui/KisViewManager.h
|
||
|
index 569274464d..6d01403846 100644
|
||
|
--- a/libs/ui/KisViewManager.h
|
||
|
+++ b/libs/ui/KisViewManager.h
|
||
|
@@ -56,13 +56,13 @@ public:
|
||
|
* @param parent a parent widget we show ourselves in.
|
||
|
* @param actionCollection an action collection.
|
||
|
*/
|
||
|
- KisViewManager(QWidget *parent, KActionCollection *actionCollection);
|
||
|
+ KisViewManager(QWidget *parent, KisKActionCollection *actionCollection);
|
||
|
~KisViewManager() override;
|
||
|
|
||
|
/**
|
||
|
* Retrieves the entire action collection.
|
||
|
*/
|
||
|
- virtual KActionCollection* actionCollection() const;
|
||
|
+ virtual KisKActionCollection* actionCollection() const;
|
||
|
|
||
|
public: // Krita specific interfaces
|
||
|
|
||
|
diff --git a/libs/ui/canvas/kis_canvas_controller.cpp b/libs/ui/canvas/kis_canvas_controller.cpp
|
||
|
index 1f945b9726..ed8cb3a38c 100644
|
||
|
--- a/libs/ui/canvas/kis_canvas_controller.cpp
|
||
|
+++ b/libs/ui/canvas/kis_canvas_controller.cpp
|
||
|
@@ -77,7 +77,7 @@ void KisCanvasController::Private::updateDocumentSizeAfterTransform()
|
||
|
}
|
||
|
|
||
|
|
||
|
-KisCanvasController::KisCanvasController(QPointer<KisView>parent, KoCanvasSupervisor *observerProvider, KActionCollection * actionCollection)
|
||
|
+KisCanvasController::KisCanvasController(QPointer<KisView>parent, KoCanvasSupervisor *observerProvider, KisKActionCollection * actionCollection)
|
||
|
: KoCanvasControllerWidget(actionCollection, observerProvider, parent),
|
||
|
m_d(new Private(this))
|
||
|
{
|
||
|
diff --git a/libs/ui/canvas/kis_canvas_controller.h b/libs/ui/canvas/kis_canvas_controller.h
|
||
|
index e4d5ab28d8..6345f7bf3a 100644
|
||
|
--- a/libs/ui/canvas/kis_canvas_controller.h
|
||
|
+++ b/libs/ui/canvas/kis_canvas_controller.h
|
||
|
@@ -21,7 +21,7 @@ class KRITAUI_EXPORT KisCanvasController : public KoCanvasControllerWidget
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
- KisCanvasController(QPointer<KisView>parent, KoCanvasSupervisor *observerProvider, KActionCollection * actionCollection);
|
||
|
+ KisCanvasController(QPointer<KisView>parent, KoCanvasSupervisor *observerProvider, KisKActionCollection * actionCollection);
|
||
|
~KisCanvasController() override;
|
||
|
|
||
|
void setCanvas(KoCanvasBase *canvas) override;
|
||
|
diff --git a/libs/ui/canvas/kis_mirror_axis.cpp b/libs/ui/canvas/kis_mirror_axis.cpp
|
||
|
index af4283bf72..a0a7b50425 100644
|
||
|
--- a/libs/ui/canvas/kis_mirror_axis.cpp
|
||
|
+++ b/libs/ui/canvas/kis_mirror_axis.cpp
|
||
|
@@ -403,7 +403,7 @@ const KisMirrorAxisConfig &KisMirrorAxis::mirrorAxisConfig() const
|
||
|
|
||
|
void KisMirrorAxis::toggleMirrorActions()
|
||
|
{
|
||
|
- KActionCollection* collection = view()->viewManager()->actionCollection();
|
||
|
+ KisKActionCollection* collection = view()->viewManager()->actionCollection();
|
||
|
// first uncheck the action, then set according to config;
|
||
|
// otherwise the connected KisHighlightedToolButton's highlight color is not
|
||
|
// properly set
|
||
|
diff --git a/libs/ui/dialogs/kis_dlg_preferences.cc b/libs/ui/dialogs/kis_dlg_preferences.cc
|
||
|
index 7c9bba5cfc..07439c285e 100644
|
||
|
--- a/libs/ui/dialogs/kis_dlg_preferences.cc
|
||
|
+++ b/libs/ui/dialogs/kis_dlg_preferences.cc
|
||
|
@@ -588,14 +588,14 @@ ShortcutSettingsTab::ShortcutSettingsTab(QWidget *parent, const char *name)
|
||
|
|
||
|
m_snapshot.reset(new KisActionsSnapshot);
|
||
|
|
||
|
- KActionCollection *collection =
|
||
|
+ KisKActionCollection *collection =
|
||
|
KisPart::instance()->currentMainwindow()->actionCollection();
|
||
|
|
||
|
Q_FOREACH (QAction *action, collection->actions()) {
|
||
|
m_snapshot->addAction(action->objectName(), action);
|
||
|
}
|
||
|
|
||
|
- QMap<QString, KActionCollection*> sortedCollections =
|
||
|
+ QMap<QString, KisKActionCollection*> sortedCollections =
|
||
|
m_snapshot->actionCollections();
|
||
|
|
||
|
for (auto it = sortedCollections.constBegin(); it != sortedCollections.constEnd(); ++it) {
|
||
|
diff --git a/libs/ui/input/KisCanvasOnlyAction.cpp b/libs/ui/input/KisCanvasOnlyAction.cpp
|
||
|
index b71fad8d4d..7be62cc88c 100644
|
||
|
--- a/libs/ui/input/KisCanvasOnlyAction.cpp
|
||
|
+++ b/libs/ui/input/KisCanvasOnlyAction.cpp
|
||
|
@@ -29,7 +29,7 @@ int KisCanvasOnlyAction::priority() const
|
||
|
|
||
|
void KisCanvasOnlyAction::begin(int, QEvent */*event*/)
|
||
|
{
|
||
|
- KActionCollection *actionCollection = KisPart::instance()->currentMainwindow()->actionCollection();
|
||
|
+ KisKActionCollection *actionCollection = KisPart::instance()->currentMainwindow()->actionCollection();
|
||
|
QAction *action = actionCollection->action("view_show_canvas_only");
|
||
|
if (action)
|
||
|
{
|
||
|
diff --git a/libs/ui/kis_action_manager.cpp b/libs/ui/kis_action_manager.cpp
|
||
|
index b5b056111b..a80d40dfd8 100644
|
||
|
--- a/libs/ui/kis_action_manager.cpp
|
||
|
+++ b/libs/ui/kis_action_manager.cpp
|
||
|
@@ -41,7 +41,7 @@ public:
|
||
|
}
|
||
|
|
||
|
KisViewManager* viewManager;
|
||
|
- KActionCollection *actionCollection;
|
||
|
+ KisKActionCollection *actionCollection;
|
||
|
|
||
|
QList<QPointer<KisAction>> actions;
|
||
|
KoGenericRegistry<KisOperationUIFactory*> uiRegistry;
|
||
|
@@ -49,7 +49,7 @@ public:
|
||
|
|
||
|
};
|
||
|
|
||
|
-KisActionManager::KisActionManager(KisViewManager* viewManager, KActionCollection *actionCollection)
|
||
|
+KisActionManager::KisActionManager(KisViewManager* viewManager, KisKActionCollection *actionCollection)
|
||
|
: d(new Private)
|
||
|
{
|
||
|
d->viewManager = viewManager;
|
||
|
diff --git a/libs/ui/kis_action_manager.h b/libs/ui/kis_action_manager.h
|
||
|
index 685836b61b..ca0dcfbc6a 100644
|
||
|
--- a/libs/ui/kis_action_manager.h
|
||
|
+++ b/libs/ui/kis_action_manager.h
|
||
|
@@ -32,8 +32,8 @@ class KisOperation;
|
||
|
* to the state of the application.
|
||
|
*
|
||
|
* Some of the primitive actions (load/save and so on) are not defined as
|
||
|
- * KisActions, but instead KActions, automacially registered through KXMLGUI.
|
||
|
- * It tracks these actions through the KActionCollection owned by the window.
|
||
|
+ * KisActions, but instead KActions, automacially registered through KisKXMLGUI.
|
||
|
+ * It tracks these actions through the KisKActionCollection owned by the window.
|
||
|
* Ultimately it would be nice to unify these things more fully.
|
||
|
*
|
||
|
*/
|
||
|
@@ -41,7 +41,7 @@ class KRITAUI_EXPORT KisActionManager : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
- KisActionManager(KisViewManager* viewManager, KActionCollection *actionCollection);
|
||
|
+ KisActionManager(KisViewManager* viewManager, KisKActionCollection *actionCollection);
|
||
|
~KisActionManager() override;
|
||
|
|
||
|
void setView(QPointer<KisView> imageView);
|
||
|
diff --git a/libs/ui/kis_filter_manager.cc b/libs/ui/kis_filter_manager.cc
|
||
|
index 329405b343..cd7139fcf8 100644
|
||
|
--- a/libs/ui/kis_filter_manager.cc
|
||
|
+++ b/libs/ui/kis_filter_manager.cc
|
||
|
@@ -49,7 +49,7 @@ struct KisFilterManager::Private {
|
||
|
KisAction* reapplyActionReprompt = nullptr;
|
||
|
QHash<QString, KActionMenu*> filterActionMenus;
|
||
|
QHash<KisFilter*, QAction *> filters2Action;
|
||
|
- KActionCollection *actionCollection = nullptr;
|
||
|
+ KisKActionCollection *actionCollection = nullptr;
|
||
|
KisActionManager *actionManager = nullptr;
|
||
|
KisViewManager *view = nullptr;
|
||
|
|
||
|
@@ -86,7 +86,7 @@ void KisFilterManager::setView(QPointer<KisView>imageView)
|
||
|
}
|
||
|
|
||
|
|
||
|
-void KisFilterManager::setup(KActionCollection * ac, KisActionManager *actionManager)
|
||
|
+void KisFilterManager::setup(KisKActionCollection * ac, KisActionManager *actionManager)
|
||
|
{
|
||
|
d->actionCollection = ac;
|
||
|
d->actionManager = actionManager;
|
||
|
diff --git a/libs/ui/kis_filter_manager.h b/libs/ui/kis_filter_manager.h
|
||
|
index dd9f0bf9cf..354b72c6cb 100644
|
||
|
--- a/libs/ui/kis_filter_manager.h
|
||
|
+++ b/libs/ui/kis_filter_manager.h
|
||
|
@@ -13,7 +13,7 @@
|
||
|
#include <kis_types.h>
|
||
|
|
||
|
class KisViewManager;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class KisActionManager;
|
||
|
class KisView;
|
||
|
|
||
|
@@ -31,7 +31,7 @@ public:
|
||
|
~KisFilterManager() override;
|
||
|
void setView(QPointer<KisView>imageView);
|
||
|
|
||
|
- void setup(KActionCollection * ac, KisActionManager *actionManager);
|
||
|
+ void setup(KisKActionCollection * ac, KisActionManager *actionManager);
|
||
|
void updateGUI();
|
||
|
|
||
|
void apply(KisFilterConfigurationSP filterConfig);
|
||
|
diff --git a/libs/ui/kis_mask_manager.cc b/libs/ui/kis_mask_manager.cc
|
||
|
index a7d99e936d..14ff8511bc 100644
|
||
|
--- a/libs/ui/kis_mask_manager.cc
|
||
|
+++ b/libs/ui/kis_mask_manager.cc
|
||
|
@@ -55,7 +55,7 @@ void KisMaskManager::setView(QPointer<KisView>imageView)
|
||
|
m_imageView = imageView;
|
||
|
}
|
||
|
|
||
|
-void KisMaskManager::setup(KActionCollection *actionCollection, KisActionManager *actionManager)
|
||
|
+void KisMaskManager::setup(KisKActionCollection *actionCollection, KisActionManager *actionManager)
|
||
|
{
|
||
|
Q_UNUSED(actionCollection);
|
||
|
Q_UNUSED(actionManager);
|
||
|
diff --git a/libs/ui/kis_mask_manager.h b/libs/ui/kis_mask_manager.h
|
||
|
index aa98ec7cb7..b5fafa949b 100644
|
||
|
--- a/libs/ui/kis_mask_manager.h
|
||
|
+++ b/libs/ui/kis_mask_manager.h
|
||
|
@@ -13,7 +13,7 @@
|
||
|
#include "KisView.h"
|
||
|
|
||
|
class KisViewManager;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class KisNodeCommandsAdapter;
|
||
|
class KisActionManager;
|
||
|
|
||
|
@@ -38,7 +38,7 @@ private:
|
||
|
|
||
|
friend class KisNodeManager;
|
||
|
|
||
|
- void setup(KActionCollection * actionCollection, KisActionManager *actionManager);
|
||
|
+ void setup(KisKActionCollection * actionCollection, KisActionManager *actionManager);
|
||
|
|
||
|
void updateGUI();
|
||
|
|
||
|
diff --git a/libs/ui/kis_mirror_manager.cpp b/libs/ui/kis_mirror_manager.cpp
|
||
|
index c8c864faf3..331c20e20a 100644
|
||
|
--- a/libs/ui/kis_mirror_manager.cpp
|
||
|
+++ b/libs/ui/kis_mirror_manager.cpp
|
||
|
@@ -32,7 +32,7 @@ KisMirrorManager::~KisMirrorManager()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-void KisMirrorManager::setup(KActionCollection * collection)
|
||
|
+void KisMirrorManager::setup(KisKActionCollection * collection)
|
||
|
{
|
||
|
m_mirrorCanvas = new KToggleAction(i18n("Mirror View"), this);
|
||
|
m_mirrorCanvas->setChecked(false);
|
||
|
diff --git a/libs/ui/kis_mirror_manager.h b/libs/ui/kis_mirror_manager.h
|
||
|
index cc01e1c265..e3600b14f7 100644
|
||
|
--- a/libs/ui/kis_mirror_manager.h
|
||
|
+++ b/libs/ui/kis_mirror_manager.h
|
||
|
@@ -15,7 +15,7 @@
|
||
|
#include "KisView.h"
|
||
|
|
||
|
class KisViewManager;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class KisMirrorAxis;
|
||
|
class KisMirrorAxisConfig;
|
||
|
|
||
|
@@ -27,7 +27,7 @@ public:
|
||
|
KisMirrorManager(KisViewManager* view);
|
||
|
~KisMirrorManager() override;
|
||
|
|
||
|
- void setup(KActionCollection* collection);
|
||
|
+ void setup(KisKActionCollection* collection);
|
||
|
void setView(QPointer<KisView> imageView);
|
||
|
|
||
|
private Q_SLOTS:
|
||
|
diff --git a/libs/ui/kis_node_manager.cpp b/libs/ui/kis_node_manager.cpp
|
||
|
index 1f0d4d7a43..f62d719ee7 100644
|
||
|
--- a/libs/ui/kis_node_manager.cpp
|
||
|
+++ b/libs/ui/kis_node_manager.cpp
|
||
|
@@ -245,7 +245,7 @@ void KisNodeManager::setView(QPointer<KisView>imageView)
|
||
|
#define CONVERT_NODE_ACTION(id, layerType) \
|
||
|
CONVERT_NODE_ACTION_2(id, layerType, layerType)
|
||
|
|
||
|
-void KisNodeManager::setup(KActionCollection * actionCollection, KisActionManager* actionManager)
|
||
|
+void KisNodeManager::setup(KisKActionCollection * actionCollection, KisActionManager* actionManager)
|
||
|
{
|
||
|
m_d->layerManager.setup(actionManager);
|
||
|
m_d->maskManager.setup(actionCollection, actionManager);
|
||
|
diff --git a/libs/ui/kis_node_manager.h b/libs/ui/kis_node_manager.h
|
||
|
index 78ad8934d1..2ba821e2bf 100644
|
||
|
--- a/libs/ui/kis_node_manager.h
|
||
|
+++ b/libs/ui/kis_node_manager.h
|
||
|
@@ -15,7 +15,7 @@
|
||
|
#include "kis_image.h"
|
||
|
#include <kritaui_export.h>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
|
||
|
class KoCompositeOp;
|
||
|
class KoColorSpace;
|
||
|
@@ -61,7 +61,7 @@ Q_SIGNALS:
|
||
|
|
||
|
public:
|
||
|
|
||
|
- void setup(KActionCollection * collection, KisActionManager* actionManager);
|
||
|
+ void setup(KisKActionCollection * collection, KisActionManager* actionManager);
|
||
|
void updateGUI();
|
||
|
|
||
|
/// Convenience function to get the active layer or mask
|
||
|
diff --git a/libs/ui/kis_popup_palette.h b/libs/ui/kis_popup_palette.h
|
||
|
index 3b1a588de4..059fdf527c 100644
|
||
|
--- a/libs/ui/kis_popup_palette.h
|
||
|
+++ b/libs/ui/kis_popup_palette.h
|
||
|
@@ -138,7 +138,7 @@ private:
|
||
|
KisColorSelectorInterface *m_colorSelector {0};
|
||
|
const KoColorDisplayRendererInterface *m_displayRenderer;
|
||
|
QScopedPointer<KisSignalCompressor> m_colorChangeCompressor;
|
||
|
- KActionCollection *m_actionCollection;
|
||
|
+ KisKActionCollection *m_actionCollection;
|
||
|
|
||
|
QSpacerItem *m_mainArea {0};
|
||
|
KisBrushHud *m_brushHud {0};
|
||
|
diff --git a/libs/ui/kis_tooltip_manager.cpp b/libs/ui/kis_tooltip_manager.cpp
|
||
|
index e38e841978..1e51441abb 100644
|
||
|
--- a/libs/ui/kis_tooltip_manager.cpp
|
||
|
+++ b/libs/ui/kis_tooltip_manager.cpp
|
||
|
@@ -56,7 +56,7 @@ void KisTooltipManager::record()
|
||
|
{
|
||
|
m_recording = true;
|
||
|
QList<QAction*> actions = m_view->actionCollection()->actions();
|
||
|
- Q_FOREACH (KXMLGUIClient* client, m_view->mainWindow()->childClients() ) {
|
||
|
+ Q_FOREACH (KisKXMLGUIClient* client, m_view->mainWindow()->childClients() ) {
|
||
|
actions.append(client->actionCollection()->actions());
|
||
|
}
|
||
|
|
||
|
diff --git a/libs/ui/kis_zoom_manager.cc b/libs/ui/kis_zoom_manager.cc
|
||
|
index 5b5e14f096..51f8eeda54 100644
|
||
|
--- a/libs/ui/kis_zoom_manager.cc
|
||
|
+++ b/libs/ui/kis_zoom_manager.cc
|
||
|
@@ -40,7 +40,7 @@
|
||
|
class KisZoomController : public KoZoomController
|
||
|
{
|
||
|
public:
|
||
|
- KisZoomController(KoCanvasController *co, KisCoordinatesConverter *zh, KActionCollection *actionCollection, QObject *parent)
|
||
|
+ KisZoomController(KoCanvasController *co, KisCoordinatesConverter *zh, KisKActionCollection *actionCollection, QObject *parent)
|
||
|
: KoZoomController(co, zh, actionCollection, parent),
|
||
|
m_converter(zh)
|
||
|
{
|
||
|
@@ -103,7 +103,7 @@ void KisZoomManager::updateScreenResolution(QWidget *parentWidget)
|
||
|
changeAspectMode(m_aspectMode);
|
||
|
}
|
||
|
|
||
|
-void KisZoomManager::setup(KActionCollection * actionCollection)
|
||
|
+void KisZoomManager::setup(KisKActionCollection * actionCollection)
|
||
|
{
|
||
|
|
||
|
KisImageWSP image = m_view->image();
|
||
|
diff --git a/libs/ui/kis_zoom_manager.h b/libs/ui/kis_zoom_manager.h
|
||
|
index f6d8677d87..7721bd5b02 100644
|
||
|
--- a/libs/ui/kis_zoom_manager.h
|
||
|
+++ b/libs/ui/kis_zoom_manager.h
|
||
|
@@ -46,7 +46,7 @@ public:
|
||
|
|
||
|
void updateScreenResolution(QWidget *parentWidget);
|
||
|
|
||
|
- void setup(KActionCollection * actionCollection);
|
||
|
+ void setup(KisKActionCollection * actionCollection);
|
||
|
void updateGuiAfterDocumentSize();
|
||
|
KoZoomController * zoomController() const {
|
||
|
return m_zoomController;
|
||
|
diff --git a/libs/ui/thememanager.cpp b/libs/ui/thememanager.cpp
|
||
|
index 5a6c3b718c..067b476062 100644
|
||
|
--- a/libs/ui/thememanager.cpp
|
||
|
+++ b/libs/ui/thememanager.cpp
|
||
|
@@ -199,7 +199,7 @@ void ThemeManager::setThemeMenuAction(KActionMenu* const action)
|
||
|
populateThemeMenu();
|
||
|
}
|
||
|
|
||
|
-void ThemeManager::registerThemeActions(KActionCollection *actionCollection)
|
||
|
+void ThemeManager::registerThemeActions(KisKActionCollection *actionCollection)
|
||
|
{
|
||
|
if (!d->themeMenuAction) return;
|
||
|
actionCollection->addAction("theme_menu", d->themeMenuAction);
|
||
|
diff --git a/libs/ui/thememanager.h b/libs/ui/thememanager.h
|
||
|
index 30350efbbb..0fe90eafac 100644
|
||
|
--- a/libs/ui/thememanager.h
|
||
|
+++ b/libs/ui/thememanager.h
|
||
|
@@ -25,7 +25,7 @@
|
||
|
|
||
|
#include <ksharedconfig.h>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class KActionMenu;
|
||
|
|
||
|
namespace Digikam
|
||
|
@@ -50,7 +50,7 @@ public:
|
||
|
void setCurrentTheme(const QString& name);
|
||
|
|
||
|
void setThemeMenuAction(KActionMenu* const action);
|
||
|
- void registerThemeActions(KActionCollection *actionCollection);
|
||
|
+ void registerThemeActions(KisKActionCollection *actionCollection);
|
||
|
|
||
|
Q_SIGNALS:
|
||
|
|
||
|
diff --git a/libs/ui/tool/kis_selection_tool_helper.cpp b/libs/ui/tool/kis_selection_tool_helper.cpp
|
||
|
index 4046e45171..e08562e6ea 100644
|
||
|
--- a/libs/ui/tool/kis_selection_tool_helper.cpp
|
||
|
+++ b/libs/ui/tool/kis_selection_tool_helper.cpp
|
||
|
@@ -341,7 +341,7 @@ QMenu* KisSelectionToolHelper::getSelectionContextMenu(KisCanvas2* canvas)
|
||
|
{
|
||
|
QMenu *m_contextMenu = new QMenu();
|
||
|
|
||
|
- KActionCollection *actionCollection = canvas->viewManager()->actionCollection();
|
||
|
+ KisKActionCollection *actionCollection = canvas->viewManager()->actionCollection();
|
||
|
|
||
|
m_contextMenu->addSection(i18n("Selection Actions"));
|
||
|
m_contextMenu->addSeparator();
|
||
|
diff --git a/libs/widgets/KoDialog.h b/libs/widgets/KoDialog.h
|
||
|
index 276f662bc5..da63d90e66 100644
|
||
|
--- a/libs/widgets/KoDialog.h
|
||
|
+++ b/libs/widgets/KoDialog.h
|
||
|
@@ -414,7 +414,7 @@ public:
|
||
|
* application is running, pass in a pointer to the window the caption will
|
||
|
* be applied to.
|
||
|
*
|
||
|
- * If using a KoDialog or KMainWindow subclass, call setCaption instead and
|
||
|
+ * If using a KoDialog or KisKMainWindow subclass, call setCaption instead and
|
||
|
* an appropriate standard caption will be created for you
|
||
|
*
|
||
|
* @param userCaption The caption string you want to display in the
|
||
|
diff --git a/libs/widgets/KoZoomController.cpp b/libs/widgets/KoZoomController.cpp
|
||
|
index 97986474a8..61d9c8f115 100644
|
||
|
--- a/libs/widgets/KoZoomController.cpp
|
||
|
+++ b/libs/widgets/KoZoomController.cpp
|
||
|
@@ -22,7 +22,7 @@
|
||
|
|
||
|
void KoZoomController::Private::init(KoCanvasController *co,
|
||
|
KoZoomHandler *zh,
|
||
|
- KActionCollection *actionCollection)
|
||
|
+ KisKActionCollection *actionCollection)
|
||
|
{
|
||
|
canvasController = co;
|
||
|
fitMargin = co->margin();
|
||
|
@@ -43,7 +43,7 @@ void KoZoomController::Private::init(KoCanvasController *co,
|
||
|
connect(canvasController->proxyObject, SIGNAL(zoomRelative(qreal,QPointF)), parent, SLOT(requestZoomRelative(qreal,QPointF)) );
|
||
|
}
|
||
|
|
||
|
-KoZoomController::KoZoomController(KoCanvasController *co, KoZoomHandler *zh, KActionCollection *actionCollection, QObject *parent)
|
||
|
+KoZoomController::KoZoomController(KoCanvasController *co, KoZoomHandler *zh, KisKActionCollection *actionCollection, QObject *parent)
|
||
|
: QObject(parent),
|
||
|
d(new Private(this))
|
||
|
{
|
||
|
diff --git a/libs/widgets/KoZoomController.h b/libs/widgets/KoZoomController.h
|
||
|
index 3520d31385..5fdf186233 100644
|
||
|
--- a/libs/widgets/KoZoomController.h
|
||
|
+++ b/libs/widgets/KoZoomController.h
|
||
|
@@ -17,7 +17,7 @@
|
||
|
class KoCanvasController;
|
||
|
class KoZoomAction;
|
||
|
class KoZoomHandler;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class QSize;
|
||
|
|
||
|
|
||
|
@@ -57,7 +57,7 @@ public:
|
||
|
*/
|
||
|
KoZoomController(KoCanvasController *controller,
|
||
|
KoZoomHandler *zoomHandler,
|
||
|
- KActionCollection *actionCollection,
|
||
|
+ KisKActionCollection *actionCollection,
|
||
|
QObject *parent = 0);
|
||
|
|
||
|
/// destructor
|
||
|
diff --git a/libs/widgets/KoZoomController_p.h b/libs/widgets/KoZoomController_p.h
|
||
|
index a709902b19..1c6895563c 100644
|
||
|
--- a/libs/widgets/KoZoomController_p.h
|
||
|
+++ b/libs/widgets/KoZoomController_p.h
|
||
|
@@ -53,7 +53,7 @@ public:
|
||
|
|
||
|
void init(KoCanvasController *co,
|
||
|
KoZoomHandler *zh,
|
||
|
- KActionCollection *actionCollection);
|
||
|
+ KisKActionCollection *actionCollection);
|
||
|
|
||
|
KoCanvasController *canvasController;
|
||
|
KoZoomHandler *zoomHandler;
|
||
|
diff --git a/libs/widgets/tests/zoomcontroller_test.cpp b/libs/widgets/tests/zoomcontroller_test.cpp
|
||
|
index df8953d5d0..9e40c68635 100644
|
||
|
--- a/libs/widgets/tests/zoomcontroller_test.cpp
|
||
|
+++ b/libs/widgets/tests/zoomcontroller_test.cpp
|
||
|
@@ -19,7 +19,7 @@
|
||
|
void zoomcontroller_test::testApi()
|
||
|
{
|
||
|
KoZoomHandler zoomHandler;
|
||
|
- KoZoomController zoomController(new KoCanvasControllerWidget(0, 0), &zoomHandler, new KActionCollection(this));
|
||
|
+ KoZoomController zoomController(new KoCanvasControllerWidget(0, 0), &zoomHandler, new KisKActionCollection(this));
|
||
|
Q_UNUSED(zoomController);
|
||
|
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/KisActionsSnapshot.cpp b/libs/widgetutils/KisActionsSnapshot.cpp
|
||
|
index b0d26a91e7..efd46ea1da 100644
|
||
|
--- a/libs/widgetutils/KisActionsSnapshot.cpp
|
||
|
+++ b/libs/widgetutils/KisActionsSnapshot.cpp
|
||
|
@@ -16,7 +16,7 @@
|
||
|
|
||
|
struct KisActionsSnapshot::Private
|
||
|
{
|
||
|
- QMap<QString, KActionCollection*> actionCollections;
|
||
|
+ QMap<QString, KisKActionCollection*> actionCollections;
|
||
|
|
||
|
~Private() {
|
||
|
qDeleteAll(actionCollections);
|
||
|
@@ -59,17 +59,17 @@ void KisActionsSnapshot::addAction(const QString &name, QAction *action)
|
||
|
}
|
||
|
#endif /* ACTIONS_CHECKSUM_SANITY_CHECK */
|
||
|
|
||
|
- KActionCollection *collection = m_d->actionCollections[cat.componentName];
|
||
|
+ KisKActionCollection *collection = m_d->actionCollections[cat.componentName];
|
||
|
|
||
|
if (!collection) {
|
||
|
- collection = new KActionCollection(0, cat.componentName);
|
||
|
+ collection = new KisKActionCollection(0, cat.componentName);
|
||
|
m_d->actionCollections.insert(cat.componentName, collection);
|
||
|
}
|
||
|
|
||
|
collection->addCategorizedAction(name, action, cat.categoryName);
|
||
|
}
|
||
|
|
||
|
-QMap<QString, KActionCollection *> KisActionsSnapshot::actionCollections()
|
||
|
+QMap<QString, KisKActionCollection *> KisActionsSnapshot::actionCollections()
|
||
|
{
|
||
|
/**
|
||
|
* A small heuristics to show warnings only when unknown shortcuts appear
|
||
|
diff --git a/libs/widgetutils/KisActionsSnapshot.h b/libs/widgetutils/KisActionsSnapshot.h
|
||
|
index 18ec4cdf24..4d06cac12c 100644
|
||
|
--- a/libs/widgetutils/KisActionsSnapshot.h
|
||
|
+++ b/libs/widgetutils/KisActionsSnapshot.h
|
||
|
@@ -13,7 +13,7 @@
|
||
|
#include <QMap>
|
||
|
|
||
|
class QAction;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
|
||
|
|
||
|
/**
|
||
|
@@ -40,7 +40,7 @@ public:
|
||
|
* WARNING: the collections are owned by the snapshot! Don't destroy
|
||
|
* the snapshot before you are done with the collections!
|
||
|
*/
|
||
|
- QMap<QString, KActionCollection*> actionCollections();
|
||
|
+ QMap<QString, KisKActionCollection*> actionCollections();
|
||
|
|
||
|
private:
|
||
|
struct Private;
|
||
|
diff --git a/libs/widgetutils/config/kstandardaction.cpp b/libs/widgetutils/config/kstandardaction.cpp
|
||
|
index 3e7ddd3119..d6a53e57e7 100644
|
||
|
--- a/libs/widgetutils/config/kstandardaction.cpp
|
||
|
+++ b/libs/widgetutils/config/kstandardaction.cpp
|
||
|
@@ -179,7 +179,7 @@ QAction *create(StandardAction id, const QObject *recvr, const char *slot, QObje
|
||
|
|
||
|
QList<QKeySequence> cut = KStandardShortcut::shortcut(pInfo->idAccel);
|
||
|
if (!cut.isEmpty()) {
|
||
|
- // emulate KActionCollection::setDefaultShortcuts to allow the use of "configure shortcuts"
|
||
|
+ // emulate KisKActionCollection::setDefaultShortcuts to allow the use of "configure shortcuts"
|
||
|
pAction->setShortcuts(cut);
|
||
|
pAction->setProperty("defaultShortcuts", QVariant::fromValue(cut));
|
||
|
}
|
||
|
@@ -199,7 +199,7 @@ QAction *create(StandardAction id, const QObject *recvr, const char *slot, QObje
|
||
|
}
|
||
|
}
|
||
|
|
||
|
- if (pAction && parent && parent->inherits("KActionCollection")) {
|
||
|
+ if (pAction && parent && parent->inherits("KisKActionCollection")) {
|
||
|
QMetaObject::invokeMethod(parent, "addAction", Q_ARG(QString, pAction->objectName()), Q_ARG(QAction *, pAction));
|
||
|
}
|
||
|
|
||
|
@@ -471,7 +471,7 @@ static QAction *buildAutomaticAction(QObject *parent, StandardAction id, const c
|
||
|
action->setToolTip(i18n(p->psToolTip));
|
||
|
}
|
||
|
|
||
|
- if (parent && parent->inherits("KActionCollection")) {
|
||
|
+ if (parent && parent->inherits("KisKActionCollection")) {
|
||
|
QMetaObject::invokeMethod(parent, "addAction", Q_ARG(QString, action->objectName()), Q_ARG(QAction *, action));
|
||
|
}
|
||
|
|
||
|
@@ -509,7 +509,7 @@ KToggleAction *showMenubar(const QObject *recvr, const char *slot, QObject *pare
|
||
|
ret->setObjectName(name(ShowMenubar));
|
||
|
ret->setIcon(KisIconUtils::loadIcon("show-menu"));
|
||
|
|
||
|
- // emulate KActionCollection::setDefaultShortcuts to allow the use of "configure shortcuts"
|
||
|
+ // emulate KisKActionCollection::setDefaultShortcuts to allow the use of "configure shortcuts"
|
||
|
// This shortcut is dangerous and should not be enabled by default.
|
||
|
// ret->setShortcuts(KStandardShortcut::shortcut(KStandardShortcut::ShowMenubar));
|
||
|
// ret->setProperty("defaultShortcuts", QVariant::fromValue(KStandardShortcut::shortcut(KStandardShortcut::ShowMenubar)));
|
||
|
@@ -523,7 +523,7 @@ KToggleAction *showMenubar(const QObject *recvr, const char *slot, QObject *pare
|
||
|
QObject::connect(ret, SIGNAL(triggered(bool)), recvr, slot);
|
||
|
}
|
||
|
|
||
|
- if (parent && parent->inherits("KActionCollection")) {
|
||
|
+ if (parent && parent->inherits("KisKActionCollection")) {
|
||
|
QMetaObject::invokeMethod(parent, "addAction", Q_ARG(QString, ret->objectName()), Q_ARG(QAction *, ret));
|
||
|
}
|
||
|
|
||
|
@@ -544,7 +544,7 @@ KToggleAction *showStatusbar(const QObject *recvr, const char *slot, QObject *pa
|
||
|
QObject::connect(ret, SIGNAL(triggered(bool)), recvr, slot);
|
||
|
}
|
||
|
|
||
|
- if (parent && parent->inherits("KActionCollection")) {
|
||
|
+ if (parent && parent->inherits("KisKActionCollection")) {
|
||
|
QMetaObject::invokeMethod(parent, "addAction", Q_ARG(QString, ret->objectName()), Q_ARG(QAction *, ret));
|
||
|
}
|
||
|
|
||
|
diff --git a/libs/widgetutils/config/kstandardaction.h b/libs/widgetutils/config/kstandardaction.h
|
||
|
index d7d37e9b38..b8425cde44 100644
|
||
|
--- a/libs/widgetutils/config/kstandardaction.h
|
||
|
+++ b/libs/widgetutils/config/kstandardaction.h
|
||
|
@@ -265,7 +265,7 @@ KRITAWIDGETUTILS_EXPORT QAction *mail(const QObject *recvr, const char *slot, QO
|
||
|
*
|
||
|
* Note that you probably want to connect this action to either QWidget::close()
|
||
|
* or QApplication::closeAllWindows(), but not QApplication::quit(), so that
|
||
|
- * KMainWindow::queryClose() is called on any open window (to warn the user
|
||
|
+ * KisKMainWindow::queryClose() is called on any open window (to warn the user
|
||
|
* about unsaved changes for example).
|
||
|
*/
|
||
|
KRITAWIDGETUTILS_EXPORT QAction *quit(const QObject *recvr, const char *slot, QObject *parent);
|
||
|
@@ -526,7 +526,7 @@ KRITAWIDGETUTILS_EXPORT QAction *saveOptions(const QObject *recvr, const char *s
|
||
|
/**
|
||
|
* Display the configure key bindings dialog.
|
||
|
*
|
||
|
- * Note that you might be able to use the pre-built KXMLGUIFactory's function:
|
||
|
+ * Note that you might be able to use the pre-built KisKXMLGUIFactory's function:
|
||
|
* KStandardAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection());
|
||
|
*/
|
||
|
KRITAWIDGETUTILS_EXPORT QAction *keyBindings(const QObject *recvr, const char *slot, QObject *parent);
|
||
|
diff --git a/libs/widgetutils/katecommandbar.cpp b/libs/widgetutils/katecommandbar.cpp
|
||
|
index 0d38e26ea5..de79b99705 100644
|
||
|
--- a/libs/widgetutils/katecommandbar.cpp
|
||
|
+++ b/libs/widgetutils/katecommandbar.cpp
|
||
|
@@ -298,7 +298,7 @@ KateCommandBar::KateCommandBar(QWidget *parent)
|
||
|
setHidden(true);
|
||
|
}
|
||
|
|
||
|
-void KateCommandBar::updateBar(const QList<KActionCollection *> &actionCollections, int totalActions)
|
||
|
+void KateCommandBar::updateBar(const QList<KisKActionCollection *> &actionCollections, int totalActions)
|
||
|
{
|
||
|
qDeleteAll(m_disposableActionCollections);
|
||
|
m_disposableActionCollections.clear();
|
||
|
diff --git a/libs/widgetutils/katecommandbar.h b/libs/widgetutils/katecommandbar.h
|
||
|
index 0c4591d6c9..204ef3e6b9 100644
|
||
|
--- a/libs/widgetutils/katecommandbar.h
|
||
|
+++ b/libs/widgetutils/katecommandbar.h
|
||
|
@@ -11,7 +11,7 @@ class QLineEdit;
|
||
|
class CommandModel;
|
||
|
class QAction;
|
||
|
class CommandBarFilterModel;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
|
||
|
#include <kritawidgetutils_export.h>
|
||
|
|
||
|
@@ -21,7 +21,7 @@ class KRITAWIDGETUTILS_EXPORT KateCommandBar : public QMenu
|
||
|
public:
|
||
|
KateCommandBar(QWidget *parent = nullptr);
|
||
|
|
||
|
- void updateBar(const QList<KActionCollection *> &actions, int totalActions);
|
||
|
+ void updateBar(const QList<KisKActionCollection *> &actions, int totalActions);
|
||
|
|
||
|
void updateViewGeometry();
|
||
|
|
||
|
@@ -37,5 +37,5 @@ private:
|
||
|
QLineEdit *m_lineEdit;
|
||
|
CommandModel *m_model;
|
||
|
CommandBarFilterModel *m_proxyModel;
|
||
|
- QVector<KActionCollection *> m_disposableActionCollections;
|
||
|
+ QVector<KisKActionCollection *> m_disposableActionCollections;
|
||
|
};
|
||
|
diff --git a/libs/widgetutils/kis_action_registry.cpp b/libs/widgetutils/kis_action_registry.cpp
|
||
|
index c67ccde887..30c9703607 100644
|
||
|
--- a/libs/widgetutils/kis_action_registry.cpp
|
||
|
+++ b/libs/widgetutils/kis_action_registry.cpp
|
||
|
@@ -32,7 +32,7 @@ namespace {
|
||
|
* piece of information is a QDomElement, containing the raw data from the
|
||
|
* .action XML file. The second and third are QKeySequences, the first of
|
||
|
* which is the default shortcut, the last of which is any custom shortcut.
|
||
|
- * The last two are the KActionCollection and KActionCategory used to
|
||
|
+ * The last two are the KisKActionCollection and KisKActionCategory used to
|
||
|
* organize the shortcut editor.
|
||
|
*/
|
||
|
struct ActionInfoItem {
|
||
|
@@ -189,7 +189,7 @@ KisActionRegistry::KisActionRegistry()
|
||
|
{
|
||
|
KConfigGroup cg = KSharedConfig::openConfig()->group("Shortcut Schemes");
|
||
|
QString schemeName = cg.readEntry("Current Scheme", "Default");
|
||
|
- QString schemeFileName = KShortcutSchemesHelper::schemeFileLocations().value(schemeName);
|
||
|
+ QString schemeFileName = KisKShortcutSchemesHelper::schemeFileLocations().value(schemeName);
|
||
|
if (!QFileInfo(schemeFileName).exists()) {
|
||
|
schemeName = "Default";
|
||
|
}
|
||
|
@@ -223,7 +223,7 @@ void KisActionRegistry::loadShortcutScheme(const QString &schemeName)
|
||
|
{
|
||
|
// Load scheme file
|
||
|
if (schemeName != QStringLiteral("Default")) {
|
||
|
- QString schemeFileName = KShortcutSchemesHelper::schemeFileLocations().value(schemeName);
|
||
|
+ QString schemeFileName = KisKShortcutSchemesHelper::schemeFileLocations().value(schemeName);
|
||
|
if (schemeFileName.isEmpty() || !QFileInfo(schemeFileName).exists()) {
|
||
|
applyShortcutScheme();
|
||
|
return;
|
||
|
@@ -377,7 +377,7 @@ void KisActionRegistry::Private::loadActionFiles()
|
||
|
}
|
||
|
|
||
|
// Loop over <Actions> nodes. Each of these corresponds to a
|
||
|
- // KActionCategory, producing a group of actions in the shortcut dialog.
|
||
|
+ // KisKActionCategory, producing a group of actions in the shortcut dialog.
|
||
|
QDomElement actions = base.firstChild().toElement();
|
||
|
while (!actions.isNull()) {
|
||
|
|
||
|
diff --git a/libs/widgetutils/kis_action_registry.h b/libs/widgetutils/kis_action_registry.h
|
||
|
index 9ef8cae4a8..878d994df9 100644
|
||
|
--- a/libs/widgetutils/kis_action_registry.h
|
||
|
+++ b/libs/widgetutils/kis_action_registry.h
|
||
|
@@ -16,7 +16,7 @@
|
||
|
#include "kritawidgetutils_export.h"
|
||
|
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class QDomElement;
|
||
|
class KConfigBase;
|
||
|
class KisShortcutsDialog;
|
||
|
@@ -36,7 +36,7 @@ class KisShortcutsDialog;
|
||
|
* sort of data you wish to the .action configuration file.
|
||
|
*
|
||
|
* This class is also in charge of displaying the shortcut configuration dialog.
|
||
|
- * The interplay between this class, KActionCollection, KisShortcutsEditor and
|
||
|
+ * The interplay between this class, KisKActionCollection, KisShortcutsEditor and
|
||
|
* so on can be complex, and is sometimes synchronized by file I/O by reading
|
||
|
* and writing the configuration files mentioned above.
|
||
|
*
|
||
|
diff --git a/libs/widgetutils/xmlgui/KisShortcutEditWidget.cpp b/libs/widgetutils/xmlgui/KisShortcutEditWidget.cpp
|
||
|
index 6ab59b6266..e3542e1042 100644
|
||
|
--- a/libs/widgetutils/xmlgui/KisShortcutEditWidget.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/KisShortcutEditWidget.cpp
|
||
|
@@ -56,7 +56,7 @@ ShortcutEditWidget::ShortcutEditWidget(QWidget *viewport, const QKeySequence &de
|
||
|
m_defaultLabel->setText(defaultText);
|
||
|
|
||
|
m_customRadio = new QRadioButton(i18n("Custom:"), this);
|
||
|
- m_customEditor = new KKeySequenceWidget(this);
|
||
|
+ m_customEditor = new KisKKeySequenceWidget(this);
|
||
|
m_customEditor->setModifierlessAllowed(allowLetterShortcuts);
|
||
|
|
||
|
layout->addWidget(m_defaultRadio, 0, 0);
|
||
|
@@ -75,7 +75,7 @@ ShortcutEditWidget::ShortcutEditWidget(QWidget *viewport, const QKeySequence &de
|
||
|
this, SIGNAL(stealShortcut(QKeySequence,QAction*)));
|
||
|
}
|
||
|
|
||
|
-KKeySequenceWidget::ShortcutTypes ShortcutEditWidget::checkForConflictsAgainst() const
|
||
|
+KisKKeySequenceWidget::ShortcutTypes ShortcutEditWidget::checkForConflictsAgainst() const
|
||
|
{
|
||
|
return m_customEditor->checkForConflictsAgainst();
|
||
|
}
|
||
|
@@ -108,13 +108,13 @@ void ShortcutEditWidget::defaultToggled(bool checked)
|
||
|
}
|
||
|
|
||
|
void ShortcutEditWidget::setCheckActionCollections(
|
||
|
- const QList<KActionCollection *> checkActionCollections)
|
||
|
+ const QList<KisKActionCollection *> checkActionCollections)
|
||
|
{
|
||
|
- // We just forward them to out KKeySequenceWidget.
|
||
|
+ // We just forward them to out KisKKeySequenceWidget.
|
||
|
m_customEditor->setCheckActionCollections(checkActionCollections);
|
||
|
}
|
||
|
|
||
|
-void ShortcutEditWidget::setCheckForConflictsAgainst(KKeySequenceWidget::ShortcutTypes types)
|
||
|
+void ShortcutEditWidget::setCheckForConflictsAgainst(KisKKeySequenceWidget::ShortcutTypes types)
|
||
|
{
|
||
|
m_customEditor->setCheckForConflictsAgainst(types);
|
||
|
}
|
||
|
@@ -126,7 +126,7 @@ void ShortcutEditWidget::setComponentName(const QString componentName)
|
||
|
|
||
|
void ShortcutEditWidget::setMultiKeyShortcutsAllowed(bool allowed)
|
||
|
{
|
||
|
- // We just forward them to out KKeySequenceWidget.
|
||
|
+ // We just forward them to out KisKKeySequenceWidget.
|
||
|
m_customEditor->setMultiKeyShortcutsAllowed(allowed);
|
||
|
}
|
||
|
|
||
|
@@ -147,7 +147,7 @@ void ShortcutEditWidget::setCustom(const QKeySequence &seq)
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
- // seq is a const reference to a private variable of KKeySequenceWidget.
|
||
|
+ // seq is a const reference to a private variable of KisKKeySequenceWidget.
|
||
|
// Somewhere below we possible change that one. But we want to emit seq
|
||
|
// whatever happens. So we make a copy.
|
||
|
QKeySequence original = seq;
|
||
|
diff --git a/libs/widgetutils/xmlgui/KisShortcutsDialog.cpp b/libs/widgetutils/xmlgui/KisShortcutsDialog.cpp
|
||
|
index 70275a3c62..f3a7dea94b 100644
|
||
|
--- a/libs/widgetutils/xmlgui/KisShortcutsDialog.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/KisShortcutsDialog.cpp
|
||
|
@@ -47,7 +47,7 @@ KisShortcutsDialog::KisShortcutsDialog(KisShortcutsEditor::ActionTypes types,
|
||
|
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||
|
mainLayout->addWidget(d->m_shortcutsEditor);
|
||
|
QHBoxLayout *bottomLayout = new QHBoxLayout;
|
||
|
- d->m_schemeEditor = new KShortcutSchemesEditor(this);
|
||
|
+ d->m_schemeEditor = new KisKShortcutSchemesEditor(this);
|
||
|
connect(d->m_schemeEditor, SIGNAL(shortcutsSchemeChanged(QString)),
|
||
|
this, SLOT(changeShortcutScheme(QString)));
|
||
|
bottomLayout->addLayout(d->m_schemeEditor);
|
||
|
@@ -71,7 +71,7 @@ KisShortcutsDialog::~KisShortcutsDialog()
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-void KisShortcutsDialog::addCollection(KActionCollection *collection, const QString &title)
|
||
|
+void KisShortcutsDialog::addCollection(KisKActionCollection *collection, const QString &title)
|
||
|
{
|
||
|
d->m_shortcutsEditor->addCollection(collection, title);
|
||
|
d->m_collections.insert(title, collection);
|
||
|
@@ -83,7 +83,7 @@ void KisShortcutsDialog::save()
|
||
|
d->save();
|
||
|
}
|
||
|
|
||
|
-QList<KActionCollection *> KisShortcutsDialog::actionCollections() const
|
||
|
+QList<KisKActionCollection *> KisShortcutsDialog::actionCollections() const
|
||
|
{
|
||
|
return d->m_collections.values();
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/KisShortcutsDialog.h b/libs/widgetutils/xmlgui/KisShortcutsDialog.h
|
||
|
index ff907fa2d5..cb74bd8b3d 100644
|
||
|
--- a/libs/widgetutils/xmlgui/KisShortcutsDialog.h
|
||
|
+++ b/libs/widgetutils/xmlgui/KisShortcutsDialog.h
|
||
|
@@ -42,16 +42,16 @@
|
||
|
// KF5 XmlGui's kshortcutseditor.cpp to begin of KisShortcutsEditorItem.cpp
|
||
|
|
||
|
/**
|
||
|
- * @short Dialog for configuration of KActionCollection and KGlobalAccel.
|
||
|
+ * @short Dialog for configuration of KisKActionCollection and KGlobalAccel.
|
||
|
*
|
||
|
* The KisShortcutsDialog class is used for configuring dictionaries of
|
||
|
- * key/action associations for KActionCollection and KGlobalAccel. It uses the
|
||
|
+ * key/action associations for KisKActionCollection and KGlobalAccel. It uses the
|
||
|
* KShortcutsEditor widget and offers buttons to set all keys to defaults and
|
||
|
* invoke on-line help.
|
||
|
*
|
||
|
* Several static methods are supplied which provide the most convenient
|
||
|
* interface to the dialog. The most common and most encouraged use is with
|
||
|
- * KActionCollection.
|
||
|
+ * KisKActionCollection.
|
||
|
*
|
||
|
* \code
|
||
|
* KisShortcutsDialog::configure( actionCollection() );
|
||
|
@@ -115,12 +115,12 @@ public:
|
||
|
* @param collection the action collection.
|
||
|
* @param title the title associated with the collection.
|
||
|
*/
|
||
|
- void addCollection(KActionCollection *, const QString &title = QString());
|
||
|
+ void addCollection(KisKActionCollection *, const QString &title = QString());
|
||
|
|
||
|
/**
|
||
|
* @return the list of action collections that are available for configuration in the dialog.
|
||
|
*/
|
||
|
- QList<KActionCollection *> actionCollections() const;
|
||
|
+ QList<KisKActionCollection *> actionCollections() const;
|
||
|
|
||
|
/** @see QWidget::sizeHint() */
|
||
|
QSize sizeHint() const override;
|
||
|
diff --git a/libs/widgetutils/xmlgui/KisShortcutsDialog_p.h b/libs/widgetutils/xmlgui/KisShortcutsDialog_p.h
|
||
|
index 06491f3344..114a012e79 100644
|
||
|
--- a/libs/widgetutils/xmlgui/KisShortcutsDialog_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/KisShortcutsDialog_p.h
|
||
|
@@ -29,11 +29,11 @@ class QTreeWidget;
|
||
|
class QTreeWidgetItem;
|
||
|
class QRadioButton;
|
||
|
class QAction;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class QPushButton;
|
||
|
class QComboBox;
|
||
|
class KisShortcutsDialog;
|
||
|
-class KShortcutSchemesEditor;
|
||
|
+class KisKShortcutSchemesEditor;
|
||
|
class QAction;
|
||
|
|
||
|
|
||
|
@@ -78,15 +78,15 @@ public:
|
||
|
void undo();
|
||
|
void save();
|
||
|
|
||
|
- QHash<QString, KActionCollection *> m_collections;
|
||
|
+ QHash<QString, KisKActionCollection *> m_collections;
|
||
|
KisShortcutsDialog *q;
|
||
|
KisShortcutsEditor *m_shortcutsEditor {0};
|
||
|
- KShortcutSchemesEditor *m_schemeEditor{0};
|
||
|
+ KisKShortcutSchemesEditor *m_schemeEditor{0};
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
- * Mixes the KShortcutWidget into the treeview used by KisShortcutsEditor. When
|
||
|
+ * Mixes the KisKShortcutWidget into the treeview used by KisShortcutsEditor. When
|
||
|
* selecting an shortcut it changes the display from "CTRL-W" to the Widget.
|
||
|
*
|
||
|
* @bug That delegate uses KExtendableItemDelegate. That means a cell can be
|
||
|
@@ -113,9 +113,9 @@ public:
|
||
|
* Set a list of action collections to check against for conflicting
|
||
|
* shortcuts.
|
||
|
*
|
||
|
- * @see KKeySequenceWidget::setCheckActionCollections
|
||
|
+ * @see KisKKeySequenceWidget::setCheckActionCollections
|
||
|
*/
|
||
|
- void setCheckActionCollections(const QList<KActionCollection *> checkActionCollections);
|
||
|
+ void setCheckActionCollections(const QList<KisKActionCollection *> checkActionCollections);
|
||
|
bool eventFilter(QObject *, QEvent *) override;
|
||
|
private:
|
||
|
mutable QPersistentModelIndex m_editingIndex;
|
||
|
@@ -123,7 +123,7 @@ private:
|
||
|
QWidget *m_editor;
|
||
|
|
||
|
//! List of actionCollections to check for conflicts.
|
||
|
- QList<KActionCollection *> m_checkActionCollections;
|
||
|
+ QList<KisKActionCollection *> m_checkActionCollections;
|
||
|
|
||
|
|
||
|
Q_SIGNALS:
|
||
|
@@ -169,22 +169,22 @@ public:
|
||
|
ShortcutEditWidget(QWidget *viewport, const QKeySequence &defaultSeq, const QKeySequence &activeSeq,
|
||
|
bool allowLetterShortcuts);
|
||
|
|
||
|
- //! @see KKeySequenceWidget::setCheckActionCollections()
|
||
|
- void setCheckActionCollections(const QList<KActionCollection *> checkActionCollections);
|
||
|
+ //! @see KisKKeySequenceWidget::setCheckActionCollections()
|
||
|
+ void setCheckActionCollections(const QList<KisKActionCollection *> checkActionCollections);
|
||
|
|
||
|
//@{
|
||
|
- //! @see KKeySequenceWidget::checkAgainstStandardShortcuts()
|
||
|
- KKeySequenceWidget::ShortcutTypes checkForConflictsAgainst() const;
|
||
|
- void setCheckForConflictsAgainst(KKeySequenceWidget::ShortcutTypes);
|
||
|
+ //! @see KisKKeySequenceWidget::checkAgainstStandardShortcuts()
|
||
|
+ KisKKeySequenceWidget::ShortcutTypes checkForConflictsAgainst() const;
|
||
|
+ void setCheckForConflictsAgainst(KisKKeySequenceWidget::ShortcutTypes);
|
||
|
//@}
|
||
|
|
||
|
//@{
|
||
|
- //! @see KKeySequenceWidget::checkAgainstStandardShortcuts()
|
||
|
+ //! @see KisKKeySequenceWidget::checkAgainstStandardShortcuts()
|
||
|
bool multiKeyShortcutsAllowed() const;
|
||
|
void setMultiKeyShortcutsAllowed(bool);
|
||
|
//@}
|
||
|
|
||
|
- //! @see KKeySequenceWidget::setComponentName
|
||
|
+ //! @see KisKKeySequenceWidget::setComponentName
|
||
|
void setComponentName(const QString componentName);
|
||
|
|
||
|
void setAction(QObject *action);
|
||
|
@@ -195,7 +195,7 @@ Q_SIGNALS:
|
||
|
//! Emitted when the key sequence is changed.
|
||
|
void keySequenceChanged(const QKeySequence &);
|
||
|
|
||
|
- //! @see KKeySequenceWidget::stealShortcut()
|
||
|
+ //! @see KisKKeySequenceWidget::stealShortcut()
|
||
|
void stealShortcut(const QKeySequence &seq, QAction *action);
|
||
|
|
||
|
|
||
|
@@ -214,7 +214,7 @@ private:
|
||
|
QKeySequence m_defaultKeySequence;
|
||
|
QRadioButton *m_defaultRadio;
|
||
|
QRadioButton *m_customRadio;
|
||
|
- KKeySequenceWidget *m_customEditor;
|
||
|
+ KisKKeySequenceWidget *m_customEditor;
|
||
|
bool m_isUpdating;
|
||
|
QObject *m_action;
|
||
|
};
|
||
|
diff --git a/libs/widgetutils/xmlgui/KisShortcutsEditor.cpp b/libs/widgetutils/xmlgui/KisShortcutsEditor.cpp
|
||
|
index 05d77d5af8..e62e135d7f 100644
|
||
|
--- a/libs/widgetutils/xmlgui/KisShortcutsEditor.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/KisShortcutsEditor.cpp
|
||
|
@@ -85,7 +85,7 @@ void KisShortcutsEditor::clearSearch()
|
||
|
}
|
||
|
|
||
|
|
||
|
-void KisShortcutsEditor::addCollection(KActionCollection *collection, const QString &title)
|
||
|
+void KisShortcutsEditor::addCollection(KisKActionCollection *collection, const QString &title)
|
||
|
{
|
||
|
// KXmlGui add action collections unconditionally. If some plugin doesn't
|
||
|
// provide actions we don't want to create empty subgroups.
|
||
|
@@ -127,9 +127,9 @@ void KisShortcutsEditor::addCollection(KActionCollection *collection, const QStr
|
||
|
QSet<QAction *> actionsSeen;
|
||
|
|
||
|
// Add a subtree for each category? Perhaps easier to think that this
|
||
|
- // doesn't exist. Basically you add KActionCategory as a QObject child of
|
||
|
- // KActionCollection, and then tag objects as belonging to the category.
|
||
|
- foreach (KActionCategory *category, collection->categories()) {
|
||
|
+ // doesn't exist. Basically you add KisKActionCategory as a QObject child of
|
||
|
+ // KisKActionCollection, and then tag objects as belonging to the category.
|
||
|
+ foreach (KisKActionCategory *category, collection->categories()) {
|
||
|
|
||
|
// Don't display empty categories.
|
||
|
if (category->actions().isEmpty()) {
|
||
|
@@ -145,7 +145,7 @@ void KisShortcutsEditor::addCollection(KActionCollection *collection, const QStr
|
||
|
d->addAction(action, hierarchy, KisShortcutsEditorPrivate::Action);
|
||
|
}
|
||
|
|
||
|
- // Fold in each KActionCategory by default.
|
||
|
+ // Fold in each KisKActionCategory by default.
|
||
|
hierarchy[KisShortcutsEditorPrivate::Action]->setExpanded(false);
|
||
|
|
||
|
}
|
||
|
@@ -210,7 +210,7 @@ void KisShortcutsEditor::exportConfiguration(KConfigBase *config) const
|
||
|
|
||
|
if (d->actionTypes) {
|
||
|
KConfigGroup group(config,QStringLiteral("Shortcuts"));
|
||
|
- foreach (KActionCollection *collection, d->actionCollections) {
|
||
|
+ foreach (KisKActionCollection *collection, d->actionCollections) {
|
||
|
collection->writeSettings(&group, true);
|
||
|
}
|
||
|
}
|
||
|
@@ -230,7 +230,7 @@ void KisShortcutsEditor::saveShortcuts(KConfigGroup *config) const
|
||
|
|
||
|
// Clear and reset temporary shortcuts
|
||
|
config->deleteGroup();
|
||
|
- foreach (KActionCollection *collection, d->actionCollections) {
|
||
|
+ foreach (KisKActionCollection *collection, d->actionCollections) {
|
||
|
collection->writeSettings(config, false);
|
||
|
}
|
||
|
|
||
|
diff --git a/libs/widgetutils/xmlgui/KisShortcutsEditor.h b/libs/widgetutils/xmlgui/KisShortcutsEditor.h
|
||
|
index aff633c95c..de627dcbf4 100644
|
||
|
--- a/libs/widgetutils/xmlgui/KisShortcutsEditor.h
|
||
|
+++ b/libs/widgetutils/xmlgui/KisShortcutsEditor.h
|
||
|
@@ -19,7 +19,7 @@
|
||
|
#include <QWidget>
|
||
|
#include <KisKineticScroller.h>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class KConfig;
|
||
|
class KConfigBase;
|
||
|
class KConfigGroup;
|
||
|
@@ -132,7 +132,7 @@ public:
|
||
|
* @param collection the action collection.
|
||
|
* @param title subtree title of this collection of shortcut.
|
||
|
*/
|
||
|
- void addCollection(KActionCollection *, const QString &title = QString());
|
||
|
+ void addCollection(KisKActionCollection *, const QString &title = QString());
|
||
|
|
||
|
/**
|
||
|
* Undo all change made since the last commit().
|
||
|
@@ -143,7 +143,7 @@ public:
|
||
|
* Save the changes.
|
||
|
*
|
||
|
* Before saving the changes are committed. This saves the actions to disk.
|
||
|
- * Any KActionCollection objects with the xmlFile() value set will be
|
||
|
+ * Any KisKActionCollection objects with the xmlFile() value set will be
|
||
|
* written to an XML file. All other will be written to the application's
|
||
|
* rc file.
|
||
|
*/
|
||
|
diff --git a/libs/widgetutils/xmlgui/KisShortcutsEditorDelegate.cpp b/libs/widgetutils/xmlgui/KisShortcutsEditorDelegate.cpp
|
||
|
index ade65a0637..d032fb1341 100644
|
||
|
--- a/libs/widgetutils/xmlgui/KisShortcutsEditorDelegate.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/KisShortcutsEditorDelegate.cpp
|
||
|
@@ -282,7 +282,7 @@ void KisShortcutsEditorDelegate::keySequenceChanged(const QKeySequence &seq)
|
||
|
}
|
||
|
|
||
|
void KisShortcutsEditorDelegate::setCheckActionCollections(
|
||
|
- const QList<KActionCollection *> checkActionCollections)
|
||
|
+ const QList<KisKActionCollection *> checkActionCollections)
|
||
|
{
|
||
|
m_checkActionCollections = checkActionCollections;
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/KisShortcutsEditor_p.cpp b/libs/widgetutils/xmlgui/KisShortcutsEditor_p.cpp
|
||
|
index e6bfbe7ebf..6522deb3b1 100644
|
||
|
--- a/libs/widgetutils/xmlgui/KisShortcutsEditor_p.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/KisShortcutsEditor_p.cpp
|
||
|
@@ -184,7 +184,7 @@ void KisShortcutsEditorPrivate::capturedShortcut(const QVariant &newShortcut, co
|
||
|
|
||
|
void KisShortcutsEditorPrivate::changeKeyShortcut(KisShortcutsEditorItem *item, uint column, const QKeySequence &capture)
|
||
|
{
|
||
|
- // The keySequence we get is cleared by KKeySequenceWidget. No conflicts.
|
||
|
+ // The keySequence we get is cleared by KisKKeySequenceWidget. No conflicts.
|
||
|
if (capture == item->keySequence(column)) {
|
||
|
return;
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/KisShortcutsEditor_p.h b/libs/widgetutils/xmlgui/KisShortcutsEditor_p.h
|
||
|
index a81df07d48..9361aa24e3 100644
|
||
|
--- a/libs/widgetutils/xmlgui/KisShortcutsEditor_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/KisShortcutsEditor_p.h
|
||
|
@@ -82,7 +82,7 @@ public:
|
||
|
public:
|
||
|
|
||
|
// Members
|
||
|
- QList<KActionCollection *> actionCollections;
|
||
|
+ QList<KisKActionCollection *> actionCollections;
|
||
|
KisShortcutsEditor *q;
|
||
|
|
||
|
Ui::KisShortcutsDialog ui;
|
||
|
diff --git a/libs/widgetutils/xmlgui/kaboutkdedialog_p.cpp b/libs/widgetutils/xmlgui/kaboutkdedialog_p.cpp
|
||
|
index 1c8bbd81c5..e3cf702881 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kaboutkdedialog_p.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kaboutkdedialog_p.cpp
|
||
|
@@ -26,7 +26,7 @@
|
||
|
namespace KDEPrivate
|
||
|
{
|
||
|
|
||
|
-KAboutKdeDialog::KAboutKdeDialog(QWidget *parent)
|
||
|
+KisKAboutKdeDialog::KisKAboutKdeDialog(QWidget *parent)
|
||
|
: QDialog(parent),
|
||
|
d(0)
|
||
|
{
|
||
|
diff --git a/libs/widgetutils/xmlgui/kaboutkdedialog_p.h b/libs/widgetutils/xmlgui/kaboutkdedialog_p.h
|
||
|
index 8136b2eb6b..37b3f07b19 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kaboutkdedialog_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kaboutkdedialog_p.h
|
||
|
@@ -19,35 +19,35 @@ namespace KDEPrivate
|
||
|
* @short Standard "About KDE" dialog box
|
||
|
*
|
||
|
* This class provides the standard "About KDE" dialog box that is used
|
||
|
- * in KHelpMenu. Normally you should not use this class directly, but
|
||
|
- * rather the KHelpMenu class or even better just subclass your
|
||
|
- * toplevel window from KMainWindow. If you do the latter, the help
|
||
|
+ * in KisKHelpMenu. Normally you should not use this class directly, but
|
||
|
+ * rather the KisKHelpMenu class or even better just subclass your
|
||
|
+ * toplevel window from KisKMainWindow. If you do the latter, the help
|
||
|
* menu and thereby this dialog box is available through the
|
||
|
- * KMainWindow::helpMenu() function.
|
||
|
+ * KisKMainWindow::helpMenu() function.
|
||
|
*
|
||
|
* @author Urs Wolfer uwolfer @ kde.org
|
||
|
* @internal
|
||
|
*/
|
||
|
|
||
|
-class KAboutKdeDialog : public QDialog
|
||
|
+class KisKAboutKdeDialog : public QDialog
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
/**
|
||
|
* Constructor. Creates a fully featured "About KDE" dialog box.
|
||
|
- * Note that this dialog is made modeless in the KHelpMenu class so
|
||
|
+ * Note that this dialog is made modeless in the KisKHelpMenu class so
|
||
|
* the users may expect a modeless dialog.
|
||
|
*
|
||
|
* @param parent The parent of the dialog box. You should use the
|
||
|
* toplevel window so that the dialog becomes centered.
|
||
|
*/
|
||
|
- explicit KAboutKdeDialog(QWidget *parent = 0);
|
||
|
+ explicit KisKAboutKdeDialog(QWidget *parent = 0);
|
||
|
|
||
|
private:
|
||
|
class Private;
|
||
|
Private *const d;
|
||
|
- Q_DISABLE_COPY(KAboutKdeDialog)
|
||
|
+ Q_DISABLE_COPY(KisKAboutKdeDialog)
|
||
|
};
|
||
|
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/kactioncategory.cpp b/libs/widgetutils/xmlgui/kactioncategory.cpp
|
||
|
index b31b6b45b0..d56045aa22 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kactioncategory.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kactioncategory.cpp
|
||
|
@@ -8,12 +8,12 @@
|
||
|
#include <QAction>
|
||
|
#include "kstandardaction.h"
|
||
|
|
||
|
-struct KActionCategoryPrivate {
|
||
|
+struct KisKActionCategoryPrivate {
|
||
|
|
||
|
- KActionCategoryPrivate(KActionCategory *host);
|
||
|
+ KisKActionCategoryPrivate(KisKActionCategory *host);
|
||
|
|
||
|
//! Our host
|
||
|
- KActionCategory *q;
|
||
|
+ KisKActionCategory *q;
|
||
|
|
||
|
//! The text for this category
|
||
|
QString text;
|
||
|
@@ -21,33 +21,33 @@ struct KActionCategoryPrivate {
|
||
|
//! List of actions
|
||
|
QList<QAction *> actions;
|
||
|
|
||
|
-}; // class KActionCategoryPrivate
|
||
|
+}; // class KisKActionCategoryPrivate
|
||
|
|
||
|
-KActionCategory::KActionCategory(const QString &text, KActionCollection *parent)
|
||
|
+KisKActionCategory::KisKActionCategory(const QString &text, KisKActionCollection *parent)
|
||
|
: QObject(parent)
|
||
|
- , d(new KActionCategoryPrivate(this))
|
||
|
+ , d(new KisKActionCategoryPrivate(this))
|
||
|
{
|
||
|
d->text = text;
|
||
|
}
|
||
|
|
||
|
-KActionCategory::~KActionCategory()
|
||
|
+KisKActionCategory::~KisKActionCategory()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-const QList<QAction *> KActionCategory::actions() const
|
||
|
+const QList<QAction *> KisKActionCategory::actions() const
|
||
|
{
|
||
|
return d->actions;
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCategory::addAction(const QString &name, QAction *action)
|
||
|
+QAction *KisKActionCategory::addAction(const QString &name, QAction *action)
|
||
|
{
|
||
|
collection()->addAction(name, action);
|
||
|
addAction(action);
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCategory::addAction(
|
||
|
+QAction *KisKActionCategory::addAction(
|
||
|
KStandardAction::StandardAction actionType,
|
||
|
const QObject *receiver,
|
||
|
const char *member)
|
||
|
@@ -57,7 +57,7 @@ QAction *KActionCategory::addAction(
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCategory::addAction(
|
||
|
+QAction *KisKActionCategory::addAction(
|
||
|
KStandardAction::StandardAction actionType,
|
||
|
const QString &name,
|
||
|
const QObject *receiver,
|
||
|
@@ -68,7 +68,7 @@ QAction *KActionCategory::addAction(
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCategory::addAction(
|
||
|
+QAction *KisKActionCategory::addAction(
|
||
|
const QString &name,
|
||
|
const QObject *receiver,
|
||
|
const char *member)
|
||
|
@@ -78,7 +78,7 @@ QAction *KActionCategory::addAction(
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-void KActionCategory::addAction(QAction *action)
|
||
|
+void KisKActionCategory::addAction(QAction *action)
|
||
|
{
|
||
|
// Only add the action if wasn't added earlier.
|
||
|
if (!d->actions.contains(action)) {
|
||
|
@@ -86,25 +86,25 @@ void KActionCategory::addAction(QAction *action)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-KActionCollection *KActionCategory::collection() const
|
||
|
+KisKActionCollection *KisKActionCategory::collection() const
|
||
|
{
|
||
|
- return qobject_cast<KActionCollection *>(parent());
|
||
|
+ return qobject_cast<KisKActionCollection *>(parent());
|
||
|
}
|
||
|
|
||
|
-QString KActionCategory::text() const
|
||
|
+QString KisKActionCategory::text() const
|
||
|
{
|
||
|
return d->text;
|
||
|
}
|
||
|
|
||
|
-void KActionCategory::setText(const QString &text)
|
||
|
+void KisKActionCategory::setText(const QString &text)
|
||
|
{
|
||
|
d->text = text;
|
||
|
}
|
||
|
|
||
|
-void KActionCategory::unlistAction(QAction *action)
|
||
|
+void KisKActionCategory::unlistAction(QAction *action)
|
||
|
{
|
||
|
// ATTENTION:
|
||
|
- // This method is called from KActionCollection with an QObject formerly
|
||
|
+ // This method is called from KisKActionCollection with an QObject formerly
|
||
|
// known as a QAction during _k_actionDestroyed(). So don't do fancy stuff
|
||
|
// here that needs a real QAction!
|
||
|
|
||
|
@@ -120,7 +120,7 @@ void KActionCategory::unlistAction(QAction *action)
|
||
|
d->actions.takeAt(index);
|
||
|
}
|
||
|
|
||
|
-KActionCategoryPrivate::KActionCategoryPrivate(KActionCategory *host)
|
||
|
+KisKActionCategoryPrivate::KisKActionCategoryPrivate(KisKActionCategory *host)
|
||
|
: q(host)
|
||
|
{}
|
||
|
|
||
|
diff --git a/libs/widgetutils/xmlgui/kactioncategory.h b/libs/widgetutils/xmlgui/kactioncategory.h
|
||
|
index e908689d1a..12b6881198 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kactioncategory.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kactioncategory.h
|
||
|
@@ -17,14 +17,14 @@
|
||
|
#include <kstandardaction.h>
|
||
|
#include "kactioncollection.h"
|
||
|
|
||
|
-struct KActionCategoryPrivate;
|
||
|
+struct KisKActionCategoryPrivate;
|
||
|
|
||
|
class QAction;
|
||
|
|
||
|
/**
|
||
|
* Categorize actions for KShortcutsEditor.
|
||
|
*
|
||
|
- * KActionCategory provides a second level to organize the actions in
|
||
|
+ * KisKActionCategory provides a second level to organize the actions in
|
||
|
* KShortcutsEditor.
|
||
|
*
|
||
|
* The first possibility is using more than one action collection. Each
|
||
|
@@ -39,7 +39,7 @@ class QAction;
|
||
|
* + second action
|
||
|
* + third action
|
||
|
*
|
||
|
- * Using KActionCategory it's possible to group the actions of one collection.
|
||
|
+ * Using KisKActionCategory it's possible to group the actions of one collection.
|
||
|
* + action collection 1
|
||
|
* + first action
|
||
|
* + first category
|
||
|
@@ -52,14 +52,14 @@ class QAction;
|
||
|
* The usage is analog to action collections. Just create a category and use
|
||
|
* it instead of the collection to create the actions.
|
||
|
*
|
||
|
- * The synchronization between KActionCollection and KActionCategory is done
|
||
|
+ * The synchronization between KisKActionCollection and KisKActionCategory is done
|
||
|
* internally. There is for example no need to remove actions from a category.
|
||
|
* It is done implicitly if the action is removed from the associated
|
||
|
* collection.
|
||
|
*
|
||
|
* \code
|
||
|
*
|
||
|
- * KActionCategory *file = new KActionCategory(i18n("File"), actionCollection());
|
||
|
+ * KisKActionCategory *file = new KisKActionCategory(i18n("File"), actionCollection());
|
||
|
* file->addAction(
|
||
|
* KStandardAction::New, //< see KStandardAction
|
||
|
* this, //< Receiver
|
||
|
@@ -67,7 +67,7 @@ class QAction;
|
||
|
*
|
||
|
* ... more actions added to file ...
|
||
|
*
|
||
|
- * KActionCategory *edit = new KActionCategory(i18n("Edit"), actionCollection());
|
||
|
+ * KisKActionCategory *edit = new KisKActionCategory(i18n("Edit"), actionCollection());
|
||
|
* edit->addAction(
|
||
|
* KStandardAction::Copy, //< see KStandardAction
|
||
|
* this, //< Receiver
|
||
|
@@ -77,7 +77,7 @@ class QAction;
|
||
|
*
|
||
|
* \endcode
|
||
|
*/
|
||
|
-class KRITAWIDGETUTILS_EXPORT KActionCategory : public QObject
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKActionCategory : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
@@ -88,12 +88,12 @@ public:
|
||
|
/**
|
||
|
* Default constructor
|
||
|
*/
|
||
|
- explicit KActionCategory(const QString &text, KActionCollection *parent = 0);
|
||
|
+ explicit KisKActionCategory(const QString &text, KisKActionCollection *parent = 0);
|
||
|
|
||
|
/**
|
||
|
* Destructor
|
||
|
*/
|
||
|
- ~KActionCategory() override;
|
||
|
+ ~KisKActionCategory() override;
|
||
|
|
||
|
/**
|
||
|
* \name Adding Actions
|
||
|
@@ -101,7 +101,7 @@ public:
|
||
|
* Add a action to the category.
|
||
|
*
|
||
|
* This methods are provided for your convenience. They call the
|
||
|
- * corresponding method of KActionCollection.
|
||
|
+ * corresponding method of KisKActionCollection.
|
||
|
*/
|
||
|
//@{
|
||
|
QAction *addAction(const QString &name, QAction *action);
|
||
|
@@ -141,7 +141,7 @@ public:
|
||
|
/**
|
||
|
* The action collection this category is associated with.
|
||
|
*/
|
||
|
- KActionCollection *collection() const;
|
||
|
+ KisKActionCollection *collection() const;
|
||
|
|
||
|
/**
|
||
|
* The action categorys descriptive text
|
||
|
@@ -165,11 +165,11 @@ private:
|
||
|
*/
|
||
|
void addAction(QAction *action);
|
||
|
|
||
|
- //! KActionCollection needs access to some of our helper methods
|
||
|
- friend class KActionCollectionPrivate;
|
||
|
+ //! KisKActionCollection needs access to some of our helper methods
|
||
|
+ friend class KisKActionCollectionPrivate;
|
||
|
|
||
|
//! Implementation details
|
||
|
- KActionCategoryPrivate *const d;
|
||
|
+ KisKActionCategoryPrivate *const d;
|
||
|
};
|
||
|
|
||
|
#endif /* #ifndef KACTIONCATEGORY_H */
|
||
|
diff --git a/libs/widgetutils/xmlgui/kactioncollection.cpp b/libs/widgetutils/xmlgui/kactioncollection.cpp
|
||
|
index 79a0518ba0..d188f16a30 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kactioncollection.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kactioncollection.cpp
|
||
|
@@ -37,10 +37,10 @@
|
||
|
# define authorizeAction authorizeKAction
|
||
|
#endif
|
||
|
|
||
|
-class KActionCollectionPrivate
|
||
|
+class KisKActionCollectionPrivate
|
||
|
{
|
||
|
public:
|
||
|
- KActionCollectionPrivate()
|
||
|
+ KisKActionCollectionPrivate()
|
||
|
: m_parentGUIClient(0L),
|
||
|
configGroup(QStringLiteral("Shortcuts")),
|
||
|
connectTriggered(false),
|
||
|
@@ -55,12 +55,12 @@ public:
|
||
|
Q_UNUSED(action);
|
||
|
}
|
||
|
|
||
|
- static QList<KActionCollection *> s_allCollections;
|
||
|
+ static QList<KisKActionCollection *> s_allCollections;
|
||
|
|
||
|
void _k_associatedWidgetDestroyed(QObject *obj);
|
||
|
void _k_actionDestroyed(QObject *obj);
|
||
|
|
||
|
- bool writeKXMLGUIConfigFile();
|
||
|
+ bool writeKisKXMLGUIConfigFile();
|
||
|
|
||
|
QString m_componentName;
|
||
|
QString m_componentDisplayName;
|
||
|
@@ -72,7 +72,7 @@ public:
|
||
|
QMap<QString, QAction *> actionByName;
|
||
|
QList<QAction *> actions;
|
||
|
|
||
|
- const KXMLGUIClient *m_parentGUIClient;
|
||
|
+ const KisKXMLGUIClient *m_parentGUIClient;
|
||
|
|
||
|
QString configGroup;
|
||
|
bool configIsGlobal : 1;
|
||
|
@@ -80,70 +80,70 @@ public:
|
||
|
bool connectTriggered : 1;
|
||
|
bool connectHovered : 1;
|
||
|
|
||
|
- KActionCollection *q;
|
||
|
+ KisKActionCollection *q;
|
||
|
|
||
|
QList<QWidget *> associatedWidgets;
|
||
|
};
|
||
|
|
||
|
-QList<KActionCollection *> KActionCollectionPrivate::s_allCollections;
|
||
|
+QList<KisKActionCollection *> KisKActionCollectionPrivate::s_allCollections;
|
||
|
|
||
|
-KActionCollection::KActionCollection(QObject *parent, const QString &cName)
|
||
|
+KisKActionCollection::KisKActionCollection(QObject *parent, const QString &cName)
|
||
|
: QObject(parent)
|
||
|
- , d(new KActionCollectionPrivate)
|
||
|
+ , d(new KisKActionCollectionPrivate)
|
||
|
{
|
||
|
d->q = this;
|
||
|
- KActionCollectionPrivate::s_allCollections.append(this);
|
||
|
+ KisKActionCollectionPrivate::s_allCollections.append(this);
|
||
|
|
||
|
setComponentName(cName);
|
||
|
}
|
||
|
|
||
|
-KActionCollection::KActionCollection(const KXMLGUIClient *parent)
|
||
|
+KisKActionCollection::KisKActionCollection(const KisKXMLGUIClient *parent)
|
||
|
: QObject(0)
|
||
|
- , d(new KActionCollectionPrivate)
|
||
|
+ , d(new KisKActionCollectionPrivate)
|
||
|
{
|
||
|
d->q = this;
|
||
|
- KActionCollectionPrivate::s_allCollections.append(this);
|
||
|
+ KisKActionCollectionPrivate::s_allCollections.append(this);
|
||
|
|
||
|
d->m_parentGUIClient = parent;
|
||
|
d->m_componentName = parent->componentName();
|
||
|
}
|
||
|
|
||
|
-KActionCollection::~KActionCollection()
|
||
|
+KisKActionCollection::~KisKActionCollection()
|
||
|
{
|
||
|
- KActionCollectionPrivate::s_allCollections.removeAll(this);
|
||
|
+ KisKActionCollectionPrivate::s_allCollections.removeAll(this);
|
||
|
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
|
||
|
-QList<KActionCategory *> KActionCollection::categories() const
|
||
|
+QList<KisKActionCategory *> KisKActionCollection::categories() const
|
||
|
{
|
||
|
- return this->findChildren<KActionCategory *>();
|
||
|
+ return this->findChildren<KisKActionCategory *>();
|
||
|
}
|
||
|
|
||
|
-KActionCategory *KActionCollection::getCategory(const QString &name) {
|
||
|
- KActionCategory *category = 0;
|
||
|
- foreach (KActionCategory *c, categories()) {
|
||
|
+KisKActionCategory *KisKActionCollection::getCategory(const QString &name) {
|
||
|
+ KisKActionCategory *category = 0;
|
||
|
+ foreach (KisKActionCategory *c, categories()) {
|
||
|
if (c->text() == name) {
|
||
|
category = c;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if (category == 0) {
|
||
|
- category = new KActionCategory(name, this);
|
||
|
+ category = new KisKActionCategory(name, this);
|
||
|
}
|
||
|
return category;
|
||
|
}
|
||
|
|
||
|
|
||
|
-void KActionCollection::clear()
|
||
|
+void KisKActionCollection::clear()
|
||
|
{
|
||
|
d->actionByName.clear();
|
||
|
qDeleteAll(d->actions);
|
||
|
d->actions.clear();
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCollection::action(const QString &name) const
|
||
|
+QAction *KisKActionCollection::action(const QString &name) const
|
||
|
{
|
||
|
QAction *action = 0L;
|
||
|
|
||
|
@@ -154,23 +154,23 @@ QAction *KActionCollection::action(const QString &name) const
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCollection::action(int index) const
|
||
|
+QAction *KisKActionCollection::action(int index) const
|
||
|
{
|
||
|
// ### investigate if any apps use this at all
|
||
|
return actions().value(index);
|
||
|
}
|
||
|
|
||
|
-int KActionCollection::count() const
|
||
|
+int KisKActionCollection::count() const
|
||
|
{
|
||
|
return d->actions.count();
|
||
|
}
|
||
|
|
||
|
-bool KActionCollection::isEmpty() const
|
||
|
+bool KisKActionCollection::isEmpty() const
|
||
|
{
|
||
|
return count() == 0;
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::setComponentName(const QString &cName)
|
||
|
+void KisKActionCollection::setComponentName(const QString &cName)
|
||
|
{
|
||
|
if (count() > 0) {
|
||
|
// Its component name is part of an action's signature in the context of
|
||
|
@@ -179,7 +179,7 @@ void KActionCollection::setComponentName(const QString &cName)
|
||
|
// As of now this only matters for global shortcuts. We could
|
||
|
// thus relax the requirement and only refuse to change the component data
|
||
|
// if we have actions with global shortcuts in this collection.
|
||
|
- qWarning() << "this does not work on a KActionCollection containing actions!";
|
||
|
+ qWarning() << "this does not work on a KisKActionCollection containing actions!";
|
||
|
}
|
||
|
|
||
|
if (!cName.isEmpty()) {
|
||
|
@@ -189,17 +189,17 @@ void KActionCollection::setComponentName(const QString &cName)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-QString KActionCollection::componentName() const
|
||
|
+QString KisKActionCollection::componentName() const
|
||
|
{
|
||
|
return d->m_componentName;
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::setComponentDisplayName(const QString &displayName)
|
||
|
+void KisKActionCollection::setComponentDisplayName(const QString &displayName)
|
||
|
{
|
||
|
d->m_componentDisplayName = displayName;
|
||
|
}
|
||
|
|
||
|
-QString KActionCollection::componentDisplayName() const
|
||
|
+QString KisKActionCollection::componentDisplayName() const
|
||
|
{
|
||
|
if (!d->m_componentDisplayName.isEmpty()) {
|
||
|
return d->m_componentDisplayName;
|
||
|
@@ -210,17 +210,17 @@ QString KActionCollection::componentDisplayName() const
|
||
|
return QCoreApplication::applicationName();
|
||
|
}
|
||
|
|
||
|
-const KXMLGUIClient *KActionCollection::parentGUIClient() const
|
||
|
+const KisKXMLGUIClient *KisKActionCollection::parentGUIClient() const
|
||
|
{
|
||
|
return d->m_parentGUIClient;
|
||
|
}
|
||
|
|
||
|
-QList<QAction *> KActionCollection::actions() const
|
||
|
+QList<QAction *> KisKActionCollection::actions() const
|
||
|
{
|
||
|
return d->actions;
|
||
|
}
|
||
|
|
||
|
-const QList< QAction * > KActionCollection::actionsWithoutGroup() const
|
||
|
+const QList< QAction * > KisKActionCollection::actionsWithoutGroup() const
|
||
|
{
|
||
|
QList<QAction *> ret;
|
||
|
Q_FOREACH (QAction *action, d->actions)
|
||
|
@@ -230,7 +230,7 @@ const QList< QAction * > KActionCollection::actionsWithoutGroup() const
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
-const QList< QActionGroup * > KActionCollection::actionGroups() const
|
||
|
+const QList< QActionGroup * > KisKActionCollection::actionGroups() const
|
||
|
{
|
||
|
QSet<QActionGroup *> set;
|
||
|
Q_FOREACH (QAction *action, d->actions)
|
||
|
@@ -244,12 +244,12 @@ const QList< QActionGroup * > KActionCollection::actionGroups() const
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCollection::addCategorizedAction(const QString &name, QAction *action, const QString &categoryName)
|
||
|
+QAction *KisKActionCollection::addCategorizedAction(const QString &name, QAction *action, const QString &categoryName)
|
||
|
{
|
||
|
return getCategory(categoryName)->addAction(name, action);
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCollection::addAction(const QString &name, QAction *action)
|
||
|
+QAction *KisKActionCollection::addAction(const QString &name, QAction *action)
|
||
|
{
|
||
|
if (!action) {
|
||
|
return action;
|
||
|
@@ -324,19 +324,19 @@ QAction *KActionCollection::addAction(const QString &name, QAction *action)
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::addActions(const QList<QAction *> &actions)
|
||
|
+void KisKActionCollection::addActions(const QList<QAction *> &actions)
|
||
|
{
|
||
|
Q_FOREACH (QAction *action, actions) {
|
||
|
addAction(action->objectName(), action);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::removeAction(QAction *action)
|
||
|
+void KisKActionCollection::removeAction(QAction *action)
|
||
|
{
|
||
|
delete takeAction(action);
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCollection::takeAction(QAction *action)
|
||
|
+QAction *KisKActionCollection::takeAction(QAction *action)
|
||
|
{
|
||
|
if (!d->unlistAction(action)) {
|
||
|
return 0;
|
||
|
@@ -353,16 +353,16 @@ QAction *KActionCollection::takeAction(QAction *action)
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCollection::addAction(KStandardAction::StandardAction actionType, const QObject *receiver, const char *member)
|
||
|
+QAction *KisKActionCollection::addAction(KStandardAction::StandardAction actionType, const QObject *receiver, const char *member)
|
||
|
{
|
||
|
QAction *action = KStandardAction::create(actionType, receiver, member, this);
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCollection::addAction(KStandardAction::StandardAction actionType, const QString &name,
|
||
|
+QAction *KisKActionCollection::addAction(KStandardAction::StandardAction actionType, const QString &name,
|
||
|
const QObject *receiver, const char *member)
|
||
|
{
|
||
|
- // pass 0 as parent, because if the parent is a KActionCollection KStandardAction::create automatically
|
||
|
+ // pass 0 as parent, because if the parent is a KisKActionCollection KStandardAction::create automatically
|
||
|
// adds the action to it under the default name. We would trigger the
|
||
|
// warning about renaming the action then.
|
||
|
QAction *action = KStandardAction::create(actionType, receiver, member, 0);
|
||
|
@@ -374,7 +374,7 @@ QAction *KActionCollection::addAction(KStandardAction::StandardAction actionType
|
||
|
return addAction(name, action);
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCollection::addAction(const QString &name, const QObject *receiver, const char *member)
|
||
|
+QAction *KisKActionCollection::addAction(const QString &name, const QObject *receiver, const char *member)
|
||
|
{
|
||
|
QAction *a = new QAction(this);
|
||
|
if (receiver && member) {
|
||
|
@@ -383,51 +383,51 @@ QAction *KActionCollection::addAction(const QString &name, const QObject *receiv
|
||
|
return addAction(name, a);
|
||
|
}
|
||
|
|
||
|
-QKeySequence KActionCollection::defaultShortcut(QAction *action) const
|
||
|
+QKeySequence KisKActionCollection::defaultShortcut(QAction *action) const
|
||
|
{
|
||
|
const QList<QKeySequence> shortcuts = defaultShortcuts(action);
|
||
|
return shortcuts.isEmpty() ? QKeySequence() : shortcuts.first();
|
||
|
}
|
||
|
|
||
|
-QList<QKeySequence> KActionCollection::defaultShortcuts(QAction *action) const
|
||
|
+QList<QKeySequence> KisKActionCollection::defaultShortcuts(QAction *action) const
|
||
|
{
|
||
|
return action->property("defaultShortcuts").value<QList<QKeySequence> >();
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::setDefaultShortcut(QAction *action, const QKeySequence &shortcut)
|
||
|
+void KisKActionCollection::setDefaultShortcut(QAction *action, const QKeySequence &shortcut)
|
||
|
{
|
||
|
setDefaultShortcuts(action, QList<QKeySequence>() << shortcut);
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::setDefaultShortcuts(QAction *action, const QList<QKeySequence> &shortcuts)
|
||
|
+void KisKActionCollection::setDefaultShortcuts(QAction *action, const QList<QKeySequence> &shortcuts)
|
||
|
{
|
||
|
action->setShortcuts(shortcuts);
|
||
|
action->setProperty("defaultShortcuts", QVariant::fromValue(shortcuts));
|
||
|
}
|
||
|
|
||
|
-bool KActionCollection::isShortcutsConfigurable(QAction *action) const
|
||
|
+bool KisKActionCollection::isShortcutsConfigurable(QAction *action) const
|
||
|
{
|
||
|
// Considered as true by default
|
||
|
const QVariant value = action->property("isShortcutConfigurable");
|
||
|
return value.isValid() ? value.toBool() : true;
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::setShortcutsConfigurable(QAction *action, bool configurable)
|
||
|
+void KisKActionCollection::setShortcutsConfigurable(QAction *action, bool configurable)
|
||
|
{
|
||
|
action->setProperty("isShortcutConfigurable", configurable);
|
||
|
}
|
||
|
|
||
|
-QString KActionCollection::configGroup() const
|
||
|
+QString KisKActionCollection::configGroup() const
|
||
|
{
|
||
|
return d->configGroup;
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::setConfigGroup(const QString &group)
|
||
|
+void KisKActionCollection::setConfigGroup(const QString &group)
|
||
|
{
|
||
|
d->configGroup = group;
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::updateShortcuts()
|
||
|
+void KisKActionCollection::updateShortcuts()
|
||
|
{
|
||
|
auto actionRegistry = KisActionRegistry::instance();
|
||
|
|
||
|
@@ -438,7 +438,7 @@ void KActionCollection::updateShortcuts()
|
||
|
}
|
||
|
|
||
|
|
||
|
-void KActionCollection::readSettings()
|
||
|
+void KisKActionCollection::readSettings()
|
||
|
{
|
||
|
auto ar = KisActionRegistry::instance();
|
||
|
ar->loadCustomShortcuts();
|
||
|
@@ -458,10 +458,10 @@ void KActionCollection::readSettings()
|
||
|
}
|
||
|
|
||
|
|
||
|
-bool KActionCollectionPrivate::writeKXMLGUIConfigFile()
|
||
|
+bool KisKActionCollectionPrivate::writeKisKXMLGUIConfigFile()
|
||
|
{
|
||
|
- const KXMLGUIClient *kxmlguiClient = q->parentGUIClient();
|
||
|
- // return false if there is no KXMLGUIClient
|
||
|
+ const KisKXMLGUIClient *kxmlguiClient = q->parentGUIClient();
|
||
|
+ // return false if there is no KisKXMLGUIClient
|
||
|
if (!kxmlguiClient || kxmlguiClient->xmlFile().isEmpty()) {
|
||
|
return false;
|
||
|
}
|
||
|
@@ -470,14 +470,14 @@ bool KActionCollectionPrivate::writeKXMLGUIConfigFile()
|
||
|
QString attrShortcut = QStringLiteral("shortcut");
|
||
|
|
||
|
// Read XML file
|
||
|
- QString sXml(KXMLGUIFactory::readConfigFile(kxmlguiClient->xmlFile(), q->componentName()));
|
||
|
+ QString sXml(KisKXMLGUIFactory::readConfigFile(kxmlguiClient->xmlFile(), q->componentName()));
|
||
|
QDomDocument doc;
|
||
|
doc.setContent(sXml);
|
||
|
|
||
|
// Process XML data
|
||
|
|
||
|
// Get hold of ActionProperties tag
|
||
|
- QDomElement elem = KXMLGUIFactory::actionPropertiesElement(doc);
|
||
|
+ QDomElement elem = KisKXMLGUIFactory::actionPropertiesElement(doc);
|
||
|
|
||
|
// now, iterate through our actions
|
||
|
for (QMap<QString, QAction *>::ConstIterator it = actionByName.constBegin();
|
||
|
@@ -500,7 +500,7 @@ bool KActionCollectionPrivate::writeKXMLGUIConfigFile()
|
||
|
|
||
|
// now see if this element already exists
|
||
|
// and create it if necessary (unless bSameAsDefault)
|
||
|
- QDomElement act_elem = KXMLGUIFactory::findActionByName(elem, actionName, !bSameAsDefault);
|
||
|
+ QDomElement act_elem = KisKXMLGUIFactory::findActionByName(elem, actionName, !bSameAsDefault);
|
||
|
if (act_elem.isNull()) {
|
||
|
continue;
|
||
|
}
|
||
|
@@ -516,18 +516,18 @@ bool KActionCollectionPrivate::writeKXMLGUIConfigFile()
|
||
|
}
|
||
|
|
||
|
// Write back to XML file
|
||
|
- KXMLGUIFactory::saveConfigFile(doc, kxmlguiClient->localXMLFile(), q->componentName());
|
||
|
+ KisKXMLGUIFactory::saveConfigFile(doc, kxmlguiClient->localXMLFile(), q->componentName());
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::writeSettings(KConfigGroup *config,
|
||
|
+void KisKActionCollection::writeSettings(KConfigGroup *config,
|
||
|
bool writeScheme,
|
||
|
QAction *oneAction) const
|
||
|
{
|
||
|
- // If the caller didn't provide a config group we try to save the KXMLGUI
|
||
|
+ // If the caller didn't provide a config group we try to save the KisKXMLGUI
|
||
|
// Configuration file. (This will work if the parentGUI was set and has a
|
||
|
// valid configuration file.)
|
||
|
- if (config == 0 && d->writeKXMLGUIConfigFile()) {
|
||
|
+ if (config == 0 && d->writeKisKXMLGUIConfigFile()) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
@@ -589,7 +589,7 @@ void KActionCollection::writeSettings(KConfigGroup *config,
|
||
|
config->sync();
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::slotActionTriggered()
|
||
|
+void KisKActionCollection::slotActionTriggered()
|
||
|
{
|
||
|
QAction *action = qobject_cast<QAction *>(sender());
|
||
|
if (action) {
|
||
|
@@ -597,12 +597,12 @@ void KActionCollection::slotActionTriggered()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::slotActionHighlighted()
|
||
|
+void KisKActionCollection::slotActionHighlighted()
|
||
|
{
|
||
|
slotActionHovered();
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::slotActionHovered()
|
||
|
+void KisKActionCollection::slotActionHovered()
|
||
|
{
|
||
|
QAction *action = qobject_cast<QAction *>(sender());
|
||
|
if (action) {
|
||
|
@@ -611,7 +611,7 @@ void KActionCollection::slotActionHovered()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KActionCollectionPrivate::_k_actionDestroyed(QObject *obj)
|
||
|
+void KisKActionCollectionPrivate::_k_actionDestroyed(QObject *obj)
|
||
|
{
|
||
|
// obj isn't really a QAction anymore. So make sure we don't do fancy stuff
|
||
|
// with it.
|
||
|
@@ -625,7 +625,7 @@ void KActionCollectionPrivate::_k_actionDestroyed(QObject *obj)
|
||
|
emit q->removed(action); //deprecated. remove in KDE5
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::connectNotify(const QMetaMethod &signal)
|
||
|
+void KisKActionCollection::connectNotify(const QMetaMethod &signal)
|
||
|
{
|
||
|
if (d->connectHovered && d->connectTriggered) {
|
||
|
return;
|
||
|
@@ -652,12 +652,12 @@ void KActionCollection::connectNotify(const QMetaMethod &signal)
|
||
|
QObject::connectNotify(signal);
|
||
|
}
|
||
|
|
||
|
-const QList< KActionCollection * > &KActionCollection::allCollections()
|
||
|
+const QList< KisKActionCollection * > &KisKActionCollection::allCollections()
|
||
|
{
|
||
|
- return KActionCollectionPrivate::s_allCollections;
|
||
|
+ return KisKActionCollectionPrivate::s_allCollections;
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::associateWidget(QWidget *widget) const
|
||
|
+void KisKActionCollection::associateWidget(QWidget *widget) const
|
||
|
{
|
||
|
Q_FOREACH (QAction *action, actions()) {
|
||
|
if (!widget->actions().contains(action)) {
|
||
|
@@ -666,7 +666,7 @@ void KActionCollection::associateWidget(QWidget *widget) const
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::addAssociatedWidget(QWidget *widget)
|
||
|
+void KisKActionCollection::addAssociatedWidget(QWidget *widget)
|
||
|
{
|
||
|
if (!d->associatedWidgets.contains(widget)) {
|
||
|
widget->addActions(actions());
|
||
|
@@ -676,7 +676,7 @@ void KActionCollection::addAssociatedWidget(QWidget *widget)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::removeAssociatedWidget(QWidget *widget)
|
||
|
+void KisKActionCollection::removeAssociatedWidget(QWidget *widget)
|
||
|
{
|
||
|
Q_FOREACH (QAction *action, actions()) {
|
||
|
widget->removeAction(action);
|
||
|
@@ -686,7 +686,7 @@ void KActionCollection::removeAssociatedWidget(QWidget *widget)
|
||
|
disconnect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(_k_associatedWidgetDestroyed(QObject*)));
|
||
|
}
|
||
|
|
||
|
-QAction *KActionCollectionPrivate::unlistAction(QAction *action)
|
||
|
+QAction *KisKActionCollectionPrivate::unlistAction(QAction *action)
|
||
|
{
|
||
|
// ATTENTION:
|
||
|
// This method is called with an QObject formerly known as a QAction
|
||
|
@@ -712,20 +712,20 @@ QAction *KActionCollectionPrivate::unlistAction(QAction *action)
|
||
|
actions.removeAt(index);
|
||
|
|
||
|
// Remove the action from the categories. Should be only one
|
||
|
- QList<KActionCategory *> categories = q->findChildren<KActionCategory *>();
|
||
|
- Q_FOREACH (KActionCategory *category, categories) {
|
||
|
+ QList<KisKActionCategory *> categories = q->findChildren<KisKActionCategory *>();
|
||
|
+ Q_FOREACH (KisKActionCategory *category, categories) {
|
||
|
category->unlistAction(action);
|
||
|
}
|
||
|
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-QList< QWidget * > KActionCollection::associatedWidgets() const
|
||
|
+QList< QWidget * > KisKActionCollection::associatedWidgets() const
|
||
|
{
|
||
|
return d->associatedWidgets;
|
||
|
}
|
||
|
|
||
|
-void KActionCollection::clearAssociatedWidgets()
|
||
|
+void KisKActionCollection::clearAssociatedWidgets()
|
||
|
{
|
||
|
Q_FOREACH (QWidget *widget, d->associatedWidgets)
|
||
|
Q_FOREACH (QAction *action, actions()) {
|
||
|
@@ -735,7 +735,7 @@ void KActionCollection::clearAssociatedWidgets()
|
||
|
d->associatedWidgets.clear();
|
||
|
}
|
||
|
|
||
|
-void KActionCollectionPrivate::_k_associatedWidgetDestroyed(QObject *obj)
|
||
|
+void KisKActionCollectionPrivate::_k_associatedWidgetDestroyed(QObject *obj)
|
||
|
{
|
||
|
associatedWidgets.removeAll(static_cast<QWidget *>(obj));
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/kactioncollection.h b/libs/widgetutils/xmlgui/kactioncollection.h
|
||
|
index 8e2ee224fa..5910553047 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kactioncollection.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kactioncollection.h
|
||
|
@@ -19,30 +19,30 @@
|
||
|
#include <QObject>
|
||
|
|
||
|
class QAction;
|
||
|
-class KXMLGUIClient;
|
||
|
+class KisKXMLGUIClient;
|
||
|
class KConfigGroup;
|
||
|
class QActionGroup;
|
||
|
class QString;
|
||
|
-class KActionCategory;
|
||
|
+class KisKActionCategory;
|
||
|
|
||
|
/**
|
||
|
* \short A container for a set of QAction objects.
|
||
|
*
|
||
|
- * KActionCollection manages a set of QAction objects. It
|
||
|
+ * KisKActionCollection manages a set of QAction objects. It
|
||
|
* allows them to be grouped for organized presentation of configuration to the user,
|
||
|
* saving + loading of configuration, and optionally for automatic plugging into
|
||
|
* specified widget(s).
|
||
|
*
|
||
|
- * Additionally, KActionCollection provides several convenience functions for locating
|
||
|
+ * Additionally, KisKActionCollection provides several convenience functions for locating
|
||
|
* named actions, and actions grouped by QActionGroup.
|
||
|
*
|
||
|
* \note If you create your own action collection and need to assign shortcuts
|
||
|
* to the actions within, you have to call associateWidget() or
|
||
|
* addAssociatedWidget() to have them working.
|
||
|
*/
|
||
|
-class KRITAWIDGETUTILS_EXPORT KActionCollection : public QObject
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKActionCollection : public QObject
|
||
|
{
|
||
|
- friend class KXMLGUIClient;
|
||
|
+ friend class KisKXMLGUIClient;
|
||
|
|
||
|
Q_OBJECT
|
||
|
|
||
|
@@ -53,17 +53,17 @@ public:
|
||
|
* Constructor. Allows specification of a component name other than the default
|
||
|
* application name, where needed (remember to call setComponentDisplayName() too).
|
||
|
*/
|
||
|
- explicit KActionCollection(QObject *parent, const QString &cName = QString());
|
||
|
+ explicit KisKActionCollection(QObject *parent, const QString &cName = QString());
|
||
|
|
||
|
/**
|
||
|
* Destructor.
|
||
|
*/
|
||
|
- ~KActionCollection() override;
|
||
|
+ ~KisKActionCollection() override;
|
||
|
|
||
|
/**
|
||
|
* Access the list of all action collections in existence for this app
|
||
|
*/
|
||
|
- static const QList<KActionCollection *> &allCollections();
|
||
|
+ static const QList<KisKActionCollection *> &allCollections();
|
||
|
|
||
|
/**
|
||
|
* Clears the entire action collection, deleting all actions.
|
||
|
@@ -197,7 +197,7 @@ public:
|
||
|
/**
|
||
|
* Set the \a componentName associated with this action collection.
|
||
|
*
|
||
|
- * \warning Don't call this method on a KActionCollection that contains
|
||
|
+ * \warning Don't call this method on a KisKActionCollection that contains
|
||
|
* actions. This is not supported.
|
||
|
*
|
||
|
* \param componentName the name which is to be associated with this action collection,
|
||
|
@@ -220,15 +220,15 @@ public:
|
||
|
QString componentDisplayName() const;
|
||
|
|
||
|
/**
|
||
|
- * The parent KXMLGUIClient, or null if not available.
|
||
|
+ * The parent KisKXMLGUIClient, or null if not available.
|
||
|
*/
|
||
|
- const KXMLGUIClient *parentGUIClient() const;
|
||
|
+ const KisKXMLGUIClient *parentGUIClient() const;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Returns the KActionCategories inside this collection
|
||
|
*/
|
||
|
- QList<KActionCategory *> categories() const;
|
||
|
+ QList<KisKActionCategory *> categories() const;
|
||
|
|
||
|
|
||
|
/**
|
||
|
@@ -236,7 +236,7 @@ public:
|
||
|
*
|
||
|
* Creates a new category if one does not exist.
|
||
|
*/
|
||
|
- KActionCategory *getCategory(const QString &categoryName);
|
||
|
+ KisKActionCategory *getCategory(const QString &categoryName);
|
||
|
|
||
|
Q_SIGNALS:
|
||
|
/**
|
||
|
@@ -490,10 +490,10 @@ private:
|
||
|
Q_PRIVATE_SLOT(d, void _k_actionDestroyed(QObject *))
|
||
|
Q_PRIVATE_SLOT(d, void _k_associatedWidgetDestroyed(QObject *))
|
||
|
|
||
|
- KActionCollection(const KXMLGUIClient *parent); // used by KXMLGUIClient
|
||
|
+ KisKActionCollection(const KisKXMLGUIClient *parent); // used by KisKXMLGUIClient
|
||
|
|
||
|
- friend class KActionCollectionPrivate;
|
||
|
- class KActionCollectionPrivate *const d;
|
||
|
+ friend class KisKActionCollectionPrivate;
|
||
|
+ class KisKActionCollectionPrivate *const d;
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
diff --git a/libs/widgetutils/xmlgui/kbugreport.cpp b/libs/widgetutils/xmlgui/kbugreport.cpp
|
||
|
index 32a324fe8b..3217cd4dfe 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kbugreport.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kbugreport.cpp
|
||
|
@@ -45,14 +45,14 @@
|
||
|
|
||
|
#include <kis_icon_utils.h>
|
||
|
|
||
|
-class KBugReportPrivate
|
||
|
+class KisKBugReportPrivate
|
||
|
{
|
||
|
public:
|
||
|
- KBugReportPrivate(KBugReport *q): q(q), m_aboutData(KAboutData::applicationData()) {}
|
||
|
+ KisKBugReportPrivate(KisKBugReport *q): q(q), m_aboutData(KAboutData::applicationData()) {}
|
||
|
|
||
|
void _k_updateUrl();
|
||
|
|
||
|
- KBugReport *q;
|
||
|
+ KisKBugReport *q;
|
||
|
QProcess *m_process;
|
||
|
KAboutData m_aboutData;
|
||
|
|
||
|
@@ -78,8 +78,8 @@ public:
|
||
|
}
|
||
|
};
|
||
|
|
||
|
-KBugReport::KBugReport(const KAboutData &aboutData, QWidget *_parent)
|
||
|
- : QDialog(_parent), d(new KBugReportPrivate(this))
|
||
|
+KisKBugReport::KisKBugReport(const KAboutData &aboutData, QWidget *_parent)
|
||
|
+ : QDialog(_parent), d(new KisKBugReportPrivate(this))
|
||
|
{
|
||
|
setWindowTitle(i18n("Submit Bug Report"));
|
||
|
|
||
|
@@ -210,12 +210,12 @@ KBugReport::KBugReport(const KAboutData &aboutData, QWidget *_parent)
|
||
|
setMinimumHeight(sizeHint().height() + 20); // WORKAROUND: prevent "cropped" qcombobox
|
||
|
}
|
||
|
|
||
|
-KBugReport::~KBugReport()
|
||
|
+KisKBugReport::~KisKBugReport()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-void KBugReportPrivate::_k_updateUrl()
|
||
|
+void KisKBugReportPrivate::_k_updateUrl()
|
||
|
{
|
||
|
url = QUrl(QStringLiteral("https://bugs.kde.org/enter_bug.cgi"));
|
||
|
QUrlQuery query;
|
||
|
@@ -239,7 +239,7 @@ void KBugReportPrivate::_k_updateUrl()
|
||
|
url.setQuery(query);
|
||
|
}
|
||
|
|
||
|
-void KBugReport::accept()
|
||
|
+void KisKBugReport::accept()
|
||
|
{
|
||
|
QDesktopServices::openUrl(d->url);
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/kbugreport.h b/libs/widgetutils/xmlgui/kbugreport.h
|
||
|
index 3474662359..59a28fbce7 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kbugreport.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kbugreport.h
|
||
|
@@ -10,7 +10,7 @@
|
||
|
#include <kritawidgetutils_export.h>
|
||
|
|
||
|
class KAboutData;
|
||
|
-class KBugReportPrivate;
|
||
|
+class KisKBugReportPrivate;
|
||
|
|
||
|
/**
|
||
|
* @short A dialog box for sending bug reports.
|
||
|
@@ -25,7 +25,7 @@ class KBugReportPrivate;
|
||
|
*
|
||
|
* @author David Faure <faure@kde.org>
|
||
|
*/
|
||
|
-class KRITAWIDGETUTILS_EXPORT KBugReport : public QDialog
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKBugReport : public QDialog
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
@@ -33,15 +33,15 @@ public:
|
||
|
/**
|
||
|
* Creates a bug-report dialog.
|
||
|
* Note that you shouldn't have to do this manually,
|
||
|
- * since KHelpMenu takes care of the menu item
|
||
|
- * for "Report Bug..." and of creating a KBugReport dialog.
|
||
|
+ * since KisKHelpMenu takes care of the menu item
|
||
|
+ * for "Report Bug..." and of creating a KisKBugReport dialog.
|
||
|
*/
|
||
|
- explicit KBugReport(const KAboutData &aboutData, QWidget *parent = 0L);
|
||
|
+ explicit KisKBugReport(const KAboutData &aboutData, QWidget *parent = 0L);
|
||
|
|
||
|
/**
|
||
|
* Destructor
|
||
|
*/
|
||
|
- ~KBugReport() override;
|
||
|
+ ~KisKBugReport() override;
|
||
|
|
||
|
|
||
|
/**
|
||
|
@@ -57,10 +57,10 @@ private:
|
||
|
|
||
|
|
||
|
private:
|
||
|
- friend class KBugReportPrivate;
|
||
|
- KBugReportPrivate *const d;
|
||
|
+ friend class KisKBugReportPrivate;
|
||
|
+ KisKBugReportPrivate *const d;
|
||
|
|
||
|
- Q_DISABLE_COPY(KBugReport)
|
||
|
+ Q_DISABLE_COPY(KisKBugReport)
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
diff --git a/libs/widgetutils/xmlgui/kcheckaccelerators.cpp b/libs/widgetutils/xmlgui/kcheckaccelerators.cpp
|
||
|
index c85742afc7..ea13fe7a3c 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kcheckaccelerators.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kcheckaccelerators.cpp
|
||
|
@@ -32,11 +32,11 @@
|
||
|
#include <klocalizedstring.h>
|
||
|
#include <kacceleratormanager.h>
|
||
|
|
||
|
-class KCheckAcceleratorsInitializer : public QObject
|
||
|
+class KisKCheckAcceleratorsInitializer : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
- explicit KCheckAcceleratorsInitializer(QObject *parent = 0)
|
||
|
+ explicit KisKCheckAcceleratorsInitializer(QObject *parent = 0)
|
||
|
: QObject(parent)
|
||
|
{
|
||
|
}
|
||
|
@@ -60,7 +60,7 @@ public Q_SLOTS:
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
- new KCheckAccelerators(qApp, key, autoCheck, copyWidgetText);
|
||
|
+ new KisKCheckAccelerators(qApp, key, autoCheck, copyWidgetText);
|
||
|
deleteLater();
|
||
|
}
|
||
|
};
|
||
|
@@ -70,13 +70,13 @@ static void startupFunc()
|
||
|
// Call initiateIfNeeded once we're in the event loop
|
||
|
// This is to prevent using KSharedConfig before main() can set the app name
|
||
|
QCoreApplication *app = QCoreApplication::instance();
|
||
|
- KCheckAcceleratorsInitializer *initializer = new KCheckAcceleratorsInitializer(app);
|
||
|
+ KisKCheckAcceleratorsInitializer *initializer = new KisKCheckAcceleratorsInitializer(app);
|
||
|
QMetaObject::invokeMethod(initializer, "initiateIfNeeded", Qt::QueuedConnection);
|
||
|
}
|
||
|
|
||
|
Q_COREAPP_STARTUP_FUNCTION(startupFunc)
|
||
|
|
||
|
-KCheckAccelerators::KCheckAccelerators(QObject *parent, int key_, bool autoCheck_, bool copyWidgetText_)
|
||
|
+KisKCheckAccelerators::KisKCheckAccelerators(QObject *parent, int key_, bool autoCheck_, bool copyWidgetText_)
|
||
|
: QObject(parent)
|
||
|
, key(key_)
|
||
|
, block(false)
|
||
|
@@ -94,7 +94,7 @@ KCheckAccelerators::KCheckAccelerators(QObject *parent, int key_, bool autoCheck
|
||
|
connect(&autoCheckTimer, SIGNAL(timeout()), SLOT(autoCheckSlot()));
|
||
|
}
|
||
|
|
||
|
-bool KCheckAccelerators::eventFilter(QObject *obj, QEvent *e)
|
||
|
+bool KisKCheckAccelerators::eventFilter(QObject *obj, QEvent *e)
|
||
|
{
|
||
|
if (block) {
|
||
|
return false;
|
||
|
@@ -187,13 +187,13 @@ bool KCheckAccelerators::eventFilter(QObject *obj, QEvent *e)
|
||
|
case QEvent::Paint:
|
||
|
return false;
|
||
|
default:
|
||
|
- // qDebug() << "KCheckAccelerators::eventFilter " << e->type() << " " << autoCheck;
|
||
|
+ // qDebug() << "KisKCheckAccelerators::eventFilter " << e->type() << " " << autoCheck;
|
||
|
break;
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
-void KCheckAccelerators::autoCheckSlot()
|
||
|
+void KisKCheckAccelerators::autoCheckSlot()
|
||
|
{
|
||
|
if (block) {
|
||
|
autoCheckTimer.setSingleShot(true);
|
||
|
@@ -205,7 +205,7 @@ void KCheckAccelerators::autoCheckSlot()
|
||
|
block = false;
|
||
|
}
|
||
|
|
||
|
-void KCheckAccelerators::createDialog(QWidget *actWin, bool automatic)
|
||
|
+void KisKCheckAccelerators::createDialog(QWidget *actWin, bool automatic)
|
||
|
{
|
||
|
if (drklash) {
|
||
|
return;
|
||
|
@@ -235,7 +235,7 @@ void KCheckAccelerators::createDialog(QWidget *actWin, bool automatic)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KCheckAccelerators::slotDisableCheck(bool on)
|
||
|
+void KisKCheckAccelerators::slotDisableCheck(bool on)
|
||
|
{
|
||
|
autoCheck = !on;
|
||
|
if (!on) {
|
||
|
@@ -243,7 +243,7 @@ void KCheckAccelerators::slotDisableCheck(bool on)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KCheckAccelerators::checkAccelerators(bool automatic)
|
||
|
+void KisKCheckAccelerators::checkAccelerators(bool automatic)
|
||
|
{
|
||
|
QWidget *actWin = qApp->activeWindow();
|
||
|
if (!actWin) {
|
||
|
diff --git a/libs/widgetutils/xmlgui/kcheckaccelerators.h b/libs/widgetutils/xmlgui/kcheckaccelerators.h
|
||
|
index 695d635a26..4d510604e0 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kcheckaccelerators.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kcheckaccelerators.h
|
||
|
@@ -64,11 +64,11 @@ class QTextBrowser;
|
||
|
|
||
|
*/
|
||
|
|
||
|
-class KCheckAccelerators: public QObject
|
||
|
+class KisKCheckAccelerators: public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
- KCheckAccelerators(QObject *parent, int key, bool autoCheck, bool copyWidgetText);
|
||
|
+ KisKCheckAccelerators(QObject *parent, int key, bool autoCheck, bool copyWidgetText);
|
||
|
/**
|
||
|
* Re-implemented to filter the parent's events.
|
||
|
*/
|
||
|
diff --git a/libs/widgetutils/xmlgui/kedittoolbar.cpp b/libs/widgetutils/xmlgui/kedittoolbar.cpp
|
||
|
index 34ec4b08cc..c1a706ca43 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kedittoolbar.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kedittoolbar.cpp
|
||
|
@@ -85,7 +85,7 @@ class XmlData
|
||
|
public:
|
||
|
enum XmlType { Shell = 0, Part, Local, Merged };
|
||
|
|
||
|
- explicit XmlData(XmlType xmlType, const QString &xmlFile, KActionCollection *collection)
|
||
|
+ explicit XmlData(XmlType xmlType, const QString &xmlFile, KisKActionCollection *collection)
|
||
|
: m_isModified(false)
|
||
|
, m_xmlFile(xmlFile)
|
||
|
, m_type(xmlType)
|
||
|
@@ -123,7 +123,7 @@ public:
|
||
|
return m_type;
|
||
|
}
|
||
|
|
||
|
- KActionCollection *actionCollection() const
|
||
|
+ KisKActionCollection *actionCollection() const
|
||
|
{
|
||
|
return m_actionCollection;
|
||
|
}
|
||
|
@@ -167,7 +167,7 @@ private:
|
||
|
QString m_xmlFile;
|
||
|
QDomDocument m_document;
|
||
|
XmlType m_type;
|
||
|
- KActionCollection *m_actionCollection {0};
|
||
|
+ KisKActionCollection *m_actionCollection {0};
|
||
|
};
|
||
|
|
||
|
QString XmlData::toolBarText(const QDomElement &it) const
|
||
|
@@ -411,18 +411,18 @@ void IconTextEditDialog::slotTextChanged(const QString &text)
|
||
|
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!text.trimmed().isEmpty());
|
||
|
}
|
||
|
|
||
|
-class KEditToolBarWidgetPrivate
|
||
|
+class KisKEditToolBarWidgetPrivate
|
||
|
{
|
||
|
public:
|
||
|
/**
|
||
|
*
|
||
|
* @param collection In the old-style constructor, this is the collection passed
|
||
|
- * to the KEditToolBar constructor.
|
||
|
- * In the xmlguifactory-based constructor, we let KXMLGUIClient create a dummy one,
|
||
|
+ * to the KisKEditToolBar constructor.
|
||
|
+ * In the xmlguifactory-based constructor, we let KisKXMLGUIClient create a dummy one,
|
||
|
* but it probably isn't used.
|
||
|
*/
|
||
|
- KEditToolBarWidgetPrivate(KEditToolBarWidget *widget,
|
||
|
- const QString &cName, KActionCollection *collection)
|
||
|
+ KisKEditToolBarWidgetPrivate(KisKEditToolBarWidget *widget,
|
||
|
+ const QString &cName, KisKActionCollection *collection)
|
||
|
: m_collection(collection),
|
||
|
m_widget(widget),
|
||
|
m_factory(0),
|
||
|
@@ -437,7 +437,7 @@ public:
|
||
|
m_emptyIcon = QPixmap(iconSize, iconSize);
|
||
|
m_emptyIcon.fill(Qt::transparent);
|
||
|
}
|
||
|
- ~KEditToolBarWidgetPrivate()
|
||
|
+ ~KisKEditToolBarWidgetPrivate()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
@@ -459,7 +459,7 @@ public:
|
||
|
void setupLayout();
|
||
|
|
||
|
void initOldStyle(const QString &file, bool global, const QString &defaultToolbar);
|
||
|
- void initFromFactory(KXMLGUIFactory *factory, const QString &defaultToolbar);
|
||
|
+ void initFromFactory(KisKXMLGUIFactory *factory, const QString &defaultToolbar);
|
||
|
void loadToolBarCombo(const QString &defaultToolbar);
|
||
|
void loadActions(const QDomElement &elem);
|
||
|
|
||
|
@@ -478,9 +478,9 @@ public:
|
||
|
//qDebug() << "loadXMLFile xml_file=" << xml_file;
|
||
|
|
||
|
if (!QDir::isRelativePath(xml_file)) {
|
||
|
- raw_xml = KXMLGUIFactory::readConfigFile(xml_file);
|
||
|
+ raw_xml = KisKXMLGUIFactory::readConfigFile(xml_file);
|
||
|
} else {
|
||
|
- raw_xml = KXMLGUIFactory::readConfigFile(xml_file, m_componentName);
|
||
|
+ raw_xml = KisKXMLGUIFactory::readConfigFile(xml_file, m_componentName);
|
||
|
}
|
||
|
|
||
|
return raw_xml;
|
||
|
@@ -526,9 +526,9 @@ public:
|
||
|
QToolButton *m_downAction;
|
||
|
|
||
|
//QValueList<QAction*> m_actionList;
|
||
|
- KActionCollection *m_collection;
|
||
|
- KEditToolBarWidget *m_widget;
|
||
|
- KXMLGUIFactory *m_factory;
|
||
|
+ KisKActionCollection *m_collection;
|
||
|
+ KisKEditToolBarWidget *m_widget;
|
||
|
+ KisKXMLGUIFactory *m_factory;
|
||
|
QString m_componentName;
|
||
|
|
||
|
QPixmap m_emptyIcon;
|
||
|
@@ -558,10 +558,10 @@ public:
|
||
|
|
||
|
using namespace KDEPrivate;
|
||
|
|
||
|
-class KEditToolBarPrivate
|
||
|
+class KisKEditToolBarPrivate
|
||
|
{
|
||
|
public:
|
||
|
- KEditToolBarPrivate(KEditToolBar *q): q(q),
|
||
|
+ KisKEditToolBarPrivate(KisKEditToolBar *q): q(q),
|
||
|
m_accept(false), m_global(false),
|
||
|
m_collection(0), m_factory(0), m_widget(0) {}
|
||
|
|
||
|
@@ -574,32 +574,32 @@ public:
|
||
|
void applyClicked();
|
||
|
void defaultClicked();
|
||
|
|
||
|
- KEditToolBar *q;
|
||
|
+ KisKEditToolBar *q;
|
||
|
bool m_accept;
|
||
|
// Save parameters for recreating widget after resetting toolbar
|
||
|
bool m_global;
|
||
|
- KActionCollection *m_collection;
|
||
|
+ KisKActionCollection *m_collection;
|
||
|
QString m_file;
|
||
|
QString m_defaultToolBar;
|
||
|
- KXMLGUIFactory *m_factory;
|
||
|
- KEditToolBarWidget *m_widget;
|
||
|
+ KisKXMLGUIFactory *m_factory;
|
||
|
+ KisKEditToolBarWidget *m_widget;
|
||
|
QVBoxLayout *m_layout;
|
||
|
QDialogButtonBox *m_buttonBox;
|
||
|
};
|
||
|
|
||
|
Q_GLOBAL_STATIC(QString, s_defaultToolBarName)
|
||
|
|
||
|
-KEditToolBar::KEditToolBar(KXMLGUIFactory *factory,
|
||
|
+KisKEditToolBar::KisKEditToolBar(KisKXMLGUIFactory *factory,
|
||
|
QWidget *parent)
|
||
|
: QDialog(parent),
|
||
|
- d(new KEditToolBarPrivate(this))
|
||
|
+ d(new KisKEditToolBarPrivate(this))
|
||
|
{
|
||
|
- d->m_widget = new KEditToolBarWidget(this);
|
||
|
+ d->m_widget = new KisKEditToolBarWidget(this);
|
||
|
d->init();
|
||
|
d->m_factory = factory;
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarPrivate::init()
|
||
|
+void KisKEditToolBarPrivate::init()
|
||
|
{
|
||
|
m_accept = false;
|
||
|
m_factory = 0;
|
||
|
@@ -633,20 +633,20 @@ void KEditToolBarPrivate::init()
|
||
|
q->setMinimumSize(q->sizeHint());
|
||
|
}
|
||
|
|
||
|
-void KEditToolBar::setResourceFile(const QString &file, bool global)
|
||
|
+void KisKEditToolBar::setResourceFile(const QString &file, bool global)
|
||
|
{
|
||
|
d->m_file = file;
|
||
|
d->m_global = global;
|
||
|
d->m_widget->load(d->m_file, d->m_global, d->m_defaultToolBar);
|
||
|
}
|
||
|
|
||
|
-KEditToolBar::~KEditToolBar()
|
||
|
+KisKEditToolBar::~KisKEditToolBar()
|
||
|
{
|
||
|
delete d;
|
||
|
s_defaultToolBarName()->clear();
|
||
|
}
|
||
|
|
||
|
-void KEditToolBar::setDefaultToolBar(const QString &toolBarName)
|
||
|
+void KisKEditToolBar::setDefaultToolBar(const QString &toolBarName)
|
||
|
{
|
||
|
if (toolBarName.isEmpty()) {
|
||
|
d->m_defaultToolBar = *s_defaultToolBarName();
|
||
|
@@ -655,29 +655,29 @@ void KEditToolBar::setDefaultToolBar(const QString &toolBarName)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarPrivate::_k_acceptOK(bool b)
|
||
|
+void KisKEditToolBarPrivate::_k_acceptOK(bool b)
|
||
|
{
|
||
|
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(b);
|
||
|
m_accept = b;
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarPrivate::_k_enableApply(bool b)
|
||
|
+void KisKEditToolBarPrivate::_k_enableApply(bool b)
|
||
|
{
|
||
|
m_buttonBox->button(QDialogButtonBox::Apply)->setEnabled(b);
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarPrivate::defaultClicked()
|
||
|
+void KisKEditToolBarPrivate::defaultClicked()
|
||
|
{
|
||
|
if (KMessageBox::warningContinueCancel(q, i18n("Do you really want to reset all toolbars of this application to their default? The changes will be applied immediately."), i18n("Reset Toolbars"), KGuiItem(i18n("Reset"))) != KMessageBox::Continue) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
- KEditToolBarWidget *oldWidget = m_widget;
|
||
|
+ KisKEditToolBarWidget *oldWidget = m_widget;
|
||
|
m_widget = 0;
|
||
|
m_accept = false;
|
||
|
|
||
|
if (m_factory) {
|
||
|
- foreach (KXMLGUIClient *client, m_factory->clients()) {
|
||
|
+ foreach (KisKXMLGUIClient *client, m_factory->clients()) {
|
||
|
const QString file = client->localXMLFile();
|
||
|
if (file.isEmpty()) {
|
||
|
continue;
|
||
|
@@ -691,9 +691,9 @@ void KEditToolBarPrivate::defaultClicked()
|
||
|
}
|
||
|
|
||
|
// Reload the xml files in all clients, now that the local files are gone
|
||
|
- oldWidget->rebuildKXMLGUIClients();
|
||
|
+ oldWidget->rebuildKisKXMLGUIClients();
|
||
|
|
||
|
- m_widget = new KEditToolBarWidget(q);
|
||
|
+ m_widget = new KisKEditToolBarWidget(q);
|
||
|
m_widget->load(m_factory, m_defaultToolBar);
|
||
|
} else {
|
||
|
int slash = m_file.lastIndexOf(QLatin1Char('/')) + 1;
|
||
|
@@ -708,7 +708,7 @@ void KEditToolBarPrivate::defaultClicked()
|
||
|
qWarning() << "Could not delete " << xml_file;
|
||
|
}
|
||
|
|
||
|
- m_widget = new KEditToolBarWidget(m_collection, q);
|
||
|
+ m_widget = new KisKEditToolBarWidget(m_collection, q);
|
||
|
q->setResourceFile(m_file, m_global);
|
||
|
}
|
||
|
|
||
|
@@ -726,7 +726,7 @@ void KEditToolBarPrivate::defaultClicked()
|
||
|
emit q->newToolbarConfig(); // compat
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarPrivate::_k_slotButtonClicked(QAbstractButton *button)
|
||
|
+void KisKEditToolBarPrivate::_k_slotButtonClicked(QAbstractButton *button)
|
||
|
{
|
||
|
QDialogButtonBox::StandardButton type = m_buttonBox->standardButton(button);
|
||
|
|
||
|
@@ -745,7 +745,7 @@ void KEditToolBarPrivate::_k_slotButtonClicked(QAbstractButton *button)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarPrivate::okClicked()
|
||
|
+void KisKEditToolBarPrivate::okClicked()
|
||
|
{
|
||
|
if (!m_accept) {
|
||
|
q->reject();
|
||
|
@@ -762,7 +762,7 @@ void KEditToolBarPrivate::okClicked()
|
||
|
q->accept();
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarPrivate::applyClicked()
|
||
|
+void KisKEditToolBarPrivate::applyClicked()
|
||
|
{
|
||
|
(void)m_widget->save();
|
||
|
_k_enableApply(false);
|
||
|
@@ -770,42 +770,42 @@ void KEditToolBarPrivate::applyClicked()
|
||
|
emit q->newToolbarConfig(); // compat
|
||
|
}
|
||
|
|
||
|
-void KEditToolBar::setGlobalDefaultToolBar(const char *toolbarName)
|
||
|
+void KisKEditToolBar::setGlobalDefaultToolBar(const char *toolbarName)
|
||
|
{
|
||
|
*s_defaultToolBarName() = QString::fromLatin1(toolbarName);
|
||
|
}
|
||
|
|
||
|
-KEditToolBarWidget::KEditToolBarWidget(KActionCollection *collection,
|
||
|
+KisKEditToolBarWidget::KisKEditToolBarWidget(KisKActionCollection *collection,
|
||
|
QWidget *parent)
|
||
|
: QWidget(parent),
|
||
|
- d(new KEditToolBarWidgetPrivate(this, componentName(), collection))
|
||
|
+ d(new KisKEditToolBarWidgetPrivate(this, componentName(), collection))
|
||
|
{
|
||
|
d->setupLayout();
|
||
|
}
|
||
|
|
||
|
-KEditToolBarWidget::KEditToolBarWidget(QWidget *parent)
|
||
|
+KisKEditToolBarWidget::KisKEditToolBarWidget(QWidget *parent)
|
||
|
: QWidget(parent),
|
||
|
- d(new KEditToolBarWidgetPrivate(this, componentName(), KXMLGUIClient::actionCollection() /*create new one*/))
|
||
|
+ d(new KisKEditToolBarWidgetPrivate(this, componentName(), KisKXMLGUIClient::actionCollection() /*create new one*/))
|
||
|
{
|
||
|
d->setupLayout();
|
||
|
}
|
||
|
|
||
|
-KEditToolBarWidget::~KEditToolBarWidget()
|
||
|
+KisKEditToolBarWidget::~KisKEditToolBarWidget()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidget::load(const QString &file, bool global, const QString &defaultToolBar)
|
||
|
+void KisKEditToolBarWidget::load(const QString &file, bool global, const QString &defaultToolBar)
|
||
|
{
|
||
|
d->initOldStyle(file, global, defaultToolBar);
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidget::load(KXMLGUIFactory *factory, const QString &defaultToolBar)
|
||
|
+void KisKEditToolBarWidget::load(KisKXMLGUIFactory *factory, const QString &defaultToolBar)
|
||
|
{
|
||
|
d->initFromFactory(factory, defaultToolBar);
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::initOldStyle(const QString &resourceFile,
|
||
|
+void KisKEditToolBarWidgetPrivate::initOldStyle(const QString &resourceFile,
|
||
|
bool global,
|
||
|
const QString &defaultToolBar)
|
||
|
{
|
||
|
@@ -847,7 +847,7 @@ void KEditToolBarWidgetPrivate::initOldStyle(const QString &resourceFile,
|
||
|
m_widget->setMinimumSize(m_widget->sizeHint());
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::initFromFactory(KXMLGUIFactory *factory,
|
||
|
+void KisKEditToolBarWidgetPrivate::initFromFactory(KisKXMLGUIFactory *factory,
|
||
|
const QString &defaultToolBar)
|
||
|
{
|
||
|
qDebug() << "initFromFactory";
|
||
|
@@ -862,7 +862,7 @@ void KEditToolBarWidgetPrivate::initFromFactory(KXMLGUIFactory *factory,
|
||
|
|
||
|
// add all of the client data
|
||
|
bool first = true;
|
||
|
- foreach (KXMLGUIClient *client, factory->clients()) {
|
||
|
+ foreach (KisKXMLGUIClient *client, factory->clients()) {
|
||
|
if (client->xmlFile().isEmpty()) {
|
||
|
continue;
|
||
|
}
|
||
|
@@ -897,9 +897,9 @@ void KEditToolBarWidgetPrivate::initFromFactory(KXMLGUIFactory *factory,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidget::save()
|
||
|
+void KisKEditToolBarWidget::save()
|
||
|
{
|
||
|
- //qDebug(240) << "KEditToolBarWidget::save";
|
||
|
+ //qDebug(240) << "KisKEditToolBarWidget::save";
|
||
|
QList<XmlData>::Iterator it = d->m_xmlFiles.begin();
|
||
|
for (; it != d->m_xmlFiles.end(); ++it) {
|
||
|
// let's not save non-modified files
|
||
|
@@ -927,23 +927,23 @@ void KEditToolBarWidget::save()
|
||
|
|
||
|
//qDebug(240) << "Saving " << (*it).xmlFile();
|
||
|
// if we got this far, we might as well just save it
|
||
|
- KXMLGUIFactory::saveConfigFile((*it).domDocument(), (*it).xmlFile());
|
||
|
+ KisKXMLGUIFactory::saveConfigFile((*it).domDocument(), (*it).xmlFile());
|
||
|
}
|
||
|
|
||
|
if (!d->m_factory) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
- rebuildKXMLGUIClients();
|
||
|
+ rebuildKisKXMLGUIClients();
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidget::rebuildKXMLGUIClients()
|
||
|
+void KisKEditToolBarWidget::rebuildKisKXMLGUIClients()
|
||
|
{
|
||
|
if (!d->m_factory) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
- const QList<KXMLGUIClient *> clients = d->m_factory->clients();
|
||
|
+ const QList<KisKXMLGUIClient *> clients = d->m_factory->clients();
|
||
|
//qDebug(240) << "factory: " << clients.count() << " clients";
|
||
|
|
||
|
// remove the elements starting from the last going to the first
|
||
|
@@ -951,19 +951,19 @@ void KEditToolBarWidget::rebuildKXMLGUIClients()
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
- QListIterator<KXMLGUIClient *> clientIterator = clients;
|
||
|
+ QListIterator<KisKXMLGUIClient *> clientIterator = clients;
|
||
|
clientIterator.toBack();
|
||
|
while (clientIterator.hasPrevious()) {
|
||
|
- KXMLGUIClient *client = clientIterator.previous();
|
||
|
+ KisKXMLGUIClient *client = clientIterator.previous();
|
||
|
//qDebug(240) << "factory->removeClient " << client;
|
||
|
d->m_factory->removeClient(client);
|
||
|
}
|
||
|
|
||
|
- KXMLGUIClient *firstClient = clients.first();
|
||
|
+ KisKXMLGUIClient *firstClient = clients.first();
|
||
|
|
||
|
// now, rebuild the gui from the first to the last
|
||
|
//qDebug(240) << "rebuilding the gui";
|
||
|
- foreach (KXMLGUIClient *client, clients) {
|
||
|
+ foreach (KisKXMLGUIClient *client, clients) {
|
||
|
//qDebug(240) << "updating client " << client << " " << client->componentName() << " xmlFile=" << client->xmlFile();
|
||
|
QString file(client->xmlFile()); // before setting ui_standards!
|
||
|
if (!file.isEmpty()) {
|
||
|
@@ -985,12 +985,12 @@ void KEditToolBarWidget::rebuildKXMLGUIClients()
|
||
|
// Now we can add the clients to the factory
|
||
|
// We don't do it in the loop above because adding a part automatically
|
||
|
// adds its plugins, so we must make sure the plugins were updated first.
|
||
|
- foreach (KXMLGUIClient *client, clients) {
|
||
|
+ foreach (KisKXMLGUIClient *client, clients) {
|
||
|
d->m_factory->addClient(client);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::setupLayout()
|
||
|
+void KisKEditToolBarWidgetPrivate::setupLayout()
|
||
|
{
|
||
|
// the toolbar name combo
|
||
|
m_comboLabel = new QLabel(i18n("&Toolbar:"), m_widget);
|
||
|
@@ -1115,7 +1115,7 @@ void KEditToolBarWidgetPrivate::setupLayout()
|
||
|
top_layout->addWidget(new KSeparator(m_widget));
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::loadToolBarCombo(const QString &defaultToolBar)
|
||
|
+void KisKEditToolBarWidgetPrivate::loadToolBarCombo(const QString &defaultToolBar)
|
||
|
{
|
||
|
const QLatin1String attrName("name");
|
||
|
// just in case, we clear our combo
|
||
|
@@ -1157,7 +1157,7 @@ void KEditToolBarWidgetPrivate::loadToolBarCombo(const QString &defaultToolBar)
|
||
|
slotToolBarSelected(m_toolbarCombo->currentIndex());
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::loadActions(const QDomElement &elem)
|
||
|
+void KisKEditToolBarWidgetPrivate::loadActions(const QDomElement &elem)
|
||
|
{
|
||
|
const QLatin1String tagSeparator("Separator");
|
||
|
const QLatin1String tagMerge("Merge");
|
||
|
@@ -1177,7 +1177,7 @@ void KEditToolBarWidgetPrivate::loadActions(const QDomElement &elem)
|
||
|
m_downAction->setEnabled(false);
|
||
|
|
||
|
// We'll use this action collection
|
||
|
- KActionCollection *actionCollection = m_currentXmlData->actionCollection();
|
||
|
+ KisKActionCollection *actionCollection = m_currentXmlData->actionCollection();
|
||
|
|
||
|
// store the names of our active actions
|
||
|
QSet<QString> active_list;
|
||
|
@@ -1257,12 +1257,12 @@ void KEditToolBarWidgetPrivate::loadActions(const QDomElement &elem)
|
||
|
m_inactiveList->insertItem(0, act);
|
||
|
}
|
||
|
|
||
|
-KActionCollection *KEditToolBarWidget::actionCollection() const
|
||
|
+KisKActionCollection *KisKEditToolBarWidget::actionCollection() const
|
||
|
{
|
||
|
return d->m_collection;
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::slotToolBarSelected(int index)
|
||
|
+void KisKEditToolBarWidgetPrivate::slotToolBarSelected(int index)
|
||
|
{
|
||
|
// We need to find the XmlData and toolbar element for this index
|
||
|
// To do that, we do the same iteration as the one which filled in the combobox.
|
||
|
@@ -1308,7 +1308,7 @@ void KEditToolBarWidgetPrivate::slotToolBarSelected(int index)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::slotInactiveSelectionChanged()
|
||
|
+void KisKEditToolBarWidgetPrivate::slotInactiveSelectionChanged()
|
||
|
{
|
||
|
if (m_inactiveList->selectedItems().count()) {
|
||
|
m_insertAction->setEnabled(true);
|
||
|
@@ -1320,7 +1320,7 @@ void KEditToolBarWidgetPrivate::slotInactiveSelectionChanged()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::slotActiveSelectionChanged()
|
||
|
+void KisKEditToolBarWidgetPrivate::slotActiveSelectionChanged()
|
||
|
{
|
||
|
ToolBarItem *toolitem = 0;
|
||
|
if (!m_activeList->selectedItems().isEmpty()) {
|
||
|
@@ -1342,7 +1342,7 @@ void KEditToolBarWidgetPrivate::slotActiveSelectionChanged()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::slotInsertButton()
|
||
|
+void KisKEditToolBarWidgetPrivate::slotInsertButton()
|
||
|
{
|
||
|
QString internalName = static_cast<ToolBarItem *>(m_inactiveList->currentItem())->internalName();
|
||
|
|
||
|
@@ -1355,7 +1355,7 @@ void KEditToolBarWidgetPrivate::slotInsertButton()
|
||
|
selectActiveItem(internalName);
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::selectActiveItem(const QString &internalName)
|
||
|
+void KisKEditToolBarWidgetPrivate::selectActiveItem(const QString &internalName)
|
||
|
{
|
||
|
int activeItemCount = m_activeList->count();
|
||
|
for (int i = 0; i < activeItemCount; i++) {
|
||
|
@@ -1367,14 +1367,14 @@ void KEditToolBarWidgetPrivate::selectActiveItem(const QString &internalName)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::slotRemoveButton()
|
||
|
+void KisKEditToolBarWidgetPrivate::slotRemoveButton()
|
||
|
{
|
||
|
removeActive(m_activeList->currentItem());
|
||
|
|
||
|
slotToolBarSelected(m_toolbarCombo->currentIndex());
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::insertActive(ToolBarItem *item, ToolBarItem *before, bool prepend)
|
||
|
+void KisKEditToolBarWidgetPrivate::insertActive(ToolBarItem *item, ToolBarItem *before, bool prepend)
|
||
|
{
|
||
|
if (!item) {
|
||
|
return;
|
||
|
@@ -1414,7 +1414,7 @@ void KEditToolBarWidgetPrivate::insertActive(ToolBarItem *item, ToolBarItem *bef
|
||
|
updateLocal(m_currentToolBarElem);
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::removeActive(ToolBarItem *item)
|
||
|
+void KisKEditToolBarWidgetPrivate::removeActive(ToolBarItem *item)
|
||
|
{
|
||
|
if (!item) {
|
||
|
return;
|
||
|
@@ -1437,7 +1437,7 @@ void KEditToolBarWidgetPrivate::removeActive(ToolBarItem *item)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::slotUpButton()
|
||
|
+void KisKEditToolBarWidgetPrivate::slotUpButton()
|
||
|
{
|
||
|
ToolBarItem *item = m_activeList->currentItem();
|
||
|
|
||
|
@@ -1459,7 +1459,7 @@ void KEditToolBarWidgetPrivate::slotUpButton()
|
||
|
moveActive(item, static_cast<ToolBarItem *>(item->listWidget()->item(row - 1)));
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::moveActive(ToolBarItem *item, ToolBarItem *before)
|
||
|
+void KisKEditToolBarWidgetPrivate::moveActive(ToolBarItem *item, ToolBarItem *before)
|
||
|
{
|
||
|
QDomElement e = findElementForToolBarItem(item);
|
||
|
|
||
|
@@ -1490,7 +1490,7 @@ void KEditToolBarWidgetPrivate::moveActive(ToolBarItem *item, ToolBarItem *befor
|
||
|
updateLocal(m_currentToolBarElem);
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::slotDownButton()
|
||
|
+void KisKEditToolBarWidgetPrivate::slotDownButton()
|
||
|
{
|
||
|
ToolBarItem *item = m_activeList->currentItem();
|
||
|
|
||
|
@@ -1512,7 +1512,7 @@ void KEditToolBarWidgetPrivate::slotDownButton()
|
||
|
moveActive(item, static_cast<ToolBarItem *>(item->listWidget()->item(newRow)));
|
||
|
}
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::updateLocal(QDomElement &elem)
|
||
|
+void KisKEditToolBarWidgetPrivate::updateLocal(QDomElement &elem)
|
||
|
{
|
||
|
QList<XmlData>::Iterator xit = m_xmlFiles.begin();
|
||
|
for (; xit != m_xmlFiles.end(); ++xit) {
|
||
|
@@ -1553,7 +1553,7 @@ void KEditToolBarWidgetPrivate::updateLocal(QDomElement &elem)
|
||
|
}
|
||
|
|
||
|
|
||
|
-void KEditToolBarWidgetPrivate::slotDropped(ToolBarListWidget *list, int index, ToolBarItem *item, bool sourceIsActiveList)
|
||
|
+void KisKEditToolBarWidgetPrivate::slotDropped(ToolBarListWidget *list, int index, ToolBarItem *item, bool sourceIsActiveList)
|
||
|
{
|
||
|
//qDebug() << "slotDropped list=" << (list==m_activeList?"activeList":"inactiveList")
|
||
|
// << "index=" << index << "sourceIsActiveList=" << sourceIsActiveList;
|
||
|
@@ -1580,7 +1580,7 @@ void KEditToolBarWidgetPrivate::slotDropped(ToolBarListWidget *list, int index,
|
||
|
slotToolBarSelected(m_toolbarCombo->currentIndex());
|
||
|
}
|
||
|
|
||
|
-void KEditToolBar::showEvent(QShowEvent *event)
|
||
|
+void KisKEditToolBar::showEvent(QShowEvent *event)
|
||
|
{
|
||
|
if (!event->spontaneous()) {
|
||
|
// The dialog has been shown, enable toolbar editing
|
||
|
@@ -1592,15 +1592,15 @@ void KEditToolBar::showEvent(QShowEvent *event)
|
||
|
d->m_widget->load(d->m_file, d->m_global, d->m_defaultToolBar);
|
||
|
}
|
||
|
|
||
|
- KToolBar::setToolBarsEditable(true);
|
||
|
+ KisToolBar::setToolBarsEditable(true);
|
||
|
}
|
||
|
QDialog::showEvent(event);
|
||
|
}
|
||
|
|
||
|
-void KEditToolBar::hideEvent(QHideEvent *event)
|
||
|
+void KisKEditToolBar::hideEvent(QHideEvent *event)
|
||
|
{
|
||
|
// The dialog has been hidden, disable toolbar editing
|
||
|
- KToolBar::setToolBarsEditable(false);
|
||
|
+ KisToolBar::setToolBarsEditable(false);
|
||
|
|
||
|
QDialog::hideEvent(event);
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/kedittoolbar.h b/libs/widgetutils/xmlgui/kedittoolbar.h
|
||
|
index e3ad43a78a..ce35533394 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kedittoolbar.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kedittoolbar.h
|
||
|
@@ -11,10 +11,10 @@
|
||
|
|
||
|
#include <kritawidgetutils_export.h>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
|
||
|
-class KEditToolBarPrivate;
|
||
|
-class KXMLGUIFactory;
|
||
|
+class KisKEditToolBarPrivate;
|
||
|
+class KisKXMLGUIFactory;
|
||
|
/**
|
||
|
* @short A dialog used to customize or configure toolbars.
|
||
|
*
|
||
|
@@ -38,14 +38,14 @@ class KXMLGUIFactory;
|
||
|
* }
|
||
|
* \endcode
|
||
|
*
|
||
|
- * When created, KEditToolBar takes a KXMLGUIFactory object, and uses it to
|
||
|
+ * When created, KisKEditToolBar takes a KisKXMLGUIFactory object, and uses it to
|
||
|
* find all of the action collections and XML files (there is one of each for the
|
||
|
* mainwindow, but there could be more, when adding other XMLGUI clients like
|
||
|
* KParts or plugins). The editor aims to be semi-intelligent about where it
|
||
|
* assigns any modifications. In other words, it will not write out part specific
|
||
|
* changes to your application's main XML file.
|
||
|
*
|
||
|
- * KXmlGuiWindow and KParts::MainWindow take care of creating KEditToolBar correctly
|
||
|
+ * KXmlGuiWindow and KParts::MainWindow take care of creating KisKEditToolBar correctly
|
||
|
* and connecting to its newToolBarConfig slot, but if you really really want to do it
|
||
|
* yourself, see the KXmlGuiWindow::configureToolbars() and KXmlGuiWindow::saveNewToolbarConfig() code.
|
||
|
*
|
||
|
@@ -54,7 +54,7 @@ class KXMLGUIFactory;
|
||
|
* @author Kurt Granroth <granroth@kde.org>
|
||
|
* @maintainer David Faure <faure@kde.org>
|
||
|
*/
|
||
|
-class KRITAWIDGETUTILS_EXPORT KEditToolBar : public QDialog
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKEditToolBar : public QDialog
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
@@ -68,7 +68,7 @@ public:
|
||
|
*
|
||
|
* Use this like so:
|
||
|
* \code
|
||
|
- * KEditToolBar edit(factory());
|
||
|
+ * KisKEditToolBar edit(factory());
|
||
|
* if (edit.exec())
|
||
|
* ...
|
||
|
* \endcode
|
||
|
@@ -76,11 +76,11 @@ public:
|
||
|
* @param factory Your application's factory object
|
||
|
* @param parent The usual parent for the dialog.
|
||
|
*/
|
||
|
- explicit KEditToolBar(KXMLGUIFactory *factory,
|
||
|
+ explicit KisKEditToolBar(KisKXMLGUIFactory *factory,
|
||
|
QWidget *parent = 0);
|
||
|
|
||
|
/// destructor
|
||
|
- ~KEditToolBar() override;
|
||
|
+ ~KisKEditToolBar() override;
|
||
|
|
||
|
/**
|
||
|
* Sets the default toolbar that will be selected when the dialog is shown.
|
||
|
@@ -112,7 +112,7 @@ public:
|
||
|
|
||
|
/**
|
||
|
* Sets the default toolbar which will be auto-selected for all
|
||
|
- * KEditToolBar instances. Can be overridden on a per-dialog basis
|
||
|
+ * KisKEditToolBar instances. Can be overridden on a per-dialog basis
|
||
|
* by calling setDefaultToolBar( const QString& ) on the dialog.
|
||
|
* @param toolBarName the name of the tool bar
|
||
|
*/
|
||
|
@@ -133,14 +133,14 @@ protected:
|
||
|
void hideEvent(QHideEvent *event) override;
|
||
|
|
||
|
private:
|
||
|
- friend class KEditToolBarPrivate;
|
||
|
- KEditToolBarPrivate *const d;
|
||
|
+ friend class KisKEditToolBarPrivate;
|
||
|
+ KisKEditToolBarPrivate *const d;
|
||
|
|
||
|
Q_PRIVATE_SLOT(d, void _k_slotButtonClicked(QAbstractButton *))
|
||
|
Q_PRIVATE_SLOT(d, void _k_acceptOK(bool))
|
||
|
Q_PRIVATE_SLOT(d, void _k_enableApply(bool))
|
||
|
|
||
|
- Q_DISABLE_COPY(KEditToolBar)
|
||
|
+ Q_DISABLE_COPY(KisKEditToolBar)
|
||
|
};
|
||
|
|
||
|
#endif // _KEDITTOOLBAR_H
|
||
|
diff --git a/libs/widgetutils/xmlgui/kedittoolbar_p.h b/libs/widgetutils/xmlgui/kedittoolbar_p.h
|
||
|
index 24afec01bb..080b403ed7 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kedittoolbar_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kedittoolbar_p.h
|
||
|
@@ -19,7 +19,7 @@ namespace KDEPrivate
|
||
|
{
|
||
|
|
||
|
class ToolBarItem;
|
||
|
-class KEditToolBarWidgetPrivate;
|
||
|
+class KisKEditToolBarWidgetPrivate;
|
||
|
|
||
|
class ToolBarListWidget : public QListWidget
|
||
|
{
|
||
|
@@ -93,7 +93,7 @@ private:
|
||
|
* @short A widget used to customize or configure toolbars
|
||
|
*
|
||
|
* This is the widget that does all of the work for the
|
||
|
- * KEditToolBar dialog. In most cases, you will want to use the
|
||
|
+ * KisKEditToolBar dialog. In most cases, you will want to use the
|
||
|
* dialog instead of this widget directly.
|
||
|
*
|
||
|
* Typically, you would use this widget only if you wanted to embed
|
||
|
@@ -108,7 +108,7 @@ private:
|
||
|
* @author Kurt Granroth <granroth@kde.org>
|
||
|
* @internal
|
||
|
*/
|
||
|
-class KEditToolBarWidget : public QWidget, virtual public KXMLGUIClient
|
||
|
+class KisKEditToolBarWidget : public QWidget, virtual public KisKXMLGUIClient
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
@@ -124,7 +124,7 @@ public:
|
||
|
* @param collection The collection of actions to work on
|
||
|
* @param parent This widget's parent
|
||
|
*/
|
||
|
- explicit KEditToolBarWidget(KActionCollection *collection,
|
||
|
+ explicit KisKEditToolBarWidget(KisKActionCollection *collection,
|
||
|
QWidget *parent = 0L);
|
||
|
|
||
|
/**
|
||
|
@@ -132,21 +132,21 @@ public:
|
||
|
*
|
||
|
* Use this like so:
|
||
|
* \code
|
||
|
- * KEditToolBarWidget widget(this);
|
||
|
+ * KisKEditToolBarWidget widget(this);
|
||
|
* widget.load(factory());
|
||
|
* ...
|
||
|
* \endcode
|
||
|
*
|
||
|
* @param parent This widget's parent
|
||
|
*/
|
||
|
- explicit KEditToolBarWidget(QWidget *parent = 0L);
|
||
|
+ explicit KisKEditToolBarWidget(QWidget *parent = 0L);
|
||
|
|
||
|
/**
|
||
|
* Destructor. Note that any changes done in this widget will
|
||
|
* @p NOT be saved in the destructor. You @p must call save()
|
||
|
* to do that.
|
||
|
*/
|
||
|
- ~KEditToolBarWidget() override;
|
||
|
+ ~KisKEditToolBarWidget() override;
|
||
|
|
||
|
/**
|
||
|
* Old-style load.
|
||
|
@@ -156,7 +156,7 @@ public:
|
||
|
* @param resourceFile the name (absolute or relative) of your application's UI
|
||
|
* resource file. If it is left blank, then the resource file: share/apps/appname/appnameui.xmlgui
|
||
|
* is used. This is the same resource file that is used by the
|
||
|
- * default createGUI function in KMainWindow so you're usually
|
||
|
+ * default createGUI function in KisKMainWindow so you're usually
|
||
|
* pretty safe in leaving it blank.
|
||
|
*
|
||
|
* @param global controls whether or not the
|
||
|
@@ -171,7 +171,7 @@ public:
|
||
|
* If not set, or QString() is passed in, the global default tool bar name
|
||
|
* will be used.
|
||
|
*
|
||
|
- * @see KEditToolBar
|
||
|
+ * @see KisKEditToolBar
|
||
|
*/
|
||
|
void load(const QString &resourceFile,
|
||
|
bool global = true,
|
||
|
@@ -188,15 +188,15 @@ public:
|
||
|
* If not set, or QString() is passed in, the global default tool bar name
|
||
|
* will be used.
|
||
|
*
|
||
|
- * @see KEditToolBar
|
||
|
+ * @see KisKEditToolBar
|
||
|
*/
|
||
|
- void load(KXMLGUIFactory *factory,
|
||
|
+ void load(KisKXMLGUIFactory *factory,
|
||
|
const QString &defaultToolBar = QString());
|
||
|
|
||
|
/**
|
||
|
* @internal Reimplemented for internal purposes.
|
||
|
*/
|
||
|
- KActionCollection *actionCollection() const override;
|
||
|
+ KisKActionCollection *actionCollection() const override;
|
||
|
|
||
|
/**
|
||
|
* Save any changes the user made. The file will be in the user's
|
||
|
@@ -210,7 +210,7 @@ public:
|
||
|
/**
|
||
|
* Remove and readd all KMXLGUIClients to update the GUI
|
||
|
*/
|
||
|
- void rebuildKXMLGUIClients();
|
||
|
+ void rebuildKisKXMLGUIClients();
|
||
|
|
||
|
Q_SIGNALS:
|
||
|
/**
|
||
|
@@ -232,10 +232,10 @@ private:
|
||
|
Q_PRIVATE_SLOT(d, void slotDropped(ToolBarListWidget *, int, ToolBarItem *, bool))
|
||
|
|
||
|
private:
|
||
|
- friend class KEditToolBarWidgetPrivate;
|
||
|
- KEditToolBarWidgetPrivate *const d;
|
||
|
+ friend class KisKEditToolBarWidgetPrivate;
|
||
|
+ KisKEditToolBarWidgetPrivate *const d;
|
||
|
|
||
|
- Q_DISABLE_COPY(KEditToolBarWidget)
|
||
|
+ Q_DISABLE_COPY(KisKEditToolBarWidget)
|
||
|
};
|
||
|
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/kgesture.cpp b/libs/widgetutils/xmlgui/kgesture.cpp
|
||
|
index 29811ca604..a0483f0594 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kgesture.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kgesture.cpp
|
||
|
@@ -15,13 +15,13 @@ inline float metric(float dx, float dy)
|
||
|
return (dx * dx + dy * dy);
|
||
|
}
|
||
|
|
||
|
-class KShapeGesturePrivate
|
||
|
+class KisKShapeGesturePrivate
|
||
|
{
|
||
|
public:
|
||
|
- KShapeGesturePrivate()
|
||
|
+ KisKShapeGesturePrivate()
|
||
|
{
|
||
|
}
|
||
|
- KShapeGesturePrivate(const KShapeGesturePrivate &other)
|
||
|
+ KisKShapeGesturePrivate(const KisKShapeGesturePrivate &other)
|
||
|
: m_shape(other.m_shape),
|
||
|
m_lengthTo(other.m_lengthTo),
|
||
|
m_curveLength(other.m_curveLength)
|
||
|
@@ -33,19 +33,19 @@ public:
|
||
|
QString m_friendlyName;
|
||
|
};
|
||
|
|
||
|
-KShapeGesture::KShapeGesture()
|
||
|
- : d(new KShapeGesturePrivate)
|
||
|
+KisKShapeGesture::KisKShapeGesture()
|
||
|
+ : d(new KisKShapeGesturePrivate)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-KShapeGesture::KShapeGesture(const QPolygon &shape)
|
||
|
- : d(new KShapeGesturePrivate)
|
||
|
+KisKShapeGesture::KisKShapeGesture(const QPolygon &shape)
|
||
|
+ : d(new KisKShapeGesturePrivate)
|
||
|
{
|
||
|
setShape(shape);
|
||
|
}
|
||
|
|
||
|
-KShapeGesture::KShapeGesture(const QString &description)
|
||
|
- : d(new KShapeGesturePrivate)
|
||
|
+KisKShapeGesture::KisKShapeGesture(const QString &description)
|
||
|
+ : d(new KisKShapeGesturePrivate)
|
||
|
{
|
||
|
QStringList sl = description.split(QLatin1Char(','));
|
||
|
d->m_friendlyName = sl.takeFirst();
|
||
|
@@ -75,17 +75,17 @@ KShapeGesture::KShapeGesture(const QString &description)
|
||
|
setShape(poly);
|
||
|
}
|
||
|
|
||
|
-KShapeGesture::KShapeGesture(const KShapeGesture &other)
|
||
|
- : d(new KShapeGesturePrivate(*(other.d)))
|
||
|
+KisKShapeGesture::KisKShapeGesture(const KisKShapeGesture &other)
|
||
|
+ : d(new KisKShapeGesturePrivate(*(other.d)))
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-KShapeGesture::~KShapeGesture()
|
||
|
+KisKShapeGesture::~KisKShapeGesture()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-void KShapeGesture::setShape(const QPolygon &shape)
|
||
|
+void KisKShapeGesture::setShape(const QPolygon &shape)
|
||
|
{
|
||
|
//Scale and translate into a 100x100 square with its
|
||
|
//upper left corner at origin.
|
||
|
@@ -125,22 +125,22 @@ void KShapeGesture::setShape(const QPolygon &shape)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KShapeGesture::setShapeName(const QString &friendlyName)
|
||
|
+void KisKShapeGesture::setShapeName(const QString &friendlyName)
|
||
|
{
|
||
|
d->m_friendlyName = friendlyName;
|
||
|
}
|
||
|
|
||
|
-QString KShapeGesture::shapeName() const
|
||
|
+QString KisKShapeGesture::shapeName() const
|
||
|
{
|
||
|
return d->m_friendlyName;
|
||
|
}
|
||
|
|
||
|
-bool KShapeGesture::isValid() const
|
||
|
+bool KisKShapeGesture::isValid() const
|
||
|
{
|
||
|
return !d->m_shape.isEmpty();
|
||
|
}
|
||
|
|
||
|
-QString KShapeGesture::toString() const
|
||
|
+QString KisKShapeGesture::toString() const
|
||
|
{
|
||
|
if (!isValid()) {
|
||
|
return QString();
|
||
|
@@ -160,7 +160,7 @@ QString KShapeGesture::toString() const
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
-QByteArray KShapeGesture::toSvg(const QString &attributes) const
|
||
|
+QByteArray KisKShapeGesture::toSvg(const QString &attributes) const
|
||
|
{
|
||
|
if (!isValid()) {
|
||
|
return QByteArray();
|
||
|
@@ -200,7 +200,7 @@ QByteArray KShapeGesture::toSvg(const QString &attributes) const
|
||
|
fabs(a->distance(b) - b->distance(a)) might turn out to be very interesting,
|
||
|
too. in fact, i think it's the most interesting value.
|
||
|
*/
|
||
|
-float KShapeGesture::distance(const KShapeGesture &other, float abortThreshold) const
|
||
|
+float KisKShapeGesture::distance(const KisKShapeGesture &other, float abortThreshold) const
|
||
|
{
|
||
|
Q_UNUSED(abortThreshold); //for optimizations, later
|
||
|
const QPolygon &o_shape = other.d->m_shape;
|
||
|
@@ -340,7 +340,7 @@ float KShapeGesture::distance(const KShapeGesture &other, float abortThreshold)
|
||
|
return retval / 30.0;
|
||
|
}
|
||
|
|
||
|
-KShapeGesture &KShapeGesture::operator=(const KShapeGesture &other)
|
||
|
+KisKShapeGesture &KisKShapeGesture::operator=(const KisKShapeGesture &other)
|
||
|
{
|
||
|
d->m_lengthTo = other.d->m_lengthTo;
|
||
|
d->m_shape = other.d->m_shape;
|
||
|
@@ -348,7 +348,7 @@ KShapeGesture &KShapeGesture::operator=(const KShapeGesture &other)
|
||
|
return *this;
|
||
|
}
|
||
|
|
||
|
-bool KShapeGesture::operator==(const KShapeGesture &other) const
|
||
|
+bool KisKShapeGesture::operator==(const KisKShapeGesture &other) const
|
||
|
{
|
||
|
//a really fast and workable shortcut
|
||
|
if (fabs(d->m_curveLength - other.d->m_curveLength) > 0.1) {
|
||
|
@@ -357,12 +357,12 @@ bool KShapeGesture::operator==(const KShapeGesture &other) const
|
||
|
return d->m_shape == other.d->m_shape;
|
||
|
}
|
||
|
|
||
|
-bool KShapeGesture::operator!=(const KShapeGesture &other) const
|
||
|
+bool KisKShapeGesture::operator!=(const KisKShapeGesture &other) const
|
||
|
{
|
||
|
return !operator==(other);
|
||
|
}
|
||
|
|
||
|
-uint KShapeGesture::hashable() const
|
||
|
+uint KisKShapeGesture::hashable() const
|
||
|
{
|
||
|
uint hash = 0;
|
||
|
|
||
|
@@ -374,18 +374,18 @@ uint KShapeGesture::hashable() const
|
||
|
}
|
||
|
|
||
|
/********************************************************
|
||
|
- * KRockerGesture *
|
||
|
+ * KisKRockerGesture *
|
||
|
*******************************************************/
|
||
|
|
||
|
-class KRockerGesturePrivate
|
||
|
+class KisKRockerGesturePrivate
|
||
|
{
|
||
|
public:
|
||
|
- KRockerGesturePrivate()
|
||
|
+ KisKRockerGesturePrivate()
|
||
|
: m_hold(Qt::NoButton),
|
||
|
m_thenPush(Qt::NoButton)
|
||
|
{
|
||
|
}
|
||
|
- KRockerGesturePrivate(const KRockerGesturePrivate &other)
|
||
|
+ KisKRockerGesturePrivate(const KisKRockerGesturePrivate &other)
|
||
|
: m_hold(other.m_hold),
|
||
|
m_thenPush(other.m_thenPush)
|
||
|
{
|
||
|
@@ -394,19 +394,19 @@ public:
|
||
|
Qt::MouseButton m_thenPush;
|
||
|
};
|
||
|
|
||
|
-KRockerGesture::KRockerGesture()
|
||
|
- : d(new KRockerGesturePrivate)
|
||
|
+KisKRockerGesture::KisKRockerGesture()
|
||
|
+ : d(new KisKRockerGesturePrivate)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-KRockerGesture::KRockerGesture(Qt::MouseButton hold, Qt::MouseButton thenPush)
|
||
|
- : d(new KRockerGesturePrivate)
|
||
|
+KisKRockerGesture::KisKRockerGesture(Qt::MouseButton hold, Qt::MouseButton thenPush)
|
||
|
+ : d(new KisKRockerGesturePrivate)
|
||
|
{
|
||
|
setButtons(hold, thenPush);
|
||
|
}
|
||
|
|
||
|
-KRockerGesture::KRockerGesture(const QString &description)
|
||
|
- : d(new KRockerGesturePrivate)
|
||
|
+KisKRockerGesture::KisKRockerGesture(const QString &description)
|
||
|
+ : d(new KisKRockerGesturePrivate)
|
||
|
{
|
||
|
if (description.length() != 2) {
|
||
|
return;
|
||
|
@@ -440,17 +440,17 @@ KRockerGesture::KRockerGesture(const QString &description)
|
||
|
d->m_thenPush = thenPush;
|
||
|
}
|
||
|
|
||
|
-KRockerGesture::KRockerGesture(const KRockerGesture &other)
|
||
|
- : d(new KRockerGesturePrivate(*(other.d)))
|
||
|
+KisKRockerGesture::KisKRockerGesture(const KisKRockerGesture &other)
|
||
|
+ : d(new KisKRockerGesturePrivate(*(other.d)))
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-KRockerGesture::~KRockerGesture()
|
||
|
+KisKRockerGesture::~KisKRockerGesture()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-void KRockerGesture::setButtons(Qt::MouseButton hold, Qt::MouseButton thenPush)
|
||
|
+void KisKRockerGesture::setButtons(Qt::MouseButton hold, Qt::MouseButton thenPush)
|
||
|
{
|
||
|
if (hold == thenPush) {
|
||
|
d->m_hold = Qt::NoButton;
|
||
|
@@ -479,13 +479,13 @@ void KRockerGesture::setButtons(Qt::MouseButton hold, Qt::MouseButton thenPush)
|
||
|
d->m_thenPush = thenPush;
|
||
|
}
|
||
|
|
||
|
-void KRockerGesture::getButtons(Qt::MouseButton *hold, Qt::MouseButton *thenPush) const
|
||
|
+void KisKRockerGesture::getButtons(Qt::MouseButton *hold, Qt::MouseButton *thenPush) const
|
||
|
{
|
||
|
*hold = d->m_hold;
|
||
|
*thenPush = d->m_thenPush;
|
||
|
}
|
||
|
|
||
|
-QString KRockerGesture::mouseButtonName(Qt::MouseButton button)
|
||
|
+QString KisKRockerGesture::mouseButtonName(Qt::MouseButton button)
|
||
|
{
|
||
|
switch (button) {
|
||
|
case Qt::LeftButton:
|
||
|
@@ -503,7 +503,7 @@ QString KRockerGesture::mouseButtonName(Qt::MouseButton button)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-QString KRockerGesture::rockerName() const
|
||
|
+QString KisKRockerGesture::rockerName() const
|
||
|
{
|
||
|
if (!isValid()) {
|
||
|
return QString();
|
||
|
@@ -515,12 +515,12 @@ QString KRockerGesture::rockerName() const
|
||
|
"Hold %1, then push %2", mouseButtonName(d->m_hold), mouseButtonName(d->m_thenPush));
|
||
|
}
|
||
|
|
||
|
-bool KRockerGesture::isValid() const
|
||
|
+bool KisKRockerGesture::isValid() const
|
||
|
{
|
||
|
return (d->m_hold != Qt::NoButton);
|
||
|
}
|
||
|
|
||
|
-QString KRockerGesture::toString() const
|
||
|
+QString KisKRockerGesture::toString() const
|
||
|
{
|
||
|
if (!isValid()) {
|
||
|
return QString();
|
||
|
@@ -554,24 +554,24 @@ QString KRockerGesture::toString() const
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
-KRockerGesture &KRockerGesture::operator=(const KRockerGesture &other)
|
||
|
+KisKRockerGesture &KisKRockerGesture::operator=(const KisKRockerGesture &other)
|
||
|
{
|
||
|
d->m_hold = other.d->m_hold;
|
||
|
d->m_thenPush = other.d->m_thenPush;
|
||
|
return *this;
|
||
|
}
|
||
|
|
||
|
-bool KRockerGesture::operator==(const KRockerGesture &other) const
|
||
|
+bool KisKRockerGesture::operator==(const KisKRockerGesture &other) const
|
||
|
{
|
||
|
return d->m_hold == other.d->m_hold && d->m_thenPush == other.d->m_thenPush;
|
||
|
}
|
||
|
|
||
|
-bool KRockerGesture::operator!=(const KRockerGesture &other) const
|
||
|
+bool KisKRockerGesture::operator!=(const KisKRockerGesture &other) const
|
||
|
{
|
||
|
return !operator==(other);
|
||
|
}
|
||
|
|
||
|
-uint KRockerGesture::hashable() const
|
||
|
+uint KisKRockerGesture::hashable() const
|
||
|
{
|
||
|
//make it asymmetric
|
||
|
return qHash(d->m_hold) + d->m_thenPush;
|
||
|
diff --git a/libs/widgetutils/xmlgui/kgesture_p.h b/libs/widgetutils/xmlgui/kgesture_p.h
|
||
|
index 23486e8cc0..a6bb1bad15 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kgesture_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kgesture_p.h
|
||
|
@@ -19,15 +19,15 @@
|
||
|
-"rocker" (i.e. two mouse button) gestures
|
||
|
*/
|
||
|
|
||
|
-class KShapeGesturePrivate;
|
||
|
+class KisKShapeGesturePrivate;
|
||
|
//TODO: implement operator== for special situations like in KKeyChooser.
|
||
|
-class KRITAWIDGETUTILS_EXPORT KShapeGesture
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKShapeGesture
|
||
|
{
|
||
|
public:
|
||
|
/**
|
||
|
* Create a new invalid shape gesture.
|
||
|
*/
|
||
|
- KShapeGesture();
|
||
|
+ KisKShapeGesture();
|
||
|
|
||
|
/**
|
||
|
* Creates a new gesture consisting of given shape.
|
||
|
@@ -38,24 +38,24 @@ public:
|
||
|
* are allowed to be at the same position.
|
||
|
* @param shape shape to draw to trigger this gesture
|
||
|
*/
|
||
|
- KShapeGesture(const QPolygon &shape);
|
||
|
+ KisKShapeGesture(const QPolygon &shape);
|
||
|
|
||
|
/**
|
||
|
* Creates a new gesture from a string description.
|
||
|
* @param description create gesture according to this
|
||
|
*/
|
||
|
- KShapeGesture(const QString &description);
|
||
|
+ KisKShapeGesture(const QString &description);
|
||
|
|
||
|
/**
|
||
|
* Copies the given gesture.
|
||
|
* @param other gesture to copy
|
||
|
*/
|
||
|
- KShapeGesture(const KShapeGesture &other);
|
||
|
+ KisKShapeGesture(const KisKShapeGesture &other);
|
||
|
|
||
|
/**
|
||
|
* Destructor.
|
||
|
*/
|
||
|
- ~KShapeGesture();
|
||
|
+ ~KisKShapeGesture();
|
||
|
|
||
|
/**
|
||
|
* Set the shape to draw to trigger this gesture.
|
||
|
@@ -102,22 +102,22 @@ public:
|
||
|
* and return a very large difference in that case.
|
||
|
* Usual return values range from x to y //TODO: fill in x and y
|
||
|
*/
|
||
|
- float distance(const KShapeGesture &other, float abortThreshold) const;
|
||
|
+ float distance(const KisKShapeGesture &other, float abortThreshold) const;
|
||
|
|
||
|
/**
|
||
|
* Set this gesture to the other gesture.
|
||
|
*/
|
||
|
- KShapeGesture &operator=(const KShapeGesture &other);
|
||
|
+ KisKShapeGesture &operator=(const KisKShapeGesture &other);
|
||
|
|
||
|
/**
|
||
|
* Return whether this gesture is equal to the other gesture.
|
||
|
*/
|
||
|
- bool operator==(const KShapeGesture &other) const;
|
||
|
+ bool operator==(const KisKShapeGesture &other) const;
|
||
|
|
||
|
/**
|
||
|
* Return the opposite of operator==()
|
||
|
*/
|
||
|
- bool operator!=(const KShapeGesture &other) const;
|
||
|
+ bool operator!=(const KisKShapeGesture &other) const;
|
||
|
|
||
|
/**
|
||
|
* Return an opaque value for use in hash tables
|
||
|
@@ -125,47 +125,47 @@ public:
|
||
|
uint hashable() const;
|
||
|
|
||
|
private:
|
||
|
- KShapeGesturePrivate *const d;
|
||
|
+ KisKShapeGesturePrivate *const d;
|
||
|
};
|
||
|
|
||
|
-inline uint qHash(const KShapeGesture &key)
|
||
|
+inline uint qHash(const KisKShapeGesture &key)
|
||
|
{
|
||
|
return qHash(key.hashable());
|
||
|
}
|
||
|
|
||
|
-class KRockerGesturePrivate;
|
||
|
+class KisKRockerGesturePrivate;
|
||
|
|
||
|
-class KRITAWIDGETUTILS_EXPORT KRockerGesture
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKRockerGesture
|
||
|
{
|
||
|
public:
|
||
|
/**
|
||
|
* Create a new invalid rocker gesture.
|
||
|
*/
|
||
|
- KRockerGesture();
|
||
|
+ KisKRockerGesture();
|
||
|
|
||
|
/**
|
||
|
* Creates a new gesture consisting of given buttons.
|
||
|
* @param hold create gesture according to this hold
|
||
|
* @param thenPush create gesture according to this push
|
||
|
*/
|
||
|
- KRockerGesture(enum Qt::MouseButton hold, enum Qt::MouseButton thenPush);
|
||
|
+ KisKRockerGesture(enum Qt::MouseButton hold, enum Qt::MouseButton thenPush);
|
||
|
|
||
|
/**
|
||
|
* Creates a new gesture from a string description.
|
||
|
* @param description create gesture according to this
|
||
|
*/
|
||
|
- KRockerGesture(const QString &description);
|
||
|
+ KisKRockerGesture(const QString &description);
|
||
|
|
||
|
/**
|
||
|
* Copies the given gesture.
|
||
|
* @param other gesture to copy
|
||
|
*/
|
||
|
- KRockerGesture(const KRockerGesture &other);
|
||
|
+ KisKRockerGesture(const KisKRockerGesture &other);
|
||
|
|
||
|
/**
|
||
|
* Destructor.
|
||
|
*/
|
||
|
- ~KRockerGesture();
|
||
|
+ ~KisKRockerGesture();
|
||
|
|
||
|
/**
|
||
|
* set button combination to trigger
|
||
|
@@ -204,17 +204,17 @@ public:
|
||
|
/**
|
||
|
* Set this gesture to the other gesture.
|
||
|
*/
|
||
|
- KRockerGesture &operator=(const KRockerGesture &other);
|
||
|
+ KisKRockerGesture &operator=(const KisKRockerGesture &other);
|
||
|
|
||
|
/**
|
||
|
* Return whether this gesture is equal to the other gesture.
|
||
|
*/
|
||
|
- bool operator==(const KRockerGesture &other) const;
|
||
|
+ bool operator==(const KisKRockerGesture &other) const;
|
||
|
|
||
|
/**
|
||
|
* Return the opposite of operator==()
|
||
|
*/
|
||
|
- bool operator!=(const KRockerGesture &other) const;
|
||
|
+ bool operator!=(const KisKRockerGesture &other) const;
|
||
|
|
||
|
/**
|
||
|
* Return an opaque value for use in hash tables
|
||
|
@@ -222,10 +222,10 @@ public:
|
||
|
uint hashable() const;
|
||
|
|
||
|
private:
|
||
|
- KRockerGesturePrivate *const d;
|
||
|
+ KisKRockerGesturePrivate *const d;
|
||
|
};
|
||
|
|
||
|
-inline uint qHash(const KRockerGesture &key)
|
||
|
+inline uint qHash(const KisKRockerGesture &key)
|
||
|
{
|
||
|
return qHash(key.hashable());
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/kgesturemap.cpp b/libs/widgetutils/xmlgui/kgesturemap.cpp
|
||
|
index 8caa242455..79bd8f9fa2 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kgesturemap.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kgesturemap.cpp
|
||
|
@@ -17,24 +17,24 @@
|
||
|
code.
|
||
|
*/
|
||
|
|
||
|
-class KGestureMapContainer
|
||
|
+class KisKGestureMapContainer
|
||
|
{
|
||
|
public:
|
||
|
- KGestureMap gestureMap;
|
||
|
+ KisKGestureMap gestureMap;
|
||
|
};
|
||
|
|
||
|
-Q_GLOBAL_STATIC(KGestureMapContainer, g_instance)
|
||
|
+Q_GLOBAL_STATIC(KisKGestureMapContainer, g_instance)
|
||
|
|
||
|
-KGestureMap::~KGestureMap()
|
||
|
+KisKGestureMap::~KisKGestureMap()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-KGestureMap *KGestureMap::self()
|
||
|
+KisKGestureMap *KisKGestureMap::self()
|
||
|
{
|
||
|
return &g_instance()->gestureMap;
|
||
|
}
|
||
|
|
||
|
-KGestureMap::KGestureMap()
|
||
|
+KisKGestureMap::KisKGestureMap()
|
||
|
{
|
||
|
m_gestureTimeout.setSingleShot(true);
|
||
|
connect(&m_gestureTimeout, SIGNAL(timeout()), this, SLOT(stopAcquisition()));
|
||
|
@@ -46,57 +46,57 @@ KGestureMap::KGestureMap()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KGestureMap::setShapeGesture(QAction *act, const KShapeGesture &gesture)
|
||
|
+void KisKGestureMap::setShapeGesture(QAction *act, const KisKShapeGesture &gesture)
|
||
|
{
|
||
|
if (!gesture.isValid() || !act) {
|
||
|
return;
|
||
|
}
|
||
|
- qDebug() << "KGestureMap::addGesture(KShapeGesture ...)";
|
||
|
+ qDebug() << "KisKGestureMap::addGesture(KisKShapeGesture ...)";
|
||
|
if (m_shapeGestures.contains(gesture)) {
|
||
|
qWarning() << "Replacing an action for a gesture already taken";
|
||
|
}
|
||
|
m_shapeGestures.insert(gesture, act);
|
||
|
}
|
||
|
|
||
|
-void KGestureMap::setRockerGesture(QAction *act, const KRockerGesture &gesture)
|
||
|
+void KisKGestureMap::setRockerGesture(QAction *act, const KisKRockerGesture &gesture)
|
||
|
{
|
||
|
if (!gesture.isValid() || !act) {
|
||
|
return;
|
||
|
}
|
||
|
- qDebug() << "KGestureMap::addGesture(KRockerGesture ...)";
|
||
|
+ qDebug() << "KisKGestureMap::addGesture(KisKRockerGesture ...)";
|
||
|
if (m_rockerGestures.contains(gesture)) {
|
||
|
qWarning() << "Replacing an action for a gesture already taken";
|
||
|
}
|
||
|
m_rockerGestures.insert(gesture, act);
|
||
|
}
|
||
|
|
||
|
-void KGestureMap::setDefaultShapeGesture(QAction *act, const KShapeGesture &gesture)
|
||
|
+void KisKGestureMap::setDefaultShapeGesture(QAction *act, const KisKShapeGesture &gesture)
|
||
|
{
|
||
|
if (!gesture.isValid() || !act) {
|
||
|
return;
|
||
|
}
|
||
|
- qDebug() << "KGestureMap::addGesture(KShapeGesture ...)";
|
||
|
+ qDebug() << "KisKGestureMap::addGesture(KisKShapeGesture ...)";
|
||
|
if (m_defaultShapeGestures.contains(gesture)) {
|
||
|
qWarning() << "Replacing an action for a gesture already taken";
|
||
|
}
|
||
|
m_defaultShapeGestures.insert(gesture, act);
|
||
|
}
|
||
|
|
||
|
-void KGestureMap::setDefaultRockerGesture(QAction *act, const KRockerGesture &gesture)
|
||
|
+void KisKGestureMap::setDefaultRockerGesture(QAction *act, const KisKRockerGesture &gesture)
|
||
|
{
|
||
|
if (!gesture.isValid() || !act) {
|
||
|
return;
|
||
|
}
|
||
|
- qDebug() << "KGestureMap::addGesture(KRockerGesture ...)";
|
||
|
+ qDebug() << "KisKGestureMap::addGesture(KisKRockerGesture ...)";
|
||
|
if (m_defaultRockerGestures.contains(gesture)) {
|
||
|
qWarning() << "Replacing an action for a gesture already taken";
|
||
|
}
|
||
|
m_defaultRockerGestures.insert(gesture, act);
|
||
|
}
|
||
|
|
||
|
-void KGestureMap::removeAllGestures(QAction *kact)
|
||
|
+void KisKGestureMap::removeAllGestures(QAction *kact)
|
||
|
{
|
||
|
- KShapeGesture activeGesture;
|
||
|
+ KisKShapeGesture activeGesture;
|
||
|
ShapeGestureHash::iterator si = m_shapeGestures.begin();
|
||
|
ShapeGestureHash::iterator send = m_shapeGestures.end();
|
||
|
for (; si != send; ++si) {
|
||
|
@@ -134,24 +134,24 @@ void KGestureMap::removeAllGestures(QAction *kact)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-QAction *KGestureMap::findAction(const KShapeGesture &gesture) const
|
||
|
+QAction *KisKGestureMap::findAction(const KisKShapeGesture &gesture) const
|
||
|
{
|
||
|
return m_shapeGestures.value(gesture);
|
||
|
}
|
||
|
|
||
|
-QAction *KGestureMap::findAction(const KRockerGesture &gesture) const
|
||
|
+QAction *KisKGestureMap::findAction(const KisKRockerGesture &gesture) const
|
||
|
{
|
||
|
return m_rockerGestures.value(gesture);
|
||
|
}
|
||
|
|
||
|
-void KGestureMap::installEventFilterOnMe(QApplication *app)
|
||
|
+void KisKGestureMap::installEventFilterOnMe(QApplication *app)
|
||
|
{
|
||
|
app->installEventFilter(this);
|
||
|
}
|
||
|
|
||
|
-KShapeGesture KGestureMap::shapeGesture(const QAction *kact) const
|
||
|
+KisKShapeGesture KisKGestureMap::shapeGesture(const QAction *kact) const
|
||
|
{
|
||
|
- KShapeGesture activeGesture;
|
||
|
+ KisKShapeGesture activeGesture;
|
||
|
ShapeGestureHash::const_iterator it = m_shapeGestures.constBegin();
|
||
|
ShapeGestureHash::const_iterator end = m_shapeGestures.constEnd();
|
||
|
for (; it != end; ++it) {
|
||
|
@@ -163,9 +163,9 @@ KShapeGesture KGestureMap::shapeGesture(const QAction *kact) const
|
||
|
return activeGesture;
|
||
|
}
|
||
|
|
||
|
-KShapeGesture KGestureMap::defaultShapeGesture(const QAction *kact) const
|
||
|
+KisKShapeGesture KisKGestureMap::defaultShapeGesture(const QAction *kact) const
|
||
|
{
|
||
|
- KShapeGesture defaultGesture;
|
||
|
+ KisKShapeGesture defaultGesture;
|
||
|
ShapeGestureHash::const_iterator it = m_defaultShapeGestures.constBegin();
|
||
|
ShapeGestureHash::const_iterator end = m_defaultShapeGestures.constEnd();
|
||
|
for (; it != end; ++it) {
|
||
|
@@ -177,9 +177,9 @@ KShapeGesture KGestureMap::defaultShapeGesture(const QAction *kact) const
|
||
|
return defaultGesture;
|
||
|
}
|
||
|
|
||
|
-KRockerGesture KGestureMap::rockerGesture(const QAction *kact) const
|
||
|
+KisKRockerGesture KisKGestureMap::rockerGesture(const QAction *kact) const
|
||
|
{
|
||
|
- KRockerGesture activeGesture;
|
||
|
+ KisKRockerGesture activeGesture;
|
||
|
RockerGestureHash::const_iterator it = m_rockerGestures.constBegin();
|
||
|
RockerGestureHash::const_iterator end = m_rockerGestures.constEnd();
|
||
|
for (; it != end; ++it) {
|
||
|
@@ -191,9 +191,9 @@ KRockerGesture KGestureMap::rockerGesture(const QAction *kact) const
|
||
|
return activeGesture;
|
||
|
}
|
||
|
|
||
|
-KRockerGesture KGestureMap::defaultRockerGesture(const QAction *kact) const
|
||
|
+KisKRockerGesture KisKGestureMap::defaultRockerGesture(const QAction *kact) const
|
||
|
{
|
||
|
- KRockerGesture defaultGesture;
|
||
|
+ KisKRockerGesture defaultGesture;
|
||
|
RockerGestureHash::const_iterator it = m_defaultRockerGestures.constBegin();
|
||
|
RockerGestureHash::const_iterator end = m_defaultRockerGestures.constEnd();
|
||
|
for (; it != end; ++it) {
|
||
|
@@ -205,7 +205,7 @@ KRockerGesture KGestureMap::defaultRockerGesture(const QAction *kact) const
|
||
|
return defaultGesture;
|
||
|
}
|
||
|
|
||
|
-inline int KGestureMap::bitCount(int n)
|
||
|
+inline int KisKGestureMap::bitCount(int n)
|
||
|
{
|
||
|
int count = 0;
|
||
|
while (n) {
|
||
|
@@ -215,7 +215,7 @@ inline int KGestureMap::bitCount(int n)
|
||
|
return count;
|
||
|
}
|
||
|
|
||
|
-void KGestureMap::handleAction(QAction *kact)
|
||
|
+void KisKGestureMap::handleAction(QAction *kact)
|
||
|
{
|
||
|
if (!kact) {
|
||
|
return;
|
||
|
@@ -226,14 +226,14 @@ void KGestureMap::handleAction(QAction *kact)
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
-void KGestureMap::matchShapeGesture()
|
||
|
+void KisKGestureMap::matchShapeGesture()
|
||
|
{
|
||
|
//TODO: tune and tweak until satisfied with result :)
|
||
|
m_shapeGesture.setShape(m_points);
|
||
|
float dist, minDist = 20.0;
|
||
|
QAction *bestMatch = 0;
|
||
|
|
||
|
- for (QHash<KShapeGesture, QAction *>::const_iterator it = m_shapeGestures.constBegin();
|
||
|
+ for (QHash<KisKShapeGesture, QAction *>::const_iterator it = m_shapeGestures.constBegin();
|
||
|
it != m_shapeGestures.constEnd(); ++it) {
|
||
|
dist = m_shapeGesture.distance(it.key(), 1000.0);
|
||
|
if (dist < minDist) {
|
||
|
@@ -245,7 +245,7 @@ void KGestureMap::matchShapeGesture()
|
||
|
}
|
||
|
|
||
|
//slot
|
||
|
-void KGestureMap::stopAcquisition()
|
||
|
+void KisKGestureMap::stopAcquisition()
|
||
|
{
|
||
|
m_gestureTimeout.stop();
|
||
|
m_acquiring = false;
|
||
|
@@ -262,7 +262,7 @@ void KGestureMap::stopAcquisition()
|
||
|
* unintended clicks on links where there was free space before.
|
||
|
*/
|
||
|
|
||
|
-bool KGestureMap::eventFilter(QObject *obj, QEvent *e)
|
||
|
+bool KisKGestureMap::eventFilter(QObject *obj, QEvent *e)
|
||
|
{
|
||
|
//disable until it does not interfere with other input any more
|
||
|
return false;
|
||
|
diff --git a/libs/widgetutils/xmlgui/kgesturemap_p.h b/libs/widgetutils/xmlgui/kgesturemap_p.h
|
||
|
index 67fb757e60..7d80713fa2 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kgesturemap_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kgesturemap_p.h
|
||
|
@@ -18,35 +18,35 @@ class QApplication;
|
||
|
class QAction;
|
||
|
class QEvent;
|
||
|
|
||
|
-class KRITAWIDGETUTILS_EXPORT KGestureMap : public QObject
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKGestureMap : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
- static KGestureMap *self();
|
||
|
+ static KisKGestureMap *self();
|
||
|
|
||
|
bool eventFilter(QObject *obj, QEvent *e) override;
|
||
|
- void setShapeGesture(QAction *kact, const KShapeGesture &gesture);
|
||
|
- void setRockerGesture(QAction *kact, const KRockerGesture &gesture);
|
||
|
- void setDefaultShapeGesture(QAction *kact, const KShapeGesture &gesture);
|
||
|
- void setDefaultRockerGesture(QAction *kact, const KRockerGesture &gesture);
|
||
|
+ void setShapeGesture(QAction *kact, const KisKShapeGesture &gesture);
|
||
|
+ void setRockerGesture(QAction *kact, const KisKRockerGesture &gesture);
|
||
|
+ void setDefaultShapeGesture(QAction *kact, const KisKShapeGesture &gesture);
|
||
|
+ void setDefaultRockerGesture(QAction *kact, const KisKRockerGesture &gesture);
|
||
|
/**
|
||
|
* This method will remove all gestures defined for a given action
|
||
|
*/
|
||
|
void removeAllGestures(QAction *kact);
|
||
|
- QAction *findAction(const KShapeGesture &gesture) const;
|
||
|
- QAction *findAction(const KRockerGesture &gesture) const;
|
||
|
- KShapeGesture shapeGesture(const QAction *kact) const;
|
||
|
- KShapeGesture defaultShapeGesture(const QAction *kact) const;
|
||
|
- KRockerGesture rockerGesture(const QAction *kact) const;
|
||
|
- KRockerGesture defaultRockerGesture(const QAction *kact) const;
|
||
|
+ QAction *findAction(const KisKShapeGesture &gesture) const;
|
||
|
+ QAction *findAction(const KisKRockerGesture &gesture) const;
|
||
|
+ KisKShapeGesture shapeGesture(const QAction *kact) const;
|
||
|
+ KisKShapeGesture defaultShapeGesture(const QAction *kact) const;
|
||
|
+ KisKRockerGesture rockerGesture(const QAction *kact) const;
|
||
|
+ KisKRockerGesture defaultRockerGesture(const QAction *kact) const;
|
||
|
|
||
|
private Q_SLOTS:
|
||
|
void stopAcquisition();
|
||
|
|
||
|
private:
|
||
|
- friend class KGestureMapContainer;
|
||
|
- KGestureMap();
|
||
|
- ~KGestureMap() override;
|
||
|
+ friend class KisKGestureMapContainer;
|
||
|
+ KisKGestureMap();
|
||
|
+ ~KisKGestureMap() override;
|
||
|
|
||
|
friend class KApplicationPrivate;
|
||
|
//intended to be used at application initialization
|
||
|
@@ -57,8 +57,8 @@ private:
|
||
|
void matchShapeGesture();
|
||
|
|
||
|
//this is an internal class so don't bother with a d-pointer
|
||
|
- typedef QHash< KShapeGesture, QAction * > ShapeGestureHash;
|
||
|
- typedef QHash< KRockerGesture, QAction * > RockerGestureHash;
|
||
|
+ typedef QHash< KisKShapeGesture, QAction * > ShapeGestureHash;
|
||
|
+ typedef QHash< KisKRockerGesture, QAction * > RockerGestureHash;
|
||
|
ShapeGestureHash m_shapeGestures;
|
||
|
ShapeGestureHash m_defaultShapeGestures;
|
||
|
RockerGestureHash m_rockerGestures;
|
||
|
@@ -67,8 +67,8 @@ private:
|
||
|
QTimer m_gestureTimeout;
|
||
|
bool m_acquiring;
|
||
|
|
||
|
- KShapeGesture m_shapeGesture;
|
||
|
- KRockerGesture m_rockerGesture;
|
||
|
+ KisKShapeGesture m_shapeGesture;
|
||
|
+ KisKRockerGesture m_rockerGesture;
|
||
|
};
|
||
|
|
||
|
#endif //KGESTUREMAP_H
|
||
|
diff --git a/libs/widgetutils/xmlgui/khelpmenu.cpp b/libs/widgetutils/xmlgui/khelpmenu.cpp
|
||
|
index add20c28bf..0818786926 100644
|
||
|
--- a/libs/widgetutils/xmlgui/khelpmenu.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/khelpmenu.cpp
|
||
|
@@ -37,10 +37,10 @@
|
||
|
|
||
|
using namespace KDEPrivate;
|
||
|
|
||
|
-class KHelpMenuPrivate
|
||
|
+class KisKHelpMenuPrivate
|
||
|
{
|
||
|
public:
|
||
|
- KHelpMenuPrivate()
|
||
|
+ KisKHelpMenuPrivate()
|
||
|
:
|
||
|
mSwitchApplicationLanguage(0),
|
||
|
mActionsCreated(false),
|
||
|
@@ -57,7 +57,7 @@ public:
|
||
|
mAboutAppAction = 0;
|
||
|
mAboutKDEAction = 0;
|
||
|
}
|
||
|
- ~KHelpMenuPrivate()
|
||
|
+ ~KisKHelpMenuPrivate()
|
||
|
{
|
||
|
delete mMenu;
|
||
|
delete mAboutApp;
|
||
|
@@ -66,13 +66,13 @@ public:
|
||
|
delete mSwitchApplicationLanguage;
|
||
|
}
|
||
|
|
||
|
- void createActions(KHelpMenu *q);
|
||
|
+ void createActions(KisKHelpMenu *q);
|
||
|
|
||
|
QMenu *mMenu;
|
||
|
QDialog *mAboutApp;
|
||
|
- KAboutKdeDialog *mAboutKDE;
|
||
|
- KBugReport *mBugReport;
|
||
|
- KSwitchLanguageDialog *mSwitchApplicationLanguage;
|
||
|
+ KisKAboutKdeDialog *mAboutKDE;
|
||
|
+ KisKBugReport *mBugReport;
|
||
|
+ KisKSwitchLanguageDialog *mSwitchApplicationLanguage;
|
||
|
// TODO evaluate if we use static_cast<QWidget*>(parent()) instead of mParent to win that bit of memory
|
||
|
QWidget *mParent;
|
||
|
QString mAboutAppText;
|
||
|
@@ -86,9 +86,9 @@ public:
|
||
|
KAboutData mAboutData;
|
||
|
};
|
||
|
|
||
|
-KHelpMenu::KHelpMenu(QWidget *parent, const QString &aboutAppText,
|
||
|
+KisKHelpMenu::KisKHelpMenu(QWidget *parent, const QString &aboutAppText,
|
||
|
bool showWhatsThis)
|
||
|
- : QObject(parent), d(new KHelpMenuPrivate)
|
||
|
+ : QObject(parent), d(new KisKHelpMenuPrivate)
|
||
|
{
|
||
|
d->mAboutAppText = aboutAppText;
|
||
|
d->mShowWhatsThis = showWhatsThis;
|
||
|
@@ -96,9 +96,9 @@ KHelpMenu::KHelpMenu(QWidget *parent, const QString &aboutAppText,
|
||
|
d->createActions(this);
|
||
|
}
|
||
|
|
||
|
-KHelpMenu::KHelpMenu(QWidget *parent, const KAboutData &aboutData,
|
||
|
+KisKHelpMenu::KisKHelpMenu(QWidget *parent, const KAboutData &aboutData,
|
||
|
bool showWhatsThis)
|
||
|
- : QObject(parent), d(new KHelpMenuPrivate)
|
||
|
+ : QObject(parent), d(new KisKHelpMenuPrivate)
|
||
|
{
|
||
|
d->mShowWhatsThis = showWhatsThis;
|
||
|
d->mParent = parent;
|
||
|
@@ -106,12 +106,12 @@ KHelpMenu::KHelpMenu(QWidget *parent, const KAboutData &aboutData,
|
||
|
d->createActions(this);
|
||
|
}
|
||
|
|
||
|
-KHelpMenu::~KHelpMenu()
|
||
|
+KisKHelpMenu::~KisKHelpMenu()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-void KHelpMenuPrivate::createActions(KHelpMenu *q)
|
||
|
+void KisKHelpMenuPrivate::createActions(KisKHelpMenu *q)
|
||
|
{
|
||
|
if (mActionsCreated) {
|
||
|
return;
|
||
|
@@ -132,7 +132,7 @@ void KHelpMenuPrivate::createActions(KHelpMenu *q)
|
||
|
}
|
||
|
|
||
|
// Used in the non-xml-gui case, like kfind or ksnapshot's help button.
|
||
|
-QMenu *KHelpMenu::menu()
|
||
|
+QMenu *KisKHelpMenu::menu()
|
||
|
{
|
||
|
if (!d->mMenu) {
|
||
|
d->mMenu = new QMenu();
|
||
|
@@ -185,7 +185,7 @@ QMenu *KHelpMenu::menu()
|
||
|
return d->mMenu;
|
||
|
}
|
||
|
|
||
|
-QAction *KHelpMenu::action(MenuId id) const
|
||
|
+QAction *KisKHelpMenu::action(MenuId id) const
|
||
|
{
|
||
|
switch (id) {
|
||
|
case menuHelpContents:
|
||
|
@@ -216,55 +216,55 @@ QAction *KHelpMenu::action(MenuId id) const
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
-void KHelpMenu::appHelpActivated()
|
||
|
+void KisKHelpMenu::appHelpActivated()
|
||
|
{
|
||
|
QDesktopServices::openUrl(QUrl(QStringLiteral("help:/")));
|
||
|
}
|
||
|
|
||
|
-void KHelpMenu::aboutApplication()
|
||
|
+void KisKHelpMenu::aboutApplication()
|
||
|
{
|
||
|
if (receivers(SIGNAL(showAboutApplication())) > 0) {
|
||
|
emit showAboutApplication();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KHelpMenu::aboutKDE()
|
||
|
+void KisKHelpMenu::aboutKDE()
|
||
|
{
|
||
|
if (!d->mAboutKDE) {
|
||
|
- d->mAboutKDE = new KAboutKdeDialog(d->mParent);
|
||
|
+ d->mAboutKDE = new KisKAboutKdeDialog(d->mParent);
|
||
|
connect(d->mAboutKDE, SIGNAL(finished(int)), this, SLOT(dialogFinished()));
|
||
|
}
|
||
|
d->mAboutKDE->show();
|
||
|
}
|
||
|
|
||
|
-void KHelpMenu::reportBug()
|
||
|
+void KisKHelpMenu::reportBug()
|
||
|
{
|
||
|
#ifdef KRITA_STABLE
|
||
|
QDesktopServices::openUrl(QUrl("https://docs.krita.org/en/untranslatable_pages/reporting_bugs.html"));
|
||
|
#else
|
||
|
if (!d->mBugReport) {
|
||
|
- d->mBugReport = new KBugReport(d->mAboutData, d->mParent);
|
||
|
+ d->mBugReport = new KisKBugReport(d->mAboutData, d->mParent);
|
||
|
connect(d->mBugReport, SIGNAL(finished(int)), this, SLOT(dialogFinished()));
|
||
|
}
|
||
|
d->mBugReport->show();
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
-void KHelpMenu::switchApplicationLanguage()
|
||
|
+void KisKHelpMenu::switchApplicationLanguage()
|
||
|
{
|
||
|
if (!d->mSwitchApplicationLanguage) {
|
||
|
- d->mSwitchApplicationLanguage = new KSwitchLanguageDialog(d->mParent);
|
||
|
+ d->mSwitchApplicationLanguage = new KisKSwitchLanguageDialog(d->mParent);
|
||
|
connect(d->mSwitchApplicationLanguage, SIGNAL(finished(int)), this, SLOT(dialogFinished()));
|
||
|
}
|
||
|
d->mSwitchApplicationLanguage->show();
|
||
|
}
|
||
|
|
||
|
-void KHelpMenu::dialogFinished()
|
||
|
+void KisKHelpMenu::dialogFinished()
|
||
|
{
|
||
|
QTimer::singleShot(0, this, SLOT(timerExpired()));
|
||
|
}
|
||
|
|
||
|
-void KHelpMenu::timerExpired()
|
||
|
+void KisKHelpMenu::timerExpired()
|
||
|
{
|
||
|
if (d->mAboutKDE && !d->mAboutKDE->isVisible()) {
|
||
|
delete d->mAboutKDE; d->mAboutKDE = 0;
|
||
|
@@ -281,12 +281,12 @@ void KHelpMenu::timerExpired()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KHelpMenu::menuDestroyed()
|
||
|
+void KisKHelpMenu::menuDestroyed()
|
||
|
{
|
||
|
d->mMenu = 0;
|
||
|
}
|
||
|
|
||
|
-void KHelpMenu::contextHelpActivated()
|
||
|
+void KisKHelpMenu::contextHelpActivated()
|
||
|
{
|
||
|
QWhatsThis::enterWhatsThisMode();
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/khelpmenu.h b/libs/widgetutils/xmlgui/khelpmenu.h
|
||
|
index b1927cb2fa..62f80bc87f 100644
|
||
|
--- a/libs/widgetutils/xmlgui/khelpmenu.h
|
||
|
+++ b/libs/widgetutils/xmlgui/khelpmenu.h
|
||
|
@@ -19,7 +19,7 @@ class QWidget;
|
||
|
class QAction;
|
||
|
|
||
|
class KAboutData;
|
||
|
-class KHelpMenuPrivate;
|
||
|
+class KisKHelpMenuPrivate;
|
||
|
|
||
|
/**
|
||
|
* @short Standard %KDE help menu with dialog boxes.
|
||
|
@@ -27,33 +27,33 @@ class KHelpMenuPrivate;
|
||
|
* This class provides the standard %KDE help menu with the default "about"
|
||
|
* dialog boxes and help entry.
|
||
|
*
|
||
|
- * This class is used in KMainWindow so
|
||
|
+ * This class is used in KisKMainWindow so
|
||
|
* normally you don't need to use this class yourself. However, if you
|
||
|
* need the help menu or any of its dialog boxes in your code that is
|
||
|
- * not subclassed from KMainWindow you should use this class.
|
||
|
+ * not subclassed from KisKMainWindow you should use this class.
|
||
|
*
|
||
|
* The usage is simple:
|
||
|
*
|
||
|
* \code
|
||
|
- * mHelpMenu = new KHelpMenu( this, <someText> );
|
||
|
+ * mHelpMenu = new KisKHelpMenu( this, <someText> );
|
||
|
* kmenubar->addMenu(mHelpMenu->menu() );
|
||
|
* \endcode
|
||
|
*
|
||
|
* or if you just want to open a dialog box:
|
||
|
*
|
||
|
* \code
|
||
|
- * mHelpMenu = new KHelpMenu( this, <someText> );
|
||
|
+ * mHelpMenu = new KisKHelpMenu( this, <someText> );
|
||
|
* connect( this, SIGNAL(someSignal()), mHelpMenu,SLOT(aboutKDE()));
|
||
|
* \endcode
|
||
|
*
|
||
|
* IMPORTANT:
|
||
|
- * The first time you use KHelpMenu::menu(), a QMenu object is
|
||
|
+ * The first time you use KisKHelpMenu::menu(), a QMenu object is
|
||
|
* allocated. Only one object is created by the class so if you call
|
||
|
- * KHelpMenu::menu() twice or more, the same pointer is returned. The class
|
||
|
+ * KisKHelpMenu::menu() twice or more, the same pointer is returned. The class
|
||
|
* will destroy the popupmenu in the destructor so do not delete this
|
||
|
* pointer yourself.
|
||
|
*
|
||
|
- * The KHelpMenu object will be deleted when its parent is destroyed but you
|
||
|
+ * The KisKHelpMenu object will be deleted when its parent is destroyed but you
|
||
|
* can delete it yourself if you want. The code below will always work.
|
||
|
*
|
||
|
* \code
|
||
|
@@ -75,7 +75,7 @@ class KHelpMenuPrivate;
|
||
|
* void MyClass::myFunc()
|
||
|
* {
|
||
|
* ..
|
||
|
- * KHelpMenu *helpMenu = new KHelpMenu( this );
|
||
|
+ * KisKHelpMenu *helpMenu = new KisKHelpMenu( this );
|
||
|
* connect( helpMenu, SIGNAL(showAboutApplication()),
|
||
|
* this, SLOT(myDialogSlot()));
|
||
|
* ..
|
||
|
@@ -102,7 +102,7 @@ class KHelpMenuPrivate;
|
||
|
* @author Espen Sand (espen@kde.org)
|
||
|
*/
|
||
|
|
||
|
-class KRITAWIDGETUTILS_EXPORT KHelpMenu : public QObject
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKHelpMenu : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
@@ -118,7 +118,7 @@ public:
|
||
|
* added to the dialog.
|
||
|
*
|
||
|
*/
|
||
|
- explicit KHelpMenu(QWidget *parent = 0, const QString &aboutAppText = QString(),
|
||
|
+ explicit KisKHelpMenu(QWidget *parent = 0, const QString &aboutAppText = QString(),
|
||
|
bool showWhatsThis = true);
|
||
|
|
||
|
/**
|
||
|
@@ -134,7 +134,7 @@ public:
|
||
|
* @param showWhatsThis Decides whether a "Whats this" entry will be
|
||
|
* added to the dialog.
|
||
|
*/
|
||
|
- KHelpMenu(QWidget *parent, const KAboutData &aboutData,
|
||
|
+ KisKHelpMenu(QWidget *parent, const KAboutData &aboutData,
|
||
|
bool showWhatsThis = true);
|
||
|
|
||
|
/**
|
||
|
@@ -142,7 +142,7 @@ public:
|
||
|
*
|
||
|
* Destroys dialogs and the menu pointer returned by menu
|
||
|
*/
|
||
|
- ~KHelpMenu() override;
|
||
|
+ ~KisKHelpMenu() override;
|
||
|
|
||
|
/**
|
||
|
* Returns a popup menu you can use in the menu bar or where you
|
||
|
@@ -217,7 +217,7 @@ private Q_SLOTS:
|
||
|
/**
|
||
|
* Connected to the menu pointer (if created) to detect a delete
|
||
|
* operation on the pointer. You should not delete the pointer in your
|
||
|
- * code yourself. Let the KHelpMenu destructor do the job.
|
||
|
+ * code yourself. Let the KisKHelpMenu destructor do the job.
|
||
|
*/
|
||
|
void menuDestroyed();
|
||
|
|
||
|
@@ -245,7 +245,7 @@ Q_SIGNALS:
|
||
|
void showAboutApplication();
|
||
|
|
||
|
private:
|
||
|
- KHelpMenuPrivate *const d;
|
||
|
+ KisKHelpMenuPrivate *const d;
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
diff --git a/libs/widgetutils/xmlgui/kkeysequencewidget.cpp b/libs/widgetutils/xmlgui/kkeysequencewidget.cpp
|
||
|
index 23d0edbce4..1f8d677bc0 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kkeysequencewidget.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kkeysequencewidget.cpp
|
||
|
@@ -30,10 +30,10 @@ uint qHash(const QKeySequence &seq)
|
||
|
return qHash(seq.toString());
|
||
|
}
|
||
|
|
||
|
-class KKeySequenceWidgetPrivate
|
||
|
+class KisKKeySequenceWidgetPrivate
|
||
|
{
|
||
|
public:
|
||
|
- KKeySequenceWidgetPrivate(KKeySequenceWidget *q);
|
||
|
+ KisKKeySequenceWidgetPrivate(KisKKeySequenceWidget *q);
|
||
|
|
||
|
void init();
|
||
|
|
||
|
@@ -69,17 +69,17 @@ public:
|
||
|
|
||
|
bool checkAgainstStandardShortcuts() const
|
||
|
{
|
||
|
- return checkAgainstShortcutTypes & KKeySequenceWidget::StandardShortcuts;
|
||
|
+ return checkAgainstShortcutTypes & KisKKeySequenceWidget::StandardShortcuts;
|
||
|
}
|
||
|
|
||
|
bool checkAgainstGlobalShortcuts() const
|
||
|
{
|
||
|
- return checkAgainstShortcutTypes & KKeySequenceWidget::GlobalShortcuts;
|
||
|
+ return checkAgainstShortcutTypes & KisKKeySequenceWidget::GlobalShortcuts;
|
||
|
}
|
||
|
|
||
|
bool checkAgainstLocalShortcuts() const
|
||
|
{
|
||
|
- return checkAgainstShortcutTypes & KKeySequenceWidget::LocalShortcuts;
|
||
|
+ return checkAgainstShortcutTypes & KisKKeySequenceWidget::LocalShortcuts;
|
||
|
}
|
||
|
|
||
|
void controlModifierlessTimout()
|
||
|
@@ -104,7 +104,7 @@ public:
|
||
|
void doneRecording(bool validate = true);
|
||
|
|
||
|
//members
|
||
|
- KKeySequenceWidget *const q;
|
||
|
+ KisKKeySequenceWidget *const q;
|
||
|
QHBoxLayout *layout;
|
||
|
KKeySequenceButton *keyButton;
|
||
|
QToolButton *clearButton;
|
||
|
@@ -120,7 +120,7 @@ public:
|
||
|
QString componentName;
|
||
|
|
||
|
//! Check the key sequence against KStandardShortcut::find()
|
||
|
- KKeySequenceWidget::ShortcutTypes checkAgainstShortcutTypes;
|
||
|
+ KisKKeySequenceWidget::ShortcutTypes checkAgainstShortcutTypes;
|
||
|
|
||
|
/**
|
||
|
* The list of action to check against for conflict shortcut
|
||
|
@@ -130,7 +130,7 @@ public:
|
||
|
/**
|
||
|
* The list of action collections to check against for conflict shortcut
|
||
|
*/
|
||
|
- QList<KActionCollection *> checkActionCollections;
|
||
|
+ QList<KisKActionCollection *> checkActionCollections;
|
||
|
|
||
|
/**
|
||
|
* The action to steal the shortcut from.
|
||
|
@@ -142,7 +142,7 @@ public:
|
||
|
|
||
|
};
|
||
|
|
||
|
-KKeySequenceWidgetPrivate::KKeySequenceWidgetPrivate(KKeySequenceWidget *q)
|
||
|
+KisKKeySequenceWidgetPrivate::KisKKeySequenceWidgetPrivate(KisKKeySequenceWidget *q)
|
||
|
: q(q)
|
||
|
, layout(0)
|
||
|
, keyButton(0)
|
||
|
@@ -153,11 +153,11 @@ KKeySequenceWidgetPrivate::KKeySequenceWidgetPrivate(KKeySequenceWidget *q)
|
||
|
, isRecording(false)
|
||
|
, multiKeyShortcutsAllowed(true)
|
||
|
, componentName()
|
||
|
- , checkAgainstShortcutTypes(KKeySequenceWidget::LocalShortcuts | KKeySequenceWidget::GlobalShortcuts)
|
||
|
+ , checkAgainstShortcutTypes(KisKKeySequenceWidget::LocalShortcuts | KisKKeySequenceWidget::GlobalShortcuts)
|
||
|
, stealActions()
|
||
|
{}
|
||
|
|
||
|
-bool KKeySequenceWidgetPrivate::stealShortcuts(
|
||
|
+bool KisKKeySequenceWidgetPrivate::stealShortcuts(
|
||
|
const QList<QAction *> &actions,
|
||
|
const QKeySequence &seq)
|
||
|
{
|
||
|
@@ -190,7 +190,7 @@ bool KKeySequenceWidgetPrivate::stealShortcuts(
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidgetPrivate::wontStealShortcut(QAction *item, const QKeySequence &seq)
|
||
|
+void KisKKeySequenceWidgetPrivate::wontStealShortcut(QAction *item, const QKeySequence &seq)
|
||
|
{
|
||
|
QString title(i18n("Shortcut conflict"));
|
||
|
QString msg(i18n("<qt>The '%1' key combination is already used by the <b>%2</b> action.<br>"
|
||
|
@@ -199,9 +199,9 @@ void KKeySequenceWidgetPrivate::wontStealShortcut(QAction *item, const QKeySeque
|
||
|
KMessageBox::sorry(q, msg, title);
|
||
|
}
|
||
|
|
||
|
-KKeySequenceWidget::KKeySequenceWidget(QWidget *parent)
|
||
|
+KisKKeySequenceWidget::KisKKeySequenceWidget(QWidget *parent)
|
||
|
: QWidget(parent),
|
||
|
- d(new KKeySequenceWidgetPrivate(this))
|
||
|
+ d(new KisKKeySequenceWidgetPrivate(this))
|
||
|
{
|
||
|
d->init();
|
||
|
setFocusProxy(d->keyButton);
|
||
|
@@ -215,7 +215,7 @@ KKeySequenceWidget::KKeySequenceWidget(QWidget *parent)
|
||
|
d->updateShortcutDisplay();
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidgetPrivate::init()
|
||
|
+void KisKKeySequenceWidgetPrivate::init()
|
||
|
{
|
||
|
layout = new QHBoxLayout(q);
|
||
|
layout->setMargin(0);
|
||
|
@@ -236,42 +236,42 @@ void KKeySequenceWidgetPrivate::init()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-KKeySequenceWidget::~KKeySequenceWidget()
|
||
|
+KisKKeySequenceWidget::~KisKKeySequenceWidget()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-KKeySequenceWidget::ShortcutTypes KKeySequenceWidget::checkForConflictsAgainst() const
|
||
|
+KisKKeySequenceWidget::ShortcutTypes KisKKeySequenceWidget::checkForConflictsAgainst() const
|
||
|
{
|
||
|
return d->checkAgainstShortcutTypes;
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidget::setComponentName(const QString &componentName)
|
||
|
+void KisKKeySequenceWidget::setComponentName(const QString &componentName)
|
||
|
{
|
||
|
d->componentName = componentName;
|
||
|
}
|
||
|
|
||
|
-bool KKeySequenceWidget::multiKeyShortcutsAllowed() const
|
||
|
+bool KisKKeySequenceWidget::multiKeyShortcutsAllowed() const
|
||
|
{
|
||
|
return d->multiKeyShortcutsAllowed;
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidget::setMultiKeyShortcutsAllowed(bool allowed)
|
||
|
+void KisKKeySequenceWidget::setMultiKeyShortcutsAllowed(bool allowed)
|
||
|
{
|
||
|
d->multiKeyShortcutsAllowed = allowed;
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidget::setCheckForConflictsAgainst(ShortcutTypes types)
|
||
|
+void KisKKeySequenceWidget::setCheckForConflictsAgainst(ShortcutTypes types)
|
||
|
{
|
||
|
d->checkAgainstShortcutTypes = types;
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidget::setModifierlessAllowed(bool allow)
|
||
|
+void KisKKeySequenceWidget::setModifierlessAllowed(bool allow)
|
||
|
{
|
||
|
d->allowModifierless = allow;
|
||
|
}
|
||
|
|
||
|
-bool KKeySequenceWidget::isKeySequenceAvailable(const QKeySequence &keySequence) const
|
||
|
+bool KisKKeySequenceWidget::isKeySequenceAvailable(const QKeySequence &keySequence) const
|
||
|
{
|
||
|
if (keySequence.isEmpty()) {
|
||
|
// qDebug() << "Key sequence" << keySequence.toString() << "is empty and available.";
|
||
|
@@ -293,34 +293,34 @@ bool KKeySequenceWidget::isKeySequenceAvailable(const QKeySequence &keySequence)
|
||
|
|
||
|
}
|
||
|
|
||
|
-bool KKeySequenceWidget::isModifierlessAllowed()
|
||
|
+bool KisKKeySequenceWidget::isModifierlessAllowed()
|
||
|
{
|
||
|
return d->allowModifierless;
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidget::setClearButtonShown(bool show)
|
||
|
+void KisKKeySequenceWidget::setClearButtonShown(bool show)
|
||
|
{
|
||
|
d->clearButton->setVisible(show);
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidget::setCheckActionCollections(const QList<KActionCollection *> &actionCollections)
|
||
|
+void KisKKeySequenceWidget::setCheckActionCollections(const QList<KisKActionCollection *> &actionCollections)
|
||
|
{
|
||
|
d->checkActionCollections = actionCollections;
|
||
|
}
|
||
|
|
||
|
//slot
|
||
|
-void KKeySequenceWidget::captureKeySequence()
|
||
|
+void KisKKeySequenceWidget::captureKeySequence()
|
||
|
{
|
||
|
d->startRecording();
|
||
|
}
|
||
|
|
||
|
-QKeySequence KKeySequenceWidget::keySequence() const
|
||
|
+QKeySequence KisKKeySequenceWidget::keySequence() const
|
||
|
{
|
||
|
return d->keySequence;
|
||
|
}
|
||
|
|
||
|
//slot
|
||
|
-void KKeySequenceWidget::setKeySequence(const QKeySequence &seq, Validation validate)
|
||
|
+void KisKKeySequenceWidget::setKeySequence(const QKeySequence &seq, Validation validate)
|
||
|
{
|
||
|
// oldKeySequence holds the key sequence before recording started, if setKeySequence()
|
||
|
// is called while not recording then set oldKeySequence to the existing sequence so
|
||
|
@@ -335,15 +335,15 @@ void KKeySequenceWidget::setKeySequence(const QKeySequence &seq, Validation vali
|
||
|
}
|
||
|
|
||
|
//slot
|
||
|
-void KKeySequenceWidget::clearKeySequence()
|
||
|
+void KisKKeySequenceWidget::clearKeySequence()
|
||
|
{
|
||
|
setKeySequence(QKeySequence());
|
||
|
}
|
||
|
|
||
|
//slot
|
||
|
-void KKeySequenceWidget::applyStealShortcut()
|
||
|
+void KisKKeySequenceWidget::applyStealShortcut()
|
||
|
{
|
||
|
- QSet<KActionCollection *> changedCollections;
|
||
|
+ QSet<KisKActionCollection *> changedCollections;
|
||
|
|
||
|
Q_FOREACH (QAction *stealAction, d->stealActions) {
|
||
|
|
||
|
@@ -352,8 +352,8 @@ void KKeySequenceWidget::applyStealShortcut()
|
||
|
|
||
|
// The following code will find the action we are about to
|
||
|
// steal from and save it's actioncollection.
|
||
|
- KActionCollection *parentCollection = 0;
|
||
|
- foreach (KActionCollection *collection, d->checkActionCollections) {
|
||
|
+ KisKActionCollection *parentCollection = 0;
|
||
|
+ foreach (KisKActionCollection *collection, d->checkActionCollections) {
|
||
|
if (collection->actions().contains(stealAction)) {
|
||
|
parentCollection = collection;
|
||
|
break;
|
||
|
@@ -366,14 +366,14 @@ void KKeySequenceWidget::applyStealShortcut()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
- Q_FOREACH (KActionCollection *col, changedCollections) {
|
||
|
+ Q_FOREACH (KisKActionCollection *col, changedCollections) {
|
||
|
col->writeSettings();
|
||
|
}
|
||
|
|
||
|
d->stealActions.clear();
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidgetPrivate::startRecording()
|
||
|
+void KisKKeySequenceWidgetPrivate::startRecording()
|
||
|
{
|
||
|
nKey = 0;
|
||
|
modifierKeys = 0;
|
||
|
@@ -390,7 +390,7 @@ void KKeySequenceWidgetPrivate::startRecording()
|
||
|
updateShortcutDisplay();
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidgetPrivate::doneRecording(bool validate)
|
||
|
+void KisKKeySequenceWidgetPrivate::doneRecording(bool validate)
|
||
|
{
|
||
|
modifierlessTimeout.stop();
|
||
|
isRecording = false;
|
||
|
@@ -414,7 +414,7 @@ void KKeySequenceWidgetPrivate::doneRecording(bool validate)
|
||
|
updateShortcutDisplay();
|
||
|
}
|
||
|
|
||
|
-bool KKeySequenceWidgetPrivate::conflictWithGlobalShortcuts(const QKeySequence &keySequence)
|
||
|
+bool KisKKeySequenceWidgetPrivate::conflictWithGlobalShortcuts(const QKeySequence &keySequence)
|
||
|
{
|
||
|
// This could hold some OS-specific stuff, or it could be linked back with
|
||
|
// the KDE global shortcut code at some point in the future.
|
||
|
@@ -447,9 +447,9 @@ bool shortcutsConflictWith(const QList<QKeySequence> &shortcuts, const QKeySeque
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
-bool KKeySequenceWidgetPrivate::conflictWithLocalShortcuts(const QKeySequence &keySequence)
|
||
|
+bool KisKKeySequenceWidgetPrivate::conflictWithLocalShortcuts(const QKeySequence &keySequence)
|
||
|
{
|
||
|
- if (!(checkAgainstShortcutTypes & KKeySequenceWidget::LocalShortcuts)) {
|
||
|
+ if (!(checkAgainstShortcutTypes & KisKKeySequenceWidget::LocalShortcuts)) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@@ -462,7 +462,7 @@ bool KKeySequenceWidgetPrivate::conflictWithLocalShortcuts(const QKeySequence &k
|
||
|
// removed from the collection again.
|
||
|
QList<QAction *> allActions;
|
||
|
allActions += checkList;
|
||
|
- foreach (KActionCollection *collection, checkActionCollections) {
|
||
|
+ foreach (KisKActionCollection *collection, checkActionCollections) {
|
||
|
allActions += collection->actions();
|
||
|
}
|
||
|
|
||
|
@@ -519,9 +519,9 @@ bool KKeySequenceWidgetPrivate::conflictWithLocalShortcuts(const QKeySequence &k
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-bool KKeySequenceWidgetPrivate::conflictWithStandardShortcuts(const QKeySequence &keySequence)
|
||
|
+bool KisKKeySequenceWidgetPrivate::conflictWithStandardShortcuts(const QKeySequence &keySequence)
|
||
|
{
|
||
|
- if (!(checkAgainstShortcutTypes & KKeySequenceWidget::StandardShortcuts)) {
|
||
|
+ if (!(checkAgainstShortcutTypes & KisKKeySequenceWidget::StandardShortcuts)) {
|
||
|
return false;
|
||
|
}
|
||
|
KStandardShortcut::StandardShortcut ssc = KStandardShortcut::find(keySequence);
|
||
|
@@ -531,7 +531,7 @@ bool KKeySequenceWidgetPrivate::conflictWithStandardShortcuts(const QKeySequence
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
-bool KKeySequenceWidgetPrivate::stealStandardShortcut(KStandardShortcut::StandardShortcut std, const QKeySequence &seq)
|
||
|
+bool KisKKeySequenceWidgetPrivate::stealStandardShortcut(KStandardShortcut::StandardShortcut std, const QKeySequence &seq)
|
||
|
{
|
||
|
QString title = i18n("Conflict with Standard Application Shortcut");
|
||
|
QString message = i18n("The '%1' key combination is also used for the standard action "
|
||
|
@@ -545,7 +545,7 @@ bool KKeySequenceWidgetPrivate::stealStandardShortcut(KStandardShortcut::Standar
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
-void KKeySequenceWidgetPrivate::updateShortcutDisplay()
|
||
|
+void KisKKeySequenceWidgetPrivate::updateShortcutDisplay()
|
||
|
{
|
||
|
//empty string if no non-modifier was pressed
|
||
|
QString s = keySequence.toString(QKeySequence::NativeText);
|
||
|
@@ -677,7 +677,7 @@ void KKeySequenceButton::keyPressEvent(QKeyEvent *e)
|
||
|
if (d->nKey == 0 && !(d->modifierKeys & ~Qt::SHIFT)) {
|
||
|
// It's the first key and no modifier pressed. Check if this is
|
||
|
// allowed
|
||
|
- if (!(KKeySequenceWidgetPrivate::isOkWhenModifierless(keyQt)
|
||
|
+ if (!(KisKKeySequenceWidgetPrivate::isOkWhenModifierless(keyQt)
|
||
|
|| d->allowModifierless)) {
|
||
|
// No it's not
|
||
|
return;
|
||
|
@@ -698,7 +698,7 @@ void KKeySequenceButton::keyPressEvent(QKeyEvent *e)
|
||
|
d->keySequence = QKeySequence(keyQt);
|
||
|
} else {
|
||
|
d->keySequence =
|
||
|
- KKeySequenceWidgetPrivate::appendToSequence(d->keySequence, keyQt);
|
||
|
+ KisKKeySequenceWidgetPrivate::appendToSequence(d->keySequence, keyQt);
|
||
|
}
|
||
|
|
||
|
d->nKey++;
|
||
|
@@ -736,7 +736,7 @@ void KKeySequenceButton::keyReleaseEvent(QKeyEvent *e)
|
||
|
}
|
||
|
|
||
|
//static
|
||
|
-QKeySequence KKeySequenceWidgetPrivate::appendToSequence(const QKeySequence &seq, int keyQt)
|
||
|
+QKeySequence KisKKeySequenceWidgetPrivate::appendToSequence(const QKeySequence &seq, int keyQt)
|
||
|
{
|
||
|
switch (seq.count()) {
|
||
|
case 0:
|
||
|
@@ -753,7 +753,7 @@ QKeySequence KKeySequenceWidgetPrivate::appendToSequence(const QKeySequence &seq
|
||
|
}
|
||
|
|
||
|
//static
|
||
|
-bool KKeySequenceWidgetPrivate::isOkWhenModifierless(int keyQt)
|
||
|
+bool KisKKeySequenceWidgetPrivate::isOkWhenModifierless(int keyQt)
|
||
|
{
|
||
|
//this whole function is a hack, but especially the first line of code
|
||
|
if (QKeySequence(keyQt).toString().length() == 1) {
|
||
|
diff --git a/libs/widgetutils/xmlgui/kkeysequencewidget.h b/libs/widgetutils/xmlgui/kkeysequencewidget.h
|
||
|
index 0d86f57e87..57e050dab2 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kkeysequencewidget.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kkeysequencewidget.h
|
||
|
@@ -13,9 +13,9 @@
|
||
|
#include <QList>
|
||
|
#include <QPushButton>
|
||
|
|
||
|
-class KKeySequenceWidgetPrivate;
|
||
|
+class KisKKeySequenceWidgetPrivate;
|
||
|
class QAction;
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
|
||
|
/**
|
||
|
* @short A widget to input a QKeySequence.
|
||
|
@@ -32,7 +32,7 @@ class KActionCollection;
|
||
|
* @author Mark Donohoe <donohoe@kde.org>
|
||
|
* @internal
|
||
|
*/
|
||
|
-class KRITAWIDGETUTILS_EXPORT KKeySequenceWidget: public QWidget
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKKeySequenceWidget: public QWidget
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
@@ -66,12 +66,12 @@ public:
|
||
|
/**
|
||
|
* Constructor.
|
||
|
*/
|
||
|
- explicit KKeySequenceWidget(QWidget *parent = 0);
|
||
|
+ explicit KisKKeySequenceWidget(QWidget *parent = 0);
|
||
|
|
||
|
/**
|
||
|
* Destructs the widget.
|
||
|
*/
|
||
|
- ~KKeySequenceWidget() override;
|
||
|
+ ~KisKKeySequenceWidget() override;
|
||
|
|
||
|
/**
|
||
|
* \name Configuration
|
||
|
@@ -109,7 +109,7 @@ public:
|
||
|
* manually. It's your responsibility to save that change later when
|
||
|
* you think it is appropriate.
|
||
|
*
|
||
|
- * 2. Call applyStealShortcut and KKeySequenceWidget will steal the
|
||
|
+ * 2. Call applyStealShortcut and KisKKeySequenceWidget will steal the
|
||
|
* shortcut. This will save the actionCollections the shortcut is part
|
||
|
* of so make sure it doesn't inadvertly save some unwanted changes
|
||
|
* too. Read its documentation for some limitation when handling
|
||
|
@@ -208,7 +208,7 @@ public:
|
||
|
*
|
||
|
* @since 4.1
|
||
|
*/
|
||
|
- void setCheckActionCollections(const QList<KActionCollection *> &actionCollections);
|
||
|
+ void setCheckActionCollections(const QList<KisKActionCollection *> &actionCollections);
|
||
|
|
||
|
/**
|
||
|
* If the component using this widget supports shortcuts contexts, it has
|
||
|
@@ -277,12 +277,12 @@ private:
|
||
|
Q_PRIVATE_SLOT(d, void doneRecording())
|
||
|
|
||
|
private:
|
||
|
- friend class KKeySequenceWidgetPrivate;
|
||
|
- KKeySequenceWidgetPrivate *const d;
|
||
|
+ friend class KisKKeySequenceWidgetPrivate;
|
||
|
+ KisKKeySequenceWidgetPrivate *const d;
|
||
|
|
||
|
- Q_DISABLE_COPY(KKeySequenceWidget)
|
||
|
+ Q_DISABLE_COPY(KisKKeySequenceWidget)
|
||
|
};
|
||
|
|
||
|
-Q_DECLARE_OPERATORS_FOR_FLAGS(KKeySequenceWidget::ShortcutTypes)
|
||
|
+Q_DECLARE_OPERATORS_FOR_FLAGS(KisKKeySequenceWidget::ShortcutTypes)
|
||
|
|
||
|
#endif //KKEYSEQUENCEWIDGET_H
|
||
|
diff --git a/libs/widgetutils/xmlgui/kkeysequencewidget_p.h b/libs/widgetutils/xmlgui/kkeysequencewidget_p.h
|
||
|
index 94146996ce..418f57f3ea 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kkeysequencewidget_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kkeysequencewidget_p.h
|
||
|
@@ -14,7 +14,7 @@ class KKeySequenceButton: public QPushButton
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
- explicit KKeySequenceButton(KKeySequenceWidgetPrivate *d, QWidget *parent)
|
||
|
+ explicit KKeySequenceButton(KisKKeySequenceWidgetPrivate *d, QWidget *parent)
|
||
|
: QPushButton(parent),
|
||
|
d(d) {}
|
||
|
|
||
|
@@ -29,7 +29,7 @@ protected:
|
||
|
void keyReleaseEvent(QKeyEvent *event) override;
|
||
|
|
||
|
private:
|
||
|
- KKeySequenceWidgetPrivate *const d;
|
||
|
+ KisKKeySequenceWidgetPrivate *const d;
|
||
|
};
|
||
|
|
||
|
#endif //KKEYSEQUENCEWIDGET_P_H
|
||
|
diff --git a/libs/widgetutils/xmlgui/kmainwindow.cpp b/libs/widgetutils/xmlgui/kmainwindow.cpp
|
||
|
index a76d59b669..60c1c2dff1 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kmainwindow.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kmainwindow.cpp
|
||
|
@@ -52,36 +52,36 @@
|
||
|
|
||
|
static const char WINDOW_PROPERTIES[]="WindowProperties";
|
||
|
|
||
|
-static QMenuBar *internalMenuBar(KMainWindow *mw)
|
||
|
+static QMenuBar *internalMenuBar(KisKMainWindow *mw)
|
||
|
{
|
||
|
return mw->findChild<QMenuBar *>(QString(), Qt::FindDirectChildrenOnly);
|
||
|
}
|
||
|
|
||
|
-static QStatusBar *internalStatusBar(KMainWindow *mw)
|
||
|
+static QStatusBar *internalStatusBar(KisKMainWindow *mw)
|
||
|
{
|
||
|
return mw->findChild<QStatusBar *>(QString(), Qt::FindDirectChildrenOnly);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
|
||
|
- * Listens to resize events from QDockWidgets. The KMainWindow
|
||
|
+ * Listens to resize events from QDockWidgets. The KisKMainWindow
|
||
|
* settings are set as dirty, as soon as at least one resize
|
||
|
* event occurred. The listener is attached to the dock widgets
|
||
|
* by dock->installEventFilter(dockResizeListener) inside
|
||
|
- * KMainWindow::event().
|
||
|
+ * KisKMainWindow::event().
|
||
|
*/
|
||
|
class DockResizeListener : public QObject
|
||
|
{
|
||
|
public:
|
||
|
- DockResizeListener(KMainWindow *win);
|
||
|
+ DockResizeListener(KisKMainWindow *win);
|
||
|
~DockResizeListener() override;
|
||
|
bool eventFilter(QObject *watched, QEvent *event) override;
|
||
|
|
||
|
private:
|
||
|
- KMainWindow *m_win;
|
||
|
+ KisKMainWindow *m_win;
|
||
|
};
|
||
|
|
||
|
-DockResizeListener::DockResizeListener(KMainWindow *win) :
|
||
|
+DockResizeListener::DockResizeListener(KisKMainWindow *win) :
|
||
|
QObject(win),
|
||
|
m_win(win)
|
||
|
{
|
||
|
@@ -97,7 +97,7 @@ bool DockResizeListener::eventFilter(QObject *watched, QEvent *event)
|
||
|
case QEvent::Resize:
|
||
|
case QEvent::Move:
|
||
|
case QEvent::Hide:
|
||
|
- m_win->k_ptr->setSettingsDirty(KMainWindowPrivate::CompressCalls);
|
||
|
+ m_win->k_ptr->setSettingsDirty(KisKMainWindowPrivate::CompressCalls);
|
||
|
break;
|
||
|
|
||
|
default:
|
||
|
@@ -123,14 +123,14 @@ bool KMWSessionManager::saveState(QSessionManager &)
|
||
|
KConfigGui::setSessionConfig(sm.sessionId(), sm.sessionKey());
|
||
|
|
||
|
KConfig *config = KConfigGui::sessionConfig();
|
||
|
- if (KMainWindow::memberList().count()) {
|
||
|
+ if (KisKMainWindow::memberList().count()) {
|
||
|
// According to Jochen Wilhelmy <digisnap@cs.tu-berlin.de>, this
|
||
|
// hook is useful for better document orientation
|
||
|
- KMainWindow::memberList().first()->saveGlobalProperties(config);
|
||
|
+ KisKMainWindow::memberList().first()->saveGlobalProperties(config);
|
||
|
}
|
||
|
|
||
|
int n = 0;
|
||
|
- foreach (KMainWindow *mw, KMainWindow::memberList()) {
|
||
|
+ foreach (KisKMainWindow *mw, KisKMainWindow::memberList()) {
|
||
|
n++;
|
||
|
mw->savePropertiesInternal(config, n);
|
||
|
}
|
||
|
@@ -154,21 +154,21 @@ bool KMWSessionManager::saveState(QSessionManager &)
|
||
|
}
|
||
|
|
||
|
Q_GLOBAL_STATIC(KMWSessionManager, ksm)
|
||
|
-Q_GLOBAL_STATIC(QList<KMainWindow *>, sMemberList)
|
||
|
+Q_GLOBAL_STATIC(QList<KisKMainWindow *>, sMemberList)
|
||
|
|
||
|
-KMainWindow::KMainWindow(QWidget *parent, Qt::WindowFlags f)
|
||
|
- : QMainWindow(parent, f), k_ptr(new KMainWindowPrivate)
|
||
|
+KisKMainWindow::KisKMainWindow(QWidget *parent, Qt::WindowFlags f)
|
||
|
+ : QMainWindow(parent, f), k_ptr(new KisKMainWindowPrivate)
|
||
|
{
|
||
|
k_ptr->init(this);
|
||
|
}
|
||
|
|
||
|
-KMainWindow::KMainWindow(KMainWindowPrivate &dd, QWidget *parent, Qt::WindowFlags f)
|
||
|
+KisKMainWindow::KisKMainWindow(KisKMainWindowPrivate &dd, QWidget *parent, Qt::WindowFlags f)
|
||
|
: QMainWindow(parent, f), k_ptr(&dd)
|
||
|
{
|
||
|
k_ptr->init(this);
|
||
|
}
|
||
|
|
||
|
-void KMainWindowPrivate::init(KMainWindow *_q)
|
||
|
+void KisKMainWindowPrivate::init(KisKMainWindow *_q)
|
||
|
{
|
||
|
q = _q;
|
||
|
|
||
|
@@ -226,7 +226,7 @@ static inline bool isValidDBusObjectPathCharacter(const QChar &c)
|
||
|
|| (u == QLatin1Char('_')) || (u == QLatin1Char('/'));
|
||
|
}
|
||
|
#endif
|
||
|
-void KMainWindowPrivate::polish(KMainWindow *q)
|
||
|
+void KisKMainWindowPrivate::polish(KisKMainWindow *q)
|
||
|
{
|
||
|
// Set a unique object name. Required by session management, window management, and for the dbus interface.
|
||
|
QString objname;
|
||
|
@@ -299,7 +299,7 @@ void KMainWindowPrivate::polish(KMainWindow *q)
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
-void KMainWindowPrivate::setSettingsDirty(CallCompression callCompression)
|
||
|
+void KisKMainWindowPrivate::setSettingsDirty(CallCompression callCompression)
|
||
|
{
|
||
|
if (!letDirtySettings) {
|
||
|
return;
|
||
|
@@ -321,7 +321,7 @@ void KMainWindowPrivate::setSettingsDirty(CallCompression callCompression)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KMainWindowPrivate::setSizeDirty()
|
||
|
+void KisKMainWindowPrivate::setSizeDirty()
|
||
|
{
|
||
|
if (autoSaveWindowSize) {
|
||
|
if (!sizeTimer) {
|
||
|
@@ -334,14 +334,14 @@ void KMainWindowPrivate::setSizeDirty()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-KMainWindow::~KMainWindow()
|
||
|
+KisKMainWindow::~KisKMainWindow()
|
||
|
{
|
||
|
sMemberList()->removeAll(this);
|
||
|
delete static_cast<QObject *>(k_ptr->dockResizeListener); //so we don't get anymore events after k_ptr is destroyed
|
||
|
delete k_ptr;
|
||
|
}
|
||
|
|
||
|
-bool KMainWindow::canBeRestored(int number)
|
||
|
+bool KisKMainWindow::canBeRestored(int number)
|
||
|
{
|
||
|
if (!qApp->isSessionRestored()) {
|
||
|
return false;
|
||
|
@@ -356,7 +356,7 @@ bool KMainWindow::canBeRestored(int number)
|
||
|
return number >= 1 && number <= n;
|
||
|
}
|
||
|
|
||
|
-const QString KMainWindow::classNameOfToplevel(int )
|
||
|
+const QString KisKMainWindow::classNameOfToplevel(int )
|
||
|
{
|
||
|
return QString();
|
||
|
#if 0
|
||
|
@@ -377,7 +377,7 @@ const QString KMainWindow::classNameOfToplevel(int )
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
-bool KMainWindow::restore(int , bool )
|
||
|
+bool KisKMainWindow::restore(int , bool )
|
||
|
{
|
||
|
#if 0
|
||
|
if (!canBeRestored(number)) {
|
||
|
@@ -386,7 +386,7 @@ bool KMainWindow::restore(int , bool )
|
||
|
KConfig *config = KConfigGui::sessionConfig();
|
||
|
if (readPropertiesInternal(config, number)) {
|
||
|
if (show) {
|
||
|
- KMainWindow::show();
|
||
|
+ KisKMainWindow::show();
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
@@ -395,11 +395,11 @@ bool KMainWindow::restore(int , bool )
|
||
|
}
|
||
|
|
||
|
|
||
|
-void KMainWindow::appHelpActivated(void)
|
||
|
+void KisKMainWindow::appHelpActivated(void)
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
+ K_D(KisKMainWindow);
|
||
|
if (!d->helpMenu) {
|
||
|
- d->helpMenu = new KHelpMenu(this);
|
||
|
+ d->helpMenu = new KisKHelpMenu(this);
|
||
|
if (!d->helpMenu) {
|
||
|
return;
|
||
|
}
|
||
|
@@ -407,9 +407,9 @@ void KMainWindow::appHelpActivated(void)
|
||
|
d->helpMenu->appHelpActivated();
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::closeEvent(QCloseEvent *e)
|
||
|
+void KisKMainWindow::closeEvent(QCloseEvent *e)
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
+ K_D(KisKMainWindow);
|
||
|
|
||
|
// Save settings if auto-save is enabled, and settings have changed
|
||
|
if (d->settingsTimer && d->settingsTimer->isActive()) {
|
||
|
@@ -432,22 +432,22 @@ void KMainWindow::closeEvent(QCloseEvent *e)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-bool KMainWindow::queryClose()
|
||
|
+bool KisKMainWindow::queryClose()
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::saveGlobalProperties(KConfig *)
|
||
|
+void KisKMainWindow::saveGlobalProperties(KConfig *)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::readGlobalProperties(KConfig *)
|
||
|
+void KisKMainWindow::readGlobalProperties(KConfig *)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::savePropertiesInternal(KConfig *config, int number)
|
||
|
+void KisKMainWindow::savePropertiesInternal(KConfig *config, int number)
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
+ K_D(KisKMainWindow);
|
||
|
const bool oldASWS = d->autoSaveWindowSize;
|
||
|
d->autoSaveWindowSize = true; // make saveMainWindowSettings save the window size
|
||
|
|
||
|
@@ -466,10 +466,10 @@ void KMainWindow::savePropertiesInternal(KConfig *config, int number)
|
||
|
d->autoSaveWindowSize = oldASWS;
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::saveMainWindowSettings(KConfigGroup &cg)
|
||
|
+void KisKMainWindow::saveMainWindowSettings(KConfigGroup &cg)
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
- //qDebug(200) << "KMainWindow::saveMainWindowSettings " << cg.name();
|
||
|
+ K_D(KisKMainWindow);
|
||
|
+ //qDebug(200) << "KisKMainWindow::saveMainWindowSettings " << cg.name();
|
||
|
|
||
|
// Called by session management - or if we want to save the window size anyway
|
||
|
if (d->autoSaveWindowSize) {
|
||
|
@@ -507,15 +507,15 @@ void KMainWindow::saveMainWindowSettings(KConfigGroup &cg)
|
||
|
|
||
|
if (!autoSaveSettings() || cg.name() == autoSaveGroup()) {
|
||
|
// TODO should be cg == d->autoSaveGroup, to compare both kconfig and group name
|
||
|
- if (!cg.hasDefault("ToolBarsMovable") && !KToolBar::toolBarsLocked()) {
|
||
|
+ if (!cg.hasDefault("ToolBarsMovable") && !KisToolBar::toolBarsLocked()) {
|
||
|
cg.revertToDefault("ToolBarsMovable");
|
||
|
} else {
|
||
|
- cg.writeEntry("ToolBarsMovable", KToolBar::toolBarsLocked() ? "Disabled" : "Enabled");
|
||
|
+ cg.writeEntry("ToolBarsMovable", KisToolBar::toolBarsLocked() ? "Disabled" : "Enabled");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
int n = 1; // Toolbar counter. toolbars are counted from 1,
|
||
|
- foreach (KToolBar *toolbar, toolBars()) {
|
||
|
+ foreach (KisToolBar *toolbar, toolBars()) {
|
||
|
QByteArray groupName("Toolbar");
|
||
|
// Give a number to the toolbar, but prefer a name if there is one,
|
||
|
// because there's no real guarantee on the ordering of toolbars
|
||
|
@@ -527,9 +527,9 @@ void KMainWindow::saveMainWindowSettings(KConfigGroup &cg)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-bool KMainWindow::readPropertiesInternal(KConfig *config, int number)
|
||
|
+bool KisKMainWindow::readPropertiesInternal(KConfig *config, int number)
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
+ K_D(KisKMainWindow);
|
||
|
|
||
|
const bool oldLetDirtySettings = d->letDirtySettings;
|
||
|
d->letDirtySettings = false;
|
||
|
@@ -558,10 +558,10 @@ bool KMainWindow::readPropertiesInternal(KConfig *config, int number)
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::applyMainWindowSettings(const KConfigGroup &cg)
|
||
|
+void KisKMainWindow::applyMainWindowSettings(const KConfigGroup &cg)
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
- //qDebug(200) << "KMainWindow::applyMainWindowSettings " << cg.name();
|
||
|
+ K_D(KisKMainWindow);
|
||
|
+ //qDebug(200) << "KisKMainWindow::applyMainWindowSettings " << cg.name();
|
||
|
|
||
|
QWidget *focusedWidget = QApplication::focusWidget();
|
||
|
|
||
|
@@ -598,11 +598,11 @@ void KMainWindow::applyMainWindowSettings(const KConfigGroup &cg)
|
||
|
|
||
|
if (!autoSaveSettings() || cg.name() == autoSaveGroup()) { // TODO should be cg == d->autoSaveGroup, to compare both kconfig and group name
|
||
|
QString entry = cg.readEntry("ToolBarsMovable", "Disabled");
|
||
|
- KToolBar::setToolBarsLocked(entry == QLatin1String("Disabled"));
|
||
|
+ KisToolBar::setToolBarsLocked(entry == QLatin1String("Disabled"));
|
||
|
}
|
||
|
|
||
|
int n = 1; // Toolbar counter. toolbars are counted from 1,
|
||
|
- foreach (KToolBar *toolbar, toolBars()) {
|
||
|
+ foreach (KisToolBar *toolbar, toolBars()) {
|
||
|
QByteArray groupName("Toolbar");
|
||
|
// Give a number to the toolbar, but prefer a name if there is one,
|
||
|
// because there's no real guarantee on the ordering of toolbars
|
||
|
@@ -629,27 +629,27 @@ void KMainWindow::applyMainWindowSettings(const KConfigGroup &cg)
|
||
|
d->letDirtySettings = oldLetDirtySettings;
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::setSettingsDirty()
|
||
|
+void KisKMainWindow::setSettingsDirty()
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
+ K_D(KisKMainWindow);
|
||
|
d->setSettingsDirty();
|
||
|
}
|
||
|
|
||
|
-bool KMainWindow::settingsDirty() const
|
||
|
+bool KisKMainWindow::settingsDirty() const
|
||
|
{
|
||
|
- K_D(const KMainWindow);
|
||
|
+ K_D(const KisKMainWindow);
|
||
|
return d->settingsDirty;
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::setAutoSaveSettings(const QString &groupName, bool saveWindowSize)
|
||
|
+void KisKMainWindow::setAutoSaveSettings(const QString &groupName, bool saveWindowSize)
|
||
|
{
|
||
|
setAutoSaveSettings(KConfigGroup(KSharedConfig::openConfig(), groupName), saveWindowSize);
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::setAutoSaveSettings(const KConfigGroup &group,
|
||
|
+void KisKMainWindow::setAutoSaveSettings(const KConfigGroup &group,
|
||
|
bool saveWindowSize)
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
+ K_D(KisKMainWindow);
|
||
|
d->autoSaveSettings = true;
|
||
|
d->autoSaveGroup = group;
|
||
|
d->autoSaveWindowSize = saveWindowSize;
|
||
|
@@ -662,46 +662,46 @@ void KMainWindow::setAutoSaveSettings(const KConfigGroup &group,
|
||
|
applyMainWindowSettings(d->autoSaveGroup);
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::resetAutoSaveSettings()
|
||
|
+void KisKMainWindow::resetAutoSaveSettings()
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
+ K_D(KisKMainWindow);
|
||
|
d->autoSaveSettings = false;
|
||
|
if (d->settingsTimer) {
|
||
|
d->settingsTimer->stop();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-bool KMainWindow::autoSaveSettings() const
|
||
|
+bool KisKMainWindow::autoSaveSettings() const
|
||
|
{
|
||
|
- K_D(const KMainWindow);
|
||
|
+ K_D(const KisKMainWindow);
|
||
|
return d->autoSaveSettings;
|
||
|
}
|
||
|
|
||
|
-QString KMainWindow::autoSaveGroup() const
|
||
|
+QString KisKMainWindow::autoSaveGroup() const
|
||
|
{
|
||
|
- K_D(const KMainWindow);
|
||
|
+ K_D(const KisKMainWindow);
|
||
|
return d->autoSaveSettings ? d->autoSaveGroup.name() : QString();
|
||
|
}
|
||
|
|
||
|
-KConfigGroup KMainWindow::autoSaveConfigGroup() const
|
||
|
+KConfigGroup KisKMainWindow::autoSaveConfigGroup() const
|
||
|
{
|
||
|
- K_D(const KMainWindow);
|
||
|
+ K_D(const KisKMainWindow);
|
||
|
return d->autoSaveSettings ? d->autoSaveGroup : KConfigGroup();
|
||
|
}
|
||
|
|
||
|
-void KMainWindow::saveAutoSaveSettings()
|
||
|
+void KisKMainWindow::saveAutoSaveSettings()
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
+ K_D(KisKMainWindow);
|
||
|
Q_ASSERT(d->autoSaveSettings);
|
||
|
- //qDebug(200) << "KMainWindow::saveAutoSaveSettings -> saving settings";
|
||
|
+ //qDebug(200) << "KisKMainWindow::saveAutoSaveSettings -> saving settings";
|
||
|
saveMainWindowSettings(d->autoSaveGroup);
|
||
|
d->autoSaveGroup.sync();
|
||
|
d->settingsDirty = false;
|
||
|
}
|
||
|
|
||
|
-bool KMainWindow::event(QEvent *ev)
|
||
|
+bool KisKMainWindow::event(QEvent *ev)
|
||
|
{
|
||
|
- K_D(KMainWindow);
|
||
|
+ K_D(KisKMainWindow);
|
||
|
switch (ev->type()) {
|
||
|
#ifdef Q_OS_WIN
|
||
|
case QEvent::Move:
|
||
|
@@ -715,7 +715,7 @@ bool KMainWindow::event(QEvent *ev)
|
||
|
case QEvent::ChildPolished: {
|
||
|
QChildEvent *event = static_cast<QChildEvent *>(ev);
|
||
|
QDockWidget *dock = qobject_cast<QDockWidget *>(event->child());
|
||
|
- KToolBar *toolbar = qobject_cast<KToolBar *>(event->child());
|
||
|
+ KisToolBar *toolbar = qobject_cast<KisToolBar *>(event->child());
|
||
|
QMenuBar *menubar = qobject_cast<QMenuBar *>(event->child());
|
||
|
if (dock) {
|
||
|
connect(dock, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
|
||
|
@@ -742,7 +742,7 @@ bool KMainWindow::event(QEvent *ev)
|
||
|
case QEvent::ChildRemoved: {
|
||
|
QChildEvent *event = static_cast<QChildEvent *>(ev);
|
||
|
QDockWidget *dock = qobject_cast<QDockWidget *>(event->child());
|
||
|
- KToolBar *toolbar = qobject_cast<KToolBar *>(event->child());
|
||
|
+ KisToolBar *toolbar = qobject_cast<KisToolBar *>(event->child());
|
||
|
QMenuBar *menubar = qobject_cast<QMenuBar *>(event->child());
|
||
|
if (dock) {
|
||
|
disconnect(dock, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
|
||
|
@@ -765,65 +765,65 @@ bool KMainWindow::event(QEvent *ev)
|
||
|
return QMainWindow::event(ev);
|
||
|
}
|
||
|
|
||
|
-bool KMainWindow::hasMenuBar()
|
||
|
+bool KisKMainWindow::hasMenuBar()
|
||
|
{
|
||
|
return internalMenuBar(this);
|
||
|
}
|
||
|
|
||
|
-void KMainWindowPrivate::_k_slotSettingsChanged(int category)
|
||
|
+void KisKMainWindowPrivate::_k_slotSettingsChanged(int category)
|
||
|
{
|
||
|
Q_UNUSED(category);
|
||
|
|
||
|
// This slot will be called when the style KCM changes settings that need
|
||
|
// to be set on the already running applications.
|
||
|
|
||
|
- // At this level (KMainWindow) the only thing we need to restore is the
|
||
|
+ // At this level (KisKMainWindow) the only thing we need to restore is the
|
||
|
// animations setting (whether the user wants builtin animations or not).
|
||
|
|
||
|
q->setAnimated(q->style()->styleHint(QStyle::SH_Widget_Animate, 0, q));
|
||
|
}
|
||
|
|
||
|
-void KMainWindowPrivate::_k_slotSaveAutoSaveSize()
|
||
|
+void KisKMainWindowPrivate::_k_slotSaveAutoSaveSize()
|
||
|
{
|
||
|
if (autoSaveGroup.isValid()) {
|
||
|
KWindowConfig::saveWindowSize(q->windowHandle(), autoSaveGroup);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-KToolBar *KMainWindow::toolBar(const QString &name)
|
||
|
+KisToolBar *KisKMainWindow::toolBar(const QString &name)
|
||
|
{
|
||
|
QString childName = name;
|
||
|
if (childName.isEmpty()) {
|
||
|
childName = QStringLiteral("mainToolBar");
|
||
|
}
|
||
|
|
||
|
- KToolBar *tb = findChild<KToolBar *>(childName);
|
||
|
+ KisToolBar *tb = findChild<KisToolBar *>(childName);
|
||
|
if (tb) {
|
||
|
return tb;
|
||
|
}
|
||
|
|
||
|
- KToolBar *toolbar = new KToolBar(childName, this); // non-XMLGUI toolbar
|
||
|
+ KisToolBar *toolbar = new KisToolBar(childName, this); // non-XMLGUI toolbar
|
||
|
return toolbar;
|
||
|
}
|
||
|
|
||
|
-QList<KToolBar *> KMainWindow::toolBars() const
|
||
|
+QList<KisToolBar *> KisKMainWindow::toolBars() const
|
||
|
{
|
||
|
- QList<KToolBar *> ret;
|
||
|
+ QList<KisToolBar *> ret;
|
||
|
|
||
|
foreach (QObject *child, children())
|
||
|
- if (KToolBar *toolBar = qobject_cast<KToolBar *>(child)) {
|
||
|
+ if (KisToolBar *toolBar = qobject_cast<KisToolBar *>(child)) {
|
||
|
ret.append(toolBar);
|
||
|
}
|
||
|
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
-QList<KMainWindow *> KMainWindow::memberList()
|
||
|
+QList<KisKMainWindow *> KisKMainWindow::memberList()
|
||
|
{
|
||
|
return *sMemberList();
|
||
|
}
|
||
|
|
||
|
-QString KMainWindow::dbusName() const
|
||
|
+QString KisKMainWindow::dbusName() const
|
||
|
{
|
||
|
return k_func()->dbusName;
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/kmainwindow.h b/libs/widgetutils/xmlgui/kmainwindow.h
|
||
|
index 9d527aa7c6..05ae48463e 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kmainwindow.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kmainwindow.h
|
||
|
@@ -26,8 +26,8 @@ class QMenu;
|
||
|
class KConfig;
|
||
|
class KConfigGroup;
|
||
|
class KMWSessionManager;
|
||
|
-class KMainWindowPrivate;
|
||
|
-class KToolBar;
|
||
|
+class KisKMainWindowPrivate;
|
||
|
+class KisToolBar;
|
||
|
|
||
|
// internal, not public API, may change any time
|
||
|
#define XMLGUI_DECLARE_PRIVATE(classname) \
|
||
|
@@ -44,7 +44,7 @@ class KToolBar;
|
||
|
* It manages the geometry for all its children, including your
|
||
|
* main widget.
|
||
|
*
|
||
|
- * Normally, you will inherit from KMainWindow,
|
||
|
+ * Normally, you will inherit from KisKMainWindow,
|
||
|
* then construct (or use some existing) widget as
|
||
|
* your main view. You can set only one main view.
|
||
|
*
|
||
|
@@ -52,18 +52,18 @@ class KToolBar;
|
||
|
* and only one statusbar.
|
||
|
*
|
||
|
* The toolbars, menubar, and statusbar can be created by the
|
||
|
- * KMainWindow and - unlike the old KMainWindow - may, but do not
|
||
|
- * have to, be deleted by you. KMainWindow will handle that internally.
|
||
|
+ * KisKMainWindow and - unlike the old KisKMainWindow - may, but do not
|
||
|
+ * have to, be deleted by you. KisKMainWindow will handle that internally.
|
||
|
*
|
||
|
* Height and width can be operated independently from each other. Simply
|
||
|
* define the minimum/maximum height/width of your main widget and
|
||
|
- * KMainWindow will take this into account. For fixed size windows set
|
||
|
+ * KisKMainWindow will take this into account. For fixed size windows set
|
||
|
* your main widget to a fixed size.
|
||
|
*
|
||
|
* Fixed aspect ratios (heightForWidth()) and fixed width widgets are
|
||
|
* not supported.
|
||
|
*
|
||
|
- * KMainWindow will set icon, mini icon and caption, which it gets
|
||
|
+ * KisKMainWindow will set icon, mini icon and caption, which it gets
|
||
|
* from KApplication. It provides full session management, and
|
||
|
* will save its position, geometry and positions of toolbars and
|
||
|
* menubar on logout. If you want to save additional data, reimplement
|
||
|
@@ -77,7 +77,7 @@ class KToolBar;
|
||
|
* There are also kRestoreMainWindows convenience functions which
|
||
|
* can do this for you and restore all your windows on next login.
|
||
|
*
|
||
|
- * Note that KMainWindow uses KGlobal::ref() and KGlobal::deref() so that closing
|
||
|
+ * Note that KisKMainWindow uses KGlobal::ref() and KGlobal::deref() so that closing
|
||
|
* the last mainwindow will quit the application unless there is still something
|
||
|
* that holds a ref in KGlobal - like a KIO job, or a systray icon.
|
||
|
*
|
||
|
@@ -85,11 +85,11 @@ class KToolBar;
|
||
|
* @author Reginald Stadlbauer (reggie@kde.org) Stephan Kulow (coolo@kde.org), Matthias Ettrich (ettrich@kde.org), Chris Schlaeger (cs@kde.org), Sven Radej (radej@kde.org). Maintained by David Faure (faure@kde.org)
|
||
|
*/
|
||
|
|
||
|
-class KRITAWIDGETUTILS_EXPORT KMainWindow : public QMainWindow
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKMainWindow : public QMainWindow
|
||
|
{
|
||
|
friend class KMWSessionManager;
|
||
|
friend class DockResizeListener;
|
||
|
- XMLGUI_DECLARE_PRIVATE(KMainWindow)
|
||
|
+ XMLGUI_DECLARE_PRIVATE(KisKMainWindow)
|
||
|
Q_OBJECT
|
||
|
Q_PROPERTY(bool hasMenuBar READ hasMenuBar)
|
||
|
Q_PROPERTY(bool autoSaveSettings READ autoSaveSettings)
|
||
|
@@ -100,35 +100,35 @@ public:
|
||
|
* Construct a main window.
|
||
|
*
|
||
|
* @param parent The widget parent. This is usually 0 but it may also be the window
|
||
|
- * group leader. In that case, the KMainWindow becomes sort of a
|
||
|
+ * group leader. In that case, the KisKMainWindow becomes sort of a
|
||
|
* secondary window.
|
||
|
*
|
||
|
* @param f Specify the window flags. The default is none.
|
||
|
*
|
||
|
- * Note that a KMainWindow per-default is created with the
|
||
|
+ * Note that a KisKMainWindow per-default is created with the
|
||
|
* WA_DeleteOnClose attribute, i.e. it is automatically destroyed when the
|
||
|
* window is closed. If you do not want this behavior, call
|
||
|
* setAttribute(Qt::WA_DeleteOnClose, false);
|
||
|
*
|
||
|
- * KMainWindows must be created on the heap with 'new', like:
|
||
|
+ * KisKMainWindows must be created on the heap with 'new', like:
|
||
|
* \code
|
||
|
- * KMainWindow *kmw = new KMainWindow(...);
|
||
|
+ * KisKMainWindow *kmw = new KisKMainWindow(...);
|
||
|
* kmw->setObjectName(...);
|
||
|
* \endcode
|
||
|
*
|
||
|
* IMPORTANT: For session management and window management to work
|
||
|
* properly, all main windows in the application should have a
|
||
|
- * different name. If you don't do it, KMainWindow will create
|
||
|
+ * different name. If you don't do it, KisKMainWindow will create
|
||
|
* a unique name, but it's recommended to explicitly pass a window name that will
|
||
|
* also describe the type of the window. If there can be several windows of the same
|
||
|
- * type, append '#' (hash) to the name, and KMainWindow will replace it with numbers to make
|
||
|
+ * type, append '#' (hash) to the name, and KisKMainWindow will replace it with numbers to make
|
||
|
* the names unique. For example, for a mail client which has one main window showing
|
||
|
* the mails and folders, and which can also have one or more windows for composing
|
||
|
* mails, the name for the folders window should be e.g. "mainwindow" and
|
||
|
* for the composer windows "composer#".
|
||
|
*
|
||
|
*/
|
||
|
- explicit KMainWindow(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
|
||
|
+ explicit KisKMainWindow(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
|
||
|
|
||
|
/**
|
||
|
* \brief Destructor.
|
||
|
@@ -136,7 +136,7 @@ public:
|
||
|
* Will also destroy the toolbars, and menubar if
|
||
|
* needed.
|
||
|
*/
|
||
|
- ~KMainWindow() override;
|
||
|
+ ~KisKMainWindow() override;
|
||
|
|
||
|
/**
|
||
|
* If the session did contain so high a number, @p true is returned,
|
||
|
@@ -166,7 +166,7 @@ public:
|
||
|
* \code
|
||
|
* if (qApp->isSessionRestored()){
|
||
|
* int n = 1;
|
||
|
- * while (KMainWindow::canBeRestored(n)){
|
||
|
+ * while (KisKMainWindow::canBeRestored(n)){
|
||
|
* (new childMW)->restore(n);
|
||
|
* n++;
|
||
|
* }
|
||
|
@@ -181,7 +181,7 @@ public:
|
||
|
* application.
|
||
|
*
|
||
|
* If your application uses different kinds of toplevel
|
||
|
- * windows, then you can use KMainWindow::classNameOfToplevel(n)
|
||
|
+ * windows, then you can use KisKMainWindow::classNameOfToplevel(n)
|
||
|
* to determine the exact type before calling the childMW
|
||
|
* constructor in the example from above.
|
||
|
*
|
||
|
@@ -199,9 +199,9 @@ public:
|
||
|
bool hasMenuBar();
|
||
|
|
||
|
/**
|
||
|
- * List of members of KMainWindow class.
|
||
|
+ * List of members of KisKMainWindow class.
|
||
|
*/
|
||
|
- static QList<KMainWindow *> memberList();
|
||
|
+ static QList<KisKMainWindow *> memberList();
|
||
|
|
||
|
/**
|
||
|
* Returns a pointer to the toolbar with the specified name.
|
||
|
@@ -213,12 +213,12 @@ public:
|
||
|
*
|
||
|
* @return A pointer to the toolbar
|
||
|
**/
|
||
|
- KToolBar *toolBar(const QString &name = QString());
|
||
|
+ KisToolBar *toolBar(const QString &name = QString());
|
||
|
|
||
|
/**
|
||
|
* @return A list of all toolbars for this window
|
||
|
*/
|
||
|
- QList<KToolBar *> toolBars() const;
|
||
|
+ QList<KisToolBar *> toolBars() const;
|
||
|
|
||
|
/**
|
||
|
* Call this to enable "auto-save" of toolbar/menubar/statusbar settings
|
||
|
@@ -233,11 +233,11 @@ public:
|
||
|
* when saving.
|
||
|
*
|
||
|
* Typically, you will call setAutoSaveSettings() in your
|
||
|
- * KMainWindow-inherited class constructor, and it will take care
|
||
|
+ * KisKMainWindow-inherited class constructor, and it will take care
|
||
|
* of restoring and saving automatically. Make sure you call this
|
||
|
* _after all_ your *bars have been created.
|
||
|
*
|
||
|
- * To make sure that KMainWindow properly obtains the default
|
||
|
+ * To make sure that KisKMainWindow properly obtains the default
|
||
|
* size of the window you should do the following:
|
||
|
* - Remove hard coded resize() calls in the constructor or main, they
|
||
|
* should be removed in favor of letting the automatic resizing
|
||
|
@@ -278,7 +278,7 @@ public:
|
||
|
* @return the group used for setting-autosaving.
|
||
|
* Only meaningful if setAutoSaveSettings(QString) was called.
|
||
|
* This can be useful for forcing a save or an apply, e.g. before and after
|
||
|
- * using KEditToolbar.
|
||
|
+ * using KisKEditToolbar.
|
||
|
*
|
||
|
* NOTE: you should rather use saveAutoSaveSettings() for saving or autoSaveConfigGroup() for loading.
|
||
|
* This method doesn't make sense if setAutoSaveSettings(KConfigGroup) was called.
|
||
|
@@ -288,7 +288,7 @@ public:
|
||
|
/**
|
||
|
* @return the group used for setting-autosaving.
|
||
|
* Only meaningful if setAutoSaveSettings() was called.
|
||
|
- * This can be useful for forcing an apply, e.g. after using KEditToolbar.
|
||
|
+ * This can be useful for forcing an apply, e.g. after using KisKEditToolbar.
|
||
|
* @since 4.1
|
||
|
*/
|
||
|
KConfigGroup autoSaveConfigGroup() const;
|
||
|
@@ -479,9 +479,9 @@ protected Q_SLOTS:
|
||
|
void saveAutoSaveSettings();
|
||
|
|
||
|
protected:
|
||
|
- KMainWindow(KMainWindowPrivate &dd, QWidget *parent, Qt::WindowFlags f);
|
||
|
+ KisKMainWindow(KisKMainWindowPrivate &dd, QWidget *parent, Qt::WindowFlags f);
|
||
|
|
||
|
- KMainWindowPrivate *const k_ptr;
|
||
|
+ KisKMainWindowPrivate *const k_ptr;
|
||
|
private:
|
||
|
Q_PRIVATE_SLOT(k_func(), void _k_slotSettingsChanged(int))
|
||
|
Q_PRIVATE_SLOT(k_func(), void _k_slotSaveAutoSaveSize())
|
||
|
@@ -499,7 +499,7 @@ private:
|
||
|
* Restores the last session. (To be used in your main function).
|
||
|
*
|
||
|
* These functions work also if you have more than one kind of toplevel
|
||
|
- * widget (each derived from KMainWindow, of course).
|
||
|
+ * widget (each derived from KisKMainWindow, of course).
|
||
|
*
|
||
|
* Imagine you have three kinds of toplevel widgets: the classes childMW1,
|
||
|
* childMW2 and childMW3. Than you can just do:
|
||
|
@@ -514,7 +514,7 @@ private:
|
||
|
*
|
||
|
* kRestoreMainWindows<>() will create (on the heap) as many instances
|
||
|
* of your main windows as have existed in the last session and
|
||
|
- * call KMainWindow::restore() with the correct arguments. Note that
|
||
|
+ * call KisKMainWindow::restore() with the correct arguments. Note that
|
||
|
* also QWidget::show() is called implicitly.
|
||
|
*
|
||
|
* Currently, these functions are provided for up to three
|
||
|
@@ -522,14 +522,14 @@ private:
|
||
|
* deciding whether or not you can use kRestoreMainWindows, a
|
||
|
* define #KDE_RESTORE_MAIN_WINDOWS_NUM_TEMPLATE_ARGS is provided.
|
||
|
*
|
||
|
- * @see KMainWindow::restore()
|
||
|
- * @see KMainWindow::classNameOfToplevel()
|
||
|
+ * @see KisKMainWindow::restore()
|
||
|
+ * @see KisKMainWindow::classNameOfToplevel()
|
||
|
**/
|
||
|
template <typename T>
|
||
|
inline void kRestoreMainWindows()
|
||
|
{
|
||
|
- for (int n = 1; KMainWindow::canBeRestored(n); ++n) {
|
||
|
- const QString className = KMainWindow::classNameOfToplevel(n);
|
||
|
+ for (int n = 1; KisKMainWindow::canBeRestored(n); ++n) {
|
||
|
+ const QString className = KisKMainWindow::classNameOfToplevel(n);
|
||
|
if (className == QLatin1String(T::staticMetaObject.className())) {
|
||
|
(new T)->restore(n);
|
||
|
}
|
||
|
@@ -542,8 +542,8 @@ inline void kRestoreMainWindows()
|
||
|
const char *classNames[2];
|
||
|
classNames[0] = T0::staticMetaObject.className();
|
||
|
classNames[1] = T1::staticMetaObject.className();
|
||
|
- for (int n = 1; KMainWindow::canBeRestored(n); ++n) {
|
||
|
- const QString className = KMainWindow::classNameOfToplevel(n);
|
||
|
+ for (int n = 1; KisKMainWindow::canBeRestored(n); ++n) {
|
||
|
+ const QString className = KisKMainWindow::classNameOfToplevel(n);
|
||
|
if (className == QLatin1String(classNames[0])) {
|
||
|
(new T0)->restore(n);
|
||
|
} else if (className == QLatin1String(classNames[1])) {
|
||
|
@@ -559,8 +559,8 @@ inline void kRestoreMainWindows()
|
||
|
classNames[0] = T0::staticMetaObject.className();
|
||
|
classNames[1] = T1::staticMetaObject.className();
|
||
|
classNames[2] = T2::staticMetaObject.className();
|
||
|
- for (int n = 1; KMainWindow::canBeRestored(n); ++n) {
|
||
|
- const QString className = KMainWindow::classNameOfToplevel(n);
|
||
|
+ for (int n = 1; KisKMainWindow::canBeRestored(n); ++n) {
|
||
|
+ const QString className = KisKMainWindow::classNameOfToplevel(n);
|
||
|
if (className == QLatin1String(classNames[0])) {
|
||
|
(new T0)->restore(n);
|
||
|
} else if (className == QLatin1String(classNames[1])) {
|
||
|
diff --git a/libs/widgetutils/xmlgui/kmainwindow_p.h b/libs/widgetutils/xmlgui/kmainwindow_p.h
|
||
|
index d5d743523e..82b3d647e2 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kmainwindow_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kmainwindow_p.h
|
||
|
@@ -25,13 +25,13 @@
|
||
|
class QObject;
|
||
|
class QSessionManager;
|
||
|
class QTimer;
|
||
|
-class KHelpMenu;
|
||
|
-class KMainWindow;
|
||
|
+class KisKHelpMenu;
|
||
|
+class KisKMainWindow;
|
||
|
|
||
|
-class KMainWindowPrivate
|
||
|
+class KisKMainWindowPrivate
|
||
|
{
|
||
|
public:
|
||
|
- virtual ~KMainWindowPrivate() = default;
|
||
|
+ virtual ~KisKMainWindowPrivate() = default;
|
||
|
|
||
|
bool autoSaveSettings: 1;
|
||
|
bool settingsDirty: 1;
|
||
|
@@ -41,8 +41,8 @@ public:
|
||
|
QTimer *settingsTimer;
|
||
|
QTimer *sizeTimer;
|
||
|
QRect defaultWindowSize;
|
||
|
- KHelpMenu *helpMenu;
|
||
|
- KMainWindow *q;
|
||
|
+ KisKHelpMenu *helpMenu;
|
||
|
+ KisKMainWindow *q;
|
||
|
QPointer<QObject> dockResizeListener;
|
||
|
QString dbusName;
|
||
|
bool letDirtySettings;
|
||
|
@@ -53,8 +53,8 @@ public:
|
||
|
void _k_slotSettingsChanged(int category);
|
||
|
void _k_slotSaveAutoSaveSize();
|
||
|
|
||
|
- void init(KMainWindow *_q);
|
||
|
- void polish(KMainWindow *q);
|
||
|
+ void init(KisKMainWindow *_q);
|
||
|
+ void polish(KisKMainWindow *q);
|
||
|
enum CallCompression {
|
||
|
NoCompressCalls = 0,
|
||
|
CompressCalls
|
||
|
diff --git a/libs/widgetutils/xmlgui/kmainwindowiface.cpp b/libs/widgetutils/xmlgui/kmainwindowiface.cpp
|
||
|
index b699e9c995..b286c33458 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kmainwindowiface.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kmainwindowiface.cpp
|
||
|
@@ -14,17 +14,17 @@
|
||
|
#include <QAction>
|
||
|
#include <QClipboard>
|
||
|
|
||
|
-KMainWindowInterface::KMainWindowInterface(KXmlGuiWindow *mainWindow)
|
||
|
+KisKMainWindowInterface::KisKMainWindowInterface(KXmlGuiWindow *mainWindow)
|
||
|
: QDBusAbstractAdaptor(mainWindow)
|
||
|
{
|
||
|
m_MainWindow = mainWindow;
|
||
|
}
|
||
|
|
||
|
-KMainWindowInterface::~KMainWindowInterface()
|
||
|
+KisKMainWindowInterface::~KisKMainWindowInterface()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-QStringList KMainWindowInterface::actions()
|
||
|
+QStringList KisKMainWindowInterface::actions()
|
||
|
{
|
||
|
QStringList tmp_actions;
|
||
|
QList<QAction *> lst = m_MainWindow->actionCollection()->actions();
|
||
|
@@ -36,7 +36,7 @@ QStringList KMainWindowInterface::actions()
|
||
|
return tmp_actions;
|
||
|
}
|
||
|
|
||
|
-bool KMainWindowInterface::activateAction(const QString &action)
|
||
|
+bool KisKMainWindowInterface::activateAction(const QString &action)
|
||
|
{
|
||
|
QAction *tmp_Action = m_MainWindow->actionCollection()->action(action);
|
||
|
if (tmp_Action) {
|
||
|
@@ -47,7 +47,7 @@ bool KMainWindowInterface::activateAction(const QString &action)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-bool KMainWindowInterface::disableAction(const QString &action)
|
||
|
+bool KisKMainWindowInterface::disableAction(const QString &action)
|
||
|
{
|
||
|
QAction *tmp_Action = m_MainWindow->actionCollection()->action(action);
|
||
|
if (tmp_Action) {
|
||
|
@@ -58,7 +58,7 @@ bool KMainWindowInterface::disableAction(const QString &action)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-bool KMainWindowInterface::enableAction(const QString &action)
|
||
|
+bool KisKMainWindowInterface::enableAction(const QString &action)
|
||
|
{
|
||
|
QAction *tmp_Action = m_MainWindow->actionCollection()->action(action);
|
||
|
if (tmp_Action) {
|
||
|
@@ -69,7 +69,7 @@ bool KMainWindowInterface::enableAction(const QString &action)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-bool KMainWindowInterface::actionIsEnabled(const QString &action)
|
||
|
+bool KisKMainWindowInterface::actionIsEnabled(const QString &action)
|
||
|
{
|
||
|
QAction *tmp_Action = m_MainWindow->actionCollection()->action(action);
|
||
|
if (tmp_Action) {
|
||
|
@@ -79,7 +79,7 @@ bool KMainWindowInterface::actionIsEnabled(const QString &action)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-QString KMainWindowInterface::actionToolTip(const QString &action)
|
||
|
+QString KisKMainWindowInterface::actionToolTip(const QString &action)
|
||
|
{
|
||
|
QAction *tmp_Action = m_MainWindow->actionCollection()->action(action);
|
||
|
if (tmp_Action) {
|
||
|
@@ -89,12 +89,12 @@ QString KMainWindowInterface::actionToolTip(const QString &action)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-qlonglong KMainWindowInterface::winId()
|
||
|
+qlonglong KisKMainWindowInterface::winId()
|
||
|
{
|
||
|
return qlonglong(m_MainWindow->winId());
|
||
|
}
|
||
|
|
||
|
-void KMainWindowInterface::grabWindowToClipBoard()
|
||
|
+void KisKMainWindowInterface::grabWindowToClipBoard()
|
||
|
{
|
||
|
QClipboard *clipboard = QApplication::clipboard();
|
||
|
clipboard->setPixmap(m_MainWindow->grab());
|
||
|
diff --git a/libs/widgetutils/xmlgui/kmainwindowiface_p.h b/libs/widgetutils/xmlgui/kmainwindowiface_p.h
|
||
|
index f205f87a30..915e70869e 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kmainwindowiface_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kmainwindowiface_p.h
|
||
|
@@ -14,30 +14,30 @@
|
||
|
class KXmlGuiWindow;
|
||
|
|
||
|
/**
|
||
|
- * @short D-Bus interface to KMainWindow.
|
||
|
+ * @short D-Bus interface to KisKMainWindow.
|
||
|
*
|
||
|
- * This is the main interface to the KMainWindow. This will provide a consistent
|
||
|
+ * This is the main interface to the KisKMainWindow. This will provide a consistent
|
||
|
* D-Bus interface to all KDE applications that use it.
|
||
|
*
|
||
|
* @author Ian Reinhart Geiser <geiseri@yahoo.com>
|
||
|
*/
|
||
|
-class KMainWindowInterface : public QDBusAbstractAdaptor
|
||
|
+class KisKMainWindowInterface : public QDBusAbstractAdaptor
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
- Q_CLASSINFO("D-Bus Interface", "org.kde.KMainWindow")
|
||
|
+ Q_CLASSINFO("D-Bus Interface", "org.kde.KisKMainWindow")
|
||
|
|
||
|
public:
|
||
|
/**
|
||
|
Construct a new interface object.
|
||
|
- @param mainWindow - The parent KMainWindow object
|
||
|
+ @param mainWindow - The parent KisKMainWindow object
|
||
|
that will provide us with the KAction objects.
|
||
|
*/
|
||
|
- KMainWindowInterface(KXmlGuiWindow *mainWindow);
|
||
|
+ KisKMainWindowInterface(KXmlGuiWindow *mainWindow);
|
||
|
/**
|
||
|
Destructor
|
||
|
Cleans up the dcop action proxy object.
|
||
|
**/
|
||
|
- ~KMainWindowInterface() override;
|
||
|
+ ~KisKMainWindowInterface() override;
|
||
|
|
||
|
public Q_SLOTS:
|
||
|
/**
|
||
|
diff --git a/libs/widgetutils/xmlgui/kpartgui.dtd b/libs/widgetutils/xmlgui/kpartgui.dtd
|
||
|
index 9fe4954500..9971a8eb61 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kpartgui.dtd
|
||
|
+++ b/libs/widgetutils/xmlgui/kpartgui.dtd
|
||
|
@@ -180,7 +180,7 @@
|
||
|
>
|
||
|
|
||
|
<!-- Defines a GUI state, esp. which actions to enable and which ones to -->
|
||
|
-<!-- disable on entering this state (see KXMLGUIClient::stateChanged()) -->
|
||
|
+<!-- disable on entering this state (see KisKXMLGUIClient::stateChanged()) -->
|
||
|
<!ELEMENT State ( (enable, disable?) | disable )>
|
||
|
<!ATTLIST State
|
||
|
name CDATA #REQUIRED
|
||
|
diff --git a/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp b/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp
|
||
|
index c49fc71577..6da8fdcdf8 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp
|
||
|
@@ -31,7 +31,7 @@
|
||
|
#include "KoResourcePaths.h"
|
||
|
|
||
|
|
||
|
-KShortcutSchemesEditor::KShortcutSchemesEditor(KisShortcutsDialog *parent)
|
||
|
+KisKShortcutSchemesEditor::KisKShortcutSchemesEditor(KisShortcutsDialog *parent)
|
||
|
: m_dialog(parent)
|
||
|
{
|
||
|
KConfigGroup group(KSharedConfig::openConfig(), "Shortcut Schemes");
|
||
|
@@ -39,11 +39,11 @@ KShortcutSchemesEditor::KShortcutSchemesEditor(KisShortcutsDialog *parent)
|
||
|
QStringList schemes;
|
||
|
schemes << QStringLiteral("Default");
|
||
|
|
||
|
- auto schemeFileLocations = KShortcutSchemesHelper::schemeFileLocations();
|
||
|
+ auto schemeFileLocations = KisKShortcutSchemesHelper::schemeFileLocations();
|
||
|
schemes << schemeFileLocations.keys();
|
||
|
|
||
|
QString currentScheme = group.readEntry("Current Scheme", "Default");
|
||
|
- QString schemeFileName = KShortcutSchemesHelper::schemeFileLocations().value(currentScheme);
|
||
|
+ QString schemeFileName = KisKShortcutSchemesHelper::schemeFileLocations().value(currentScheme);
|
||
|
if (!QFileInfo(schemeFileName).exists()) {
|
||
|
currentScheme = "Default";
|
||
|
}
|
||
|
@@ -91,7 +91,7 @@ KShortcutSchemesEditor::KShortcutSchemesEditor(KisShortcutsDialog *parent)
|
||
|
updateDeleteButton();
|
||
|
}
|
||
|
|
||
|
-void KShortcutSchemesEditor::newScheme()
|
||
|
+void KisKShortcutSchemesEditor::newScheme()
|
||
|
{
|
||
|
bool ok;
|
||
|
const QString newName = QInputDialog::getText(m_dialog, i18n("Name for New Scheme"),
|
||
|
@@ -105,7 +105,7 @@ void KShortcutSchemesEditor::newScheme()
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
- const QString newSchemeFileName = KShortcutSchemesHelper::shortcutSchemeFileName(newName) + ".shortcuts";
|
||
|
+ const QString newSchemeFileName = KisKShortcutSchemesHelper::shortcutSchemeFileName(newName) + ".shortcuts";
|
||
|
|
||
|
QFile schemeFile(newSchemeFileName);
|
||
|
if (!schemeFile.open(QFile::WriteOnly | QFile::Truncate)) {
|
||
|
@@ -122,7 +122,7 @@ void KShortcutSchemesEditor::newScheme()
|
||
|
emit shortcutsSchemeChanged(newName);
|
||
|
}
|
||
|
|
||
|
-void KShortcutSchemesEditor::deleteScheme()
|
||
|
+void KisKShortcutSchemesEditor::deleteScheme()
|
||
|
{
|
||
|
if (KMessageBox::questionYesNo(m_dialog,
|
||
|
i18n("Do you really want to delete the scheme %1?\n\
|
||
|
@@ -131,19 +131,19 @@ Note that this will not remove any system wide shortcut schemes.", currentScheme
|
||
|
}
|
||
|
|
||
|
//delete the scheme for the app itself
|
||
|
- QFile::remove(KShortcutSchemesHelper::shortcutSchemeFileName(currentScheme()));
|
||
|
+ QFile::remove(KisKShortcutSchemesHelper::shortcutSchemeFileName(currentScheme()));
|
||
|
|
||
|
m_schemesList->removeItem(m_schemesList->findText(currentScheme()));
|
||
|
updateDeleteButton();
|
||
|
emit shortcutsSchemeChanged(currentScheme());
|
||
|
}
|
||
|
|
||
|
-QString KShortcutSchemesEditor::currentScheme()
|
||
|
+QString KisKShortcutSchemesEditor::currentScheme()
|
||
|
{
|
||
|
return m_schemesList->currentText();
|
||
|
}
|
||
|
|
||
|
-void KShortcutSchemesEditor::exportShortcutsScheme()
|
||
|
+void KisKShortcutSchemesEditor::exportShortcutsScheme()
|
||
|
{
|
||
|
KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
|
||
|
QString proposedPath = group.readEntry("ExportShortcuts", KoResourcePaths::saveLocation("kis_shortcuts"));
|
||
|
@@ -159,7 +159,7 @@ void KShortcutSchemesEditor::exportShortcutsScheme()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KShortcutSchemesEditor::saveCustomShortcuts()
|
||
|
+void KisKShortcutSchemesEditor::saveCustomShortcuts()
|
||
|
{
|
||
|
KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
|
||
|
QString proposedPath = group.readEntry("SaveCustomShortcuts", QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||
|
@@ -177,7 +177,7 @@ void KShortcutSchemesEditor::saveCustomShortcuts()
|
||
|
|
||
|
|
||
|
|
||
|
-void KShortcutSchemesEditor::loadCustomShortcuts()
|
||
|
+void KisKShortcutSchemesEditor::loadCustomShortcuts()
|
||
|
{
|
||
|
KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
|
||
|
QString proposedPath = group.readEntry("ImportShortcuts", QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||
|
@@ -198,7 +198,7 @@ void KShortcutSchemesEditor::loadCustomShortcuts()
|
||
|
|
||
|
}
|
||
|
|
||
|
-void KShortcutSchemesEditor::importShortcutsScheme()
|
||
|
+void KisKShortcutSchemesEditor::importShortcutsScheme()
|
||
|
{
|
||
|
KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
|
||
|
QString proposedPath = group.readEntry("ImportShortcuts", QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||
|
@@ -218,15 +218,15 @@ void KShortcutSchemesEditor::importShortcutsScheme()
|
||
|
|
||
|
#if 0
|
||
|
// XXX: Not implemented
|
||
|
-void KShortcutSchemesEditor::saveAsDefaultsForScheme()
|
||
|
+void KisKShortcutSchemesEditor::saveAsDefaultsForScheme()
|
||
|
{
|
||
|
- foreach (KActionCollection *collection, m_dialog->actionCollections()) {
|
||
|
- KShortcutSchemesHelper::exportActionCollection(collection, currentScheme());
|
||
|
+ foreach (KisKActionCollection *collection, m_dialog->actionCollections()) {
|
||
|
+ KisKShortcutSchemesHelper::exportActionCollection(collection, currentScheme());
|
||
|
}
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
-void KShortcutSchemesEditor::updateDeleteButton()
|
||
|
+void KisKShortcutSchemesEditor::updateDeleteButton()
|
||
|
{
|
||
|
m_deleteScheme->setEnabled(m_schemesList->count() >= 1);
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/kshortcutschemeseditor.h b/libs/widgetutils/xmlgui/kshortcutschemeseditor.h
|
||
|
index 330bbda1ba..3ec7ad1fff 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kshortcutschemeseditor.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kshortcutschemeseditor.h
|
||
|
@@ -12,11 +12,11 @@ class KisShortcutsDialog;
|
||
|
class QPushButton;
|
||
|
class QComboBox;
|
||
|
|
||
|
-class KShortcutSchemesEditor: public QHBoxLayout
|
||
|
+class KisKShortcutSchemesEditor: public QHBoxLayout
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
- KShortcutSchemesEditor(KisShortcutsDialog *parent);
|
||
|
+ KisKShortcutSchemesEditor(KisShortcutsDialog *parent);
|
||
|
|
||
|
/** @return the currently selected scheme in the editor (may differ from current app's scheme.*/
|
||
|
QString currentScheme();
|
||
|
diff --git a/libs/widgetutils/xmlgui/kshortcutschemeshelper.cpp b/libs/widgetutils/xmlgui/kshortcutschemeshelper.cpp
|
||
|
index 155e185b04..14cc5da0c0 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kshortcutschemeshelper.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kshortcutschemeshelper.cpp
|
||
|
@@ -23,14 +23,14 @@
|
||
|
#include "kis_action_registry.h"
|
||
|
|
||
|
|
||
|
-QString KShortcutSchemesHelper::shortcutSchemeFileName(const QString &schemeName)
|
||
|
+QString KisKShortcutSchemesHelper::shortcutSchemeFileName(const QString &schemeName)
|
||
|
{
|
||
|
// Create a directory if one cannot be found.
|
||
|
return KoResourcePaths::locateLocal("kis_shortcuts", schemeName, true);
|
||
|
}
|
||
|
|
||
|
|
||
|
-QHash<QString, QString> KShortcutSchemesHelper::schemeFileLocations()
|
||
|
+QHash<QString, QString> KisKShortcutSchemesHelper::schemeFileLocations()
|
||
|
{
|
||
|
QStringList schemes;
|
||
|
schemes << QString("Default"); // Forbid "Default.shortcuts"
|
||
|
diff --git a/libs/widgetutils/xmlgui/kshortcutschemeshelper_p.h b/libs/widgetutils/xmlgui/kshortcutschemeshelper_p.h
|
||
|
index d2c3b3ee8a..b193d10755 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kshortcutschemeshelper_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kshortcutschemeshelper_p.h
|
||
|
@@ -9,11 +9,11 @@
|
||
|
#include <QString>
|
||
|
#include <QHash>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
-class KXMLGUIClient;
|
||
|
+class KisKActionCollection;
|
||
|
+class KisKXMLGUIClient;
|
||
|
class KConfigBase;
|
||
|
|
||
|
-class KShortcutSchemesHelper
|
||
|
+class KisKShortcutSchemesHelper
|
||
|
{
|
||
|
public:
|
||
|
|
||
|
diff --git a/libs/widgetutils/xmlgui/kshortcutwidget.cpp b/libs/widgetutils/xmlgui/kshortcutwidget.cpp
|
||
|
index 463f172243..04fe85ccd0 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kshortcutwidget.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kshortcutwidget.cpp
|
||
|
@@ -7,25 +7,25 @@
|
||
|
#include "kshortcutwidget.h"
|
||
|
#include "ui_kshortcutwidget.h"
|
||
|
|
||
|
-class KShortcutWidgetPrivate
|
||
|
+class KisKShortcutWidgetPrivate
|
||
|
{
|
||
|
public:
|
||
|
- KShortcutWidgetPrivate(KShortcutWidget *q) : q(q) {}
|
||
|
+ KisKShortcutWidgetPrivate(KisKShortcutWidget *q) : q(q) {}
|
||
|
|
||
|
//private slots
|
||
|
void priKeySequenceChanged(const QKeySequence &);
|
||
|
void altKeySequenceChanged(const QKeySequence &);
|
||
|
|
||
|
//members
|
||
|
- KShortcutWidget *const q;
|
||
|
- Ui::KShortcutWidget ui;
|
||
|
+ KisKShortcutWidget *const q;
|
||
|
+ Ui::KisKShortcutWidget ui;
|
||
|
QList<QKeySequence> cut;
|
||
|
bool holdChangedSignal;
|
||
|
};
|
||
|
|
||
|
-KShortcutWidget::KShortcutWidget(QWidget *parent)
|
||
|
+KisKShortcutWidget::KisKShortcutWidget(QWidget *parent)
|
||
|
: QWidget(parent),
|
||
|
- d(new KShortcutWidgetPrivate(this))
|
||
|
+ d(new KisKShortcutWidgetPrivate(this))
|
||
|
{
|
||
|
d->holdChangedSignal = false;
|
||
|
d->ui.setupUi(this);
|
||
|
@@ -35,29 +35,29 @@ KShortcutWidget::KShortcutWidget(QWidget *parent)
|
||
|
this, SLOT(altKeySequenceChanged(QKeySequence)));
|
||
|
}
|
||
|
|
||
|
-KShortcutWidget::~KShortcutWidget()
|
||
|
+KisKShortcutWidget::~KisKShortcutWidget()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-void KShortcutWidget::setModifierlessAllowed(bool allow)
|
||
|
+void KisKShortcutWidget::setModifierlessAllowed(bool allow)
|
||
|
{
|
||
|
d->ui.priEditor->setModifierlessAllowed(allow);
|
||
|
d->ui.altEditor->setModifierlessAllowed(allow);
|
||
|
}
|
||
|
|
||
|
-bool KShortcutWidget::isModifierlessAllowed()
|
||
|
+bool KisKShortcutWidget::isModifierlessAllowed()
|
||
|
{
|
||
|
return d->ui.priEditor->isModifierlessAllowed();
|
||
|
}
|
||
|
|
||
|
-void KShortcutWidget::setClearButtonsShown(bool show)
|
||
|
+void KisKShortcutWidget::setClearButtonsShown(bool show)
|
||
|
{
|
||
|
d->ui.priEditor->setClearButtonShown(show);
|
||
|
d->ui.altEditor->setClearButtonShown(show);
|
||
|
}
|
||
|
|
||
|
-QList<QKeySequence> KShortcutWidget::shortcut() const
|
||
|
+QList<QKeySequence> KisKShortcutWidget::shortcut() const
|
||
|
{
|
||
|
QList<QKeySequence> ret;
|
||
|
ret << d->ui.priEditor->keySequence()
|
||
|
@@ -66,21 +66,21 @@ QList<QKeySequence> KShortcutWidget::shortcut() const
|
||
|
}
|
||
|
|
||
|
|
||
|
-void KShortcutWidget::setCheckActionCollections(const QList<KActionCollection *> &actionCollections)
|
||
|
+void KisKShortcutWidget::setCheckActionCollections(const QList<KisKActionCollection *> &actionCollections)
|
||
|
{
|
||
|
d->ui.priEditor->setCheckActionCollections(actionCollections);
|
||
|
d->ui.altEditor->setCheckActionCollections(actionCollections);
|
||
|
}
|
||
|
|
||
|
//slot
|
||
|
-void KShortcutWidget::applyStealShortcut()
|
||
|
+void KisKShortcutWidget::applyStealShortcut()
|
||
|
{
|
||
|
d->ui.priEditor->applyStealShortcut();
|
||
|
d->ui.altEditor->applyStealShortcut();
|
||
|
}
|
||
|
|
||
|
//slot
|
||
|
-void KShortcutWidget::setShortcut(const QList<QKeySequence> &newSc)
|
||
|
+void KisKShortcutWidget::setShortcut(const QList<QKeySequence> &newSc)
|
||
|
{
|
||
|
if (newSc == d->cut) {
|
||
|
return;
|
||
|
@@ -102,13 +102,13 @@ void KShortcutWidget::setShortcut(const QList<QKeySequence> &newSc)
|
||
|
}
|
||
|
|
||
|
//slot
|
||
|
-void KShortcutWidget::clearShortcut()
|
||
|
+void KisKShortcutWidget::clearShortcut()
|
||
|
{
|
||
|
setShortcut(QList<QKeySequence>());
|
||
|
}
|
||
|
|
||
|
//private slot
|
||
|
-void KShortcutWidgetPrivate::priKeySequenceChanged(const QKeySequence &seq)
|
||
|
+void KisKShortcutWidgetPrivate::priKeySequenceChanged(const QKeySequence &seq)
|
||
|
{
|
||
|
if (cut.isEmpty()) {
|
||
|
cut << seq;
|
||
|
@@ -122,7 +122,7 @@ void KShortcutWidgetPrivate::priKeySequenceChanged(const QKeySequence &seq)
|
||
|
}
|
||
|
|
||
|
//private slot
|
||
|
-void KShortcutWidgetPrivate::altKeySequenceChanged(const QKeySequence &seq)
|
||
|
+void KisKShortcutWidgetPrivate::altKeySequenceChanged(const QKeySequence &seq)
|
||
|
{
|
||
|
if (cut.size() <= 1) {
|
||
|
cut << seq;
|
||
|
diff --git a/libs/widgetutils/xmlgui/kshortcutwidget.h b/libs/widgetutils/xmlgui/kshortcutwidget.h
|
||
|
index 43378060e8..d4186985a5 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kshortcutwidget.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kshortcutwidget.h
|
||
|
@@ -12,19 +12,19 @@
|
||
|
#include <QList>
|
||
|
#include <QWidget>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
-class KShortcutWidgetPrivate;
|
||
|
+class KisKActionCollection;
|
||
|
+class KisKShortcutWidgetPrivate;
|
||
|
|
||
|
/**
|
||
|
* \image html kshortcutwidget.png "KDE Shortcut Widget"
|
||
|
*/
|
||
|
-class KRITAWIDGETUTILS_EXPORT KShortcutWidget : public QWidget
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKShortcutWidget : public QWidget
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
Q_PROPERTY(bool modifierlessAllowed READ isModifierlessAllowed WRITE setModifierlessAllowed)
|
||
|
public:
|
||
|
- KShortcutWidget(QWidget *parent = 0);
|
||
|
- ~KShortcutWidget() override;
|
||
|
+ KisKShortcutWidget(QWidget *parent = 0);
|
||
|
+ ~KisKShortcutWidget() override;
|
||
|
|
||
|
void setModifierlessAllowed(bool allow);
|
||
|
bool isModifierlessAllowed();
|
||
|
@@ -46,7 +46,7 @@ public:
|
||
|
*
|
||
|
* @since 4.1
|
||
|
*/
|
||
|
- void setCheckActionCollections(const QList<KActionCollection *> &actionCollections);
|
||
|
+ void setCheckActionCollections(const QList<KisKActionCollection *> &actionCollections);
|
||
|
|
||
|
Q_SIGNALS:
|
||
|
void shortcutChanged(const QList<QKeySequence> &cut);
|
||
|
@@ -69,8 +69,8 @@ private:
|
||
|
Q_PRIVATE_SLOT(d, void altKeySequenceChanged(const QKeySequence &))
|
||
|
|
||
|
private:
|
||
|
- friend class KShortcutWidgetPrivate;
|
||
|
- KShortcutWidgetPrivate *const d;
|
||
|
+ friend class KisKShortcutWidgetPrivate;
|
||
|
+ KisKShortcutWidgetPrivate *const d;
|
||
|
};
|
||
|
|
||
|
#endif //KSHORTCUTWIDGET_H
|
||
|
diff --git a/libs/widgetutils/xmlgui/kshortcutwidget.ui b/libs/widgetutils/xmlgui/kshortcutwidget.ui
|
||
|
index b42c3e18c9..af939b3393 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kshortcutwidget.ui
|
||
|
+++ b/libs/widgetutils/xmlgui/kshortcutwidget.ui
|
||
|
@@ -4,8 +4,8 @@
|
||
|
SPDX-FileCopyrightText: none
|
||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
</author>
|
||
|
- <class>KShortcutWidget</class>
|
||
|
- <widget class="QWidget" name="KShortcutWidget">
|
||
|
+ <class>KisKShortcutWidget</class>
|
||
|
+ <widget class="QWidget" name="KisKShortcutWidget">
|
||
|
<property name="geometry">
|
||
|
<rect>
|
||
|
<x>0</x>
|
||
|
@@ -29,7 +29,7 @@
|
||
|
</widget>
|
||
|
</item>
|
||
|
<item>
|
||
|
- <widget class="KKeySequenceWidget" name="priEditor" native="1">
|
||
|
+ <widget class="KisKKeySequenceWidget" name="priEditor" native="1">
|
||
|
<property name="minimumSize">
|
||
|
<size>
|
||
|
<width>0</width>
|
||
|
@@ -59,7 +59,7 @@
|
||
|
</widget>
|
||
|
</item>
|
||
|
<item>
|
||
|
- <widget class="KKeySequenceWidget" name="altEditor" native="1">
|
||
|
+ <widget class="KisKKeySequenceWidget" name="altEditor" native="1">
|
||
|
<property name="minimumSize">
|
||
|
<size>
|
||
|
<width>0</width>
|
||
|
@@ -72,7 +72,7 @@
|
||
|
</widget>
|
||
|
<customwidgets>
|
||
|
<customwidget>
|
||
|
- <class>KKeySequenceWidget</class>
|
||
|
+ <class>KisKKeySequenceWidget</class>
|
||
|
<extends>QWidget</extends>
|
||
|
<header>kkeysequencewidget.h</header>
|
||
|
</customwidget>
|
||
|
diff --git a/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.cpp b/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.cpp
|
||
|
index 7c78bf519c..eb1c005a47 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.cpp
|
||
|
@@ -105,12 +105,12 @@ struct LanguageRowData {
|
||
|
|
||
|
};
|
||
|
|
||
|
-class KSwitchLanguageDialogPrivate
|
||
|
+class KisKSwitchLanguageDialogPrivate
|
||
|
{
|
||
|
public:
|
||
|
- KSwitchLanguageDialogPrivate(KSwitchLanguageDialog *parent);
|
||
|
+ KisKSwitchLanguageDialogPrivate(KisKSwitchLanguageDialog *parent);
|
||
|
|
||
|
- KSwitchLanguageDialog *p; //parent class
|
||
|
+ KisKSwitchLanguageDialog *p; //parent class
|
||
|
|
||
|
/**
|
||
|
Fills language button with names of languages for which given application has translation.
|
||
|
@@ -132,11 +132,11 @@ public:
|
||
|
QGridLayout *languagesLayout;
|
||
|
};
|
||
|
|
||
|
-/*************************** KSwitchLanguageDialog **************************/
|
||
|
+/*************************** KisKSwitchLanguageDialog **************************/
|
||
|
|
||
|
-KSwitchLanguageDialog::KSwitchLanguageDialog(QWidget *parent)
|
||
|
+KisKSwitchLanguageDialog::KisKSwitchLanguageDialog(QWidget *parent)
|
||
|
: QDialog(parent),
|
||
|
- d(new KSwitchLanguageDialogPrivate(this))
|
||
|
+ d(new KisKSwitchLanguageDialogPrivate(this))
|
||
|
{
|
||
|
setWindowTitle(i18n("Switch Application Language"));
|
||
|
|
||
|
@@ -194,34 +194,34 @@ KSwitchLanguageDialog::KSwitchLanguageDialog(QWidget *parent)
|
||
|
this, SLOT(slotDefault()));
|
||
|
}
|
||
|
|
||
|
-KSwitchLanguageDialog::~KSwitchLanguageDialog()
|
||
|
+KisKSwitchLanguageDialog::~KisKSwitchLanguageDialog()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-void KSwitchLanguageDialog::slotAddLanguageButton()
|
||
|
+void KisKSwitchLanguageDialog::slotAddLanguageButton()
|
||
|
{
|
||
|
//adding new button with en_US as it should always be present
|
||
|
d->addLanguageButton(QStringLiteral("en_US"), d->languageButtons.isEmpty());
|
||
|
}
|
||
|
|
||
|
-void KSwitchLanguageDialog::removeButtonClicked()
|
||
|
+void KisKSwitchLanguageDialog::removeButtonClicked()
|
||
|
{
|
||
|
QObject const *signalSender = sender();
|
||
|
if (!signalSender) {
|
||
|
- qCritical() << "KSwitchLanguageDialog::removeButtonClicked() called directly, not using signal" << endl;
|
||
|
+ qCritical() << "KisKSwitchLanguageDialog::removeButtonClicked() called directly, not using signal" << endl;
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
QPushButton *removeButton = const_cast<QPushButton *>(::qobject_cast<const QPushButton *>(signalSender));
|
||
|
if (!removeButton) {
|
||
|
- qCritical() << "KSwitchLanguageDialog::removeButtonClicked() called from something else than QPushButton" << endl;
|
||
|
+ qCritical() << "KisKSwitchLanguageDialog::removeButtonClicked() called from something else than QPushButton" << endl;
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
QMap<QPushButton *, LanguageRowData>::iterator it = d->languageRows.find(removeButton);
|
||
|
if (it == d->languageRows.end()) {
|
||
|
- qCritical() << "KSwitchLanguageDialog::removeButtonClicked called from unknown QPushButton" << endl;
|
||
|
+ qCritical() << "KisKSwitchLanguageDialog::removeButtonClicked called from unknown QPushButton" << endl;
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
@@ -235,7 +235,7 @@ void KSwitchLanguageDialog::removeButtonClicked()
|
||
|
d->languageRows.erase(it);
|
||
|
}
|
||
|
|
||
|
-void KSwitchLanguageDialog::languageOnButtonChanged(const QString &languageCode)
|
||
|
+void KisKSwitchLanguageDialog::languageOnButtonChanged(const QString &languageCode)
|
||
|
{
|
||
|
Q_UNUSED(languageCode);
|
||
|
#if 0
|
||
|
@@ -250,7 +250,7 @@ void KSwitchLanguageDialog::languageOnButtonChanged(const QString &languageCode)
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
-void KSwitchLanguageDialog::slotOk()
|
||
|
+void KisKSwitchLanguageDialog::slotOk()
|
||
|
{
|
||
|
QStringList languages;
|
||
|
|
||
|
@@ -272,16 +272,16 @@ void KSwitchLanguageDialog::slotOk()
|
||
|
accept();
|
||
|
}
|
||
|
|
||
|
-void KSwitchLanguageDialog::slotDefault()
|
||
|
+void KisKSwitchLanguageDialog::slotDefault()
|
||
|
{
|
||
|
setApplicationSpecificLanguage(QByteArray());
|
||
|
accept();
|
||
|
}
|
||
|
|
||
|
-/************************ KSwitchLanguageDialogPrivate ***********************/
|
||
|
+/************************ KisKSwitchLanguageDialogPrivate ***********************/
|
||
|
|
||
|
-KSwitchLanguageDialogPrivate::KSwitchLanguageDialogPrivate(
|
||
|
- KSwitchLanguageDialog *parent)
|
||
|
+KisKSwitchLanguageDialogPrivate::KisKSwitchLanguageDialogPrivate(
|
||
|
+ KisKSwitchLanguageDialog *parent)
|
||
|
: p(parent)
|
||
|
{
|
||
|
//NOTE: do NOT use "p" in constructor, it is not fully constructed
|
||
|
@@ -297,7 +297,7 @@ static bool stripCountryCode(QString *languageCode)
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
-void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *button)
|
||
|
+void KisKSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *button)
|
||
|
{
|
||
|
QLocale defaultLocale;
|
||
|
QLocale cLocale(QLocale::C);
|
||
|
@@ -346,7 +346,7 @@ void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *but
|
||
|
QLocale::setDefault(defaultLocale);
|
||
|
}
|
||
|
|
||
|
-QStringList KSwitchLanguageDialogPrivate::applicationLanguageList()
|
||
|
+QStringList KisKSwitchLanguageDialogPrivate::applicationLanguageList()
|
||
|
{
|
||
|
QStringList languagesList;
|
||
|
|
||
|
@@ -383,7 +383,7 @@ QStringList KSwitchLanguageDialogPrivate::applicationLanguageList()
|
||
|
return languagesList;
|
||
|
}
|
||
|
|
||
|
-void KSwitchLanguageDialogPrivate::addLanguageButton(const QString &languageCode, bool primaryLanguage)
|
||
|
+void KisKSwitchLanguageDialogPrivate::addLanguageButton(const QString &languageCode, bool primaryLanguage)
|
||
|
{
|
||
|
QString labelText = primaryLanguage ? i18n("Primary language:") : i18n("Fallback language:");
|
||
|
|
||
|
diff --git a/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.h b/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.h
|
||
|
index 9fdbcb299e..c4e3a170d4 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.h
|
||
|
@@ -14,34 +14,34 @@
|
||
|
namespace KDEPrivate
|
||
|
{
|
||
|
|
||
|
-class KSwitchLanguageDialogPrivate;
|
||
|
+class KisKSwitchLanguageDialogPrivate;
|
||
|
|
||
|
/**
|
||
|
* @short Standard "switch application language" dialog box.
|
||
|
*
|
||
|
* This class provides "switch application language" dialog box that is used
|
||
|
- * in KHelpMenu
|
||
|
+ * in KisKHelpMenu
|
||
|
*
|
||
|
* @author Krzysztof Lichota (lichota@mimuw.edu.pl)
|
||
|
* @internal
|
||
|
*/
|
||
|
|
||
|
-class KSwitchLanguageDialog : public QDialog
|
||
|
+class KisKSwitchLanguageDialog : public QDialog
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
/**
|
||
|
* Constructor. Creates a fully featured "Switch application language" dialog box.
|
||
|
- * Note that this dialog is made modeless in the KHelpMenu class so
|
||
|
+ * Note that this dialog is made modeless in the KisKHelpMenu class so
|
||
|
* the users may expect a modeless dialog.
|
||
|
*
|
||
|
* @param parent The parent of the dialog box. You should use the
|
||
|
* toplevel window so that the dialog becomes centered.
|
||
|
*/
|
||
|
- KSwitchLanguageDialog(QWidget *parent = 0);
|
||
|
+ KisKSwitchLanguageDialog(QWidget *parent = 0);
|
||
|
|
||
|
- ~KSwitchLanguageDialog() override;
|
||
|
+ ~KisKSwitchLanguageDialog() override;
|
||
|
|
||
|
protected Q_SLOTS:
|
||
|
/**
|
||
|
@@ -66,9 +66,9 @@ protected Q_SLOTS:
|
||
|
virtual void removeButtonClicked();
|
||
|
|
||
|
private:
|
||
|
- KSwitchLanguageDialogPrivate *const d;
|
||
|
+ KisKSwitchLanguageDialogPrivate *const d;
|
||
|
|
||
|
- friend class KSwitchLanguageDialogPrivate;
|
||
|
+ friend class KisKSwitchLanguageDialogPrivate;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/ktoggletoolbaraction.cpp b/libs/widgetutils/xmlgui/ktoggletoolbaraction.cpp
|
||
|
index 1619c35de6..ea82e71b7a 100644
|
||
|
--- a/libs/widgetutils/xmlgui/ktoggletoolbaraction.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/ktoggletoolbaraction.cpp
|
||
|
@@ -33,7 +33,7 @@ public:
|
||
|
}
|
||
|
|
||
|
QByteArray toolBarName;
|
||
|
- QPointer<KToolBar> toolBar;
|
||
|
+ QPointer<KisToolBar> toolBar;
|
||
|
bool beingToggled;
|
||
|
};
|
||
|
|
||
|
@@ -44,7 +44,7 @@ KToggleToolBarAction::KToggleToolBarAction(const char *toolBarName, const QStrin
|
||
|
d->toolBarName = toolBarName;
|
||
|
}
|
||
|
|
||
|
-KToggleToolBarAction::KToggleToolBarAction(KToolBar *toolBar, const QString &text, QObject *parent)
|
||
|
+KToggleToolBarAction::KToggleToolBarAction(KisToolBar *toolBar, const QString &text, QObject *parent)
|
||
|
: KToggleAction(text, parent),
|
||
|
d(new Private)
|
||
|
{
|
||
|
@@ -93,7 +93,7 @@ bool KToggleToolBarAction::eventFilter(QObject *watched, QEvent *event)
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
-KToolBar *KToggleToolBarAction::toolBar()
|
||
|
+KisToolBar *KToggleToolBarAction::toolBar()
|
||
|
{
|
||
|
return d->toolBar;
|
||
|
}
|
||
|
@@ -106,8 +106,8 @@ void KToggleToolBarAction::slotToggled(bool checked)
|
||
|
d->beingToggled = false;
|
||
|
|
||
|
QMainWindow *mw = d->toolBar->mainWindow();
|
||
|
- if (mw && qobject_cast<KMainWindow *>(mw)) {
|
||
|
- static_cast<KMainWindow *>(mw)->setSettingsDirty();
|
||
|
+ if (mw && qobject_cast<KisKMainWindow *>(mw)) {
|
||
|
+ static_cast<KisKMainWindow *>(mw)->setSettingsDirty();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
diff --git a/libs/widgetutils/xmlgui/ktoggletoolbaraction.h b/libs/widgetutils/xmlgui/ktoggletoolbaraction.h
|
||
|
index 1d5801d02f..c48abf0731 100644
|
||
|
--- a/libs/widgetutils/xmlgui/ktoggletoolbaraction.h
|
||
|
+++ b/libs/widgetutils/xmlgui/ktoggletoolbaraction.h
|
||
|
@@ -18,7 +18,7 @@
|
||
|
#include <ktoggleaction.h>
|
||
|
#include <kritawidgetutils_export.h>
|
||
|
|
||
|
-class KToolBar;
|
||
|
+class KisToolBar;
|
||
|
|
||
|
/**
|
||
|
* An action that takes care of everything associated with
|
||
|
@@ -38,7 +38,7 @@ class KRITAWIDGETUTILS_EXPORT KToggleToolBarAction : public KToggleAction
|
||
|
|
||
|
public:
|
||
|
/**
|
||
|
- * Create a KToggleToolbarAction that manages the toolbar
|
||
|
+ * Create a KisKToggleToolbarAction that manages the toolbar
|
||
|
* named @p toolBarName. This can be either the name of a
|
||
|
* toolbar in an xml ui file, or a toolbar programmatically
|
||
|
* created with that name.
|
||
|
@@ -50,7 +50,7 @@ public:
|
||
|
KToggleToolBarAction(const char *toolBarName, const QString &text, QObject *parent);
|
||
|
|
||
|
/**
|
||
|
- * Create a KToggleToolbarAction that manages the @p toolBar.
|
||
|
+ * Create a KisKToggleToolbarAction that manages the @p toolBar.
|
||
|
* This can be either the name of a toolbar in an xml ui file,
|
||
|
* or a toolbar programmatically created with that name.
|
||
|
*
|
||
|
@@ -58,7 +58,7 @@ public:
|
||
|
* @param text The action's text
|
||
|
* @param parent The action's parent object.
|
||
|
*/
|
||
|
- KToggleToolBarAction(KToolBar *toolBar, const QString &text, QObject *parent);
|
||
|
+ KToggleToolBarAction(KisToolBar *toolBar, const QString &text, QObject *parent);
|
||
|
|
||
|
/**
|
||
|
* Destroys toggle toolbar action.
|
||
|
@@ -68,7 +68,7 @@ public:
|
||
|
/**
|
||
|
* Returns a pointer to the tool bar it manages.
|
||
|
*/
|
||
|
- KToolBar *toolBar();
|
||
|
+ KisToolBar *toolBar();
|
||
|
|
||
|
/**
|
||
|
* Reimplemented from @see QObject.
|
||
|
diff --git a/libs/widgetutils/xmlgui/ktoolbar.cpp b/libs/widgetutils/xmlgui/ktoolbar.cpp
|
||
|
index 6a96914d42..f946317a42 100644
|
||
|
--- a/libs/widgetutils/xmlgui/ktoolbar.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/ktoolbar.cpp
|
||
|
@@ -80,10 +80,10 @@ enum SettingLevel { Level_KDEDefault, Level_AppXML, Level_UserSettings,
|
||
|
};
|
||
|
enum { Unset = -1 };
|
||
|
|
||
|
-class KToolBar::Private
|
||
|
+class KisToolBar::Private
|
||
|
{
|
||
|
public:
|
||
|
- Private(KToolBar *qq)
|
||
|
+ Private(KisToolBar *qq)
|
||
|
: q(qq),
|
||
|
isMainToolBar(false),
|
||
|
unlockedMovable(true),
|
||
|
@@ -134,20 +134,20 @@ public:
|
||
|
void applyCurrentSettings();
|
||
|
void customizeButtonPalette(QToolButton *button, bool checked);
|
||
|
|
||
|
- QAction *findAction(const QString &actionName, KXMLGUIClient **client = 0) const;
|
||
|
+ QAction *findAction(const QString &actionName, KisKXMLGUIClient **client = 0) const;
|
||
|
|
||
|
static Qt::ToolButtonStyle toolButtonStyleFromString(const QString &style);
|
||
|
static QString toolButtonStyleToString(Qt::ToolButtonStyle);
|
||
|
static Qt::ToolBarArea positionFromString(const QString &position);
|
||
|
static Qt::ToolButtonStyle toolButtonStyleSetting();
|
||
|
|
||
|
- KToolBar *q;
|
||
|
+ KisToolBar *q;
|
||
|
bool isMainToolBar : 1;
|
||
|
bool unlockedMovable : 1;
|
||
|
static bool s_editable;
|
||
|
static bool s_locked;
|
||
|
|
||
|
- QSet<KXMLGUIClient *> xmlguiClients;
|
||
|
+ QSet<KisKXMLGUIClient *> xmlguiClients;
|
||
|
|
||
|
QMenu *contextOrient;
|
||
|
QMenu *contextMode;
|
||
|
@@ -224,10 +224,10 @@ public:
|
||
|
QPoint dragStartPosition;
|
||
|
};
|
||
|
|
||
|
-bool KToolBar::Private::s_editable = false;
|
||
|
-bool KToolBar::Private::s_locked = true;
|
||
|
+bool KisToolBar::Private::s_editable = false;
|
||
|
+bool KisToolBar::Private::s_locked = true;
|
||
|
|
||
|
-void KToolBar::Private::init(bool readConfig, bool _isMainToolBar)
|
||
|
+void KisToolBar::Private::init(bool readConfig, bool _isMainToolBar)
|
||
|
{
|
||
|
isMainToolBar = _isMainToolBar;
|
||
|
loadKDESettings();
|
||
|
@@ -252,7 +252,7 @@ void KToolBar::Private::init(bool readConfig, bool _isMainToolBar)
|
||
|
q->mainWindow(), SLOT(setSettingsDirty()));
|
||
|
}
|
||
|
|
||
|
- q->setMovable(!KToolBar::toolBarsLocked());
|
||
|
+ q->setMovable(!KisToolBar::toolBarsLocked());
|
||
|
|
||
|
connect(q, SIGNAL(movableChanged(bool)),
|
||
|
q, SLOT(slotMovableChanged(bool)));
|
||
|
@@ -260,15 +260,15 @@ void KToolBar::Private::init(bool readConfig, bool _isMainToolBar)
|
||
|
q->setAcceptDrops(true);
|
||
|
|
||
|
#ifdef HAVE_DBUS
|
||
|
- QDBusConnection::sessionBus().connect(QString(), QStringLiteral("/KToolBar"), QStringLiteral("org.kde.KToolBar"),
|
||
|
+ QDBusConnection::sessionBus().connect(QString(), QStringLiteral("/KisToolBar"), QStringLiteral("org.kde.KisToolBar"),
|
||
|
QStringLiteral("styleChanged"), q, SLOT(slotAppearanceChanged()));
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
-QString KToolBar::Private::getPositionAsString() const
|
||
|
+QString KisToolBar::Private::getPositionAsString() const
|
||
|
{
|
||
|
// get all of the stuff to save
|
||
|
- switch (q->mainWindow()->toolBarArea(const_cast<KToolBar *>(q))) {
|
||
|
+ switch (q->mainWindow()->toolBarArea(const_cast<KisToolBar *>(q))) {
|
||
|
case Qt::BottomToolBarArea:
|
||
|
return QStringLiteral("Bottom");
|
||
|
case Qt::LeftToolBarArea:
|
||
|
@@ -281,7 +281,7 @@ QString KToolBar::Private::getPositionAsString() const
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-QMenu *KToolBar::Private::contextMenu(const QPoint &globalPos)
|
||
|
+QMenu *KisToolBar::Private::contextMenu(const QPoint &globalPos)
|
||
|
{
|
||
|
if (!context) {
|
||
|
context = new QMenu(q);
|
||
|
@@ -410,14 +410,14 @@ QMenu *KToolBar::Private::contextMenu(const QPoint &globalPos)
|
||
|
return context;
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::setLocked(bool locked)
|
||
|
+void KisToolBar::Private::setLocked(bool locked)
|
||
|
{
|
||
|
if (unlockedMovable) {
|
||
|
q->setMovable(!locked);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::adjustSeparatorVisibility()
|
||
|
+void KisToolBar::Private::adjustSeparatorVisibility()
|
||
|
{
|
||
|
bool visibleNonSeparator = false;
|
||
|
int separatorToShow = -1;
|
||
|
@@ -447,7 +447,7 @@ void KToolBar::Private::adjustSeparatorVisibility()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-Qt::ToolButtonStyle KToolBar::Private::toolButtonStyleFromString(const QString &_style)
|
||
|
+Qt::ToolButtonStyle KisToolBar::Private::toolButtonStyleFromString(const QString &_style)
|
||
|
{
|
||
|
QString style = _style.toLower();
|
||
|
if (style == QStringLiteral("textbesideicon") || style == QLatin1String("icontextright")) {
|
||
|
@@ -461,7 +461,7 @@ Qt::ToolButtonStyle KToolBar::Private::toolButtonStyleFromString(const QString &
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-QString KToolBar::Private::toolButtonStyleToString(Qt::ToolButtonStyle style)
|
||
|
+QString KisToolBar::Private::toolButtonStyleToString(Qt::ToolButtonStyle style)
|
||
|
{
|
||
|
switch (style) {
|
||
|
case Qt::ToolButtonIconOnly:
|
||
|
@@ -476,7 +476,7 @@ QString KToolBar::Private::toolButtonStyleToString(Qt::ToolButtonStyle style)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-Qt::ToolBarArea KToolBar::Private::positionFromString(const QString &position)
|
||
|
+Qt::ToolBarArea KisToolBar::Private::positionFromString(const QString &position)
|
||
|
{
|
||
|
Qt::ToolBarArea newposition = Qt::TopToolBarArea;
|
||
|
if (position == QStringLiteral("left")) {
|
||
|
@@ -490,20 +490,20 @@ Qt::ToolBarArea KToolBar::Private::positionFromString(const QString &position)
|
||
|
}
|
||
|
|
||
|
// Global setting was changed
|
||
|
-void KToolBar::Private::slotAppearanceChanged()
|
||
|
+void KisToolBar::Private::slotAppearanceChanged()
|
||
|
{
|
||
|
loadKDESettings();
|
||
|
applyCurrentSettings();
|
||
|
}
|
||
|
|
||
|
-Qt::ToolButtonStyle KToolBar::Private::toolButtonStyleSetting()
|
||
|
+Qt::ToolButtonStyle KisToolBar::Private::toolButtonStyleSetting()
|
||
|
{
|
||
|
KConfigGroup group(KSharedConfig::openConfig(), "Toolbar style");
|
||
|
- const QString fallback = KToolBar::Private::toolButtonStyleToString(Qt::ToolButtonTextBesideIcon);
|
||
|
- return KToolBar::Private::toolButtonStyleFromString(group.readEntry("ToolButtonStyle", fallback));
|
||
|
+ const QString fallback = KisToolBar::Private::toolButtonStyleToString(Qt::ToolButtonTextBesideIcon);
|
||
|
+ return KisToolBar::Private::toolButtonStyleFromString(group.readEntry("ToolButtonStyle", fallback));
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::loadKDESettings()
|
||
|
+void KisToolBar::Private::loadKDESettings()
|
||
|
{
|
||
|
iconSizeSettings[Level_KDEDefault] = q->iconSizeDefault();
|
||
|
|
||
|
@@ -513,12 +513,12 @@ void KToolBar::Private::loadKDESettings()
|
||
|
const QString fallBack = toolButtonStyleToString(Qt::ToolButtonTextBesideIcon);
|
||
|
KConfigGroup group(KSharedConfig::openConfig(), "Toolbar style");
|
||
|
const QString value = group.readEntry("ToolButtonStyleOtherToolbars", fallBack);
|
||
|
- toolButtonStyleSettings[Level_KDEDefault] = KToolBar::Private::toolButtonStyleFromString(value);
|
||
|
+ toolButtonStyleSettings[Level_KDEDefault] = KisToolBar::Private::toolButtonStyleFromString(value);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Call this after changing something in d->iconSizeSettings or d->toolButtonStyleSettings
|
||
|
-void KToolBar::Private::applyCurrentSettings()
|
||
|
+void KisToolBar::Private::applyCurrentSettings()
|
||
|
{
|
||
|
//qDebug() << q->objectName() << "iconSizeSettings:" << iconSizeSettings.toString() << "->" << iconSizeSettings.currentValue();
|
||
|
const int currentIconSize = iconSizeSettings.currentValue();
|
||
|
@@ -527,14 +527,14 @@ void KToolBar::Private::applyCurrentSettings()
|
||
|
q->setToolButtonStyle(static_cast<Qt::ToolButtonStyle>(toolButtonStyleSettings.currentValue()));
|
||
|
|
||
|
// And remember to save the new look later
|
||
|
- KMainWindow *kmw = q->mainWindow();
|
||
|
+ KisKMainWindow *kmw = q->mainWindow();
|
||
|
if (kmw) {
|
||
|
kmw->setSettingsDirty();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Krita widget style "hack" setting button palette depending on check state
|
||
|
-void KToolBar::Private::customizeButtonPalette(QToolButton *button, bool checked)
|
||
|
+void KisToolBar::Private::customizeButtonPalette(QToolButton *button, bool checked)
|
||
|
{
|
||
|
QPalette p = button->palette();
|
||
|
QColor color = q->palette().color(checked ? QPalette::Highlight : QPalette::Button);
|
||
|
@@ -542,9 +542,9 @@ void KToolBar::Private::customizeButtonPalette(QToolButton *button, bool checked
|
||
|
button->setPalette(p);
|
||
|
}
|
||
|
|
||
|
-QAction *KToolBar::Private::findAction(const QString &actionName, KXMLGUIClient **clientOut) const
|
||
|
+QAction *KisToolBar::Private::findAction(const QString &actionName, KisKXMLGUIClient **clientOut) const
|
||
|
{
|
||
|
- Q_FOREACH (KXMLGUIClient *client, xmlguiClients) {
|
||
|
+ Q_FOREACH (KisKXMLGUIClient *client, xmlguiClients) {
|
||
|
QAction *action = client->actionCollection()->action(actionName);
|
||
|
if (action) {
|
||
|
if (clientOut) {
|
||
|
@@ -556,7 +556,7 @@ QAction *KToolBar::Private::findAction(const QString &actionName, KXMLGUIClient
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextAboutToShow()
|
||
|
+void KisToolBar::Private::slotContextAboutToShow()
|
||
|
{
|
||
|
/**
|
||
|
* The idea here is to reuse the "static" part of the menu to save time.
|
||
|
@@ -593,7 +593,7 @@ void KToolBar::Private::slotContextAboutToShow()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
- KEditToolBar::setGlobalDefaultToolBar(q->QObject::objectName().toLatin1().constData());
|
||
|
+ KisKEditToolBar::setGlobalDefaultToolBar(q->QObject::objectName().toLatin1().constData());
|
||
|
|
||
|
// Check the actions that should be checked
|
||
|
switch (q->toolButtonStyle()) {
|
||
|
@@ -647,7 +647,7 @@ void KToolBar::Private::slotContextAboutToShow()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextAboutToHide()
|
||
|
+void KisToolBar::Private::slotContextAboutToHide()
|
||
|
{
|
||
|
// We have to unplug whatever slotContextAboutToShow plugged into the menu.
|
||
|
// Unplug the toolbar menu action
|
||
|
@@ -675,17 +675,17 @@ void KToolBar::Private::slotContextAboutToHide()
|
||
|
context->removeAction(contextLockAction);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextLeft()
|
||
|
+void KisToolBar::Private::slotContextLeft()
|
||
|
{
|
||
|
q->mainWindow()->addToolBar(Qt::LeftToolBarArea, q);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextRight()
|
||
|
+void KisToolBar::Private::slotContextRight()
|
||
|
{
|
||
|
q->mainWindow()->addToolBar(Qt::RightToolBarArea, q);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextShowText()
|
||
|
+void KisToolBar::Private::slotContextShowText()
|
||
|
{
|
||
|
Q_ASSERT(contextButtonAction);
|
||
|
const QAction::Priority priority = contextShowText->isChecked()
|
||
|
@@ -695,7 +695,7 @@ void KToolBar::Private::slotContextShowText()
|
||
|
// Find to which xml file and componentData the action belongs to
|
||
|
QString componentName;
|
||
|
QString filename;
|
||
|
- KXMLGUIClient *client;
|
||
|
+ KisKXMLGUIClient *client;
|
||
|
if (findAction(contextButtonAction->objectName(), &client)) {
|
||
|
componentName = client->componentName();
|
||
|
filename = client->xmlFile();
|
||
|
@@ -706,51 +706,51 @@ void KToolBar::Private::slotContextShowText()
|
||
|
}
|
||
|
|
||
|
// Save the priority state of the action
|
||
|
- const QString configFile = KXMLGUIFactory::readConfigFile(filename, componentName);
|
||
|
+ const QString configFile = KisKXMLGUIFactory::readConfigFile(filename, componentName);
|
||
|
|
||
|
QDomDocument document;
|
||
|
document.setContent(configFile);
|
||
|
- QDomElement elem = KXMLGUIFactory::actionPropertiesElement(document);
|
||
|
- QDomElement actionElem = KXMLGUIFactory::findActionByName(elem, contextButtonAction->objectName(), true);
|
||
|
+ QDomElement elem = KisKXMLGUIFactory::actionPropertiesElement(document);
|
||
|
+ QDomElement actionElem = KisKXMLGUIFactory::findActionByName(elem, contextButtonAction->objectName(), true);
|
||
|
actionElem.setAttribute(QStringLiteral("priority"), priority);
|
||
|
- KXMLGUIFactory::saveConfigFile(document, filename, componentName);
|
||
|
+ KisKXMLGUIFactory::saveConfigFile(document, filename, componentName);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextTop()
|
||
|
+void KisToolBar::Private::slotContextTop()
|
||
|
{
|
||
|
q->mainWindow()->addToolBar(Qt::TopToolBarArea, q);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextBottom()
|
||
|
+void KisToolBar::Private::slotContextBottom()
|
||
|
{
|
||
|
q->mainWindow()->addToolBar(Qt::BottomToolBarArea, q);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextIcons()
|
||
|
+void KisToolBar::Private::slotContextIcons()
|
||
|
{
|
||
|
q->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||
|
toolButtonStyleSettings[Level_UserSettings] = q->toolButtonStyle();
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextText()
|
||
|
+void KisToolBar::Private::slotContextText()
|
||
|
{
|
||
|
q->setToolButtonStyle(Qt::ToolButtonTextOnly);
|
||
|
toolButtonStyleSettings[Level_UserSettings] = q->toolButtonStyle();
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextTextUnder()
|
||
|
+void KisToolBar::Private::slotContextTextUnder()
|
||
|
{
|
||
|
q->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||
|
toolButtonStyleSettings[Level_UserSettings] = q->toolButtonStyle();
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextTextRight()
|
||
|
+void KisToolBar::Private::slotContextTextRight()
|
||
|
{
|
||
|
q->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||
|
toolButtonStyleSettings[Level_UserSettings] = q->toolButtonStyle();
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotContextIconSize()
|
||
|
+void KisToolBar::Private::slotContextIconSize()
|
||
|
{
|
||
|
QAction *action = qobject_cast<QAction *>(q->sender());
|
||
|
if (action && contextIconSizes.contains(action)) {
|
||
|
@@ -759,13 +759,13 @@ void KToolBar::Private::slotContextIconSize()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KToolBar::Private::slotLockToolBars(bool lock)
|
||
|
+void KisToolBar::Private::slotLockToolBars(bool lock)
|
||
|
{
|
||
|
q->setToolBarsLocked(lock);
|
||
|
}
|
||
|
|
||
|
// Krita widget style "hack" reacting to QToolButton toggles
|
||
|
-void KToolBar::Private::slotToolButtonToggled(bool checked)
|
||
|
+void KisToolBar::Private::slotToolButtonToggled(bool checked)
|
||
|
{
|
||
|
QToolButton *tb = qobject_cast<QToolButton *>(q->sender());
|
||
|
if (tb) {
|
||
|
@@ -773,7 +773,7 @@ void KToolBar::Private::slotToolButtonToggled(bool checked)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-KToolBar::KToolBar(const QString &objectName, QWidget *parent, bool readConfig)
|
||
|
+KisToolBar::KisToolBar(const QString &objectName, QWidget *parent, bool readConfig)
|
||
|
: QToolBar(parent),
|
||
|
d(new Private(this))
|
||
|
{
|
||
|
@@ -782,19 +782,19 @@ KToolBar::KToolBar(const QString &objectName, QWidget *parent, bool readConfig)
|
||
|
// others -> isMainToolBar = false -> ### hardcoded default for buttonStyle !!! should be configurable? -> hidden key added
|
||
|
d->init(readConfig, objectName == QStringLiteral("mainToolBar"));
|
||
|
|
||
|
- // KToolBar is auto-added to the top area of the main window if parent is a QMainWindow
|
||
|
+ // KisToolBar is auto-added to the top area of the main window if parent is a QMainWindow
|
||
|
if (QMainWindow *mw = qobject_cast<QMainWindow *>(parent)) {
|
||
|
mw->addToolBar(this);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-KToolBar::~KToolBar()
|
||
|
+KisToolBar::~KisToolBar()
|
||
|
{
|
||
|
delete d->contextLockAction;
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-void KToolBar::saveSettings(KConfigGroup &cg)
|
||
|
+void KisToolBar::saveSettings(KConfigGroup &cg)
|
||
|
{
|
||
|
Q_ASSERT(!cg.name().isEmpty());
|
||
|
|
||
|
@@ -819,22 +819,22 @@ void KToolBar::saveSettings(KConfigGroup &cg)
|
||
|
}
|
||
|
|
||
|
|
||
|
-void KToolBar::addXMLGUIClient(KXMLGUIClient *client)
|
||
|
+void KisToolBar::addXMLGUIClient(KisKXMLGUIClient *client)
|
||
|
{
|
||
|
d->xmlguiClients << client;
|
||
|
}
|
||
|
|
||
|
-void KToolBar::removeXMLGUIClient(KXMLGUIClient *client)
|
||
|
+void KisToolBar::removeXMLGUIClient(KisKXMLGUIClient *client)
|
||
|
{
|
||
|
d->xmlguiClients.remove(client);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::contextMenuEvent(QContextMenuEvent *event)
|
||
|
+void KisToolBar::contextMenuEvent(QContextMenuEvent *event)
|
||
|
{
|
||
|
QToolBar::contextMenuEvent(event);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::loadState(const QDomElement &element)
|
||
|
+void KisToolBar::loadState(const QDomElement &element)
|
||
|
{
|
||
|
QMainWindow *mw = mainWindow();
|
||
|
if (!mw) {
|
||
|
@@ -885,7 +885,7 @@ void KToolBar::loadState(const QDomElement &element)
|
||
|
- for the initial loading of the app's XML. In that case the settings
|
||
|
are only the defaults (Level_AppXML), the user's KConfig settings will override them
|
||
|
|
||
|
- - for later re-loading when switching between parts in KXMLGUIFactory.
|
||
|
+ - for later re-loading when switching between parts in KisKXMLGUIFactory.
|
||
|
In that case the XML contains the final settings, not the defaults.
|
||
|
We do need the defaults, and the toolbar might have been completely
|
||
|
deleted and recreated meanwhile. So we store the app-default settings
|
||
|
@@ -945,7 +945,7 @@ void KToolBar::loadState(const QDomElement &element)
|
||
|
{
|
||
|
QString attrPosition = element.attribute(QStringLiteral("position")).toLower();
|
||
|
if (!attrPosition.isEmpty()) {
|
||
|
- pos = KToolBar::Private::positionFromString(attrPosition);
|
||
|
+ pos = KisToolBar::Private::positionFromString(attrPosition);
|
||
|
}
|
||
|
}
|
||
|
if (pos != Qt::NoToolBarArea) {
|
||
|
@@ -959,7 +959,7 @@ void KToolBar::loadState(const QDomElement &element)
|
||
|
|
||
|
// Called when switching between xmlgui clients, in order to find any unsaved settings
|
||
|
// again when switching back to the current xmlgui client.
|
||
|
-void KToolBar::saveState(QDomElement ¤t) const
|
||
|
+void KisToolBar::saveState(QDomElement ¤t) const
|
||
|
{
|
||
|
Q_ASSERT(!current.isNull());
|
||
|
|
||
|
@@ -982,7 +982,7 @@ void KToolBar::saveState(QDomElement ¤t) const
|
||
|
current.setAttribute(QStringLiteral("iconText"), d->toolButtonStyleToString(toolButtonStyle()));
|
||
|
}
|
||
|
|
||
|
- // Note: if this method is used by more than KXMLGUIBuilder, e.g. to save XML settings to *disk*,
|
||
|
+ // Note: if this method is used by more than KisKXMLGUIBuilder, e.g. to save XML settings to *disk*,
|
||
|
// then the stuff below shouldn't always be done. This is not the case currently though.
|
||
|
if (d->iconSizeSettings[Level_AppXML] != Unset) {
|
||
|
current.setAttribute(QStringLiteral("iconSizeDefault"), d->iconSizeSettings[Level_AppXML]);
|
||
|
@@ -993,8 +993,8 @@ void KToolBar::saveState(QDomElement ¤t) const
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-// called by KMainWindow::applyMainWindowSettings to read from the user settings
|
||
|
-void KToolBar::applySettings(const KConfigGroup &cg)
|
||
|
+// called by KisKMainWindow::applyMainWindowSettings to read from the user settings
|
||
|
+void KisToolBar::applySettings(const KConfigGroup &cg)
|
||
|
{
|
||
|
Q_ASSERT(!cg.name().isEmpty());
|
||
|
|
||
|
@@ -1008,28 +1008,28 @@ void KToolBar::applySettings(const KConfigGroup &cg)
|
||
|
d->applyCurrentSettings();
|
||
|
}
|
||
|
|
||
|
-KMainWindow *KToolBar::mainWindow() const
|
||
|
+KisKMainWindow *KisToolBar::mainWindow() const
|
||
|
{
|
||
|
- return qobject_cast<KMainWindow *>(const_cast<QObject *>(parent()));
|
||
|
+ return qobject_cast<KisKMainWindow *>(const_cast<QObject *>(parent()));
|
||
|
}
|
||
|
|
||
|
-void KToolBar::setIconDimensions(int size)
|
||
|
+void KisToolBar::setIconDimensions(int size)
|
||
|
{
|
||
|
QToolBar::setIconSize(QSize(size, size));
|
||
|
d->iconSizeSettings[Level_UserSettings] = size;
|
||
|
}
|
||
|
|
||
|
-int KToolBar::iconSizeDefault() const
|
||
|
+int KisToolBar::iconSizeDefault() const
|
||
|
{
|
||
|
return 22;
|
||
|
}
|
||
|
|
||
|
-void KToolBar::slotMovableChanged(bool movable)
|
||
|
+void KisToolBar::slotMovableChanged(bool movable)
|
||
|
{
|
||
|
setMovable(movable);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::dragEnterEvent(QDragEnterEvent *event)
|
||
|
+void KisToolBar::dragEnterEvent(QDragEnterEvent *event)
|
||
|
{
|
||
|
if (toolBarsEditable() && event->proposedAction() & (Qt::CopyAction | Qt::MoveAction) &&
|
||
|
event->mimeData()->hasFormat(QStringLiteral("application/x-kde-action-list"))) {
|
||
|
@@ -1042,7 +1042,7 @@ void KToolBar::dragEnterEvent(QDragEnterEvent *event)
|
||
|
stream >> actionNames;
|
||
|
|
||
|
Q_FOREACH (const QString &actionName, actionNames) {
|
||
|
- Q_FOREACH (KActionCollection *ac, KActionCollection::allCollections()) {
|
||
|
+ Q_FOREACH (KisKActionCollection *ac, KisKActionCollection::allCollections()) {
|
||
|
QAction *newAction = ac->action(actionName);
|
||
|
if (newAction) {
|
||
|
d->actionsBeingDragged.append(newAction);
|
||
|
@@ -1071,7 +1071,7 @@ void KToolBar::dragEnterEvent(QDragEnterEvent *event)
|
||
|
QToolBar::dragEnterEvent(event);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::dragMoveEvent(QDragMoveEvent *event)
|
||
|
+void KisToolBar::dragMoveEvent(QDragMoveEvent *event)
|
||
|
{
|
||
|
if (toolBarsEditable())
|
||
|
Q_FOREVER {
|
||
|
@@ -1110,7 +1110,7 @@ void KToolBar::dragMoveEvent(QDragMoveEvent *event)
|
||
|
QToolBar::dragMoveEvent(event);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::dragLeaveEvent(QDragLeaveEvent *event)
|
||
|
+void KisToolBar::dragLeaveEvent(QDragLeaveEvent *event)
|
||
|
{
|
||
|
// Want to clear this even if toolBarsEditable was changed mid-drag (unlikely)
|
||
|
delete d->dropIndicatorAction;
|
||
|
@@ -1125,7 +1125,7 @@ void KToolBar::dragLeaveEvent(QDragLeaveEvent *event)
|
||
|
QToolBar::dragLeaveEvent(event);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::dropEvent(QDropEvent *event)
|
||
|
+void KisToolBar::dropEvent(QDropEvent *event)
|
||
|
{
|
||
|
if (toolBarsEditable()) {
|
||
|
Q_FOREACH (QAction *action, d->actionsBeingDragged) {
|
||
|
@@ -1149,7 +1149,7 @@ void KToolBar::dropEvent(QDropEvent *event)
|
||
|
QToolBar::dropEvent(event);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::mousePressEvent(QMouseEvent *event)
|
||
|
+void KisToolBar::mousePressEvent(QMouseEvent *event)
|
||
|
{
|
||
|
if (toolBarsEditable() && event->button() == Qt::LeftButton) {
|
||
|
if (QAction *action = actionAt(event->pos())) {
|
||
|
@@ -1163,7 +1163,7 @@ void KToolBar::mousePressEvent(QMouseEvent *event)
|
||
|
QToolBar::mousePressEvent(event);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::mouseMoveEvent(QMouseEvent *event)
|
||
|
+void KisToolBar::mouseMoveEvent(QMouseEvent *event)
|
||
|
{
|
||
|
if (!toolBarsEditable() || !d->dragAction) {
|
||
|
return QToolBar::mouseMoveEvent(event);
|
||
|
@@ -1204,7 +1204,7 @@ void KToolBar::mouseMoveEvent(QMouseEvent *event)
|
||
|
event->accept();
|
||
|
}
|
||
|
|
||
|
-void KToolBar::mouseReleaseEvent(QMouseEvent *event)
|
||
|
+void KisToolBar::mouseReleaseEvent(QMouseEvent *event)
|
||
|
{
|
||
|
// Want to clear this even if toolBarsEditable was changed mid-drag (unlikely)
|
||
|
if (d->dragAction) {
|
||
|
@@ -1216,7 +1216,7 @@ void KToolBar::mouseReleaseEvent(QMouseEvent *event)
|
||
|
QToolBar::mouseReleaseEvent(event);
|
||
|
}
|
||
|
|
||
|
-bool KToolBar::eventFilter(QObject *watched, QEvent *event)
|
||
|
+bool KisToolBar::eventFilter(QObject *watched, QEvent *event)
|
||
|
{
|
||
|
// Generate context menu events for disabled buttons too...
|
||
|
if (event->type() == QEvent::MouseButtonPress) {
|
||
|
@@ -1315,7 +1315,7 @@ bool KToolBar::eventFilter(QObject *watched, QEvent *event)
|
||
|
return QToolBar::eventFilter(watched, event);
|
||
|
}
|
||
|
|
||
|
-void KToolBar::actionEvent(QActionEvent *event)
|
||
|
+void KisToolBar::actionEvent(QActionEvent *event)
|
||
|
{
|
||
|
if (event->type() == QEvent::ActionRemoved) {
|
||
|
QWidget *widget = widgetForAction(event->action());
|
||
|
@@ -1366,40 +1366,40 @@ void KToolBar::actionEvent(QActionEvent *event)
|
||
|
d->adjustSeparatorVisibility();
|
||
|
}
|
||
|
|
||
|
-bool KToolBar::toolBarsEditable()
|
||
|
+bool KisToolBar::toolBarsEditable()
|
||
|
{
|
||
|
- return KToolBar::Private::s_editable;
|
||
|
+ return KisToolBar::Private::s_editable;
|
||
|
}
|
||
|
|
||
|
-void KToolBar::setToolBarsEditable(bool editable)
|
||
|
+void KisToolBar::setToolBarsEditable(bool editable)
|
||
|
{
|
||
|
- if (KToolBar::Private::s_editable != editable) {
|
||
|
- KToolBar::Private::s_editable = editable;
|
||
|
+ if (KisToolBar::Private::s_editable != editable) {
|
||
|
+ KisToolBar::Private::s_editable = editable;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KToolBar::setToolBarsLocked(bool locked)
|
||
|
+void KisToolBar::setToolBarsLocked(bool locked)
|
||
|
{
|
||
|
- if (KToolBar::Private::s_locked != locked) {
|
||
|
- KToolBar::Private::s_locked = locked;
|
||
|
+ if (KisToolBar::Private::s_locked != locked) {
|
||
|
+ KisToolBar::Private::s_locked = locked;
|
||
|
|
||
|
- Q_FOREACH (KMainWindow *mw, KMainWindow::memberList()) {
|
||
|
- Q_FOREACH (KToolBar *toolbar, mw->findChildren<KToolBar *>()) {
|
||
|
+ Q_FOREACH (KisKMainWindow *mw, KisKMainWindow::memberList()) {
|
||
|
+ Q_FOREACH (KisToolBar *toolbar, mw->findChildren<KisToolBar *>()) {
|
||
|
toolbar->d->setLocked(locked);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-bool KToolBar::toolBarsLocked()
|
||
|
+bool KisToolBar::toolBarsLocked()
|
||
|
{
|
||
|
- return KToolBar::Private::s_locked;
|
||
|
+ return KisToolBar::Private::s_locked;
|
||
|
}
|
||
|
|
||
|
-void KToolBar::emitToolbarStyleChanged()
|
||
|
+void KisToolBar::emitToolbarStyleChanged()
|
||
|
{
|
||
|
#ifdef HAVE_DBUS
|
||
|
- QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KToolBar"), QStringLiteral("org.kde.KToolBar"), QStringLiteral("styleChanged"));
|
||
|
+ QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KisToolBar"), QStringLiteral("org.kde.KisToolBar"), QStringLiteral("styleChanged"));
|
||
|
QDBusConnection::sessionBus().send(message);
|
||
|
#endif
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/ktoolbar.h b/libs/widgetutils/xmlgui/ktoolbar.h
|
||
|
index f7486133d6..8e948c53c5 100644
|
||
|
--- a/libs/widgetutils/xmlgui/ktoolbar.h
|
||
|
+++ b/libs/widgetutils/xmlgui/ktoolbar.h
|
||
|
@@ -21,18 +21,18 @@ class QDomElement;
|
||
|
|
||
|
class KConfigGroup;
|
||
|
class KConfig;
|
||
|
-class KMainWindow;
|
||
|
-class KXMLGUIClient;
|
||
|
+class KisKMainWindow;
|
||
|
+class KisKXMLGUIClient;
|
||
|
|
||
|
/**
|
||
|
* @short Floatable toolbar with auto resize.
|
||
|
*
|
||
|
* A KDE-style toolbar.
|
||
|
*
|
||
|
- * KToolBar can be used as a standalone widget, but KMainWindow
|
||
|
+ * KisToolBar can be used as a standalone widget, but KisKMainWindow
|
||
|
* provides easy factories and management of one or more toolbars.
|
||
|
*
|
||
|
- * KToolBar uses a global config group to load toolbar settings on
|
||
|
+ * KisToolBar uses a global config group to load toolbar settings on
|
||
|
* construction. It will reread this config group on a
|
||
|
* KApplication::appearanceChanged() signal.
|
||
|
*
|
||
|
@@ -42,7 +42,7 @@ class KXMLGUIClient;
|
||
|
* Settings from "Other toolbars" will only work on widget styles derived from KStyle
|
||
|
* @author Reginald Stadlbauer <reggie@kde.org>, Stephan Kulow <coolo@kde.org>, Sven Radej <radej@kde.org>, Hamish Rodda <rodda@kde.org>.
|
||
|
*/
|
||
|
-class KRITAWIDGETUTILS_EXPORT KToolBar : public QToolBar
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisToolBar : public QToolBar
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
@@ -54,25 +54,25 @@ public:
|
||
|
* if @p parent is a QMainWindow.
|
||
|
*
|
||
|
* Normally KDE applications do not call this directly, they either
|
||
|
- * call KMainWindow::toolBar(name), or they use XML-GUI and specify
|
||
|
+ * call KisKMainWindow::toolBar(name), or they use XML-GUI and specify
|
||
|
* toolbars using XML.
|
||
|
*
|
||
|
* @param objectName The QObject name of this toolbar, required so that QMainWindow can save and load the toolbar position,
|
||
|
- * and so that KToolBar can find out if it's the main toolbar.
|
||
|
- * @param parent The standard toolbar parent (usually a KMainWindow)
|
||
|
+ * and so that KisToolBar can find out if it's the main toolbar.
|
||
|
+ * @param parent The standard toolbar parent (usually a KisKMainWindow)
|
||
|
* @param readConfig whether to apply the configuration (global and application-specific)
|
||
|
*/
|
||
|
- explicit KToolBar(const QString &objectName, QWidget *parent, bool readConfig = true);
|
||
|
+ explicit KisToolBar(const QString &objectName, QWidget *parent, bool readConfig = true);
|
||
|
|
||
|
/**
|
||
|
* Destroys the toolbar.
|
||
|
*/
|
||
|
- ~KToolBar() override;
|
||
|
+ ~KisToolBar() override;
|
||
|
|
||
|
/**
|
||
|
* Returns the main window that this toolbar is docked with.
|
||
|
*/
|
||
|
- KMainWindow *mainWindow() const;
|
||
|
+ KisKMainWindow *mainWindow() const;
|
||
|
|
||
|
/**
|
||
|
* Convenience function to set icon size
|
||
|
@@ -101,21 +101,21 @@ public:
|
||
|
* Adds an XML gui client that uses this toolbar
|
||
|
* @since 4.8.1
|
||
|
*/
|
||
|
- void addXMLGUIClient(KXMLGUIClient *client);
|
||
|
+ void addXMLGUIClient(KisKXMLGUIClient *client);
|
||
|
|
||
|
/**
|
||
|
* Removes an XML gui client that uses this toolbar
|
||
|
* @since 4.8.5
|
||
|
*/
|
||
|
- void removeXMLGUIClient(KXMLGUIClient *client);
|
||
|
+ void removeXMLGUIClient(KisKXMLGUIClient *client);
|
||
|
|
||
|
/**
|
||
|
- * Load state from an XML @p element, called by KXMLGUIBuilder.
|
||
|
+ * Load state from an XML @p element, called by KisKXMLGUIBuilder.
|
||
|
*/
|
||
|
void loadState(const QDomElement &element);
|
||
|
|
||
|
/**
|
||
|
- * Save state into an XML @p element, called by KXMLGUIBuilder.
|
||
|
+ * Save state into an XML @p element, called by KisKXMLGUIBuilder.
|
||
|
*/
|
||
|
void saveState(QDomElement &element) const;
|
||
|
|
||
|
@@ -131,8 +131,8 @@ public:
|
||
|
|
||
|
/**
|
||
|
* Enable or disable toolbar editing via drag & drop of actions. This is
|
||
|
- * called by KEditToolbar and should generally be set to disabled whenever
|
||
|
- * KEditToolbar is not active.
|
||
|
+ * called by KisKEditToolbar and should generally be set to disabled whenever
|
||
|
+ * KisKEditToolbar is not active.
|
||
|
*/
|
||
|
static void setToolBarsEditable(bool editable);
|
||
|
|
||
|
diff --git a/libs/widgetutils/xmlgui/ktoolbarhandler.cpp b/libs/widgetutils/xmlgui/ktoolbarhandler.cpp
|
||
|
index 907e77bcd8..f763046529 100644
|
||
|
--- a/libs/widgetutils/xmlgui/ktoolbarhandler.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/ktoolbarhandler.cpp
|
||
|
@@ -39,13 +39,13 @@ const char guiDescription[] = ""
|
||
|
class BarActionBuilder
|
||
|
{
|
||
|
public:
|
||
|
- BarActionBuilder(KActionCollection *actionCollection, KXmlGuiWindow *mainWindow,
|
||
|
- QLinkedList<KToolBar *> &oldToolBarList)
|
||
|
+ BarActionBuilder(KisKActionCollection *actionCollection, KXmlGuiWindow *mainWindow,
|
||
|
+ QLinkedList<KisToolBar *> &oldToolBarList)
|
||
|
: m_actionCollection(actionCollection), m_mainWindow(mainWindow), m_needsRebuild(false)
|
||
|
{
|
||
|
- QList<KToolBar *> toolBars = m_mainWindow->findChildren<KToolBar *>();
|
||
|
+ QList<KisToolBar *> toolBars = m_mainWindow->findChildren<KisToolBar *>();
|
||
|
|
||
|
- Q_FOREACH (KToolBar *toolBar, toolBars) {
|
||
|
+ Q_FOREACH (KisToolBar *toolBar, toolBars) {
|
||
|
if (toolBar->mainWindow() != m_mainWindow) {
|
||
|
continue;
|
||
|
}
|
||
|
@@ -75,7 +75,7 @@ public:
|
||
|
return actions;
|
||
|
}
|
||
|
|
||
|
- Q_FOREACH (KToolBar *bar, m_toolBars) {
|
||
|
+ Q_FOREACH (KisToolBar *bar, m_toolBars) {
|
||
|
handleToolBar(bar);
|
||
|
}
|
||
|
|
||
|
@@ -101,13 +101,13 @@ public:
|
||
|
return actions;
|
||
|
}
|
||
|
|
||
|
- const QLinkedList<KToolBar *> &toolBars() const
|
||
|
+ const QLinkedList<KisToolBar *> &toolBars() const
|
||
|
{
|
||
|
return m_toolBars;
|
||
|
}
|
||
|
|
||
|
private:
|
||
|
- void handleToolBar(KToolBar *toolBar)
|
||
|
+ void handleToolBar(KisToolBar *toolBar)
|
||
|
{
|
||
|
KToggleToolBarAction *action = new KToggleToolBarAction(
|
||
|
toolBar,
|
||
|
@@ -119,10 +119,10 @@ private:
|
||
|
m_toolBarActions.append(action);
|
||
|
}
|
||
|
|
||
|
- KActionCollection *m_actionCollection;
|
||
|
+ KisKActionCollection *m_actionCollection;
|
||
|
KXmlGuiWindow *m_mainWindow;
|
||
|
|
||
|
- QLinkedList<KToolBar *> m_toolBars;
|
||
|
+ QLinkedList<KisToolBar *> m_toolBars;
|
||
|
QList<QAction *> m_toolBarActions;
|
||
|
|
||
|
bool m_needsRebuild : 1;
|
||
|
@@ -139,7 +139,7 @@ public:
|
||
|
{
|
||
|
}
|
||
|
|
||
|
- void clientAdded(KXMLGUIClient *client)
|
||
|
+ void clientAdded(KisKXMLGUIClient *client)
|
||
|
{
|
||
|
Q_UNUSED(client);
|
||
|
parent->setupActions();
|
||
|
@@ -153,15 +153,15 @@ public:
|
||
|
ToolBarHandler *parent;
|
||
|
QPointer<KXmlGuiWindow> mainWindow;
|
||
|
QList<QAction *> actions;
|
||
|
- QLinkedList<KToolBar *> toolBars;
|
||
|
+ QLinkedList<KisToolBar *> toolBars;
|
||
|
};
|
||
|
|
||
|
void ToolBarHandler::Private::init(KXmlGuiWindow *mw)
|
||
|
{
|
||
|
mainWindow = mw;
|
||
|
|
||
|
- QObject::connect(mainWindow->guiFactory(), SIGNAL(clientAdded(KXMLGUIClient*)),
|
||
|
- parent, SLOT(clientAdded(KXMLGUIClient*)));
|
||
|
+ QObject::connect(mainWindow->guiFactory(), SIGNAL(clientAdded(KisKXMLGUIClient*)),
|
||
|
+ parent, SLOT(clientAdded(KisKXMLGUIClient*)));
|
||
|
|
||
|
if (parent->domDocument().documentElement().isNull()) {
|
||
|
|
||
|
@@ -200,14 +200,14 @@ void ToolBarHandler::Private::connectToActionContainer(QWidget *container)
|
||
|
}
|
||
|
|
||
|
ToolBarHandler::ToolBarHandler(KXmlGuiWindow *mainWindow)
|
||
|
- : QObject(mainWindow), KXMLGUIClient(mainWindow),
|
||
|
+ : QObject(mainWindow), KisKXMLGUIClient(mainWindow),
|
||
|
d(new Private(this))
|
||
|
{
|
||
|
d->init(mainWindow);
|
||
|
}
|
||
|
|
||
|
ToolBarHandler::ToolBarHandler(KXmlGuiWindow *mainWindow, QObject *parent)
|
||
|
- : QObject(parent), KXMLGUIClient(mainWindow),
|
||
|
+ : QObject(parent), KisKXMLGUIClient(mainWindow),
|
||
|
d(new Private(this))
|
||
|
{
|
||
|
d->init(mainWindow);
|
||
|
diff --git a/libs/widgetutils/xmlgui/ktoolbarhandler_p.h b/libs/widgetutils/xmlgui/ktoolbarhandler_p.h
|
||
|
index 49a25ca7af..86bd4bdf44 100644
|
||
|
--- a/libs/widgetutils/xmlgui/ktoolbarhandler_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/ktoolbarhandler_p.h
|
||
|
@@ -18,7 +18,7 @@ class KXmlGuiWindow;
|
||
|
namespace KDEPrivate
|
||
|
{
|
||
|
|
||
|
-class ToolBarHandler : public QObject, public KXMLGUIClient
|
||
|
+class ToolBarHandler : public QObject, public KisKXMLGUIClient
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
@@ -52,7 +52,7 @@ private:
|
||
|
class Private;
|
||
|
Private *const d;
|
||
|
|
||
|
- Q_PRIVATE_SLOT(d, void clientAdded(KXMLGUIClient *))
|
||
|
+ Q_PRIVATE_SLOT(d, void clientAdded(KisKXMLGUIClient *))
|
||
|
};
|
||
|
|
||
|
} // namespace KDEPrivate
|
||
|
diff --git a/libs/widgetutils/xmlgui/kundoactions.cpp b/libs/widgetutils/xmlgui/kundoactions.cpp
|
||
|
index 983a3b09b4..41189c9c96 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kundoactions.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kundoactions.cpp
|
||
|
@@ -18,7 +18,7 @@
|
||
|
|
||
|
#include <kis_icon_utils.h>
|
||
|
|
||
|
-QAction *KUndoActions::createRedoAction(QUndoStack *undoStack, KActionCollection *actionCollection, const QString &actionName)
|
||
|
+QAction *KisKUndoActions::createRedoAction(QUndoStack *undoStack, KisKActionCollection *actionCollection, const QString &actionName)
|
||
|
{
|
||
|
QAction *action = undoStack->createRedoAction(actionCollection);
|
||
|
|
||
|
@@ -37,7 +37,7 @@ QAction *KUndoActions::createRedoAction(QUndoStack *undoStack, KActionCollection
|
||
|
return action;
|
||
|
}
|
||
|
|
||
|
-QAction *KUndoActions::createUndoAction(QUndoStack *undoStack, KActionCollection *actionCollection, const QString &actionName)
|
||
|
+QAction *KisKUndoActions::createUndoAction(QUndoStack *undoStack, KisKActionCollection *actionCollection, const QString &actionName)
|
||
|
{
|
||
|
QAction *action = undoStack->createUndoAction(actionCollection);
|
||
|
|
||
|
diff --git a/libs/widgetutils/xmlgui/kundoactions.h b/libs/widgetutils/xmlgui/kundoactions.h
|
||
|
index 0508798f0e..2bbca9bdeb 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kundoactions.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kundoactions.h
|
||
|
@@ -11,7 +11,7 @@
|
||
|
|
||
|
#include <QString>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class QAction;
|
||
|
class QUndoStack;
|
||
|
|
||
|
@@ -21,25 +21,25 @@ class QUndoStack;
|
||
|
*
|
||
|
* @since 5.0
|
||
|
*/
|
||
|
-namespace KUndoActions
|
||
|
+namespace KisKUndoActions
|
||
|
{
|
||
|
/**
|
||
|
* Creates an redo action with the default shortcut and icon and adds it to @p actionCollection
|
||
|
* @param undoStack the QUndoStack the action triggers the redo on
|
||
|
- * @param actionCollection the KActionCollection that should be the parent of the action
|
||
|
+ * @param actionCollection the KisKActionCollection that should be the parent of the action
|
||
|
* @param actionName the created action's object name, empty string will set it to the KDE default
|
||
|
* @return the created action.
|
||
|
*/
|
||
|
-KRITAWIDGETUTILS_EXPORT QAction *createRedoAction(QUndoStack *undoStack, KActionCollection *actionCollection, const QString &actionName = QString());
|
||
|
+KRITAWIDGETUTILS_EXPORT QAction *createRedoAction(QUndoStack *undoStack, KisKActionCollection *actionCollection, const QString &actionName = QString());
|
||
|
|
||
|
/**
|
||
|
* Creates an undo action with the default KDE shortcut and icon and adds it to @p actionCollection
|
||
|
* @param undoStack the QUndoStack the action triggers the undo on
|
||
|
- * @param actionCollection the KActionCollection that should be the parent of the action
|
||
|
+ * @param actionCollection the KisKActionCollection that should be the parent of the action
|
||
|
* @param actionName the created action's object name, empty string will set it to the KDE default
|
||
|
* @return the created action.
|
||
|
*/
|
||
|
-KRITAWIDGETUTILS_EXPORT QAction *createUndoAction(QUndoStack *undoStack, KActionCollection *actionCollection, const QString &actionName = QString());
|
||
|
+KRITAWIDGETUTILS_EXPORT QAction *createUndoAction(QUndoStack *undoStack, KisKActionCollection *actionCollection, const QString &actionName = QString());
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlgui.xsd b/libs/widgetutils/xmlgui/kxmlgui.xsd
|
||
|
index bfd7fe4bf2..052a72c3bd 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlgui.xsd
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlgui.xsd
|
||
|
@@ -395,7 +395,7 @@
|
||
|
|
||
|
Defines a GUI state, esp. which actions to enable and which
|
||
|
ones to disable on entering this state (see
|
||
|
- KXMLGUIClient::stateChanged()).
|
||
|
+ KisKXMLGUIClient::stateChanged()).
|
||
|
|
||
|
Actions listed in "disable" are disabled, and vice
|
||
|
versa for "enable".
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguibuilder.cpp b/libs/widgetutils/xmlgui/kxmlguibuilder.cpp
|
||
|
index 86697e61d5..f4f3e8823f 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguibuilder.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguibuilder.cpp
|
||
|
@@ -31,11 +31,11 @@
|
||
|
|
||
|
using namespace KDEPrivate;
|
||
|
|
||
|
-class KXMLGUIBuilderPrivate
|
||
|
+class KisKXMLGUIBuilderPrivate
|
||
|
{
|
||
|
public:
|
||
|
- KXMLGUIBuilderPrivate() { }
|
||
|
- ~KXMLGUIBuilderPrivate() { }
|
||
|
+ KisKXMLGUIBuilderPrivate() { }
|
||
|
+ ~KisKXMLGUIBuilderPrivate() { }
|
||
|
|
||
|
QWidget *m_widget {0};
|
||
|
|
||
|
@@ -59,11 +59,11 @@ public:
|
||
|
|
||
|
QString attrIcon;
|
||
|
|
||
|
- KXMLGUIClient *m_client {0};
|
||
|
+ KisKXMLGUIClient *m_client {0};
|
||
|
};
|
||
|
|
||
|
-KXMLGUIBuilder::KXMLGUIBuilder(QWidget *widget)
|
||
|
- : d(new KXMLGUIBuilderPrivate)
|
||
|
+KisKXMLGUIBuilder::KisKXMLGUIBuilder(QWidget *widget)
|
||
|
+ : d(new KisKXMLGUIBuilderPrivate)
|
||
|
{
|
||
|
d->m_widget = widget;
|
||
|
|
||
|
@@ -88,17 +88,17 @@ KXMLGUIBuilder::KXMLGUIBuilder(QWidget *widget)
|
||
|
d->attrIcon = QStringLiteral("icon");
|
||
|
}
|
||
|
|
||
|
-KXMLGUIBuilder::~KXMLGUIBuilder()
|
||
|
+KisKXMLGUIBuilder::~KisKXMLGUIBuilder()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-QWidget *KXMLGUIBuilder::widget()
|
||
|
+QWidget *KisKXMLGUIBuilder::widget()
|
||
|
{
|
||
|
return d->m_widget;
|
||
|
}
|
||
|
|
||
|
-QStringList KXMLGUIBuilder::containerTags() const
|
||
|
+QStringList KisKXMLGUIBuilder::containerTags() const
|
||
|
{
|
||
|
QStringList res;
|
||
|
res << d->tagMenu << d->tagToolBar << d->tagMainWindow << d->tagMenuBar << d->tagStatusBar;
|
||
|
@@ -106,7 +106,7 @@ QStringList KXMLGUIBuilder::containerTags() const
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
-QWidget *KXMLGUIBuilder::createContainer(QWidget *parent, int index, const QDomElement &element, QAction *&containerAction)
|
||
|
+QWidget *KisKXMLGUIBuilder::createContainer(QWidget *parent, int index, const QDomElement &element, QAction *&containerAction)
|
||
|
{
|
||
|
containerAction = 0;
|
||
|
|
||
|
@@ -116,12 +116,12 @@ QWidget *KXMLGUIBuilder::createContainer(QWidget *parent, int index, const QDomE
|
||
|
|
||
|
const QString tagName = element.tagName().toLower();
|
||
|
if (tagName == d->tagMainWindow) {
|
||
|
- KMainWindow *mainwindow = qobject_cast<KMainWindow *>(d->m_widget); // could be 0
|
||
|
+ KisKMainWindow *mainwindow = qobject_cast<KisKMainWindow *>(d->m_widget); // could be 0
|
||
|
return mainwindow;
|
||
|
}
|
||
|
|
||
|
if (tagName == d->tagMenuBar) {
|
||
|
- KMainWindow *mainWin = qobject_cast<KMainWindow *>(d->m_widget);
|
||
|
+ KisKMainWindow *mainWin = qobject_cast<KisKMainWindow *>(d->m_widget);
|
||
|
QMenuBar *bar = 0;
|
||
|
if (mainWin) {
|
||
|
bar = mainWin->menuBar();
|
||
|
@@ -214,12 +214,12 @@ QWidget *KXMLGUIBuilder::createContainer(QWidget *parent, int index, const QDomE
|
||
|
if (tagName == d->tagToolBar) {
|
||
|
QString name = element.attribute(d->attrName);
|
||
|
|
||
|
- KToolBar *bar = static_cast<KToolBar *>(d->m_widget->findChild<KToolBar *>(name));
|
||
|
+ KisToolBar *bar = static_cast<KisToolBar *>(d->m_widget->findChild<KisToolBar *>(name));
|
||
|
if (!bar) {
|
||
|
- bar = new KToolBar(name, d->m_widget, false);
|
||
|
+ bar = new KisToolBar(name, d->m_widget, false);
|
||
|
}
|
||
|
|
||
|
- if (qobject_cast<KMainWindow *>(d->m_widget)) {
|
||
|
+ if (qobject_cast<KisKMainWindow *>(d->m_widget)) {
|
||
|
if (d->m_client && !d->m_client->xmlFile().isEmpty()) {
|
||
|
bar->addXMLGUIClient(d->m_client);
|
||
|
}
|
||
|
@@ -231,7 +231,7 @@ QWidget *KXMLGUIBuilder::createContainer(QWidget *parent, int index, const QDomE
|
||
|
}
|
||
|
|
||
|
if (tagName == d->tagStatusBar) {
|
||
|
- KMainWindow *mainWin = qobject_cast<KMainWindow *>(d->m_widget);
|
||
|
+ KisKMainWindow *mainWin = qobject_cast<KisKMainWindow *>(d->m_widget);
|
||
|
if (mainWin) {
|
||
|
mainWin->statusBar()->show();
|
||
|
return mainWin->statusBar();
|
||
|
@@ -243,7 +243,7 @@ QWidget *KXMLGUIBuilder::createContainer(QWidget *parent, int index, const QDomE
|
||
|
return 0L;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIBuilder::removeContainer(QWidget *container, QWidget *parent, QDomElement &element, QAction *containerAction)
|
||
|
+void KisKXMLGUIBuilder::removeContainer(QWidget *container, QWidget *parent, QDomElement &element, QAction *containerAction)
|
||
|
{
|
||
|
// Warning parent can be 0L
|
||
|
|
||
|
@@ -253,8 +253,8 @@ void KXMLGUIBuilder::removeContainer(QWidget *container, QWidget *parent, QDomEl
|
||
|
}
|
||
|
|
||
|
delete container;
|
||
|
- } else if (qobject_cast<KToolBar *>(container)) {
|
||
|
- KToolBar *tb = static_cast<KToolBar *>(container);
|
||
|
+ } else if (qobject_cast<KisToolBar *>(container)) {
|
||
|
+ KisToolBar *tb = static_cast<KisToolBar *>(container);
|
||
|
|
||
|
tb->saveState(element);
|
||
|
delete tb;
|
||
|
@@ -266,7 +266,7 @@ void KXMLGUIBuilder::removeContainer(QWidget *container, QWidget *parent, QDomEl
|
||
|
// sure that QMainWindow::d->mb does not point to a deleted
|
||
|
// menubar object.
|
||
|
} else if (qobject_cast<QStatusBar *>(container)) {
|
||
|
- if (qobject_cast<KMainWindow *>(d->m_widget)) {
|
||
|
+ if (qobject_cast<KisKMainWindow *>(d->m_widget)) {
|
||
|
container->hide();
|
||
|
} else {
|
||
|
delete static_cast<QStatusBar *>(container);
|
||
|
@@ -276,14 +276,14 @@ void KXMLGUIBuilder::removeContainer(QWidget *container, QWidget *parent, QDomEl
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-QStringList KXMLGUIBuilder::customTags() const
|
||
|
+QStringList KisKXMLGUIBuilder::customTags() const
|
||
|
{
|
||
|
QStringList res;
|
||
|
res << d->tagSeparator << d->tagTearOffHandle << d->tagMenuTitle;
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
-QAction *KXMLGUIBuilder::createCustomElement(QWidget *parent, int index, const QDomElement &element)
|
||
|
+QAction *KisKXMLGUIBuilder::createCustomElement(QWidget *parent, int index, const QDomElement &element)
|
||
|
{
|
||
|
QAction *before = 0L;
|
||
|
if (index > 0 && index < parent->actions().count()) {
|
||
|
@@ -301,7 +301,7 @@ QAction *KXMLGUIBuilder::createCustomElement(QWidget *parent, int index, const Q
|
||
|
separatorAction->setSeparator(true);
|
||
|
bar->insertAction(before, separatorAction);
|
||
|
return separatorAction;
|
||
|
- } else if (KToolBar *bar = qobject_cast<KToolBar *>(parent)) {
|
||
|
+ } else if (KisToolBar *bar = qobject_cast<KisToolBar *>(parent)) {
|
||
|
/* FIXME KAction port - any need to provide a replacement for lineSeparator/normal separator?
|
||
|
bool isLineSep = true;
|
||
|
|
||
|
@@ -366,32 +366,32 @@ QAction *KXMLGUIBuilder::createCustomElement(QWidget *parent, int index, const Q
|
||
|
return blank;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIBuilder::removeCustomElement(QWidget *parent, QAction *action)
|
||
|
+void KisKXMLGUIBuilder::removeCustomElement(QWidget *parent, QAction *action)
|
||
|
{
|
||
|
parent->removeAction(action);
|
||
|
}
|
||
|
|
||
|
-KXMLGUIClient *KXMLGUIBuilder::builderClient() const
|
||
|
+KisKXMLGUIClient *KisKXMLGUIBuilder::builderClient() const
|
||
|
{
|
||
|
return d->m_client;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIBuilder::setBuilderClient(KXMLGUIClient *client)
|
||
|
+void KisKXMLGUIBuilder::setBuilderClient(KisKXMLGUIClient *client)
|
||
|
{
|
||
|
d->m_client = client;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIBuilder::finalizeGUI(KXMLGUIClient *)
|
||
|
+void KisKXMLGUIBuilder::finalizeGUI(KisKXMLGUIClient *)
|
||
|
{
|
||
|
KXmlGuiWindow *window = qobject_cast<KXmlGuiWindow *>(d->m_widget);
|
||
|
if (!window) {
|
||
|
return;
|
||
|
}
|
||
|
#if 0
|
||
|
- KToolBar *toolbar = 0;
|
||
|
- QListIterator<KToolBar> it(((KMainWindow *)d->m_widget)->toolBarIterator());
|
||
|
+ KisToolBar *toolbar = 0;
|
||
|
+ QListIterator<KisToolBar> it(((KisKMainWindow *)d->m_widget)->toolBarIterator());
|
||
|
while ((toolbar = it.current())) {
|
||
|
- //qDebug(260) << "KXMLGUIBuilder::finalizeGUI toolbar=" << (void*)toolbar;
|
||
|
+ //qDebug(260) << "KisKXMLGUIBuilder::finalizeGUI toolbar=" << (void*)toolbar;
|
||
|
++it;
|
||
|
toolbar->positionYourself();
|
||
|
}
|
||
|
@@ -400,7 +400,7 @@ void KXMLGUIBuilder::finalizeGUI(KXMLGUIClient *)
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIBuilder::virtual_hook(int, void *)
|
||
|
+void KisKXMLGUIBuilder::virtual_hook(int, void *)
|
||
|
{
|
||
|
/*BASE::virtual_hook( id, data );*/
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguibuilder.h b/libs/widgetutils/xmlgui/kxmlguibuilder.h
|
||
|
index f21495ce5d..fd121d24ec 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguibuilder.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguibuilder.h
|
||
|
@@ -9,8 +9,8 @@
|
||
|
|
||
|
#include <kritawidgetutils_export.h>
|
||
|
|
||
|
-class KXMLGUIBuilderPrivate;
|
||
|
-class KXMLGUIClient;
|
||
|
+class KisKXMLGUIBuilderPrivate;
|
||
|
+class KisKXMLGUIClient;
|
||
|
|
||
|
class QAction;
|
||
|
class QDomElement;
|
||
|
@@ -22,19 +22,19 @@ class QWidget;
|
||
|
* as requested by the GUI factory.
|
||
|
*
|
||
|
* The virtual methods are mostly for historical reasons, there isn't really
|
||
|
- * a need to derive from KXMLGUIBuilder anymore.
|
||
|
+ * a need to derive from KisKXMLGUIBuilder anymore.
|
||
|
*/
|
||
|
-class KRITAWIDGETUTILS_EXPORT KXMLGUIBuilder
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKXMLGUIBuilder
|
||
|
{
|
||
|
public:
|
||
|
|
||
|
- explicit KXMLGUIBuilder(QWidget *widget);
|
||
|
- virtual ~KXMLGUIBuilder();
|
||
|
+ explicit KisKXMLGUIBuilder(QWidget *widget);
|
||
|
+ virtual ~KisKXMLGUIBuilder();
|
||
|
|
||
|
/* @internal */
|
||
|
- KXMLGUIClient *builderClient() const;
|
||
|
+ KisKXMLGUIClient *builderClient() const;
|
||
|
/* @internal */
|
||
|
- void setBuilderClient(KXMLGUIClient *client);
|
||
|
+ void setBuilderClient(KisKXMLGUIClient *client);
|
||
|
/* @internal */
|
||
|
QWidget *widget();
|
||
|
|
||
|
@@ -69,12 +69,12 @@ public:
|
||
|
|
||
|
virtual void removeCustomElement(QWidget *parent, QAction *action);
|
||
|
|
||
|
- virtual void finalizeGUI(KXMLGUIClient *client);
|
||
|
+ virtual void finalizeGUI(KisKXMLGUIClient *client);
|
||
|
|
||
|
protected:
|
||
|
virtual void virtual_hook(int id, void *data);
|
||
|
private:
|
||
|
- KXMLGUIBuilderPrivate *const d;
|
||
|
+ KisKXMLGUIBuilderPrivate *const d;
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguiclient.cpp b/libs/widgetutils/xmlgui/kxmlguiclient.cpp
|
||
|
index dbe5a26bd3..d37cf97249 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguiclient.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguiclient.cpp
|
||
|
@@ -31,10 +31,10 @@
|
||
|
# define authorizeAction authorizeKAction
|
||
|
#endif
|
||
|
|
||
|
-class KXMLGUIClientPrivate
|
||
|
+class KisKXMLGUIClientPrivate
|
||
|
{
|
||
|
public:
|
||
|
- KXMLGUIClientPrivate()
|
||
|
+ KisKXMLGUIClientPrivate()
|
||
|
: m_componentName(QCoreApplication::applicationName()),
|
||
|
m_actionCollection(0),
|
||
|
m_parent(0L),
|
||
|
@@ -44,14 +44,14 @@ public:
|
||
|
m_textTagNames.append(QLatin1String("Text"));
|
||
|
m_textTagNames.append(QLatin1String("title"));
|
||
|
}
|
||
|
- ~KXMLGUIClientPrivate()
|
||
|
+ ~KisKXMLGUIClientPrivate()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
bool mergeXML(QDomElement &base, QDomElement &additive,
|
||
|
- KActionCollection *actionCollection);
|
||
|
+ KisKActionCollection *actionCollection);
|
||
|
bool isEmptyContainer(const QDomElement &base,
|
||
|
- KActionCollection *actionCollection) const;
|
||
|
+ KisKActionCollection *actionCollection) const;
|
||
|
|
||
|
QDomElement findMatchingElement(const QDomElement &base,
|
||
|
const QDomElement &additive);
|
||
|
@@ -59,33 +59,33 @@ public:
|
||
|
QString m_componentName;
|
||
|
|
||
|
QDomDocument m_doc;
|
||
|
- KActionCollection *m_actionCollection;
|
||
|
+ KisKActionCollection *m_actionCollection;
|
||
|
QDomDocument m_buildDocument;
|
||
|
- QPointer<KXMLGUIFactory> m_factory;
|
||
|
- KXMLGUIClient *m_parent;
|
||
|
- //QPtrList<KXMLGUIClient> m_supers;
|
||
|
- QList<KXMLGUIClient *> m_children;
|
||
|
- KXMLGUIBuilder *m_builder;
|
||
|
+ QPointer<KisKXMLGUIFactory> m_factory;
|
||
|
+ KisKXMLGUIClient *m_parent;
|
||
|
+ //QPtrList<KisKXMLGUIClient> m_supers;
|
||
|
+ QList<KisKXMLGUIClient *> m_children;
|
||
|
+ KisKXMLGUIBuilder *m_builder;
|
||
|
QString m_xmlFile;
|
||
|
QString m_localXMLFile;
|
||
|
QStringList m_textTagNames;
|
||
|
|
||
|
// Actions to enable/disable on a state change
|
||
|
- QMap<QString, KXMLGUIClient::StateChange> m_actionsStateMap;
|
||
|
+ QMap<QString, KisKXMLGUIClient::StateChange> m_actionsStateMap;
|
||
|
};
|
||
|
|
||
|
-KXMLGUIClient::KXMLGUIClient()
|
||
|
- : d(new KXMLGUIClientPrivate)
|
||
|
+KisKXMLGUIClient::KisKXMLGUIClient()
|
||
|
+ : d(new KisKXMLGUIClientPrivate)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-KXMLGUIClient::KXMLGUIClient(KXMLGUIClient *parent)
|
||
|
- : d(new KXMLGUIClientPrivate)
|
||
|
+KisKXMLGUIClient::KisKXMLGUIClient(KisKXMLGUIClient *parent)
|
||
|
+ : d(new KisKXMLGUIClientPrivate)
|
||
|
{
|
||
|
parent->insertChildClient(this);
|
||
|
}
|
||
|
|
||
|
-KXMLGUIClient::~KXMLGUIClient()
|
||
|
+KisKXMLGUIClient::~KisKXMLGUIClient()
|
||
|
{
|
||
|
if (d->m_parent) {
|
||
|
d->m_parent->removeChildClient(this);
|
||
|
@@ -96,7 +96,7 @@ KXMLGUIClient::~KXMLGUIClient()
|
||
|
d->m_factory->forgetClient(this);
|
||
|
}
|
||
|
|
||
|
- Q_FOREACH (KXMLGUIClient *client, d->m_children) {
|
||
|
+ Q_FOREACH (KisKXMLGUIClient *client, d->m_children) {
|
||
|
if (d->m_factory) {
|
||
|
d->m_factory->forgetClient(client);
|
||
|
}
|
||
|
@@ -108,11 +108,11 @@ KXMLGUIClient::~KXMLGUIClient()
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-QAction *KXMLGUIClient::action(const char *name) const
|
||
|
+QAction *KisKXMLGUIClient::action(const char *name) const
|
||
|
{
|
||
|
QAction *act = actionCollection()->action(QLatin1String(name));
|
||
|
if (!act) {
|
||
|
- Q_FOREACH (KXMLGUIClient *client, d->m_children) {
|
||
|
+ Q_FOREACH (KisKXMLGUIClient *client, d->m_children) {
|
||
|
act = client->actionCollection()->action(QLatin1String(name));
|
||
|
if (act) {
|
||
|
break;
|
||
|
@@ -122,36 +122,36 @@ QAction *KXMLGUIClient::action(const char *name) const
|
||
|
return act;
|
||
|
}
|
||
|
|
||
|
-KActionCollection *KXMLGUIClient::actionCollection() const
|
||
|
+KisKActionCollection *KisKXMLGUIClient::actionCollection() const
|
||
|
{
|
||
|
if (!d->m_actionCollection) {
|
||
|
- d->m_actionCollection = new KActionCollection(this);
|
||
|
- d->m_actionCollection->setObjectName(QStringLiteral("KXMLGUIClient-KActionCollection"));
|
||
|
+ d->m_actionCollection = new KisKActionCollection(this);
|
||
|
+ d->m_actionCollection->setObjectName(QStringLiteral("KisKXMLGUIClient-KisKActionCollection"));
|
||
|
}
|
||
|
return d->m_actionCollection;
|
||
|
}
|
||
|
|
||
|
-QAction *KXMLGUIClient::action(const QDomElement &element) const
|
||
|
+QAction *KisKXMLGUIClient::action(const QDomElement &element) const
|
||
|
{
|
||
|
return actionCollection()->action(element.attribute(QStringLiteral("name")));
|
||
|
}
|
||
|
|
||
|
-QString KXMLGUIClient::componentName() const
|
||
|
+QString KisKXMLGUIClient::componentName() const
|
||
|
{
|
||
|
return d->m_componentName;
|
||
|
}
|
||
|
|
||
|
-QDomDocument KXMLGUIClient::domDocument() const
|
||
|
+QDomDocument KisKXMLGUIClient::domDocument() const
|
||
|
{
|
||
|
return d->m_doc;
|
||
|
}
|
||
|
|
||
|
-QString KXMLGUIClient::xmlFile() const
|
||
|
+QString KisKXMLGUIClient::xmlFile() const
|
||
|
{
|
||
|
return d->m_xmlFile;
|
||
|
}
|
||
|
|
||
|
-QString KXMLGUIClient::localXMLFile() const
|
||
|
+QString KisKXMLGUIClient::localXMLFile() const
|
||
|
{
|
||
|
if (!d->m_localXMLFile.isEmpty()) {
|
||
|
return d->m_localXMLFile;
|
||
|
@@ -169,18 +169,18 @@ QString KXMLGUIClient::localXMLFile() const
|
||
|
componentName() + QLatin1Char('/') + d->m_xmlFile;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::reloadXML()
|
||
|
+void KisKXMLGUIClient::reloadXML()
|
||
|
{
|
||
|
// TODO: this method can't be used for the KXmlGuiWindow, since it doesn't merge in ui_standards.xmlgui!
|
||
|
// -> KDE5: load ui_standards_rc in setXMLFile using a flag, and remember that flag?
|
||
|
- // and then KEditToolBar can use reloadXML.
|
||
|
+ // and then KisKEditToolBar can use reloadXML.
|
||
|
QString file(xmlFile());
|
||
|
if (!file.isEmpty()) {
|
||
|
setXMLFile(file);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::setComponentName(const QString &componentName, const QString &componentDisplayName)
|
||
|
+void KisKXMLGUIClient::setComponentName(const QString &componentName, const QString &componentDisplayName)
|
||
|
{
|
||
|
d->m_componentName = componentName;
|
||
|
actionCollection()->setComponentName(componentName);
|
||
|
@@ -190,7 +190,7 @@ void KXMLGUIClient::setComponentName(const QString &componentName, const QString
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-QString KXMLGUIClient::standardsXmlFileLocation()
|
||
|
+QString KisKXMLGUIClient::standardsXmlFileLocation()
|
||
|
{
|
||
|
QString file = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, QStringLiteral("ui/ui_standards.xmlgui"));
|
||
|
if (file.isEmpty()) {
|
||
|
@@ -201,12 +201,12 @@ QString KXMLGUIClient::standardsXmlFileLocation()
|
||
|
return file;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::loadStandardsXmlFile()
|
||
|
+void KisKXMLGUIClient::loadStandardsXmlFile()
|
||
|
{
|
||
|
- setXML(KXMLGUIFactory::readConfigFile(standardsXmlFileLocation()));
|
||
|
+ setXML(KisKXMLGUIFactory::readConfigFile(standardsXmlFileLocation()));
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::setXMLFile(const QString &_file, bool merge, bool setXMLDoc)
|
||
|
+void KisKXMLGUIClient::setXMLFile(const QString &_file, bool merge, bool setXMLDoc)
|
||
|
{
|
||
|
// store our xml file name
|
||
|
if (!_file.isNull()) {
|
||
|
@@ -239,7 +239,7 @@ void KXMLGUIClient::setXMLFile(const QString &_file, bool merge, bool setXMLDoc)
|
||
|
QStandardPaths::locateAll(QStandardPaths::AppDataLocation, _file); // kdelibs4, KF 5.0, caller passes component name
|
||
|
|
||
|
if (allFiles.isEmpty() && !compatFiles.isEmpty()) {
|
||
|
- qWarning() << "kxmlguiclient: KXMLGUI file found at deprecated location" << compatFiles << "-- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.";
|
||
|
+ qWarning() << "kxmlguiclient: KisKXMLGUI file found at deprecated location" << compatFiles << "-- please use ${KisKXMLGUI_INSTALL_DIR} to install this file instead.";
|
||
|
}
|
||
|
allFiles += compatFiles;
|
||
|
}
|
||
|
@@ -266,12 +266,12 @@ void KXMLGUIClient::setXMLFile(const QString &_file, bool merge, bool setXMLDoc)
|
||
|
setXML(doc, merge);
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::setLocalXMLFile(const QString &file)
|
||
|
+void KisKXMLGUIClient::setLocalXMLFile(const QString &file)
|
||
|
{
|
||
|
d->m_localXMLFile = file;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::replaceXMLFile(const QString &xmlfile, const QString &localxmlfile, bool merge)
|
||
|
+void KisKXMLGUIClient::replaceXMLFile(const QString &xmlfile, const QString &localxmlfile, bool merge)
|
||
|
{
|
||
|
if (!QDir::isAbsolutePath(xmlfile)) {
|
||
|
qWarning() << "xml file" << xmlfile << "is not an absolute path";
|
||
|
@@ -311,7 +311,7 @@ static void propagateTranslationDomain(QDomDocument &doc, const QStringList tagN
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::setXML(const QString &document, bool merge)
|
||
|
+void KisKXMLGUIClient::setXML(const QString &document, bool merge)
|
||
|
{
|
||
|
QDomDocument doc;
|
||
|
QString errorMsg;
|
||
|
@@ -333,7 +333,7 @@ void KXMLGUIClient::setXML(const QString &document, bool merge)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::setDOMDocument(const QDomDocument &document, bool merge)
|
||
|
+void KisKXMLGUIClient::setDOMDocument(const QDomDocument &document, bool merge)
|
||
|
{
|
||
|
if (merge && !d->m_doc.isNull()) {
|
||
|
QDomElement base = d->m_doc.documentElement();
|
||
|
@@ -370,7 +370,7 @@ static inline bool equalstr(const QString &a, const QLatin1String &b)
|
||
|
return a.compare(b, Qt::CaseInsensitive) == 0;
|
||
|
}
|
||
|
|
||
|
-bool KXMLGUIClientPrivate::mergeXML(QDomElement &base, QDomElement &additive, KActionCollection *actionCollection)
|
||
|
+bool KisKXMLGUIClientPrivate::mergeXML(QDomElement &base, QDomElement &additive, KisKActionCollection *actionCollection)
|
||
|
{
|
||
|
const QLatin1String tagAction("Action");
|
||
|
const QLatin1String tagMerge("Merge");
|
||
|
@@ -549,7 +549,7 @@ bool KXMLGUIClientPrivate::mergeXML(QDomElement &base, QDomElement &additive, KA
|
||
|
return isEmptyContainer(base, actionCollection);
|
||
|
}
|
||
|
|
||
|
-bool KXMLGUIClientPrivate::isEmptyContainer(const QDomElement &base, KActionCollection *actionCollection) const
|
||
|
+bool KisKXMLGUIClientPrivate::isEmptyContainer(const QDomElement &base, KisKActionCollection *actionCollection) const
|
||
|
{
|
||
|
// now we check if we are empty (in which case we return "true", to
|
||
|
// indicate the caller that it can delete "us" (the base element
|
||
|
@@ -602,7 +602,7 @@ bool KXMLGUIClientPrivate::isEmptyContainer(const QDomElement &base, KActionColl
|
||
|
return true; // I'm empty, please delete me.
|
||
|
}
|
||
|
|
||
|
-QDomElement KXMLGUIClientPrivate::findMatchingElement(const QDomElement &base, const QDomElement &additive)
|
||
|
+QDomElement KisKXMLGUIClientPrivate::findMatchingElement(const QDomElement &base, const QDomElement &additive)
|
||
|
{
|
||
|
QDomNode n = additive.firstChild();
|
||
|
while (!n.isNull()) {
|
||
|
@@ -630,32 +630,32 @@ QDomElement KXMLGUIClientPrivate::findMatchingElement(const QDomElement &base, c
|
||
|
return QDomElement();
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::setXMLGUIBuildDocument(const QDomDocument &doc)
|
||
|
+void KisKXMLGUIClient::setXMLGUIBuildDocument(const QDomDocument &doc)
|
||
|
{
|
||
|
d->m_buildDocument = doc;
|
||
|
}
|
||
|
|
||
|
-QDomDocument KXMLGUIClient::xmlguiBuildDocument() const
|
||
|
+QDomDocument KisKXMLGUIClient::xmlguiBuildDocument() const
|
||
|
{
|
||
|
return d->m_buildDocument;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::setFactory(KXMLGUIFactory *factory)
|
||
|
+void KisKXMLGUIClient::setFactory(KisKXMLGUIFactory *factory)
|
||
|
{
|
||
|
d->m_factory = factory;
|
||
|
}
|
||
|
|
||
|
-KXMLGUIFactory *KXMLGUIClient::factory() const
|
||
|
+KisKXMLGUIFactory *KisKXMLGUIClient::factory() const
|
||
|
{
|
||
|
return d->m_factory;
|
||
|
}
|
||
|
|
||
|
-KXMLGUIClient *KXMLGUIClient::parentClient() const
|
||
|
+KisKXMLGUIClient *KisKXMLGUIClient::parentClient() const
|
||
|
{
|
||
|
return d->m_parent;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::insertChildClient(KXMLGUIClient *child)
|
||
|
+void KisKXMLGUIClient::insertChildClient(KisKXMLGUIClient *child)
|
||
|
{
|
||
|
if (child->d->m_parent) {
|
||
|
child->d->m_parent->removeChildClient(child);
|
||
|
@@ -664,14 +664,14 @@ void KXMLGUIClient::insertChildClient(KXMLGUIClient *child)
|
||
|
child->d->m_parent = this;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::removeChildClient(KXMLGUIClient *child)
|
||
|
+void KisKXMLGUIClient::removeChildClient(KisKXMLGUIClient *child)
|
||
|
{
|
||
|
assert(d->m_children.contains(child));
|
||
|
d->m_children.removeAll(child);
|
||
|
child->d->m_parent = 0;
|
||
|
}
|
||
|
|
||
|
-/*bool KXMLGUIClient::addSuperClient( KXMLGUIClient *super )
|
||
|
+/*bool KisKXMLGUIClient::addSuperClient( KisKXMLGUIClient *super )
|
||
|
{
|
||
|
if ( d->m_supers.contains( super ) )
|
||
|
return false;
|
||
|
@@ -679,22 +679,22 @@ void KXMLGUIClient::removeChildClient(KXMLGUIClient *child)
|
||
|
return true;
|
||
|
}*/
|
||
|
|
||
|
-QList<KXMLGUIClient *> KXMLGUIClient::childClients()
|
||
|
+QList<KisKXMLGUIClient *> KisKXMLGUIClient::childClients()
|
||
|
{
|
||
|
return d->m_children;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::setClientBuilder(KXMLGUIBuilder *builder)
|
||
|
+void KisKXMLGUIClient::setClientBuilder(KisKXMLGUIBuilder *builder)
|
||
|
{
|
||
|
d->m_builder = builder;
|
||
|
}
|
||
|
|
||
|
-KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const
|
||
|
+KisKXMLGUIBuilder *KisKXMLGUIClient::clientBuilder() const
|
||
|
{
|
||
|
return d->m_builder;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::plugActionList(const QString &name, const QList<QAction *> &actionList)
|
||
|
+void KisKXMLGUIClient::plugActionList(const QString &name, const QList<QAction *> &actionList)
|
||
|
{
|
||
|
if (!d->m_factory) {
|
||
|
return;
|
||
|
@@ -703,7 +703,7 @@ void KXMLGUIClient::plugActionList(const QString &name, const QList<QAction *> &
|
||
|
d->m_factory->plugActionList(this, name, actionList);
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::unplugActionList(const QString &name)
|
||
|
+void KisKXMLGUIClient::unplugActionList(const QString &name)
|
||
|
{
|
||
|
if (!d->m_factory) {
|
||
|
return;
|
||
|
@@ -712,41 +712,41 @@ void KXMLGUIClient::unplugActionList(const QString &name)
|
||
|
d->m_factory->unplugActionList(this, name);
|
||
|
}
|
||
|
|
||
|
-QString KXMLGUIClient::findMostRecentXMLFile(const QStringList &files, QString &doc)
|
||
|
+QString KisKXMLGUIClient::findMostRecentXMLFile(const QStringList &files, QString &doc)
|
||
|
{
|
||
|
KXmlGuiVersionHandler versionHandler(files);
|
||
|
doc = versionHandler.finalDocument();
|
||
|
return versionHandler.finalFile();
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::addStateActionEnabled(const QString &state,
|
||
|
+void KisKXMLGUIClient::addStateActionEnabled(const QString &state,
|
||
|
const QString &action)
|
||
|
{
|
||
|
StateChange stateChange = getActionsToChangeForState(state);
|
||
|
|
||
|
stateChange.actionsToEnable.append(action);
|
||
|
- //qDebug(260) << "KXMLGUIClient::addStateActionEnabled( " << state << ", " << action << ")";
|
||
|
+ //qDebug(260) << "KisKXMLGUIClient::addStateActionEnabled( " << state << ", " << action << ")";
|
||
|
|
||
|
d->m_actionsStateMap.insert(state, stateChange);
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::addStateActionDisabled(const QString &state,
|
||
|
+void KisKXMLGUIClient::addStateActionDisabled(const QString &state,
|
||
|
const QString &action)
|
||
|
{
|
||
|
StateChange stateChange = getActionsToChangeForState(state);
|
||
|
|
||
|
stateChange.actionsToDisable.append(action);
|
||
|
- //qDebug(260) << "KXMLGUIClient::addStateActionDisabled( " << state << ", " << action << ")";
|
||
|
+ //qDebug(260) << "KisKXMLGUIClient::addStateActionDisabled( " << state << ", " << action << ")";
|
||
|
|
||
|
d->m_actionsStateMap.insert(state, stateChange);
|
||
|
}
|
||
|
|
||
|
-KXMLGUIClient::StateChange KXMLGUIClient::getActionsToChangeForState(const QString &state)
|
||
|
+KisKXMLGUIClient::StateChange KisKXMLGUIClient::getActionsToChangeForState(const QString &state)
|
||
|
{
|
||
|
return d->m_actionsStateMap[state];
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::stateChanged(const QString &newstate, KXMLGUIClient::ReverseStateChange reverse)
|
||
|
+void KisKXMLGUIClient::stateChanged(const QString &newstate, KisKXMLGUIClient::ReverseStateChange reverse)
|
||
|
{
|
||
|
StateChange stateChange = getActionsToChangeForState(newstate);
|
||
|
|
||
|
@@ -777,27 +777,27 @@ void KXMLGUIClient::stateChanged(const QString &newstate, KXMLGUIClient::Reverse
|
||
|
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::beginXMLPlug(QWidget *w)
|
||
|
+void KisKXMLGUIClient::beginXMLPlug(QWidget *w)
|
||
|
{
|
||
|
actionCollection()->addAssociatedWidget(w);
|
||
|
- foreach (KXMLGUIClient *client, d->m_children) {
|
||
|
+ foreach (KisKXMLGUIClient *client, d->m_children) {
|
||
|
client->beginXMLPlug(w);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::endXMLPlug()
|
||
|
+void KisKXMLGUIClient::endXMLPlug()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::prepareXMLUnplug(QWidget *w)
|
||
|
+void KisKXMLGUIClient::prepareXMLUnplug(QWidget *w)
|
||
|
{
|
||
|
actionCollection()->removeAssociatedWidget(w);
|
||
|
- foreach (KXMLGUIClient *client, d->m_children) {
|
||
|
+ foreach (KisKXMLGUIClient *client, d->m_children) {
|
||
|
client->prepareXMLUnplug(w);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIClient::virtual_hook(int, void *)
|
||
|
+void KisKXMLGUIClient::virtual_hook(int, void *)
|
||
|
{
|
||
|
/*BASE::virtual_hook( id, data );*/
|
||
|
}
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguiclient.h b/libs/widgetutils/xmlgui/kxmlguiclient.h
|
||
|
index 303ae1460d..c9ad9ad640 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguiclient.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguiclient.h
|
||
|
@@ -4,8 +4,8 @@
|
||
|
|
||
|
SPDX-License-Identifier: LGPL-2.0-only
|
||
|
*/
|
||
|
-#ifndef KXMLGUICLIENT_H
|
||
|
-#define KXMLGUICLIENT_H
|
||
|
+#ifndef KisKXMLGUICLIENT_H
|
||
|
+#define KisKXMLGUICLIENT_H
|
||
|
|
||
|
#include <kritawidgetutils_export.h>
|
||
|
|
||
|
@@ -17,37 +17,37 @@ class QDomElement;
|
||
|
class QWidget;
|
||
|
|
||
|
class QAction;
|
||
|
-class KActionCollection;
|
||
|
-class KXMLGUIClientPrivate;
|
||
|
-class KXMLGUIFactory;
|
||
|
-class KXMLGUIBuilder;
|
||
|
+class KisKActionCollection;
|
||
|
+class KisKXMLGUIClientPrivate;
|
||
|
+class KisKXMLGUIFactory;
|
||
|
+class KisKXMLGUIBuilder;
|
||
|
|
||
|
namespace KDEPrivate
|
||
|
{
|
||
|
-class KEditToolBarWidget;
|
||
|
+class KisKEditToolBarWidget;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
- * A KXMLGUIClient can be used with KXMLGUIFactory to create a
|
||
|
+ * A KisKXMLGUIClient can be used with KisKXMLGUIFactory to create a
|
||
|
* GUI from actions and an XML document, and can be dynamically merged
|
||
|
- * with other KXMLGUIClients.
|
||
|
+ * with other KisKXMLGUIClients.
|
||
|
*/
|
||
|
-class KRITAWIDGETUTILS_EXPORT KXMLGUIClient
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKXMLGUIClient
|
||
|
{
|
||
|
- friend class KDEPrivate::KEditToolBarWidget; // for setXMLFile(3 args)
|
||
|
+ friend class KDEPrivate::KisKEditToolBarWidget; // for setXMLFile(3 args)
|
||
|
public:
|
||
|
/**
|
||
|
- * Constructs a KXMLGUIClient which can be used with a
|
||
|
- * KXMLGUIFactory to create a GUI from actions and an XML document, and
|
||
|
- * which can be dynamically merged with other KXMLGUIClients.
|
||
|
+ * Constructs a KisKXMLGUIClient which can be used with a
|
||
|
+ * KisKXMLGUIFactory to create a GUI from actions and an XML document, and
|
||
|
+ * which can be dynamically merged with other KisKXMLGUIClients.
|
||
|
*/
|
||
|
- KXMLGUIClient();
|
||
|
+ KisKXMLGUIClient();
|
||
|
|
||
|
/**
|
||
|
- * Constructs a KXMLGUIClient which can be used with a KXMLGUIFactory
|
||
|
+ * Constructs a KisKXMLGUIClient which can be used with a KisKXMLGUIFactory
|
||
|
* to create a GUI from actions and an XML document,
|
||
|
- * and which can be dynamically merged with other KXMLGUIClients.
|
||
|
+ * and which can be dynamically merged with other KisKXMLGUIClients.
|
||
|
*
|
||
|
* This constructor takes an additional @p parent argument, which makes
|
||
|
* the client a child client of the parent.
|
||
|
@@ -55,10 +55,10 @@ public:
|
||
|
* Child clients are automatically added to the GUI if the parent is added.
|
||
|
*
|
||
|
*/
|
||
|
- explicit KXMLGUIClient(KXMLGUIClient *parent);
|
||
|
+ explicit KisKXMLGUIClient(KisKXMLGUIClient *parent);
|
||
|
|
||
|
/**
|
||
|
- * Destructs the KXMLGUIClient.
|
||
|
+ * Destructs the KisKXMLGUIClient.
|
||
|
*
|
||
|
* If the client was in a factory, the factory is NOT informed about the client
|
||
|
* being removed. This is a feature, it makes window destruction fast (the xmlgui
|
||
|
@@ -66,7 +66,7 @@ public:
|
||
|
* one client and to keep using the window, make sure to call factory->removeClient(client)
|
||
|
* before deleting the client.
|
||
|
*/
|
||
|
- virtual ~KXMLGUIClient();
|
||
|
+ virtual ~KisKXMLGUIClient();
|
||
|
|
||
|
/**
|
||
|
* Retrieves an action of the client by name. If not found, it looks in its child clients.
|
||
|
@@ -85,7 +85,7 @@ public:
|
||
|
/**
|
||
|
* Retrieves the entire action collection for the GUI client.
|
||
|
*/
|
||
|
- virtual KActionCollection *actionCollection() const;
|
||
|
+ virtual KisKActionCollection *actionCollection() const;
|
||
|
|
||
|
/**
|
||
|
* @return The component name for this GUI client.
|
||
|
@@ -126,23 +126,23 @@ public:
|
||
|
QDomDocument xmlguiBuildDocument() const;
|
||
|
|
||
|
/**
|
||
|
- * This method is called by the KXMLGUIFactory as soon as the client
|
||
|
- * is added to the KXMLGUIFactory's GUI.
|
||
|
+ * This method is called by the KisKXMLGUIFactory as soon as the client
|
||
|
+ * is added to the KisKXMLGUIFactory's GUI.
|
||
|
*/
|
||
|
- void setFactory(KXMLGUIFactory *factory);
|
||
|
+ void setFactory(KisKXMLGUIFactory *factory);
|
||
|
/**
|
||
|
- * Retrieves a pointer to the KXMLGUIFactory this client is
|
||
|
+ * Retrieves a pointer to the KisKXMLGUIFactory this client is
|
||
|
* associated with (will return 0 if the client's GUI has not been built
|
||
|
- * by a KXMLGUIFactory.
|
||
|
+ * by a KisKXMLGUIFactory.
|
||
|
*/
|
||
|
- KXMLGUIFactory *factory() const;
|
||
|
+ KisKXMLGUIFactory *factory() const;
|
||
|
|
||
|
/**
|
||
|
- * KXMLGUIClients can form a simple child/parent object tree. This
|
||
|
+ * KisKXMLGUIClients can form a simple child/parent object tree. This
|
||
|
* method returns a pointer to the parent client or 0 if it has no
|
||
|
* parent client assigned.
|
||
|
*/
|
||
|
- KXMLGUIClient *parentClient() const;
|
||
|
+ KisKXMLGUIClient *parentClient() const;
|
||
|
|
||
|
/**
|
||
|
* Use this method to make a client a child client of another client.
|
||
|
@@ -150,33 +150,33 @@ public:
|
||
|
* automatically when using the second constructor, which takes a
|
||
|
* parent argument.
|
||
|
*/
|
||
|
- void insertChildClient(KXMLGUIClient *child);
|
||
|
+ void insertChildClient(KisKXMLGUIClient *child);
|
||
|
|
||
|
/**
|
||
|
* Removes the given @p child from the client's children list.
|
||
|
*/
|
||
|
- void removeChildClient(KXMLGUIClient *child);
|
||
|
+ void removeChildClient(KisKXMLGUIClient *child);
|
||
|
|
||
|
/**
|
||
|
* Retrieves a list of all child clients.
|
||
|
*/
|
||
|
- QList<KXMLGUIClient *> childClients();
|
||
|
+ QList<KisKXMLGUIClient *> childClients();
|
||
|
|
||
|
/**
|
||
|
- * A client can have an own KXMLGUIBuilder.
|
||
|
+ * A client can have an own KisKXMLGUIBuilder.
|
||
|
* Use this method to assign your builder instance to the client (so that the
|
||
|
- * KXMLGUIFactory can use it when building the client's GUI)
|
||
|
+ * KisKXMLGUIFactory can use it when building the client's GUI)
|
||
|
*
|
||
|
* Client specific guibuilders are useful if you want to create
|
||
|
* custom container widgets for your GUI.
|
||
|
*/
|
||
|
- void setClientBuilder(KXMLGUIBuilder *builder);
|
||
|
+ void setClientBuilder(KisKXMLGUIBuilder *builder);
|
||
|
|
||
|
/**
|
||
|
* Retrieves the client's GUI builder or 0 if no client specific
|
||
|
* builder has been assigned via setClientBuilder()
|
||
|
*/
|
||
|
- KXMLGUIBuilder *clientBuilder() const;
|
||
|
+ KisKXMLGUIBuilder *clientBuilder() const;
|
||
|
|
||
|
/**
|
||
|
* Forces this client to re-read its XML resource file. This is
|
||
|
@@ -278,7 +278,7 @@ public:
|
||
|
* @note If in any doubt whether you need this or not, use setXMLFile()
|
||
|
* and setLocalXMLFile(), instead of this function.
|
||
|
* @note Just like setXMLFile(), this function has to be called before
|
||
|
- * the client is added to a KXMLGUIFactory in order to have an
|
||
|
+ * the client is added to a KisKXMLGUIFactory in order to have an
|
||
|
* effect.
|
||
|
*
|
||
|
* @since 4.4
|
||
|
@@ -314,7 +314,7 @@ protected:
|
||
|
*
|
||
|
* Since KF 5.1, the file will then be assumed to be installed in DATADIR/kxmlgui5/, under a directory
|
||
|
* named after the component name.
|
||
|
- * You should use ${KXMLGUI_INSTALL_DIR}/componentname in your CMakeLists.txt file, to install
|
||
|
+ * You should use ${KisKXMLGUI_INSTALL_DIR}/componentname in your CMakeLists.txt file, to install
|
||
|
* the .xmlgui file(s).
|
||
|
*
|
||
|
* Since KF 5.4, the file will then be assumed to be installed in a Qt resource in :/kxmlgui5/,
|
||
|
@@ -323,7 +323,7 @@ protected:
|
||
|
* Compatibility notes:
|
||
|
* Fallback lookups exist to older locations: DATADIR/componentname/file and DATADIR/file.
|
||
|
* The latter was there so that setXMLFile("componentname/filename") worked (but this was
|
||
|
- * undocumented). Do not do this anymore after porting to KXMLGUI_INSTALL_DIR, use
|
||
|
+ * undocumented). Do not do this anymore after porting to KisKXMLGUI_INSTALL_DIR, use
|
||
|
* setComponentName("componentname") and setXMLFile("filename").
|
||
|
**/
|
||
|
void setXMLFile(const QString &file, bool merge = false, bool setXMLDoc = true);
|
||
|
@@ -392,7 +392,7 @@ protected:
|
||
|
virtual void virtual_hook(int id, void *data);
|
||
|
|
||
|
private:
|
||
|
- KXMLGUIClientPrivate *const d;
|
||
|
+ KisKXMLGUIClientPrivate *const d;
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguifactory.cpp b/libs/widgetutils/xmlgui/kxmlguifactory.cpp
|
||
|
index c752ee33bd..fd19651c08 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguifactory.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguifactory.cpp
|
||
|
@@ -36,21 +36,21 @@
|
||
|
|
||
|
Q_DECLARE_METATYPE(QList<QKeySequence>)
|
||
|
|
||
|
-using namespace KXMLGUI;
|
||
|
+using namespace KisKXMLGUI;
|
||
|
|
||
|
-class KXMLGUIFactoryPrivate : public BuildState
|
||
|
+class KisKXMLGUIFactoryPrivate : public BuildState
|
||
|
{
|
||
|
public:
|
||
|
enum ShortcutOption { SetActiveShortcut = 1, SetDefaultShortcut = 2};
|
||
|
|
||
|
- KXMLGUIFactoryPrivate()
|
||
|
+ KisKXMLGUIFactoryPrivate()
|
||
|
{
|
||
|
m_rootNode = new ContainerNode(0L, QString(), QString());
|
||
|
m_defaultMergingName = QStringLiteral("<default>");
|
||
|
tagActionList = QStringLiteral("actionlist");
|
||
|
attrName = QStringLiteral("name");
|
||
|
}
|
||
|
- ~KXMLGUIFactoryPrivate()
|
||
|
+ ~KisKXMLGUIFactoryPrivate()
|
||
|
{
|
||
|
delete m_rootNode;
|
||
|
}
|
||
|
@@ -70,17 +70,17 @@ public:
|
||
|
return m_stateStack.isEmpty();
|
||
|
}
|
||
|
|
||
|
- QWidget *findRecursive(KXMLGUI::ContainerNode *node, bool tag);
|
||
|
- QList<QWidget *> findRecursive(KXMLGUI::ContainerNode *node, const QString &tagName);
|
||
|
+ QWidget *findRecursive(KisKXMLGUI::ContainerNode *node, bool tag);
|
||
|
+ QList<QWidget *> findRecursive(KisKXMLGUI::ContainerNode *node, const QString &tagName);
|
||
|
void applyActionProperties(const QDomElement &element,
|
||
|
- ShortcutOption shortcutOption = KXMLGUIFactoryPrivate::SetActiveShortcut);
|
||
|
+ ShortcutOption shortcutOption = KisKXMLGUIFactoryPrivate::SetActiveShortcut);
|
||
|
void configureAction(QAction *action, const QDomNamedNodeMap &attributes,
|
||
|
- ShortcutOption shortcutOption = KXMLGUIFactoryPrivate::SetActiveShortcut);
|
||
|
+ ShortcutOption shortcutOption = KisKXMLGUIFactoryPrivate::SetActiveShortcut);
|
||
|
void configureAction(QAction *action, const QDomAttr &attribute,
|
||
|
- ShortcutOption shortcutOption = KXMLGUIFactoryPrivate::SetActiveShortcut);
|
||
|
+ ShortcutOption shortcutOption = KisKXMLGUIFactoryPrivate::SetActiveShortcut);
|
||
|
|
||
|
|
||
|
- void refreshActionProperties(KXMLGUIClient *client, const QList<QAction *> &actions, const QDomDocument &doc);
|
||
|
+ void refreshActionProperties(KisKXMLGUIClient *client, const QList<QAction *> &actions, const QDomDocument &doc);
|
||
|
void saveDefaultActionProperties(const QList<QAction *> &actions);
|
||
|
|
||
|
ContainerNode *m_rootNode;
|
||
|
@@ -95,7 +95,7 @@ public:
|
||
|
/*
|
||
|
* List of all clients
|
||
|
*/
|
||
|
- QList<KXMLGUIClient *> m_clients;
|
||
|
+ QList<KisKXMLGUIClient *> m_clients;
|
||
|
|
||
|
QString tagActionList;
|
||
|
|
||
|
@@ -104,7 +104,7 @@ public:
|
||
|
BuildStateStack m_stateStack;
|
||
|
};
|
||
|
|
||
|
-QString KXMLGUIFactory::readConfigFile(const QString &filename, const QString &_componentName)
|
||
|
+QString KisKXMLGUIFactory::readConfigFile(const QString &filename, const QString &_componentName)
|
||
|
{
|
||
|
QString componentName = _componentName.isEmpty() ? QCoreApplication::applicationName() : _componentName;
|
||
|
QString xml_file;
|
||
|
@@ -112,7 +112,7 @@ QString KXMLGUIFactory::readConfigFile(const QString &filename, const QString &_
|
||
|
if (!QDir::isRelativePath(filename)) {
|
||
|
xml_file = filename;
|
||
|
} else {
|
||
|
- // KF >= 5.1 (KXMLGUI_INSTALL_DIR)
|
||
|
+ // KF >= 5.1 (KisKXMLGUI_INSTALL_DIR)
|
||
|
xml_file = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("kxmlgui5/") + componentName + QLatin1Char('/') + filename);
|
||
|
if (!QFile::exists(xml_file)) {
|
||
|
// KF >= 5.4 (resource file)
|
||
|
@@ -135,7 +135,7 @@ QString KXMLGUIFactory::readConfigFile(const QString &filename, const QString &_
|
||
|
}
|
||
|
|
||
|
if (warn) {
|
||
|
- qWarning() << "kxmlguifactory: KXMLGUI file found at deprecated location" << xml_file << "-- please use ${KXMLGUI_INSTALL_DIR} to install these files instead.";
|
||
|
+ qWarning() << "kxmlguifactory: KisKXMLGUI file found at deprecated location" << xml_file << "-- please use ${KisKXMLGUI_INSTALL_DIR} to install these files instead.";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@@ -149,7 +149,7 @@ QString KXMLGUIFactory::readConfigFile(const QString &filename, const QString &_
|
||
|
return QString::fromUtf8(buffer.constData(), buffer.size());
|
||
|
}
|
||
|
|
||
|
-bool KXMLGUIFactory::saveConfigFile(const QDomDocument &doc,
|
||
|
+bool KisKXMLGUIFactory::saveConfigFile(const QDomDocument &doc,
|
||
|
const QString &filename, const QString &_componentName)
|
||
|
{
|
||
|
QString componentName = _componentName.isEmpty() ? QCoreApplication::applicationName() : _componentName;
|
||
|
@@ -196,8 +196,8 @@ static void removeDOMComments(QDomNode &node)
|
||
|
}
|
||
|
}*/
|
||
|
|
||
|
-KXMLGUIFactory::KXMLGUIFactory(KXMLGUIBuilder *builder, QObject *parent)
|
||
|
- : QObject(parent), d(new KXMLGUIFactoryPrivate)
|
||
|
+KisKXMLGUIFactory::KisKXMLGUIFactory(KisKXMLGUIBuilder *builder, QObject *parent)
|
||
|
+ : QObject(parent), d(new KisKXMLGUIFactoryPrivate)
|
||
|
{
|
||
|
d->builder = builder;
|
||
|
d->guiClient = 0;
|
||
|
@@ -207,15 +207,15 @@ KXMLGUIFactory::KXMLGUIFactory(KXMLGUIBuilder *builder, QObject *parent)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-KXMLGUIFactory::~KXMLGUIFactory()
|
||
|
+KisKXMLGUIFactory::~KisKXMLGUIFactory()
|
||
|
{
|
||
|
- Q_FOREACH (KXMLGUIClient *client, d->m_clients) {
|
||
|
+ Q_FOREACH (KisKXMLGUIClient *client, d->m_clients) {
|
||
|
client->setFactory(0L);
|
||
|
}
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactory::addClient(KXMLGUIClient *client)
|
||
|
+void KisKXMLGUIFactory::addClient(KisKXMLGUIClient *client)
|
||
|
{
|
||
|
debugWidgetUtils << client;
|
||
|
if (client->factory()) {
|
||
|
@@ -299,7 +299,7 @@ void KXMLGUIFactory::addClient(KXMLGUIClient *client)
|
||
|
emit clientAdded(client);
|
||
|
|
||
|
// build child clients
|
||
|
- Q_FOREACH (KXMLGUIClient *child, client->childClients()) {
|
||
|
+ Q_FOREACH (KisKXMLGUIClient *child, client->childClients()) {
|
||
|
addClient(child);
|
||
|
}
|
||
|
|
||
|
@@ -308,7 +308,7 @@ void KXMLGUIFactory::addClient(KXMLGUIClient *client)
|
||
|
}
|
||
|
/*
|
||
|
QString unaddedActions;
|
||
|
- Q_FOREACH (KActionCollection* ac, KActionCollection::allCollections())
|
||
|
+ Q_FOREACH (KisKActionCollection* ac, KisKActionCollection::allCollections())
|
||
|
Q_FOREACH (QAction* action, ac->actions())
|
||
|
if (action->associatedWidgets().isEmpty())
|
||
|
unaddedActions += action->objectName() + ' ';
|
||
|
@@ -333,7 +333,7 @@ static QDomElement findActionPropertiesElement(const QDomDocument &doc)
|
||
|
return QDomElement();
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactoryPrivate::refreshActionProperties(KXMLGUIClient *client, const QList<QAction *> &actions, const QDomDocument &doc)
|
||
|
+void KisKXMLGUIFactoryPrivate::refreshActionProperties(KisKXMLGUIClient *client, const QList<QAction *> &actions, const QDomDocument &doc)
|
||
|
{
|
||
|
// These were used for applyShortcutScheme() but not for applyActionProperties()??
|
||
|
Q_UNUSED(client);
|
||
|
@@ -347,7 +347,7 @@ void KXMLGUIFactoryPrivate::refreshActionProperties(KXMLGUIClient *client, const
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactoryPrivate::saveDefaultActionProperties(const QList<QAction *> &actions)
|
||
|
+void KisKXMLGUIFactoryPrivate::saveDefaultActionProperties(const QList<QAction *> &actions)
|
||
|
{
|
||
|
// This method is called every time the user activated a new
|
||
|
// kxmlguiclient. We only want to execute the following code only once in
|
||
|
@@ -373,12 +373,12 @@ void KXMLGUIFactoryPrivate::saveDefaultActionProperties(const QList<QAction *> &
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactory::forgetClient(KXMLGUIClient *client)
|
||
|
+void KisKXMLGUIFactory::forgetClient(KisKXMLGUIClient *client)
|
||
|
{
|
||
|
d->m_clients.removeAll(client);
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactory::removeClient(KXMLGUIClient *client)
|
||
|
+void KisKXMLGUIFactory::removeClient(KisKXMLGUIClient *client)
|
||
|
{
|
||
|
//qDebug(260) << client;
|
||
|
|
||
|
@@ -396,8 +396,8 @@ void KXMLGUIFactory::removeClient(KXMLGUIClient *client)
|
||
|
|
||
|
// remove child clients first (create a copy of the list just in case the
|
||
|
// original list is modified directly or indirectly in removeClient())
|
||
|
- const QList<KXMLGUIClient *> childClients(client->childClients());
|
||
|
- Q_FOREACH (KXMLGUIClient *child, childClients) {
|
||
|
+ const QList<KisKXMLGUIClient *> childClients(client->childClients());
|
||
|
+ Q_FOREACH (KisKXMLGUIClient *child, childClients) {
|
||
|
removeClient(child);
|
||
|
}
|
||
|
|
||
|
@@ -439,12 +439,12 @@ void KXMLGUIFactory::removeClient(KXMLGUIClient *client)
|
||
|
emit clientRemoved(client);
|
||
|
}
|
||
|
|
||
|
-QList<KXMLGUIClient *> KXMLGUIFactory::clients() const
|
||
|
+QList<KisKXMLGUIClient *> KisKXMLGUIFactory::clients() const
|
||
|
{
|
||
|
return d->m_clients;
|
||
|
}
|
||
|
|
||
|
-QWidget *KXMLGUIFactory::container(const QString &containerName, KXMLGUIClient *client,
|
||
|
+QWidget *KisKXMLGUIFactory::container(const QString &containerName, KisKXMLGUIClient *client,
|
||
|
bool useTagName)
|
||
|
{
|
||
|
d->pushState();
|
||
|
@@ -461,19 +461,19 @@ QWidget *KXMLGUIFactory::container(const QString &containerName, KXMLGUIClient *
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
-QList<QWidget *> KXMLGUIFactory::containers(const QString &tagName)
|
||
|
+QList<QWidget *> KisKXMLGUIFactory::containers(const QString &tagName)
|
||
|
{
|
||
|
return d->findRecursive(d->m_rootNode, tagName);
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactory::reset()
|
||
|
+void KisKXMLGUIFactory::reset()
|
||
|
{
|
||
|
d->m_rootNode->reset();
|
||
|
|
||
|
d->m_rootNode->clearChildren();
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactory::resetContainer(const QString &containerName, bool useTagName)
|
||
|
+void KisKXMLGUIFactory::resetContainer(const QString &containerName, bool useTagName)
|
||
|
{
|
||
|
if (containerName.isEmpty()) {
|
||
|
return;
|
||
|
@@ -495,7 +495,7 @@ void KXMLGUIFactory::resetContainer(const QString &containerName, bool useTagNam
|
||
|
parent->removeChild(container);
|
||
|
}
|
||
|
|
||
|
-QWidget *KXMLGUIFactoryPrivate::findRecursive(KXMLGUI::ContainerNode *node, bool tag)
|
||
|
+QWidget *KisKXMLGUIFactoryPrivate::findRecursive(KisKXMLGUI::ContainerNode *node, bool tag)
|
||
|
{
|
||
|
if (((!tag && node->name == m_containerName) ||
|
||
|
(tag && node->tagName == m_containerName)) &&
|
||
|
@@ -523,7 +523,7 @@ static inline bool equals(const QString &str1, const QString &str2)
|
||
|
return str1.compare(str2, Qt::CaseInsensitive) == 0;
|
||
|
}
|
||
|
|
||
|
-QList<QWidget *> KXMLGUIFactoryPrivate::findRecursive(KXMLGUI::ContainerNode *node,
|
||
|
+QList<QWidget *> KisKXMLGUIFactoryPrivate::findRecursive(KisKXMLGUI::ContainerNode *node,
|
||
|
const QString &tagName)
|
||
|
{
|
||
|
QList<QWidget *> res;
|
||
|
@@ -532,14 +532,14 @@ QList<QWidget *> KXMLGUIFactoryPrivate::findRecursive(KXMLGUI::ContainerNode *no
|
||
|
res.append(node->container);
|
||
|
}
|
||
|
|
||
|
- Q_FOREACH (KXMLGUI::ContainerNode *child, node->children) {
|
||
|
+ Q_FOREACH (KisKXMLGUI::ContainerNode *child, node->children) {
|
||
|
res << findRecursive(child, tagName);
|
||
|
}
|
||
|
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactory::plugActionList(KXMLGUIClient *client, const QString &name,
|
||
|
+void KisKXMLGUIFactory::plugActionList(KisKXMLGUIClient *client, const QString &name,
|
||
|
const QList<QAction *> &actionList)
|
||
|
{
|
||
|
d->pushState();
|
||
|
@@ -558,7 +558,7 @@ void KXMLGUIFactory::plugActionList(KXMLGUIClient *client, const QString &name,
|
||
|
d->popState();
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactory::unplugActionList(KXMLGUIClient *client, const QString &name)
|
||
|
+void KisKXMLGUIFactory::unplugActionList(KisKXMLGUIClient *client, const QString &name)
|
||
|
{
|
||
|
d->pushState();
|
||
|
d->guiClient = client;
|
||
|
@@ -571,7 +571,7 @@ void KXMLGUIFactory::unplugActionList(KXMLGUIClient *client, const QString &name
|
||
|
d->popState();
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactoryPrivate::applyActionProperties(const QDomElement &actionPropElement,
|
||
|
+void KisKXMLGUIFactoryPrivate::applyActionProperties(const QDomElement &actionPropElement,
|
||
|
ShortcutOption shortcutOption)
|
||
|
{
|
||
|
for (QDomElement e = actionPropElement.firstChildElement();
|
||
|
@@ -589,7 +589,7 @@ void KXMLGUIFactoryPrivate::applyActionProperties(const QDomElement &actionPropE
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactoryPrivate::configureAction(QAction *action, const QDomNamedNodeMap &attributes,
|
||
|
+void KisKXMLGUIFactoryPrivate::configureAction(QAction *action, const QDomNamedNodeMap &attributes,
|
||
|
ShortcutOption shortcutOption)
|
||
|
{
|
||
|
for (int i = 0; i < attributes.length(); i++) {
|
||
|
@@ -602,7 +602,7 @@ void KXMLGUIFactoryPrivate::configureAction(QAction *action, const QDomNamedNode
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void KXMLGUIFactoryPrivate::configureAction(QAction *action, const QDomAttr &attribute,
|
||
|
+void KisKXMLGUIFactoryPrivate::configureAction(QAction *action, const QDomAttr &attribute,
|
||
|
ShortcutOption shortcutOption)
|
||
|
{
|
||
|
QString attrName = attribute.name();
|
||
|
@@ -634,7 +634,7 @@ void KXMLGUIFactoryPrivate::configureAction(QAction *action, const QDomAttr &att
|
||
|
// Setting the shortcut by property also sets the default shortcut
|
||
|
// (which is incorrect), so we have to do it directly
|
||
|
action->setShortcuts(QKeySequence::listFromString(attribute.value()));
|
||
|
- if (shortcutOption & KXMLGUIFactoryPrivate::SetDefaultShortcut) {
|
||
|
+ if (shortcutOption & KisKXMLGUIFactoryPrivate::SetDefaultShortcut) {
|
||
|
action->setProperty("defaultShortcuts",
|
||
|
QVariant::fromValue(QKeySequence::listFromString(attribute.value())));
|
||
|
}
|
||
|
@@ -647,7 +647,7 @@ void KXMLGUIFactoryPrivate::configureAction(QAction *action, const QDomAttr &att
|
||
|
}
|
||
|
|
||
|
// Find or create
|
||
|
-QDomElement KXMLGUIFactory::actionPropertiesElement(QDomDocument &doc)
|
||
|
+QDomElement KisKXMLGUIFactory::actionPropertiesElement(QDomDocument &doc)
|
||
|
{
|
||
|
// first, lets see if we have existing properties
|
||
|
QDomElement elem = findActionPropertiesElement(doc);
|
||
|
@@ -660,7 +660,7 @@ QDomElement KXMLGUIFactory::actionPropertiesElement(QDomDocument &doc)
|
||
|
return elem;
|
||
|
}
|
||
|
|
||
|
-QDomElement KXMLGUIFactory::findActionByName(QDomElement &elem, const QString &sName, bool create)
|
||
|
+QDomElement KisKXMLGUIFactory::findActionByName(QDomElement &elem, const QString &sName, bool create)
|
||
|
{
|
||
|
const QLatin1String attrName("name");
|
||
|
for (QDomNode it = elem.firstChild(); !it.isNull(); it = it.nextSibling()) {
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguifactory.h b/libs/widgetutils/xmlgui/kxmlguifactory.h
|
||
|
index 5ee2510de2..66017633d7 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguifactory.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguifactory.h
|
||
|
@@ -13,9 +13,9 @@
|
||
|
#include <QObject>
|
||
|
|
||
|
class QAction;
|
||
|
-class KXMLGUIFactoryPrivate;
|
||
|
-class KXMLGUIClient;
|
||
|
-class KXMLGUIBuilder;
|
||
|
+class KisKXMLGUIFactoryPrivate;
|
||
|
+class KisKXMLGUIClient;
|
||
|
+class KisKXMLGUIBuilder;
|
||
|
|
||
|
class QDomAttr;
|
||
|
class QDomDocument;
|
||
|
@@ -23,7 +23,7 @@ class QDomElement;
|
||
|
class QDomNode;
|
||
|
class QDomNamedNodeMap;
|
||
|
|
||
|
-namespace KXMLGUI
|
||
|
+namespace KisKXMLGUI
|
||
|
{
|
||
|
struct MergingIndex;
|
||
|
struct ContainerNode;
|
||
|
@@ -32,40 +32,40 @@ class BuildHelper;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
- * KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create
|
||
|
+ * KisKXMLGUIFactory, together with KisKXMLGUIClient objects, can be used to create
|
||
|
* a GUI of container widgets (like menus, toolbars, etc.) and container items
|
||
|
* (menu items, toolbar buttons, etc.) from an XML document and action objects.
|
||
|
*
|
||
|
- * Each KXMLGUIClient represents a part of the GUI, composed from containers and
|
||
|
- * actions. KXMLGUIFactory takes care of building (with the help of a KXMLGUIBuilder)
|
||
|
+ * Each KisKXMLGUIClient represents a part of the GUI, composed from containers and
|
||
|
+ * actions. KisKXMLGUIFactory takes care of building (with the help of a KisKXMLGUIBuilder)
|
||
|
* and merging the GUI from an unlimited number of clients.
|
||
|
*
|
||
|
* Each client provides XML through a QDomDocument and actions through a
|
||
|
- * KActionCollection . The XML document contains the rules for how to merge the
|
||
|
+ * KisKActionCollection . The XML document contains the rules for how to merge the
|
||
|
* GUI.
|
||
|
*
|
||
|
- * KXMLGUIFactory processes the DOM tree provided by a client and plugs in the client's actions,
|
||
|
+ * KisKXMLGUIFactory processes the DOM tree provided by a client and plugs in the client's actions,
|
||
|
* according to the XML and the merging rules of previously inserted clients. Container widgets
|
||
|
- * are built via a KXMLGUIBuilder , which has to be provided with the KXMLGUIFactory constructor.
|
||
|
+ * are built via a KisKXMLGUIBuilder , which has to be provided with the KisKXMLGUIFactory constructor.
|
||
|
*/
|
||
|
-class KRITAWIDGETUTILS_EXPORT KXMLGUIFactory : public QObject
|
||
|
+class KRITAWIDGETUTILS_EXPORT KisKXMLGUIFactory : public QObject
|
||
|
{
|
||
|
- friend class KXMLGUI::BuildHelper;
|
||
|
+ friend class KisKXMLGUI::BuildHelper;
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
/**
|
||
|
- * Constructs a KXMLGUIFactory. The provided @p builder KXMLGUIBuilder will be called
|
||
|
+ * Constructs a KisKXMLGUIFactory. The provided @p builder KisKXMLGUIBuilder will be called
|
||
|
* for creating and removing container widgets, when clients are added/removed from the GUI.
|
||
|
*
|
||
|
- * Note that the ownership of the given KXMLGUIBuilder object won't be transferred to this
|
||
|
- * KXMLGUIFactory, so you have to take care of deleting it properly.
|
||
|
+ * Note that the ownership of the given KisKXMLGUIBuilder object won't be transferred to this
|
||
|
+ * KisKXMLGUIFactory, so you have to take care of deleting it properly.
|
||
|
*/
|
||
|
- explicit KXMLGUIFactory(KXMLGUIBuilder *builder, QObject *parent = 0);
|
||
|
+ explicit KisKXMLGUIFactory(KisKXMLGUIBuilder *builder, QObject *parent = 0);
|
||
|
|
||
|
/**
|
||
|
* Destructor
|
||
|
*/
|
||
|
- ~KXMLGUIFactory() override;
|
||
|
+ ~KisKXMLGUIFactory() override;
|
||
|
|
||
|
// XXX move to somewhere else? (Simon)
|
||
|
/// @internal
|
||
|
@@ -98,22 +98,22 @@ public:
|
||
|
* plugin's UI is merged into the UI of your application, and not the other
|
||
|
* way round.
|
||
|
*/
|
||
|
- void addClient(KXMLGUIClient *client);
|
||
|
+ void addClient(KisKXMLGUIClient *client);
|
||
|
|
||
|
/**
|
||
|
* Removes the GUI described by the client, by unplugging all
|
||
|
* provided actions and removing all owned containers (and storing
|
||
|
* container state information in the given client)
|
||
|
*/
|
||
|
- void removeClient(KXMLGUIClient *client);
|
||
|
+ void removeClient(KisKXMLGUIClient *client);
|
||
|
|
||
|
- void plugActionList(KXMLGUIClient *client, const QString &name, const QList<QAction *> &actionList);
|
||
|
- void unplugActionList(KXMLGUIClient *client, const QString &name);
|
||
|
+ void plugActionList(KisKXMLGUIClient *client, const QString &name, const QList<QAction *> &actionList);
|
||
|
+ void unplugActionList(KisKXMLGUIClient *client, const QString &name);
|
||
|
|
||
|
/**
|
||
|
* Returns a list of all clients currently added to this factory
|
||
|
*/
|
||
|
- QList<KXMLGUIClient *> clients() const;
|
||
|
+ QList<KisKXMLGUIClient *> clients() const;
|
||
|
|
||
|
/**
|
||
|
* Use this method to get access to a container widget with the name specified with @p containerName
|
||
|
@@ -135,41 +135,41 @@ public:
|
||
|
*
|
||
|
* This method may return 0 if no container with the given name exists or is not owned by the client.
|
||
|
*/
|
||
|
- QWidget *container(const QString &containerName, KXMLGUIClient *client, bool useTagName = false);
|
||
|
+ QWidget *container(const QString &containerName, KisKXMLGUIClient *client, bool useTagName = false);
|
||
|
|
||
|
QList<QWidget *> containers(const QString &tagName);
|
||
|
|
||
|
/**
|
||
|
- * Use this method to free all memory allocated by the KXMLGUIFactory. This deletes the internal node
|
||
|
+ * Use this method to free all memory allocated by the KisKXMLGUIFactory. This deletes the internal node
|
||
|
* tree and therefore resets the internal state of the class. Please note that the actual GUI is
|
||
|
* NOT touched at all, meaning no containers are deleted nor any actions unplugged. That is
|
||
|
* something you have to do on your own. So use this method only if you know what you are doing :-)
|
||
|
*
|
||
|
- * (also note that this will call KXMLGUIClient::setFactory( 0 ) for all inserted clients)
|
||
|
+ * (also note that this will call KisKXMLGUIClient::setFactory( 0 ) for all inserted clients)
|
||
|
*/
|
||
|
void reset();
|
||
|
|
||
|
/**
|
||
|
- * Use this method to free all memory allocated by the KXMLGUIFactory for a specific container,
|
||
|
+ * Use this method to free all memory allocated by the KisKXMLGUIFactory for a specific container,
|
||
|
* including all child containers and actions. This deletes the internal node subtree for the
|
||
|
* specified container. The actual GUI is not touched, no containers are deleted or any actions
|
||
|
* unplugged. Use this method only if you know what you are doing :-)
|
||
|
*
|
||
|
- * (also note that this will call KXMLGUIClient::setFactory( 0 ) for all clients of the
|
||
|
+ * (also note that this will call KisKXMLGUIClient::setFactory( 0 ) for all clients of the
|
||
|
* container)
|
||
|
*/
|
||
|
void resetContainer(const QString &containerName, bool useTagName = false);
|
||
|
|
||
|
Q_SIGNALS:
|
||
|
- void clientAdded(KXMLGUIClient *client);
|
||
|
- void clientRemoved(KXMLGUIClient *client);
|
||
|
+ void clientAdded(KisKXMLGUIClient *client);
|
||
|
+ void clientRemoved(KisKXMLGUIClient *client);
|
||
|
|
||
|
/**
|
||
|
* Emitted when the factory is currently making changes to the GUI,
|
||
|
* i.e. adding or removing clients.
|
||
|
* makingChanges(true) is emitted before any change happens, and
|
||
|
* makingChanges(false) is emitted after the change is done.
|
||
|
- * This allows e.g. KMainWindow to know that the GUI is
|
||
|
+ * This allows e.g. KisKMainWindow to know that the GUI is
|
||
|
* being changed programmatically and not by the user (so there is no reason to
|
||
|
* save toolbar settings afterwards).
|
||
|
* @since 4.1.3
|
||
|
@@ -177,11 +177,11 @@ Q_SIGNALS:
|
||
|
void makingChanges(bool);
|
||
|
|
||
|
private:
|
||
|
- friend class KXMLGUIClient;
|
||
|
- /// Internal, called by KXMLGUIClient destructor
|
||
|
- void forgetClient(KXMLGUIClient *client);
|
||
|
+ friend class KisKXMLGUIClient;
|
||
|
+ /// Internal, called by KisKXMLGUIClient destructor
|
||
|
+ void forgetClient(KisKXMLGUIClient *client);
|
||
|
|
||
|
- KXMLGUIFactoryPrivate *const d;
|
||
|
+ KisKXMLGUIFactoryPrivate *const d;
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguifactory_p.cpp b/libs/widgetutils/xmlgui/kxmlguifactory_p.cpp
|
||
|
index 20dc8f2fcd..b12c4fc5ac 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguifactory_p.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguifactory_p.cpp
|
||
|
@@ -15,7 +15,7 @@
|
||
|
|
||
|
#include <assert.h>
|
||
|
|
||
|
-using namespace KXMLGUI;
|
||
|
+using namespace KisKXMLGUI;
|
||
|
|
||
|
void ActionList::plug(QWidget *container, int index) const
|
||
|
{
|
||
|
@@ -44,7 +44,7 @@ void ActionList::unplug(QWidget *container) const
|
||
|
|
||
|
ContainerNode::ContainerNode(QWidget *_container, const QString &_tagName,
|
||
|
const QString &_name, ContainerNode *_parent,
|
||
|
- KXMLGUIClient *_client, KXMLGUIBuilder *_builder,
|
||
|
+ KisKXMLGUIClient *_client, KisKXMLGUIBuilder *_builder,
|
||
|
QAction *_containerAction, const QString &_mergingName,
|
||
|
const QString &_groupName, const QStringList &customTags,
|
||
|
const QStringList &containerTags)
|
||
|
@@ -138,7 +138,7 @@ ContainerNode *ContainerNode::findContainer(const QString &_name, bool tag)
|
||
|
*/
|
||
|
ContainerNode *ContainerNode::findContainer(const QString &name, const QString &tagName,
|
||
|
const QList<QWidget *> *excludeList,
|
||
|
- KXMLGUIClient * /*currClient*/)
|
||
|
+ KisKXMLGUIClient * /*currClient*/)
|
||
|
{
|
||
|
ContainerNode *res = 0L;
|
||
|
ContainerNodeList::ConstIterator nIt = children.constBegin();
|
||
|
@@ -182,7 +182,7 @@ ContainerNode *ContainerNode::findContainer(const QString &name, const QString &
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
-ContainerClient *ContainerNode::findChildContainerClient(KXMLGUIClient *currentGUIClient,
|
||
|
+ContainerClient *ContainerNode::findChildContainerClient(KisKXMLGUIClient *currentGUIClient,
|
||
|
const QString &groupName,
|
||
|
const MergingIndexList::Iterator &mergingIdx)
|
||
|
{
|
||
|
@@ -403,7 +403,7 @@ void ContainerNode::unplugActions(BuildState &state)
|
||
|
QMutableListIterator<ContainerClient *> clientIt(clients);
|
||
|
|
||
|
/*
|
||
|
- Disabled because it means in KToolBar::saveState isHidden is always true then,
|
||
|
+ Disabled because it means in KisToolBar::saveState isHidden is always true then,
|
||
|
which is clearly wrong.
|
||
|
|
||
|
if ( clients.count() == 1 && clientIt.current()->client == client &&
|
||
|
@@ -437,7 +437,7 @@ void ContainerNode::unplugClient(ContainerClient *client)
|
||
|
builder->removeCustomElement(container, *custIt);
|
||
|
}
|
||
|
|
||
|
- KToolBar *bar = qobject_cast<KToolBar *>(container);
|
||
|
+ KisToolBar *bar = qobject_cast<KisToolBar *>(container);
|
||
|
if (bar) {
|
||
|
bar->removeXMLGUIClient(client->client);
|
||
|
}
|
||
|
@@ -785,7 +785,7 @@ void BuildHelper::processContainerElement(const QDomElement &e, const QString &t
|
||
|
|
||
|
QAction *containerAction;
|
||
|
|
||
|
- KXMLGUIBuilder *builder;
|
||
|
+ KisKXMLGUIBuilder *builder;
|
||
|
|
||
|
QWidget *container = createContainer(parentNode->container, idx, e, containerAction, &builder);
|
||
|
|
||
|
@@ -817,13 +817,13 @@ void BuildHelper::processContainerElement(const QDomElement &e, const QString &t
|
||
|
mergingName, group, cusTags, conTags);
|
||
|
} else {
|
||
|
if (tag == QStringLiteral("toolbar")) {
|
||
|
- KToolBar *bar = qobject_cast<KToolBar *>(containerNode->container);
|
||
|
+ KisToolBar *bar = qobject_cast<KisToolBar *>(containerNode->container);
|
||
|
if (bar) {
|
||
|
if (m_state.guiClient && !m_state.guiClient->xmlFile().isEmpty()) {
|
||
|
bar->addXMLGUIClient(m_state.guiClient);
|
||
|
}
|
||
|
} else {
|
||
|
- qWarning() << "toolbar container is not a KToolBar";
|
||
|
+ qWarning() << "toolbar container is not a KisToolBar";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
@@ -838,7 +838,7 @@ void BuildHelper::processContainerElement(const QDomElement &e, const QString &t
|
||
|
|
||
|
QWidget *BuildHelper::createContainer(QWidget *parent, int index,
|
||
|
const QDomElement &element, QAction *&containerAction,
|
||
|
- KXMLGUIBuilder **builder)
|
||
|
+ KisKXMLGUIBuilder **builder)
|
||
|
{
|
||
|
QWidget *res = 0L;
|
||
|
|
||
|
@@ -851,7 +851,7 @@ QWidget *BuildHelper::createContainer(QWidget *parent, int index,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
- KXMLGUIClient *oldClient = m_state.builder->builderClient();
|
||
|
+ KisKXMLGUIClient *oldClient = m_state.builder->builderClient();
|
||
|
|
||
|
m_state.builder->setBuilderClient(m_state.guiClient);
|
||
|
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguifactory_p.h b/libs/widgetutils/xmlgui/kxmlguifactory_p.h
|
||
|
index d43aab4084..9752fbae2b 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguifactory_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguifactory_p.h
|
||
|
@@ -13,10 +13,10 @@
|
||
|
#include <QAction>
|
||
|
|
||
|
class QWidget;
|
||
|
-class KXMLGUIClient;
|
||
|
-class KXMLGUIBuilder;
|
||
|
+class KisKXMLGUIClient;
|
||
|
+class KisKXMLGUIBuilder;
|
||
|
|
||
|
-namespace KXMLGUI
|
||
|
+namespace KisKXMLGUI
|
||
|
{
|
||
|
|
||
|
struct BuildState;
|
||
|
@@ -53,7 +53,7 @@ typedef QMap< QString, ActionList > ActionListMap;
|
||
|
* A ContainerClient always belongs to a ContainerNode.
|
||
|
*/
|
||
|
struct ContainerClient {
|
||
|
- KXMLGUIClient *client;
|
||
|
+ KisKXMLGUIClient *client;
|
||
|
ActionList actions;
|
||
|
QList<QAction *> customElements;
|
||
|
QString groupName; //is empty if no group client
|
||
|
@@ -93,8 +93,8 @@ typedef QList<MergingIndex> MergingIndexList;
|
||
|
*/
|
||
|
struct ContainerNode {
|
||
|
ContainerNode(QWidget *_container, const QString &_tagName, const QString &_name,
|
||
|
- ContainerNode *_parent = 0L, KXMLGUIClient *_client = 0L,
|
||
|
- KXMLGUIBuilder *_builder = 0L, QAction *containerAction = 0,
|
||
|
+ ContainerNode *_parent = 0L, KisKXMLGUIClient *_client = 0L,
|
||
|
+ KisKXMLGUIBuilder *_builder = 0L, QAction *containerAction = 0,
|
||
|
const QString &_mergingName = QString(),
|
||
|
const QString &groupName = QString(),
|
||
|
const QStringList &customTags = QStringList(),
|
||
|
@@ -102,8 +102,8 @@ struct ContainerNode {
|
||
|
~ContainerNode();
|
||
|
|
||
|
ContainerNode *parent;
|
||
|
- KXMLGUIClient *client;
|
||
|
- KXMLGUIBuilder *builder;
|
||
|
+ KisKXMLGUIClient *client;
|
||
|
+ KisKXMLGUIBuilder *builder;
|
||
|
QStringList builderCustomTags;
|
||
|
QStringList builderContainerTags;
|
||
|
QWidget *container;
|
||
|
@@ -136,9 +136,9 @@ struct ContainerNode {
|
||
|
ContainerNode *findContainer(const QString &_name, bool tag);
|
||
|
ContainerNode *findContainer(const QString &name, const QString &tagName,
|
||
|
const QList<QWidget *> *excludeList,
|
||
|
- KXMLGUIClient *currClient);
|
||
|
+ KisKXMLGUIClient *currClient);
|
||
|
|
||
|
- ContainerClient *findChildContainerClient(KXMLGUIClient *currentGUIClient,
|
||
|
+ ContainerClient *findChildContainerClient(KisKXMLGUIClient *currentGUIClient,
|
||
|
const QString &groupName,
|
||
|
const MergingIndexList::Iterator &mergingIdx);
|
||
|
|
||
|
@@ -190,7 +190,7 @@ private:
|
||
|
const QString &name);
|
||
|
|
||
|
QWidget *createContainer(QWidget *parent, int index, const QDomElement &element,
|
||
|
- QAction *&containerAction, KXMLGUIBuilder **builder);
|
||
|
+ QAction *&containerAction, KisKXMLGUIBuilder **builder);
|
||
|
|
||
|
int calcMergingIndex(const QDomElement &element, MergingIndexList::Iterator &it, QString &group);
|
||
|
|
||
|
@@ -218,16 +218,16 @@ struct BuildState {
|
||
|
QString actionListName;
|
||
|
ActionList actionList;
|
||
|
|
||
|
- KXMLGUIClient *guiClient;
|
||
|
+ KisKXMLGUIClient *guiClient;
|
||
|
|
||
|
MergingIndexList::Iterator currentDefaultMergingIt;
|
||
|
MergingIndexList::Iterator currentClientMergingIt;
|
||
|
|
||
|
- KXMLGUIBuilder *builder;
|
||
|
+ KisKXMLGUIBuilder *builder;
|
||
|
QStringList builderCustomTags;
|
||
|
QStringList builderContainerTags;
|
||
|
|
||
|
- KXMLGUIBuilder *clientBuilder;
|
||
|
+ KisKXMLGUIBuilder *clientBuilder;
|
||
|
QStringList clientBuilderCustomTags;
|
||
|
QStringList clientBuilderContainerTags;
|
||
|
};
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguiversionhandler.cpp b/libs/widgetutils/xmlgui/kxmlguiversionhandler.cpp
|
||
|
index 6f40a95d0e..0597831650 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguiversionhandler.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguiversionhandler.cpp
|
||
|
@@ -237,7 +237,7 @@ KXmlGuiVersionHandler::KXmlGuiVersionHandler(const QStringList &files)
|
||
|
if (files.count() == 1) {
|
||
|
// No need to parse version numbers if there's only one file anyway
|
||
|
m_file = files.first();
|
||
|
- m_doc = KXMLGUIFactory::readConfigFile(m_file);
|
||
|
+ m_doc = KisKXMLGUIFactory::readConfigFile(m_file);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
@@ -246,7 +246,7 @@ KXmlGuiVersionHandler::KXmlGuiVersionHandler(const QStringList &files)
|
||
|
Q_FOREACH (const QString &file, files) {
|
||
|
DocStruct d;
|
||
|
d.file = file;
|
||
|
- d.data = KXMLGUIFactory::readConfigFile(file);
|
||
|
+ d.data = KisKXMLGUIFactory::readConfigFile(file);
|
||
|
allDocuments.append(d);
|
||
|
}
|
||
|
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguiversionhandler_p.h b/libs/widgetutils/xmlgui/kxmlguiversionhandler_p.h
|
||
|
index 537d1b996c..c039f7a5cb 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguiversionhandler_p.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguiversionhandler_p.h
|
||
|
@@ -6,14 +6,14 @@
|
||
|
SPDX-License-Identifier: LGPL-2.0-or-later
|
||
|
*/
|
||
|
|
||
|
-#ifndef KXMLGUIVERSIONHANDLER_P_H
|
||
|
-#define KXMLGUIVERSIONHANDLER_P_H
|
||
|
+#ifndef KisKXMLGUIVERSIONHANDLER_P_H
|
||
|
+#define KisKXMLGUIVERSIONHANDLER_P_H
|
||
|
|
||
|
#include <QStringList>
|
||
|
|
||
|
/**
|
||
|
* @internal
|
||
|
- * Helper class for KXMLGUIClient::setXMLFile
|
||
|
+ * Helper class for KisKXMLGUIClient::setXMLFile
|
||
|
* Finds the xml file with the largest version number and takes
|
||
|
* care of keeping user settings (from the most local file)
|
||
|
* like action shortcuts or toolbar customizations.
|
||
|
@@ -43,4 +43,4 @@ private:
|
||
|
QString m_doc;
|
||
|
};
|
||
|
|
||
|
-#endif /* KXMLGUIVERSIONHANDLER_P_H */
|
||
|
+#endif /* KisKXMLGUIVERSIONHANDLER_P_H */
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguiwindow.cpp b/libs/widgetutils/xmlgui/kxmlguiwindow.cpp
|
||
|
index ac0c043a4d..1764b4b42f 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguiwindow.cpp
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguiwindow.cpp
|
||
|
@@ -51,13 +51,13 @@
|
||
|
#include <stdlib.h>
|
||
|
#include <ctype.h>
|
||
|
|
||
|
-class KXmlGuiWindowPrivate : public KMainWindowPrivate
|
||
|
+class KXmlGuiWindowPrivate : public KisKMainWindowPrivate
|
||
|
{
|
||
|
public:
|
||
|
void _k_slotFactoryMakingChanges(bool b)
|
||
|
{
|
||
|
// While the GUI factory is adding/removing clients,
|
||
|
- // don't let KMainWindow think those are changes made by the user
|
||
|
+ // don't let KisKMainWindow think those are changes made by the user
|
||
|
// #105525
|
||
|
letDirtySettings = !b;
|
||
|
}
|
||
|
@@ -67,12 +67,12 @@ public:
|
||
|
|
||
|
KDEPrivate::ToolBarHandler *toolBarHandler;
|
||
|
KToggleAction *showStatusBarAction;
|
||
|
- QPointer<KEditToolBar> toolBarEditor;
|
||
|
- KXMLGUIFactory *factory;
|
||
|
+ QPointer<KisKEditToolBar> toolBarEditor;
|
||
|
+ KisKXMLGUIFactory *factory;
|
||
|
};
|
||
|
|
||
|
KXmlGuiWindow::KXmlGuiWindow(QWidget *parent, Qt::WindowFlags f)
|
||
|
- : KMainWindow(*new KXmlGuiWindowPrivate, parent, f), KXMLGUIBuilder(this)
|
||
|
+ : KisKMainWindow(*new KXmlGuiWindowPrivate, parent, f), KisKXMLGUIBuilder(this)
|
||
|
{
|
||
|
K_D(KXmlGuiWindow);
|
||
|
d->showHelpMenu = true;
|
||
|
@@ -80,7 +80,7 @@ KXmlGuiWindow::KXmlGuiWindow(QWidget *parent, Qt::WindowFlags f)
|
||
|
d->showStatusBarAction = 0;
|
||
|
d->factory = 0;
|
||
|
#ifdef HAVE_DBUS
|
||
|
- new KMainWindowInterface(this);
|
||
|
+ new KisKMainWindowInterface(this);
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
@@ -110,7 +110,7 @@ KXmlGuiWindow::~KXmlGuiWindow()
|
||
|
|
||
|
bool KXmlGuiWindow::event(QEvent *ev)
|
||
|
{
|
||
|
- bool ret = KMainWindow::event(ev);
|
||
|
+ bool ret = KisKMainWindow::event(ev);
|
||
|
#ifdef HAVE_DBUS
|
||
|
if (ev->type() == QEvent::Polish) {
|
||
|
QDBusConnection::sessionBus().registerObject(dbusName() + QStringLiteral("/actions"), actionCollection(),
|
||
|
@@ -136,11 +136,11 @@ bool KXmlGuiWindow::isHelpMenuEnabled() const
|
||
|
return d->showHelpMenu;
|
||
|
}
|
||
|
|
||
|
-KXMLGUIFactory *KXmlGuiWindow::guiFactory()
|
||
|
+KisKXMLGUIFactory *KXmlGuiWindow::guiFactory()
|
||
|
{
|
||
|
K_D(KXmlGuiWindow);
|
||
|
if (!d->factory) {
|
||
|
- d->factory = new KXMLGUIFactory(this, this);
|
||
|
+ d->factory = new KisKXMLGUIFactory(this, this);
|
||
|
connect(d->factory, SIGNAL(makingChanges(bool)),
|
||
|
this, SLOT(_k_slotFactoryMakingChanges(bool)));
|
||
|
}
|
||
|
@@ -153,7 +153,7 @@ void KXmlGuiWindow::configureToolbars()
|
||
|
KConfigGroup cg(KSharedConfig::openConfig(), "");
|
||
|
saveMainWindowSettings(cg);
|
||
|
if (!d->toolBarEditor) {
|
||
|
- d->toolBarEditor = new KEditToolBar(guiFactory(), this);
|
||
|
+ d->toolBarEditor = new KisKEditToolBar(guiFactory(), this);
|
||
|
d->toolBarEditor->setAttribute(Qt::WA_DeleteOnClose);
|
||
|
connect(d->toolBarEditor, SIGNAL(newToolBarConfig()), SLOT(saveNewToolbarConfig()));
|
||
|
}
|
||
|
@@ -235,15 +235,15 @@ void KXmlGuiWindow::createGUI(const QString &xmlfile)
|
||
|
if (d->showHelpMenu) {
|
||
|
delete d->helpMenu;
|
||
|
// we always want a help menu
|
||
|
- d->helpMenu = new KHelpMenu(this, KAboutData::applicationData(), true);
|
||
|
+ d->helpMenu = new KisKHelpMenu(this, KAboutData::applicationData(), true);
|
||
|
|
||
|
- KActionCollection *actions = actionCollection();
|
||
|
- QAction *helpContentsAction = d->helpMenu->action(KHelpMenu::menuHelpContents);
|
||
|
- QAction *whatsThisAction = d->helpMenu->action(KHelpMenu::menuWhatsThis);
|
||
|
- QAction *reportBugAction = d->helpMenu->action(KHelpMenu::menuReportBug);
|
||
|
- QAction *switchLanguageAction = d->helpMenu->action(KHelpMenu::menuSwitchLanguage);
|
||
|
- QAction *aboutAppAction = d->helpMenu->action(KHelpMenu::menuAboutApp);
|
||
|
- QAction *aboutKdeAction = d->helpMenu->action(KHelpMenu::menuAboutKDE);
|
||
|
+ KisKActionCollection *actions = actionCollection();
|
||
|
+ QAction *helpContentsAction = d->helpMenu->action(KisKHelpMenu::menuHelpContents);
|
||
|
+ QAction *whatsThisAction = d->helpMenu->action(KisKHelpMenu::menuWhatsThis);
|
||
|
+ QAction *reportBugAction = d->helpMenu->action(KisKHelpMenu::menuReportBug);
|
||
|
+ QAction *switchLanguageAction = d->helpMenu->action(KisKHelpMenu::menuSwitchLanguage);
|
||
|
+ QAction *aboutAppAction = d->helpMenu->action(KisKHelpMenu::menuAboutApp);
|
||
|
+ QAction *aboutKdeAction = d->helpMenu->action(KisKHelpMenu::menuAboutKDE);
|
||
|
|
||
|
if (helpContentsAction) {
|
||
|
actions->addAction(helpContentsAction->objectName(), helpContentsAction);
|
||
|
@@ -292,14 +292,14 @@ void KXmlGuiWindow::createGUI(const QString &xmlfile)
|
||
|
|
||
|
void KXmlGuiWindow::slotStateChanged(const QString &newstate)
|
||
|
{
|
||
|
- stateChanged(newstate, KXMLGUIClient::StateNoReverse);
|
||
|
+ stateChanged(newstate, KisKXMLGUIClient::StateNoReverse);
|
||
|
}
|
||
|
|
||
|
void KXmlGuiWindow::slotStateChanged(const QString &newstate,
|
||
|
bool reverse)
|
||
|
{
|
||
|
stateChanged(newstate,
|
||
|
- reverse ? KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse);
|
||
|
+ reverse ? KisKXMLGUIClient::StateReverse : KisKXMLGUIClient::StateNoReverse);
|
||
|
}
|
||
|
|
||
|
void KXmlGuiWindow::setStandardToolBarMenuEnabled(bool enable)
|
||
|
@@ -366,18 +366,18 @@ void KXmlGuiWindow::finalizeGUI(bool /*force*/)
|
||
|
void KXmlGuiWindow::applyMainWindowSettings(const KConfigGroup &config)
|
||
|
{
|
||
|
K_D(KXmlGuiWindow);
|
||
|
- KMainWindow::applyMainWindowSettings(config);
|
||
|
+ KisKMainWindow::applyMainWindowSettings(config);
|
||
|
QStatusBar *sb = findChild<QStatusBar *>();
|
||
|
if (sb && d->showStatusBarAction) {
|
||
|
d->showStatusBarAction->setChecked(!sb->isHidden());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-// KDE5 TODO: change it to "using KXMLGUIBuilder::finalizeGUI;" in the header
|
||
|
+// KDE5 TODO: change it to "using KisKXMLGUIBuilder::finalizeGUI;" in the header
|
||
|
// and remove the reimplementation
|
||
|
-void KXmlGuiWindow::finalizeGUI(KXMLGUIClient *client)
|
||
|
+void KXmlGuiWindow::finalizeGUI(KisKXMLGUIClient *client)
|
||
|
{
|
||
|
- KXMLGUIBuilder::finalizeGUI(client);
|
||
|
+ KisKXMLGUIBuilder::finalizeGUI(client);
|
||
|
}
|
||
|
|
||
|
#include "moc_kxmlguiwindow.cpp"
|
||
|
diff --git a/libs/widgetutils/xmlgui/kxmlguiwindow.h b/libs/widgetutils/xmlgui/kxmlguiwindow.h
|
||
|
index fee8085049..6490f325bc 100644
|
||
|
--- a/libs/widgetutils/xmlgui/kxmlguiwindow.h
|
||
|
+++ b/libs/widgetutils/xmlgui/kxmlguiwindow.h
|
||
|
@@ -13,8 +13,8 @@
|
||
|
|
||
|
*/
|
||
|
|
||
|
-#ifndef KXMLGUIWINDOW_H
|
||
|
-#define KXMLGUIWINDOW_H
|
||
|
+#ifndef KisKXMLGUIWINDOW_H
|
||
|
+#define KisKXMLGUIWINDOW_H
|
||
|
|
||
|
#include "kxmlguiclient.h"
|
||
|
#include "kxmlguibuilder.h"
|
||
|
@@ -22,28 +22,28 @@
|
||
|
#include <QMetaClassInfo>
|
||
|
|
||
|
class KMenu;
|
||
|
-class KXMLGUIFactory;
|
||
|
+class KisKXMLGUIFactory;
|
||
|
class KConfig;
|
||
|
class KConfigGroup;
|
||
|
-class KToolBar;
|
||
|
+class KisToolBar;
|
||
|
class KXmlGuiWindowPrivate;
|
||
|
|
||
|
/**
|
||
|
* @short %KDE top level main window with predefined action layout
|
||
|
*
|
||
|
- * Instead of creating a KMainWindow manually and assigning menus, menu entries,
|
||
|
+ * Instead of creating a KisKMainWindow manually and assigning menus, menu entries,
|
||
|
* toolbar buttons and actions to it by hand, this class can be used to load an
|
||
|
* rc file to manage the main window's actions.
|
||
|
*
|
||
|
* See http://techbase.kde.org/Development/Tutorials/Using_KActions#XMLGUI
|
||
|
* for essential information on the XML file format and usage of this class.
|
||
|
*
|
||
|
- * @see KMainWindow
|
||
|
+ * @see KisKMainWindow
|
||
|
* @author Reginald Stadlbauer (reggie@kde.org) Stephan Kulow (coolo@kde.org), Matthias Ettrich (ettrich@kde.org), Chris Schlaeger (cs@kde.org), Sven Radej (radej@kde.org). Maintained by Sven Radej (radej@kde.org)
|
||
|
|
||
|
*/
|
||
|
|
||
|
-class KRITAWIDGETUTILS_EXPORT KXmlGuiWindow : public KMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient
|
||
|
+class KRITAWIDGETUTILS_EXPORT KXmlGuiWindow : public KisKMainWindow, public KisKXMLGUIBuilder, virtual public KisKXMLGUIClient
|
||
|
{
|
||
|
XMLGUI_DECLARE_PRIVATE(KXmlGuiWindow)
|
||
|
Q_OBJECT
|
||
|
@@ -58,7 +58,7 @@ public:
|
||
|
* Construct a main window.
|
||
|
*
|
||
|
* @param parent The widget parent. This is usually 0 but it may also be the window
|
||
|
- * group leader. In that case, the KMainWindow becomes sort of a
|
||
|
+ * group leader. In that case, the KisKMainWindow becomes sort of a
|
||
|
* secondary window.
|
||
|
*
|
||
|
* @param f Specify the widget flags. The default is
|
||
|
@@ -70,18 +70,18 @@ public:
|
||
|
*
|
||
|
* @see http://doc.trolltech.com/qt.html#WindowType-enum
|
||
|
*
|
||
|
- * KMainWindows must be created on the heap with 'new', like:
|
||
|
+ * KisKMainWindows must be created on the heap with 'new', like:
|
||
|
* \code
|
||
|
- * KMainWindow *kmw = new KMainWindow(...);
|
||
|
+ * KisKMainWindow *kmw = new KisKMainWindow(...);
|
||
|
* kmw->setObjectName(...);
|
||
|
* \endcode
|
||
|
*
|
||
|
* IMPORTANT: For session management and window management to work
|
||
|
* properly, all main windows in the application should have a
|
||
|
- * different name. If you don't do it, KMainWindow will create
|
||
|
+ * different name. If you don't do it, KisKMainWindow will create
|
||
|
* a unique name, but it's recommended to explicitly pass a window name that will
|
||
|
* also describe the type of the window. If there can be several windows of the same
|
||
|
- * type, append '#' (hash) to the name, and KMainWindow will replace it with numbers to make
|
||
|
+ * type, append '#' (hash) to the name, and KisKMainWindow will replace it with numbers to make
|
||
|
* the names unique. For example, for a mail client which has one main window showing
|
||
|
* the mails and folders, and which can also have one or more windows for composing
|
||
|
* mails, the name for the folders window should be e.g. "mainwindow" and
|
||
|
@@ -111,7 +111,7 @@ public:
|
||
|
*/
|
||
|
bool isHelpMenuEnabled() const;
|
||
|
|
||
|
- virtual KXMLGUIFactory *guiFactory();
|
||
|
+ virtual KisKXMLGUIFactory *guiFactory();
|
||
|
|
||
|
/**
|
||
|
* Create a GUI given a local XML file. In a regular app you usually want to use
|
||
|
@@ -129,7 +129,7 @@ public:
|
||
|
void createGUI(const QString &xmlfile = QString());
|
||
|
|
||
|
/**
|
||
|
- * Sets whether KMainWindow should provide a menu that allows showing/hiding
|
||
|
+ * Sets whether KisKMainWindow should provide a menu that allows showing/hiding
|
||
|
* the available toolbars ( using KToggleToolBarAction ) . In case there
|
||
|
* is only one toolbar configured a simple 'Show \<toolbar name here\>' menu item
|
||
|
* is shown.
|
||
|
@@ -148,7 +148,7 @@ public:
|
||
|
bool isStandardToolBarMenuEnabled() const;
|
||
|
|
||
|
/**
|
||
|
- * Sets whether KMainWindow should provide a menu that allows showing/hiding
|
||
|
+ * Sets whether KisKMainWindow should provide a menu that allows showing/hiding
|
||
|
* of the statusbar ( using KToggleStatusBarAction ).
|
||
|
*
|
||
|
* The menu / menu item is implemented using xmlgui. It will be inserted
|
||
|
@@ -158,13 +158,13 @@ public:
|
||
|
* ( or similar ).
|
||
|
*
|
||
|
* If an application maintains the action on its own (i.e. never calls
|
||
|
- * this function) a connection needs to be made to let KMainWindow
|
||
|
+ * this function) a connection needs to be made to let KisKMainWindow
|
||
|
* know when that status (hidden/shown) of the statusbar has changed.
|
||
|
* For example:
|
||
|
* connect(action, SIGNAL(activated()),
|
||
|
* kmainwindow, SLOT(setSettingsDirty()));
|
||
|
* Otherwise the status (hidden/show) of the statusbar might not be saved
|
||
|
- * by KMainWindow.
|
||
|
+ * by KisKMainWindow.
|
||
|
*/
|
||
|
void createStandardStatusBarAction();
|
||
|
|
||
|
@@ -265,12 +265,12 @@ public:
|
||
|
QAction *toolBarMenuAction();
|
||
|
|
||
|
/**
|
||
|
- * @internal for KToolBar
|
||
|
+ * @internal for KisToolBar
|
||
|
*/
|
||
|
void setupToolbarMenuActions();
|
||
|
|
||
|
- // KDE5 TODO: change it to "using KXMLGUIBuilder::finalizeGUI;"
|
||
|
- void finalizeGUI(KXMLGUIClient *client) override;
|
||
|
+ // KDE5 TODO: change it to "using KisKXMLGUIBuilder::finalizeGUI;"
|
||
|
+ void finalizeGUI(KisKXMLGUIClient *client) override;
|
||
|
|
||
|
/**
|
||
|
* @internal
|
||
|
@@ -320,7 +320,7 @@ protected:
|
||
|
|
||
|
protected Q_SLOTS:
|
||
|
/**
|
||
|
- * Rebuilds the GUI after KEditToolbar changed the toolbar layout.
|
||
|
+ * Rebuilds the GUI after KisKEditToolbar changed the toolbar layout.
|
||
|
* @see configureToolbars()
|
||
|
*/
|
||
|
virtual void saveNewToolbarConfig();
|
||
|
diff --git a/plugins/dockers/advancedcolorselector/kis_color_selector_container.cpp b/plugins/dockers/advancedcolorselector/kis_color_selector_container.cpp
|
||
|
index 319ff79dd2..dbbea7acd4 100644
|
||
|
--- a/plugins/dockers/advancedcolorselector/kis_color_selector_container.cpp
|
||
|
+++ b/plugins/dockers/advancedcolorselector/kis_color_selector_container.cpp
|
||
|
@@ -116,7 +116,7 @@ void KisColorSelectorContainer::setCanvas(KisCanvas2* canvas)
|
||
|
if (m_canvas) {
|
||
|
m_canvas->disconnectCanvasObserver(this);
|
||
|
m_canvas->viewManager()->nodeManager()->disconnect(this);
|
||
|
- KActionCollection *ac = m_canvas->viewManager()->actionCollection();
|
||
|
+ KisKActionCollection *ac = m_canvas->viewManager()->actionCollection();
|
||
|
ac->takeAction(ac->action("show_color_selector"));
|
||
|
ac->takeAction(ac->action("show_mypaint_shade_selector"));
|
||
|
ac->takeAction(ac->action("show_minimal_shade_selector"));
|
||
|
@@ -148,7 +148,7 @@ void KisColorSelectorContainer::setCanvas(KisCanvas2* canvas)
|
||
|
|
||
|
m_gamutMaskToolbar->connectMaskSignals(m_canvas->viewManager()->canvasResourceProvider());
|
||
|
|
||
|
- KActionCollection* actionCollection = canvas->viewManager()->actionCollection();
|
||
|
+ KisKActionCollection* actionCollection = canvas->viewManager()->actionCollection();
|
||
|
actionCollection->addAction("show_color_selector", m_colorSelAction);
|
||
|
actionCollection->addAction("show_mypaint_shade_selector", m_mypaintAction);
|
||
|
actionCollection->addAction("show_minimal_shade_selector", m_minimalAction);
|
||
|
diff --git a/plugins/dockers/advancedcolorselector/kis_color_selector_ng_docker_widget.cpp b/plugins/dockers/advancedcolorselector/kis_color_selector_ng_docker_widget.cpp
|
||
|
index 9c3aeea545..c327fbc7ed 100644
|
||
|
--- a/plugins/dockers/advancedcolorselector/kis_color_selector_ng_docker_widget.cpp
|
||
|
+++ b/plugins/dockers/advancedcolorselector/kis_color_selector_ng_docker_widget.cpp
|
||
|
@@ -141,7 +141,7 @@ void KisColorSelectorNgDockerWidget::setCanvas(KisCanvas2 *canvas)
|
||
|
{
|
||
|
if (m_canvas) {
|
||
|
m_canvas->disconnect(this);
|
||
|
- KActionCollection *ac = m_canvas->viewManager()->actionCollection();
|
||
|
+ KisKActionCollection *ac = m_canvas->viewManager()->actionCollection();
|
||
|
ac->takeAction(ac->action("show_color_history"));
|
||
|
ac->takeAction(ac->action("show_common_colors"));
|
||
|
}
|
||
|
@@ -153,7 +153,7 @@ void KisColorSelectorNgDockerWidget::setCanvas(KisCanvas2 *canvas)
|
||
|
m_colorSelectorContainer->setCanvas(canvas);
|
||
|
|
||
|
if (m_canvas && m_canvas->viewManager()) {
|
||
|
- KActionCollection* actionCollection = canvas->viewManager()->actionCollection();
|
||
|
+ KisKActionCollection* actionCollection = canvas->viewManager()->actionCollection();
|
||
|
|
||
|
actionCollection->addAction("show_color_history", m_colorHistoryAction);
|
||
|
actionCollection->addAction("show_common_colors", m_commonColorsAction);
|
||
|
diff --git a/plugins/dockers/arrangedocker/arrange_docker_widget.cpp b/plugins/dockers/arrangedocker/arrange_docker_widget.cpp
|
||
|
index 018fa3c301..caf8546841 100644
|
||
|
--- a/plugins/dockers/arrangedocker/arrange_docker_widget.cpp
|
||
|
+++ b/plugins/dockers/arrangedocker/arrange_docker_widget.cpp
|
||
|
@@ -42,7 +42,7 @@ void replaceAction(QToolButton *button, QAction *newAction)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-void ArrangeDockerWidget::setActionCollection(KActionCollection *collection)
|
||
|
+void ArrangeDockerWidget::setActionCollection(KisKActionCollection *collection)
|
||
|
{
|
||
|
const bool enabled = collection->action("object_order_front");
|
||
|
|
||
|
diff --git a/plugins/dockers/arrangedocker/arrange_docker_widget.h b/plugins/dockers/arrangedocker/arrange_docker_widget.h
|
||
|
index 493aa68bf7..4946cd945d 100644
|
||
|
--- a/plugins/dockers/arrangedocker/arrange_docker_widget.h
|
||
|
+++ b/plugins/dockers/arrangedocker/arrange_docker_widget.h
|
||
|
@@ -25,7 +25,7 @@ public:
|
||
|
explicit ArrangeDockerWidget(QWidget *parent = 0);
|
||
|
~ArrangeDockerWidget() override;
|
||
|
|
||
|
- void setActionCollection(KActionCollection *collection);
|
||
|
+ void setActionCollection(KisKActionCollection *collection);
|
||
|
void switchState(bool enabled);
|
||
|
|
||
|
private:
|
||
|
diff --git a/plugins/dockers/arrangedocker/arrangedocker_dock.cpp b/plugins/dockers/arrangedocker/arrangedocker_dock.cpp
|
||
|
index 183c86e954..0308b32506 100644
|
||
|
--- a/plugins/dockers/arrangedocker/arrangedocker_dock.cpp
|
||
|
+++ b/plugins/dockers/arrangedocker/arrangedocker_dock.cpp
|
||
|
@@ -67,7 +67,7 @@ void ArrangeDockerDock::unsetCanvas()
|
||
|
|
||
|
void ArrangeDockerDock::slotToolChanged()
|
||
|
{
|
||
|
- KActionCollection *collection = m_canvas->viewManager()->actionCollection();
|
||
|
+ KisKActionCollection *collection = m_canvas->viewManager()->actionCollection();
|
||
|
m_configWidget->setActionCollection(collection);
|
||
|
}
|
||
|
|
||
|
diff --git a/plugins/dockers/recorder/recorderdocker_dock.cpp b/plugins/dockers/recorder/recorderdocker_dock.cpp
|
||
|
index 3064190532..f7143e98a6 100644
|
||
|
--- a/plugins/dockers/recorder/recorderdocker_dock.cpp
|
||
|
+++ b/plugins/dockers/recorder/recorderdocker_dock.cpp
|
||
|
@@ -313,7 +313,7 @@ void RecorderDockerDock::unsetCanvas()
|
||
|
|
||
|
void RecorderDockerDock::onMainWindowIsBeingCreated(KisMainWindow *window)
|
||
|
{
|
||
|
- KActionCollection *actionCollection = window->viewManager()->actionCollection();
|
||
|
+ KisKActionCollection *actionCollection = window->viewManager()->actionCollection();
|
||
|
actionCollection->addAction(keyActionRecordToggle, d->recordToggleAction);
|
||
|
actionCollection->addAction(keyActionExport, d->exportAction);
|
||
|
}
|
||
|
diff --git a/plugins/dockers/tasksetdocker/tasksetdocker_dock.cpp b/plugins/dockers/tasksetdocker/tasksetdocker_dock.cpp
|
||
|
index 742d91d4d7..15df0545e5 100644
|
||
|
--- a/plugins/dockers/tasksetdocker/tasksetdocker_dock.cpp
|
||
|
+++ b/plugins/dockers/tasksetdocker/tasksetdocker_dock.cpp
|
||
|
@@ -128,7 +128,7 @@ void TasksetDockerDock::setCanvas(KoCanvasBase * canvas)
|
||
|
{
|
||
|
if (m_canvas && m_canvas->viewManager()) {
|
||
|
m_canvas->viewManager()->actionCollection()->disconnect(this);
|
||
|
- Q_FOREACH (KXMLGUIClient* client, m_canvas->viewManager()->mainWindow()->childClients()) {
|
||
|
+ Q_FOREACH (KisKXMLGUIClient* client, m_canvas->viewManager()->mainWindow()->childClients()) {
|
||
|
client->actionCollection()->disconnect(this);
|
||
|
}
|
||
|
}
|
||
|
@@ -166,7 +166,7 @@ void TasksetDockerDock::recordClicked()
|
||
|
KisViewManager* view = m_canvas->viewManager();
|
||
|
connect(view->actionCollection(), SIGNAL(actionTriggered(QAction*)),
|
||
|
this, SLOT(actionTriggered(QAction*)), Qt::UniqueConnection);
|
||
|
- Q_FOREACH (KXMLGUIClient* client, view->mainWindow()->childClients()) {
|
||
|
+ Q_FOREACH (KisKXMLGUIClient* client, view->mainWindow()->childClients()) {
|
||
|
connect(client->actionCollection(), SIGNAL(actionTriggered(QAction*)),
|
||
|
this, SLOT(actionTriggered(QAction*)), Qt::UniqueConnection);
|
||
|
}
|
||
|
diff --git a/plugins/extensions/spensettings/KisSPenSettings.cpp b/plugins/extensions/spensettings/KisSPenSettings.cpp
|
||
|
index 93d8c20b1b..d60fc5ecbb 100644
|
||
|
--- a/plugins/extensions/spensettings/KisSPenSettings.cpp
|
||
|
+++ b/plugins/extensions/spensettings/KisSPenSettings.cpp
|
||
|
@@ -34,13 +34,13 @@ KisSPenSettings::KisSPenSettings(QWidget *parent)
|
||
|
// Thanks to the KisActionSnapshot, we can list all actions even when no document is open
|
||
|
QScopedPointer<KisActionsSnapshot> actionsSnapshot(new KisActionsSnapshot());
|
||
|
|
||
|
- KActionCollection *actionCollection = KisPart::instance()->currentMainwindow()->actionCollection();
|
||
|
+ KisKActionCollection *actionCollection = KisPart::instance()->currentMainwindow()->actionCollection();
|
||
|
for (QAction *action: actionCollection->actions()) {
|
||
|
actionsSnapshot->addAction(action->objectName(), action);
|
||
|
}
|
||
|
|
||
|
- QMap<QString, KActionCollection*> sortedCollections = actionsSnapshot->actionCollections();
|
||
|
- for (KActionCollection* collection: sortedCollections) {
|
||
|
+ QMap<QString, KisKActionCollection*> sortedCollections = actionsSnapshot->actionCollections();
|
||
|
+ for (KisKActionCollection* collection: sortedCollections) {
|
||
|
for (QAction* action: collection->actions()) {
|
||
|
QString actionName = KLocalizedString::removeAcceleratorMarker(action->text());
|
||
|
QStandardItem* item = new QStandardItem(action->icon(), actionName);
|
||
|
diff --git a/plugins/extensions/spensettings/SPenSettings.cpp b/plugins/extensions/spensettings/SPenSettings.cpp
|
||
|
index c1e3def142..88da79442c 100644
|
||
|
--- a/plugins/extensions/spensettings/SPenSettings.cpp
|
||
|
+++ b/plugins/extensions/spensettings/SPenSettings.cpp
|
||
|
@@ -76,7 +76,7 @@ void SPenSettings::slotActivateAction(SPenSettings::Action gestureType)
|
||
|
// qDebug() << "Gesture " << gestureType << " action " << actionName;
|
||
|
|
||
|
if (!actionName.isEmpty()) {
|
||
|
- KActionCollection* actionCollection = KisPart::instance()->currentMainwindow()->actionCollection();
|
||
|
+ KisKActionCollection* actionCollection = KisPart::instance()->currentMainwindow()->actionCollection();
|
||
|
QAction* action = actionCollection->action(actionName);
|
||
|
if (action) {
|
||
|
// qDebug() << "triggering action " << actionName;
|
||
|
diff --git a/plugins/tools/basictools/kis_tool_brush.h b/plugins/tools/basictools/kis_tool_brush.h
|
||
|
index b75969088e..6bbc09f39e 100644
|
||
|
--- a/plugins/tools/basictools/kis_tool_brush.h
|
||
|
+++ b/plugins/tools/basictools/kis_tool_brush.h
|
||
|
@@ -25,7 +25,7 @@ class QCheckBox;
|
||
|
class QComboBox;
|
||
|
class QLabel;
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
|
||
|
class KoCanvasBase;
|
||
|
class KisSliderSpinBox;
|
||
|
diff --git a/plugins/tools/svgtexttool/SvgTextEditor.cpp b/plugins/tools/svgtexttool/SvgTextEditor.cpp
|
||
|
index 0e9e6d2474..b398e84ea7 100644
|
||
|
--- a/plugins/tools/svgtexttool/SvgTextEditor.cpp
|
||
|
+++ b/plugins/tools/svgtexttool/SvgTextEditor.cpp
|
||
|
@@ -97,7 +97,7 @@ public:
|
||
|
// horizontal alignment - it seems to work without saving
|
||
|
// line height - it seems to work without saving
|
||
|
|
||
|
- void saveFromWidgets(KActionCollection* actions)
|
||
|
+ void saveFromWidgets(KisKActionCollection* actions)
|
||
|
{
|
||
|
|
||
|
FontSizeAction *fontSizeAction = qobject_cast<FontSizeAction*>(actions->action("svg_font_size"));
|
||
|
@@ -123,7 +123,7 @@ public:
|
||
|
saveBoolActionFromWidget(actions, "svg_font_kerning", kerning);
|
||
|
}
|
||
|
|
||
|
- void setSavedToWidgets(KActionCollection* actions)
|
||
|
+ void setSavedToWidgets(KisKActionCollection* actions)
|
||
|
{
|
||
|
|
||
|
FontSizeAction *fontSizeAction = qobject_cast<FontSizeAction*>(actions->action("svg_font_size"));
|
||
|
@@ -205,7 +205,7 @@ public:
|
||
|
}
|
||
|
|
||
|
|
||
|
- void setSavedLineDecorationToWidgets(KActionCollection* actions)
|
||
|
+ void setSavedLineDecorationToWidgets(KisKActionCollection* actions)
|
||
|
{
|
||
|
setBoolActionToWidget(actions, "svg_format_underline", underline);
|
||
|
setBoolActionToWidget(actions, "svg_format_strike_through", strikeThrough);
|
||
|
@@ -213,14 +213,14 @@ public:
|
||
|
|
||
|
private:
|
||
|
|
||
|
- void saveBoolActionFromWidget(KActionCollection* actions, QString actionName, bool &variable)
|
||
|
+ void saveBoolActionFromWidget(KisKActionCollection* actions, QString actionName, bool &variable)
|
||
|
{
|
||
|
QAction *boolAction = actions->action(actionName);
|
||
|
KIS_ASSERT_RECOVER_RETURN(boolAction);
|
||
|
variable = boolAction->isChecked();
|
||
|
}
|
||
|
|
||
|
- void setBoolActionToWidget(KActionCollection* actions, QString actionName, bool variable)
|
||
|
+ void setBoolActionToWidget(KisKActionCollection* actions, QString actionName, bool variable)
|
||
|
{
|
||
|
QAction *boolAction = actions->action(actionName);
|
||
|
KIS_ASSERT_RECOVER_RETURN(boolAction);
|
||
|
@@ -308,7 +308,7 @@ SvgTextEditor::SvgTextEditor(QWidget *parent, Qt::WindowFlags flags)
|
||
|
// Create and plug toolbar list for Settings menu
|
||
|
QList<QAction *> toolbarList;
|
||
|
Q_FOREACH (QWidget* it, guiFactory()->containers("ToolBar")) {
|
||
|
- KToolBar * toolBar = ::qobject_cast<KToolBar *>(it);
|
||
|
+ KisToolBar * toolBar = ::qobject_cast<KisToolBar *>(it);
|
||
|
if (toolBar) {
|
||
|
toolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||
|
KToggleAction* act = new KToggleAction(i18n("Show %1 Toolbar", toolBar->windowTitle()), this);
|
||
|
diff --git a/plugins/tools/tool_lazybrush/kis_tool_lazy_brush.h b/plugins/tools/tool_lazybrush/kis_tool_lazy_brush.h
|
||
|
index 6d7cd20307..3a53aab423 100644
|
||
|
--- a/plugins/tools/tool_lazybrush/kis_tool_lazy_brush.h
|
||
|
+++ b/plugins/tools/tool_lazybrush/kis_tool_lazy_brush.h
|
||
|
@@ -20,7 +20,7 @@
|
||
|
#include <kconfiggroup.h>
|
||
|
#include <KoIcon.h>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class KoCanvasBase;
|
||
|
|
||
|
class KisToolLazyBrush : public KisToolFreehand
|
||
|
diff --git a/plugins/tools/tool_smart_patch/kis_tool_smart_patch.h b/plugins/tools/tool_smart_patch/kis_tool_smart_patch.h
|
||
|
index fe561240c1..8c11d3386d 100644
|
||
|
--- a/plugins/tools/tool_smart_patch/kis_tool_smart_patch.h
|
||
|
+++ b/plugins/tools/tool_smart_patch/kis_tool_smart_patch.h
|
||
|
@@ -22,7 +22,7 @@
|
||
|
#include <kconfiggroup.h>
|
||
|
#include <KoIcon.h>
|
||
|
|
||
|
-class KActionCollection;
|
||
|
+class KisKActionCollection;
|
||
|
class KoCanvasBase;
|
||
|
class KisPaintInformation;
|
||
|
class KisSpacingInfomation;
|