Commit e98c601a authored by Martin Kacej's avatar Martin Kacej

base for mobile data settings section

parent 704a2680
......@@ -85,5 +85,5 @@ add_subdirectory(kcm)
add_subdirectory(libs)
add_subdirectory(vpn)
add_subdirectory(mobile)
add_subdirectory(mobile_cellular)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
project (kcm_mobile_cellural)
set (celluralsettings_SRCS celluralsettings.cpp)
add_library(kcm_mobile_cellural MODULE ${celluralsettings_SRCS})
target_link_libraries(kcm_mobile_cellural
Qt5::DBus
Qt5::Gui
Qt5::Quick
Qt5::Qml
KF5::Plasma
KF5::I18n
KF5::QuickAddons
)
kcoreaddons_desktop_to_json(kcm_mobile_cellural "mobile_cellural.desktop")
install(FILES mobile_cellural.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(TARGETS kcm_mobile_cellural DESTINATION ${PLUGIN_INSTALL_DIR}/kcms)
kpackage_install_package(package kcm_mobile_cellural kcms)
/*
* Copyright 2018 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 or
* (at your option) any later version.
*
* This program 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "celluralsettings.h"
#include <KPluginFactory>
#include <KLocalizedString>
#include <KAboutData>
K_PLUGIN_FACTORY_WITH_JSON(CelluralSettingsFactory, "mobile_cellural.json", registerPlugin<CelluralSettings>();)
CelluralSettings::CelluralSettings(QObject* parent, const QVariantList& args) : KQuickAddons::ConfigModule(parent, args)
{
KAboutData* about = new KAboutData("kcm_mobile_cellural", i18n("Configure cellural data network"),
"0.1", QString(), KAboutLicense::GPL);
about->addAuthor(i18n("Martin Kacej"), QString(), "m.kacej@atlas.sk");
setAboutData(about);
}
CelluralSettings::~CelluralSettings()
{
}
#include "celluralsettings.moc"
/*
* Copyright 2018 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 or
* (at your option) any later version.
*
* This program 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef CELLURALSETTINGS_H
#define CELLURALSETTINGS_H
#include <KQuickAddons/ConfigModule>
class CelluralSettings : public KQuickAddons::ConfigModule
{
public:
CelluralSettings(QObject *parent, const QVariantList &args);
virtual ~CelluralSettings();
};
#endif // CELLURALSETTINGS_H
[Desktop Entry]
Name=Mobile data
Comment=Mobile cellural network setting
Icon=smartphone
Exec=plasma-settings -m kcm_mobile_wifi
Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-Library=kcm_mobile_cellural
X-KDE-ParentApp=kcontrol
X-KDE-FormFactors=handset,tablet,mediacenter
X-KDE-System-Settings-Parent-Category=network
X-KDE-Weight=70
X-KDE-Keywords=mobile,data,network
Categories=Qt;KDE;X-KDE-settings-system;
import QtQuick 2.6
import QtQuick.Controls 2.2 as Controls
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
import org.kde.kirigami 2.2 as Kirigami
Kirigami.ApplicationItem {
id: main
objectName: "mobileDataMain"
pageStack.defaultColumnWidth: Kirigami.Units.gridUnit * 25
//pageStack.initialPage:
Kirigami.Theme.colorSet: Kirigami.Theme.Window
anchors.fill: parent
Controls.Label {
text: i18n("Mobile data settings")
font.weight: Font.Bold
}
}
[Desktop Entry]
Name=Mobile data
Comment=Mobile cellural network setting
Encoding=UTF-8
Type=Service
Icon=smartphone
X-KDE-ServiceTypes=KCModule
X-KDE-Library=kcm_mobile_cellural
X-KDE-PluginInfo-Author=Martin Kacej
X-KDE-PluginInfo-Email=m.kacej@atlas.sk
X-KDE-PluginInfo-Name=kcm_mobile_cellural
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=https://plasma-mobile.org/
X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
X-KDE-FormFactors=handset,tablet,mediacenter
X-Plasma-Package=kcm_mobile_cellural
X-Plasma-MainScript=ui/mainMobile.qml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment