Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating dream/add new update module #18

Merged
merged 6 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# set(QT Core Gui Widgets Network WebEngine Quick QuickControls2 X11Extras DBus Xml Concurrent LinguistTools)
set(QT Core Gui Widgets Network Quick QuickControls2 X11Extras DBus Xml Concurrent LinguistTools)
find_package(Qt5 REQUIRED ${QT})
find_package(X11 REQUIRED)
Expand All @@ -27,7 +28,8 @@ find_package(Libcrypt REQUIRED)
find_package(KF5NetworkManagerQt REQUIRED)
find_package(KF5ModemManagerQt REQUIRED)
find_package(KF5Config)
# find_package(QApt REQUIRED)
find_package(QApt REQUIRED)
# find_package(QtWebEngine REQUIRED)

pkg_search_module(FontConfig REQUIRED fontconfig IMPORTED_TARGET)
pkg_search_module(ICU REQUIRED icu-i18n)
Expand Down Expand Up @@ -62,8 +64,10 @@ target_link_libraries(${PROJECT_NAME}
Qt5::Xml
Qt5::X11Extras
Qt5::Concurrent
# Qt5::WebEngine
# ::Main
Qt5::Network
QApt::Main
# LingmoUI

KF5::NetworkManagerQt
Expand Down
35 changes: 35 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
lingmo-settings (2.1.5-rc1) main; urgency=high

[Lingmo OS Team]
* update Change Device name Page

-- Lingm OS Team <[email protected]> Tue, 46 Jul 2024 22:06:00 +0800

lingmo-settings (2.1.5-rc1) main; urgency=high

[Lingmo OS Team]
* fix bugs

-- Lingm OS Team <[email protected]> Sat, 13 Jul 2024 23:14:00 +0800

lingmo-settings (2.1.5) main; urgency=high

[Lingmo OS Team]
* update GET_VERSION

-- Lingm OS Team <[email protected]> Sat, 13 Jul 2024 23:14:00 +0800

lingmo-settings (2.1.3) UNRELEASED; urgency=high

[ Elysia ]
* Fixed the Abort signal on existing app.

-- Elysia <[email protected]> Wen, 5 Jun 2024 19:51:00 +0800

lingmo-settings (2.1.2+fix1) UNRELEASED; urgency=high

[ Elysia ]
* Fixed missing network-manager dependency.

-- Elysia <[email protected]> Mon, 27 May 2024 15:04:00 +0800

lingmo-settings (2.1.2) UNRELEASED; urgency=high

* Changes Some Text
Expand Down
4 changes: 4 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Build-Depends: cmake,
libkf5config-dev,
modemmanager-qt-dev,
qtbase5-dev,
libqt5webengine5,
qtwebengine5-dev,
network-manager,
libqt5x11extras5-dev,
qtdeclarative5-dev,
qtquickcontrols2-5-dev,
Expand All @@ -42,6 +45,7 @@ Depends: qml-module-qtquick-controls2,
qml-module-qtquick-particles2,
curl,
openssl,
libqt5webengine5,
aria2,
gnupg,
zenity,
Expand Down
6 changes: 6 additions & 0 deletions src/about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <QRegularExpression>
#include <QSettings>
#include <QProcess>
#include <QHostInfo>

#ifdef Q_OS_LINUX
#include <sys/sysinfo.h>
Expand Down Expand Up @@ -69,6 +70,11 @@ bool About::isLingmoOS()
return settings.value("LingmoOS", false).toBool();
}

QString About::hostName()
{
return QHostInfo::localHostName();
}

QString About::version()
{
QSettings settings("/etc/os-release",QSettings::IniFormat);
Expand Down
2 changes: 2 additions & 0 deletions src/about.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class About : public QObject
Q_OBJECT
Q_PROPERTY(bool isLingmoOS READ isLingmoOS CONSTANT)
Q_PROPERTY(QString version READ version CONSTANT)
Q_PROPERTY(QString hostName READ hostName CONSTANT)
Q_PROPERTY(QString systemrelease READ systemrelease CONSTANT)
Q_PROPERTY(QString debianversion READ debianversion CONSTANT)
Q_PROPERTY(QString desktopversion READ desktopversion CONSTANT)
Expand All @@ -34,6 +35,7 @@ class About : public QObject
bool isLingmoOS();

QString version();
QString hostName();
QString systemrelease();
QString debianversion();
QString desktopversion();
Expand Down
4 changes: 2 additions & 2 deletions src/appearance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,14 @@ void Appearance::setFontPointSize(int fontPointSize)
}
}

