From 06ddef8506855084bda7cfd645d5026cc3203897 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 2 Jul 2017 15:02:07 +0300 Subject: [PATCH] cnew architectures classes,add missing licenses --- app/CMakeLists.txt | 3 +++ app/dockcorona.cpp | 6 +++++- app/dockcorona.h | 4 ++++ app/globalsettings.cpp | 20 +++++++++++++++++ app/globalshortcuts.cpp | 20 +++++++++++++++++ app/importer.cpp | 34 +++++++++++++++++++++++++++++ app/importer.h | 39 +++++++++++++++++++++++++++++++++ app/layoutmanager.cpp | 36 +++++++++++++++++++++++++++++++ app/layoutmanager.h | 43 +++++++++++++++++++++++++++++++++++++ app/universalsettings.cpp | 34 +++++++++++++++++++++++++++++ app/universalsettings.h | 45 +++++++++++++++++++++++++++++++++++++++ 11 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 app/importer.cpp create mode 100644 app/importer.h create mode 100644 app/layoutmanager.cpp create mode 100644 app/layoutmanager.h create mode 100644 app/universalsettings.cpp create mode 100644 app/universalsettings.h diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index aad4171fe..6fed83957 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -15,6 +15,9 @@ set(lattedock-app_SRCS screenpool.cpp globalsettings.cpp globalshortcuts.cpp + universalsettings.cpp + layoutmanager.cpp + importer.cpp main.cpp ) diff --git a/app/dockcorona.cpp b/app/dockcorona.cpp index 489b7c684..492bff915 100644 --- a/app/dockcorona.cpp +++ b/app/dockcorona.cpp @@ -61,7 +61,9 @@ DockCorona::DockCorona(QObject *parent) m_activityConsumer(new KActivities::Consumer(this)), m_screenPool(new ScreenPool(KSharedConfig::openConfig(), this)), m_globalSettings(new GlobalSettings(this)), - m_globalShortcuts(new GlobalShortcuts(this)) + m_globalShortcuts(new GlobalShortcuts(this)), + m_universalSettings(new UniversalSettings(this)), + m_layoutManager(new LayoutManager(this)) { setupWaylandIntegration(); @@ -117,6 +119,8 @@ DockCorona::~DockCorona() m_globalSettings->deleteLater(); m_globalShortcuts->deleteLater(); m_screenPool->deleteLater(); + m_layoutManager->deleteLater(); + m_universalSettings->deleteLater(); qDeleteAll(m_dockViews); qDeleteAll(m_waitingDockViews); diff --git a/app/dockcorona.h b/app/dockcorona.h index 855454c57..627ec37da 100644 --- a/app/dockcorona.h +++ b/app/dockcorona.h @@ -24,6 +24,8 @@ #include "dockview.h" #include "globalsettings.h" #include "globalshortcuts.h" +#include "layoutmanager.h" +#include "universalsettings.h" #include "../liblattedock/dock.h" #include @@ -158,6 +160,8 @@ private: ScreenPool *m_screenPool{nullptr}; GlobalSettings *m_globalSettings{nullptr}; GlobalShortcuts *m_globalShortcuts{nullptr}; + UniversalSettings *m_universalSettings{nullptr}; + LayoutManager *m_layoutManager{nullptr}; KWayland::Client::PlasmaShell *m_waylandDockCorona{nullptr}; diff --git a/app/globalsettings.cpp b/app/globalsettings.cpp index d64f85581..6e7948038 100644 --- a/app/globalsettings.cpp +++ b/app/globalsettings.cpp @@ -1,3 +1,23 @@ +/* +* Copyright 2016 Smith AR +* Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + #include "globalsettings.h" #include "../liblattedock/extras.h" diff --git a/app/globalshortcuts.cpp b/app/globalshortcuts.cpp index fb241b6b1..61bde7a42 100644 --- a/app/globalshortcuts.cpp +++ b/app/globalshortcuts.cpp @@ -1,3 +1,23 @@ +/* +* Copyright 2016 Smith AR +* Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + #include "globalshortcuts.h" #include diff --git a/app/importer.cpp b/app/importer.cpp new file mode 100644 index 000000000..e5e7dc88e --- /dev/null +++ b/app/importer.cpp @@ -0,0 +1,34 @@ +/* +* Copyright 2017 Smith AR +* Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#include "importer.h" + +namespace Latte { + +Importer::Importer(QObject *parent) + : QObject(parent) +{ +} + +Importer::~Importer() +{ +} + +} diff --git a/app/importer.h b/app/importer.h new file mode 100644 index 000000000..47974b168 --- /dev/null +++ b/app/importer.h @@ -0,0 +1,39 @@ +/* +* Copyright 2017 Smith AR +* Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#ifndef IMPORTER_H +#define IMPORTER_H + +#include + +namespace Latte { + +class Importer : public QObject { + Q_OBJECT + +public: + Importer(QObject *parent = nullptr); + ~Importer() override; + +}; + +} + +#endif // IMPORTER_H diff --git a/app/layoutmanager.cpp b/app/layoutmanager.cpp new file mode 100644 index 000000000..024885794 --- /dev/null +++ b/app/layoutmanager.cpp @@ -0,0 +1,36 @@ +/* +* Copyright 2017 Smith AR +* Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#include "layoutmanager.h" + +namespace Latte { + +LayoutManager::LayoutManager(QObject *parent) + : QObject(parent), + m_importer(new Importer(this)) +{ +} + +LayoutManager::~LayoutManager() +{ + m_importer->deleteLater(); +} + +} diff --git a/app/layoutmanager.h b/app/layoutmanager.h new file mode 100644 index 000000000..662358d47 --- /dev/null +++ b/app/layoutmanager.h @@ -0,0 +1,43 @@ +/* +* Copyright 2016 Smith AR +* Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#ifndef LAYOUTMANAGER_H +#define LAYOUTMANAGER_H + +#include + +#include "importer.h" + +namespace Latte { + +class LayoutManager : public QObject { + Q_OBJECT + +public: + LayoutManager(QObject *parent = nullptr); + ~LayoutManager() override; + +private: + Importer *m_importer{nullptr}; +}; + +} + +#endif // LAYOUTMANAGER_H diff --git a/app/universalsettings.cpp b/app/universalsettings.cpp new file mode 100644 index 000000000..b75abadfa --- /dev/null +++ b/app/universalsettings.cpp @@ -0,0 +1,34 @@ +/* +* Copyright 2017 Smith AR +* Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#include "universalsettings.h" + +namespace Latte { + +UniversalSettings::UniversalSettings(QObject *parent) + : QObject(parent) +{ +} + +UniversalSettings::~UniversalSettings() +{ +} + +} diff --git a/app/universalsettings.h b/app/universalsettings.h new file mode 100644 index 000000000..c81e20823 --- /dev/null +++ b/app/universalsettings.h @@ -0,0 +1,45 @@ +/* +* Copyright 2017 Smith AR +* Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#ifndef UNIVERSALSETTINGS_H +#define UNIVERSALSETTINGS_H + +#include + +namespace Latte { + +class UniversalSettings : public QObject { + Q_OBJECT + //Q_PROPERTY(bool autostart READ autostart WRITE setAutostart NOTIFY autostartChanged) + //Q_PROPERTY(bool exposeAltSession READ exposeAltSession WRITE setExposeAltSession NOTIFY exposeAltSessionChanged) + + //Q_PROPERTY(Latte::Dock::SessionType currentSession READ currentSession WRITE setCurrentSession NOTIFY currentSessionChanged) + + //Q_PROPERTY(QAction *altSessionAction READ altSessionAction NOTIFY altSessionActionChanged) + //Q_PROPERTY(QAction *addWidgetsAction READ addWidgetsAction NOTIFY addWidgetsActionChanged) + +public: + UniversalSettings(QObject *parent = nullptr); + ~UniversalSettings() override; +}; + +} + +#endif //UNIVERSALSETTINGS_H