REFACTOR:replace liblattedock with new liblatte2

pull/3/head
Michail Vourlakos 6 years ago
parent 462a849ac4
commit 9447a8f748

@ -66,7 +66,7 @@ include(WriteBasicConfigVersionFile)
include(Definitions.cmake)
add_subdirectory(liblattedock)
add_subdirectory(liblatte2)
add_subdirectory(kwin_scripts)
add_subdirectory(app)
add_subdirectory(containmentactions)

@ -1,5 +1,5 @@
set(lattedock-app_SRCS
../liblattedock/dock.cpp
../liblatte2/types.cpp
alternativeshelper.cpp
commontools.cpp
globalshortcuts.cpp

@ -1,15 +1,15 @@
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-latte-lib.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-latte-lib.h)
set(lattedock_SRCS
lattedockplugin.cpp
set(latteplugin_SRCS
latteplugin.cpp
quickwindowsystem.cpp
dock.cpp
iconitem.cpp
types.cpp
)
add_library(lattedockplugin SHARED ${lattedock_SRCS})
add_library(latte2plugin SHARED ${latteplugin_SRCS})
target_link_libraries(lattedockplugin
target_link_libraries(latte2plugin
Qt5::Quick
Qt5::Qml
KF5::CoreAddons
@ -20,10 +20,10 @@ target_link_libraries(lattedockplugin
)
if(HAVE_X11)
target_link_libraries(lattedockplugin KF5::WindowSystem)
target_link_libraries(latte2plugin KF5::WindowSystem)
endif()
install(TARGETS lattedockplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte)
install(TARGETS latte2plugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte)
install(DIRECTORY qml/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte)

@ -2,7 +2,7 @@
#define EXTRAS_H
// local
#include "../liblattedock/config-latte-lib.h"
#include "../liblatte2/config-latte-lib.h"
// C++
#include <type_traits>

@ -23,7 +23,7 @@
#include "iconitem.h"
// local
#include "../liblattedock/extras.h"
#include "../liblatte2/extras.h"
// Qt
#include <QDebug>

@ -18,20 +18,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "lattedockplugin.h"
#include "latteplugin.h"
// local
#include "dock.h"
#include "iconitem.h"
#include "quickwindowsystem.h"
#include "types.h"
// Qt
#include <QtQml>
void LatteDockPlugin::registerTypes(const char *uri)
void LattePlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.latte"));
qmlRegisterUncreatableType<Latte::Dock>(uri, 0, 1, "Dock", "Latte Dock Types uncreatable");
qmlRegisterType<Latte::IconItem>(uri, 0, 1, "IconItem");
qmlRegisterSingletonType<Latte::QuickWindowSystem>(uri, 0, 1, "WindowSystem", &Latte::windowsystem_qobject_singletontype_provider);
qmlRegisterUncreatableType<Latte::Types>(uri, 0, 2, "Types", "Latte Types uncreatable");
qmlRegisterType<Latte::IconItem>(uri, 0, 2, "IconItem");
qmlRegisterSingletonType<Latte::QuickWindowSystem>(uri, 0, 2, "WindowSystem", &Latte::windowsystem_qobject_singletontype_provider);
}

@ -18,13 +18,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LATTEDOCKPLUGIN_H
#define LATTEDOCKPLUGIN_H
#ifndef LATTEPLUGIN_H
#define LATTEPLUGIN_H
// Qt
#include <QQmlExtensionPlugin>
class LatteDockPlugin : public QQmlExtensionPlugin
class LattePlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")

@ -0,0 +1,5 @@
module org.kde.latte
plugin latte2plugin
GlowPoint 0.2 GlowPoint.qml
BadgeText 0.2 BadgeText.qml

@ -18,4 +18,4 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dock.h"
#include "types.h"

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DOCK_H
#define DOCK_H
#ifndef TYPES_H
#define TYPES_H
// Qt
#include <QObject>
@ -28,13 +28,13 @@
namespace Latte {
class Dock
class Types
{
Q_GADGET
public:
Dock() = delete;
~Dock() {}
Types() = delete;
~Types() {}
enum Visibility
{

@ -1,5 +0,0 @@
module org.kde.latte
plugin lattedockplugin
GlowPoint 0.1 GlowPoint.qml
BadgeText 0.1 BadgeText.qml
Loading…
Cancel
Save