void Appearance::setAccentColor(int accentColor)
void Appearance::setAccentColor(int defaultColor)
{
QDBusInterface iface("com.lingmo.Settings",
"/Theme",
"com.lingmo.Theme",
QDBusConnection::sessionBus(), this);
if (iface.isValid()) {
iface.call("setAccentColor", accentColor);
iface.call("setAccentColor", defaultColor);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/appearance.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Appearance : public QObject
int fontPointSize() const;
Q_INVOKABLE void setFontPointSize(int fontPointSize);

Q_INVOKABLE void setAccentColor(int accentColor);
Q_INVOKABLE void setAccentColor(int defaultColor);

int DesktopSettings() const;
Q_INVOKABLE void setDesktopIcons(int DesktopSettings);
Expand Down
13 changes: 12 additions & 1 deletion src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QTranslator>
// #include <QtWebEngine>

#include "about.h"
#include "accessibility.h"
Expand All @@ -32,6 +33,8 @@
#include "settingsuiadaptor.h"
#include "touchpad.h"
#include "update/updatemanager.h"
// #include "updatorhelper.h"
// #include "upgradeablemodel.h"

const QString ModuleDirectory = "/usr/lib/lingmo-settings/modules";

Expand Down Expand Up @@ -91,7 +94,13 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) {
qmlRegisterType<DefaultApplications>(uri, 1, 0, "DefaultApplications");
qmlRegisterType<Accessibility>(uri, 1, 0, "Accessibility");
qmlRegisterSingletonType<Password>(uri, 1, 0, "Password", passwordSingleton);
qmlRegisterType<UpdateManager>(uri, 1, 0, "UpdateManager");
// qmlRegisterType<UpdateManager>(uri, 1, 0, "UpdateManager");
// qmlRegisterType<UpdatorHelper>(uri, 1, 0, "Updator");
// qmlRegisterType<UpgradeableModel>(uri, 1, 0, "UpgradeableModel");

// if (!QDBusConnection::sessionBus().registerService("com.lingmo.UpdatorGui")) {
// return 0;
// }
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
qmlRegisterType<QAbstractItemModel>();
#else
Expand All @@ -117,6 +126,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) {
m_engine.addImportPath(QStringLiteral("qrc:/"));
m_engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));

// m_engine.rootContext()->setContextProperty("upgradeableModel", UpgradeableModel::self());

if (!module.isEmpty()) {
switchToPage(module);
}
Expand Down
2 changes: 1 addition & 1 deletion src/battery.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2021 LingmoOS Team.
*
* Author: Reion Wong <[email protected]>
* Author: Lingmo OS Team <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/battery.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2021 LingmoOS Team.
*
* Author: Reion Wong <[email protected]>
* Author: Lingmo OS Team <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/batteryhistorymodel.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2021 Reion Wong <[email protected]> *
* Copyright (C) 2021 Lingmo OS Team <[email protected]> *
* Copyright (C) 2015 Kai Uwe Broulik <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
Expand Down
2 changes: 1 addition & 1 deletion src/batteryhistorymodel.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2021 Reion Wong <[email protected]> *
* Copyright (C) 2021 Lingmo OS Team <[email protected]> *
* Copyright (C) 2015 Kai Uwe Broulik <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
Expand Down
2 changes: 1 addition & 1 deletion src/cicontheme.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2021 LingmoOS Team.
*
* Author: Reion Wong <[email protected]>
* Author: Lingmo OS Team <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/cicontheme.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2021 LingmoOS Team.
*
* Author: Reion Wong <[email protected]>
* Author: Lingmo OS Team <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Binary file added src/images/MundoDark.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/MundoLight.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/images/check_failed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/images/dark/edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/images/done.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/laptop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/images/light/edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading