diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 9c50506ef..7ea4495a3 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -38,6 +38,7 @@ add_subdirectory(wm/tracker) set(latte_dbusXML dbus/org.kde.LatteDock.xml) qt5_add_dbus_adaptor(lattedock-app_SRCS ${latte_dbusXML} lattecorona.h Latte::Corona lattedockadaptor) +ki18n_wrap_ui(lattedock-app_SRCS settings/dialogs/exporttemplatedialog.ui) ki18n_wrap_ui(lattedock-app_SRCS settings/dialogs/detailsdialog.ui) ki18n_wrap_ui(lattedock-app_SRCS settings/dialogs/settingsdialog.ui) diff --git a/app/settings/dialogs/CMakeLists.txt b/app/settings/dialogs/CMakeLists.txt index 4d400a52e..53f4e2c18 100644 --- a/app/settings/dialogs/CMakeLists.txt +++ b/app/settings/dialogs/CMakeLists.txt @@ -2,6 +2,7 @@ set(lattedock-app_SRCS ${lattedock-app_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/detailsdialog.cpp ${CMAKE_CURRENT_SOURCE_DIR}/genericdialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/exporttemplatedialog.cpp ${CMAKE_CURRENT_SOURCE_DIR}/settingsdialog.cpp PARENT_SCOPE ) diff --git a/app/settings/dialogs/exporttemplatedialog.cpp b/app/settings/dialogs/exporttemplatedialog.cpp new file mode 100644 index 000000000..09e97acc2 --- /dev/null +++ b/app/settings/dialogs/exporttemplatedialog.cpp @@ -0,0 +1,66 @@ +/* + * Copyright 2021 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 "exporttemplatedialog.h" + +// local +#include "ui_exporttemplatedialog.h" + +namespace Latte { +namespace Settings { +namespace Dialog { + +ExportTemplateDialog::ExportTemplateDialog(SettingsDialog *parent) + : GenericDialog(parent), + m_parentDlg(parent), + m_ui(new Ui::ExportTemplateDialog) +{ + //! first we need to setup the ui + m_ui->setupUi(this); +} + +ExportTemplateDialog::~ExportTemplateDialog() +{ +} + +Ui::ExportTemplateDialog *ExportTemplateDialog::ui() const +{ + return m_ui; +} + +Latte::Corona *ExportTemplateDialog::corona() const +{ + return m_parentDlg->corona(); +} + +void ExportTemplateDialog::accept() +{ + qDebug() << Q_FUNC_INFO; +} + +void ExportTemplateDialog::onCancel() +{ + qDebug() << Q_FUNC_INFO; + close(); +} + +} +} +} diff --git a/app/settings/dialogs/exporttemplatedialog.h b/app/settings/dialogs/exporttemplatedialog.h new file mode 100644 index 000000000..573f63d6b --- /dev/null +++ b/app/settings/dialogs/exporttemplatedialog.h @@ -0,0 +1,67 @@ +/* + * Copyright 2021 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 EXPORTTEMPLATEDIALOG_H +#define EXPORTTEMPLATEDIALOG_H + +// local +#include "genericdialog.h" +#include "settingsdialog.h" + +// Qt +#include +#include + +namespace Ui { +class ExportTemplateDialog; +} + +namespace Latte { +namespace Settings { +namespace Dialog { + +class ExportTemplateDialog : public GenericDialog +{ + Q_OBJECT + +public: + ExportTemplateDialog(SettingsDialog *parent); + ~ExportTemplateDialog(); + + Latte::Corona *corona() const; + + Ui::ExportTemplateDialog *ui() const; + +protected: + void accept() override; + +private slots: + void onCancel(); + +private: + SettingsDialog *m_parentDlg{nullptr}; + Ui::ExportTemplateDialog *m_ui; +}; + +} +} +} + +#endif diff --git a/app/settings/dialogs/exporttemplatedialog.ui b/app/settings/dialogs/exporttemplatedialog.ui new file mode 100644 index 000000000..ce6a66580 --- /dev/null +++ b/app/settings/dialogs/exporttemplatedialog.ui @@ -0,0 +1,117 @@ + + + ExportTemplateDialog + + + + 0 + 0 + 561 + 615 + + + + Personal Data + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 15 + 20 + + + + + + + + + + <b>Select only</b> applets that you would like to keep their settings in the extracted template. Make sure to not include any applets that contain personal data such as email credentials, calendar etc. + + + true + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 15 + 20 + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel + + + + + + + + + buttonBox + accepted() + DetailsDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + DetailsDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + +