scripting: Move old ClientModel in V2 namespace

This commit is contained in:
Vlad Zahorodnii 2021-08-02 15:50:14 +03:00
parent f6f027aa10
commit cecf2ee7a1
4 changed files with 16 additions and 16 deletions

View file

@ -99,12 +99,12 @@ set(kwin_SRCS
screenedge.cpp
screenlockerwatcher.cpp
screens.cpp
scripting/v2/clientmodel.cpp
scripting/dbuscall.cpp
scripting/screenedgeitem.cpp
scripting/scriptedeffect.cpp
scripting/scripting.cpp
scripting/scripting_logging.cpp
scripting/scripting_model.cpp
scripting/scriptingutils.cpp
scripting/thumbnailitem.cpp
scripting/workspace_wrapper.cpp

View file

@ -15,10 +15,11 @@
#include "scriptingutils.h"
#include "workspace_wrapper.h"
#include "screenedgeitem.h"
#include "scripting_model.h"
#include "scripting_logging.h"
#include "thumbnailitem.h"
#include "v2/clientmodel.h"
#include "input.h"
#include "options.h"
#include "screenedge.h"
@ -634,12 +635,13 @@ void KWin::Scripting::init()
qmlRegisterType<WindowThumbnailItem>("org.kde.kwin", 2, 0, "ThumbnailItem");
qmlRegisterType<DBusCall>("org.kde.kwin", 2, 0, "DBusCall");
qmlRegisterType<ScreenEdgeItem>("org.kde.kwin", 2, 0, "ScreenEdgeItem");
qmlRegisterType<KWin::ScriptingClientModel::ClientModel>();
qmlRegisterType<KWin::ScriptingClientModel::SimpleClientModel>("org.kde.kwin", 2, 0, "ClientModel");
qmlRegisterType<KWin::ScriptingClientModel::ClientModelByScreen>("org.kde.kwin", 2, 0, "ClientModelByScreen");
qmlRegisterType<KWin::ScriptingClientModel::ClientModelByScreenAndDesktop>("org.kde.kwin", 2, 0, "ClientModelByScreenAndDesktop");
qmlRegisterType<KWin::ScriptingClientModel::ClientModelByScreenAndActivity>("org.kde.kwin", 2, 1, "ClientModelByScreenAndActivity");
qmlRegisterType<KWin::ScriptingClientModel::ClientFilterModel>("org.kde.kwin", 2, 0, "ClientFilterModel");
qmlRegisterType<ScriptingModels::V2::ClientModel>();
qmlRegisterType<ScriptingModels::V2::SimpleClientModel>("org.kde.kwin", 2, 0, "ClientModel");
qmlRegisterType<ScriptingModels::V2::ClientModelByScreen>("org.kde.kwin", 2, 0, "ClientModelByScreen");
qmlRegisterType<ScriptingModels::V2::ClientModelByScreenAndDesktop>("org.kde.kwin", 2, 0, "ClientModelByScreenAndDesktop");
qmlRegisterType<ScriptingModels::V2::ClientModelByScreenAndActivity>("org.kde.kwin", 2, 1, "ClientModelByScreenAndActivity");
qmlRegisterType<ScriptingModels::V2::ClientFilterModel>("org.kde.kwin", 2, 0, "ClientFilterModel");
qmlRegisterType<KWin::AbstractClient>();
qmlRegisterType<KWin::X11Client>();
qmlRegisterType<QAbstractItemModel>();

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "scripting_model.h"
#include "clientmodel.h"
#include <config-kwin.h>
#include "abstract_client.h"
#ifdef KWIN_BUILD_ACTIVITIES
@ -16,8 +16,7 @@
#include "virtualdesktops.h"
#include "workspace.h"
namespace KWin {
namespace ScriptingClientModel {
namespace KWin::ScriptingModels::V2 {
static quint32 nextId() {
static quint32 counter = 0;
@ -904,5 +903,4 @@ bool ClientFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourc
return false;
}
} // namespace Scripting
} // namespace KWin

View file

@ -17,7 +17,7 @@ namespace KWin {
class AbstractClient;
class Client;
namespace ScriptingClientModel {
namespace ScriptingModels::V2 {
class AbstractLevel;
@ -272,7 +272,7 @@ public:
class ClientFilterModel : public QSortFilterProxyModel
{
Q_OBJECT
Q_PROPERTY(KWin::ScriptingClientModel::ClientModel *clientModel READ clientModel WRITE setClientModel NOTIFY clientModelChanged)
Q_PROPERTY(KWin::ScriptingModels::V2::ClientModel *clientModel READ clientModel WRITE setClientModel NOTIFY clientModelChanged)
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
public:
ClientFilterModel(QObject *parent = nullptr);
@ -371,7 +371,7 @@ const QString &ClientFilterModel::filter() const
} // namespace Scripting
} // namespace KWin
Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::ScriptingClientModel::ClientModel::Exclusions)
Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::ScriptingClientModel::ClientModel::LevelRestrictions)
Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::ScriptingModels::V2::ClientModel::Exclusions)
Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::ScriptingModels::V2::ClientModel::LevelRestrictions)
#endif // KWIN_SCRIPTING_MODEL_H