diff --git a/src/modules/tracking/CMakeLists.txt b/src/modules/tracking/CMakeLists.txt new file mode 100644 index 000000000..d99d09446 --- /dev/null +++ b/src/modules/tracking/CMakeLists.txt @@ -0,0 +1,13 @@ +calamares_add_plugin( tracking + TYPE viewmodule + EXPORT_MACRO PLUGINDLLEXPORT_PRO + SOURCES + TrackingViewStep.cpp + TrackingPage.cpp + UI + page_trackingstep.ui + LINK_PRIVATE_LIBRARIES + calamaresui + SHARED_LIB +) + diff --git a/src/modules/tracking/TrackingPage.cpp b/src/modules/tracking/TrackingPage.cpp new file mode 100644 index 000000000..512b743d4 --- /dev/null +++ b/src/modules/tracking/TrackingPage.cpp @@ -0,0 +1,44 @@ +/* === This file is part of Calamares - === + * + * Copyright 2017, Adriaan de Groot + * + * Calamares 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 3 of the License, or + * (at your option) any later version. + * + * Calamares 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 Calamares. If not, see . + */ + +#include "TrackingPage.h" + +#include "ui_page_trackingstep.h" + +#include "JobQueue.h" +#include "GlobalStorage.h" +#include "utils/Logger.h" +#include "utils/CalamaresUtilsGui.h" +#include "utils/Retranslator.h" +#include "ViewManager.h" + +#include +#include +#include +#include +#include +#include +#include + +TrackingPage::TrackingPage(QWidget *parent) + : QWidget( parent ) + , ui( new Ui::TrackingPage ) +{ + ui->setupUi( this ); +} + diff --git a/src/modules/tracking/TrackingPage.h b/src/modules/tracking/TrackingPage.h new file mode 100644 index 000000000..ccacb6415 --- /dev/null +++ b/src/modules/tracking/TrackingPage.h @@ -0,0 +1,40 @@ +/* === This file is part of Calamares - === + * + * Copyright 2017, Adriaan de Groot + * + * Calamares 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 3 of the License, or + * (at your option) any later version. + * + * Calamares 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 Calamares. If not, see . + */ + +#ifndef TRACKINGPAGE_H +#define TRACKINGPAGE_H + +#include +#include + +namespace Ui +{ +class TrackingPage; +} + +class TrackingPage : public QWidget +{ + Q_OBJECT +public: + explicit TrackingPage( QWidget* parent = nullptr ); + +private: + Ui::TrackingPage* ui; +}; + +#endif //TRACKINGPAGE_H diff --git a/src/modules/tracking/TrackingViewStep.cpp b/src/modules/tracking/TrackingViewStep.cpp new file mode 100644 index 000000000..a78b6c5b8 --- /dev/null +++ b/src/modules/tracking/TrackingViewStep.cpp @@ -0,0 +1,109 @@ +/* === This file is part of Calamares - === + * + * Copyright 2017, Adriaan de Groot + * + * Calamares 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 3 of the License, or + * (at your option) any later version. + * + * Calamares 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 Calamares. If not, see . + */ + +#include "JobQueue.h" +#include "GlobalStorage.h" +#include "utils/Logger.h" + +#include "TrackingViewStep.h" +#include "TrackingPage.h" + +#include + +CALAMARES_PLUGIN_FACTORY_DEFINITION( TrackingViewStepFactory, registerPlugin(); ) + +TrackingViewStep::TrackingViewStep( QObject* parent ) + : Calamares::ViewStep( parent ) + , m_widget( new TrackingPage ) +{ + emit nextStatusChanged( false ); +} + + +TrackingViewStep::~TrackingViewStep() +{ + if ( m_widget && m_widget->parent() == nullptr ) + m_widget->deleteLater(); +} + + +QString +TrackingViewStep::prettyName() const +{ + return tr( "Telemetry and Tracking" ); +} + + +QWidget* +TrackingViewStep::widget() +{ + return m_widget; +} + + +void +TrackingViewStep::next() +{ + emit done(); +} + + +void +TrackingViewStep::back() +{} + + +bool +TrackingViewStep::isNextEnabled() const +{ +// return m_widget->isNextEnabled(); + return false; +} + + +bool +TrackingViewStep::isBackEnabled() const +{ + return true; +} + + +bool +TrackingViewStep::isAtBeginning() const +{ + return true; +} + + +bool +TrackingViewStep::isAtEnd() const +{ + return true; +} + + +QList< Calamares::job_ptr > +TrackingViewStep::jobs() const +{ + return QList< Calamares::job_ptr >(); +} + +void +TrackingViewStep::setConfigurationMap( const QVariantMap& configurationMap ) +{ +} diff --git a/src/modules/tracking/TrackingViewStep.h b/src/modules/tracking/TrackingViewStep.h new file mode 100644 index 000000000..8b9f97db9 --- /dev/null +++ b/src/modules/tracking/TrackingViewStep.h @@ -0,0 +1,63 @@ +/* === This file is part of Calamares - === + * + * Copyright 2017, Adriaan de Groot + * + * Calamares 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 3 of the License, or + * (at your option) any later version. + * + * Calamares 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 Calamares. If not, see . + */ + +#ifndef TRACKINGVIEWSTEP_H +#define TRACKINGVIEWSTEP_H + +#include +#include +#include + +#include +#include +#include + +class TrackingPage; + +class PLUGINDLLEXPORT TrackingViewStep : public Calamares::ViewStep +{ + Q_OBJECT + +public: + explicit TrackingViewStep( QObject* parent = nullptr ); + virtual ~TrackingViewStep(); + + QString prettyName() const override; + + QWidget* widget() override; + + void next() override; + void back() override; + + bool isNextEnabled() const override; + bool isBackEnabled() const override; + + bool isAtBeginning() const override; + bool isAtEnd() const override; + + QList< Calamares::job_ptr > jobs() const override; + + void setConfigurationMap( const QVariantMap& configurationMap ) override; + +private: + TrackingPage* m_widget; +}; + +CALAMARES_PLUGIN_FACTORY_DECLARATION( TrackingViewStepFactory ) + +#endif // TRACKINGVIEWSTEP_H diff --git a/src/modules/tracking/page_trackingstep.ui b/src/modules/tracking/page_trackingstep.ui new file mode 100644 index 000000000..f42133624 --- /dev/null +++ b/src/modules/tracking/page_trackingstep.ui @@ -0,0 +1,106 @@ + + + TrackingPage + + + + 0 + 0 + 799 + 400 + + + + Form + + + + + + + + Install Tracking + + + + + + + + Explanation of install-tracking. + + + + + + + Enable install-tracking + + + + + + + + + + + + Machine Tracking + + + + + + + + Explanation of machine-tracking. + + + + + + + Enable machine-tracking + + + + + + + + + + + + User Tracking + + + + + + + + Explanation of user-tracking. + + + + + + + Enable user-tracking + + + + + + + + + + + + + + + diff --git a/src/modules/tracking/tracking.conf b/src/modules/tracking/tracking.conf new file mode 100644 index 000000000..ebbbc528d --- /dev/null +++ b/src/modules/tracking/tracking.conf @@ -0,0 +1,14 @@ +--- +machine: + - tracking: false + - style: neon + - path: /etc/machine-file + +user: + - tracking: false + - style: neon + +install: + - tracking: false + - style: neon +