├── .clang-format
├── .github
└── workflows
│ └── clang-format-check.yml
├── .gitignore
├── CMakeLists.txt
├── COPYING.BSD
├── COPYING.MIT
├── README.md
├── data
├── 90-glacier-devlock.conf
├── 90-glacier-powerkey.conf
├── lipstick.service
└── nemovars.conf
├── interfaces
└── org.lipstick.polkitAuthAgent.xml
├── lib
├── CMakeLists.txt
└── search
│ ├── CMakeLists.txt
│ ├── glaciersearchplugin.h
│ ├── plugins
│ ├── CMakeLists.txt
│ └── application
│ │ ├── CMakeLists.txt
│ │ ├── applicationsearchplugin.cpp
│ │ └── applicationsearchplugin.h
│ ├── searchpluginmanager.cpp
│ └── searchpluginmanager.h
├── rpm
└── lipstick-glacier-home-qt5.spec
├── settings-plugins
├── CMakeLists.txt
├── desktop
│ ├── CMakeLists.txt
│ ├── desktop.qml
│ ├── desktop.svg
│ ├── desktopsettingsplugin.cpp
│ ├── desktopsettingsplugin.h
│ └── translations
│ │ ├── desktop.ts
│ │ ├── desktop_cs.ts
│ │ ├── desktop_de.ts
│ │ ├── desktop_es.ts
│ │ ├── desktop_fi.ts
│ │ ├── desktop_nl.ts
│ │ ├── desktop_pl.ts
│ │ ├── desktop_ru.ts
│ │ └── desktop_uk.ts
└── wallpaper
│ ├── CMakeLists.txt
│ ├── selectImage.qml
│ ├── translations
│ ├── wallpaper.ts
│ ├── wallpaper_cs.ts
│ ├── wallpaper_de.ts
│ ├── wallpaper_es.ts
│ ├── wallpaper_fi.ts
│ ├── wallpaper_nl.ts
│ ├── wallpaper_pl.ts
│ ├── wallpaper_ru.ts
│ └── wallpaper_uk.ts
│ ├── wallpaper.qml
│ ├── wallpaper.svg
│ ├── wallpapersettingsplugin.cpp
│ └── wallpapersettingsplugin.h
├── src
├── CMakeLists.txt
├── fileutils.cpp
├── fileutils.h
├── geoagent.cpp
├── geoagent.h
├── geoclueagent.cpp
├── geoclueagent.h
├── glacier_global.h
├── logging.cpp
├── logging.h
├── main.cpp
├── mceconnect.cpp
├── mceconnect.h
├── models
│ ├── controlcenterbuttonsmodel.cpp
│ ├── controlcenterbuttonsmodel.h
│ ├── glacierwindowmodel.cpp
│ ├── glacierwindowmodel.h
│ ├── searchmodel.cpp
│ └── searchmodel.h
├── nemovars.conf
├── org.freedesktop.GeoClue2.Agent.xml
├── qml
│ ├── AppLauncher.qml
│ ├── AppSwitcher.qml
│ ├── FeedsPage.qml
│ ├── GlacierCompositor.qml
│ ├── Lockscreen.qml
│ ├── MainScreen.qml
│ ├── Statusbar.qml
│ ├── applauncher
│ │ ├── FolderView.qml
│ │ ├── LauncherItemDelegate.qml
│ │ ├── LauncherItemFolder.qml
│ │ ├── LauncherItemWrapper.qml
│ │ └── SearchListView.qml
│ ├── appswitcher
│ │ ├── CloseButton.qml
│ │ └── SwitcherItem.qml
│ ├── compositor
│ │ ├── ScreenGestureArea.qml
│ │ ├── WindowWrapperAlpha.qml
│ │ ├── WindowWrapperBase.qml
│ │ └── WindowWrapperMystic.qml
│ ├── connectivity
│ │ ├── ConnectionSelector.qml
│ │ ├── USBModeSelector.qml
│ │ └── VpnAgent.qml
│ ├── dialogs
│ │ ├── BtObexRequestConfirmationDialog.qml
│ │ ├── BtRequestConfirmationDialog.qml
│ │ ├── RebootDialog.qml
│ │ └── UsbModeDialog.qml
│ ├── feedspage
│ │ ├── BluetoothControlButton.qml
│ │ ├── CellularDataControlButton.qml
│ │ ├── ControlButton.qml
│ │ ├── ControlCenter.qml
│ │ ├── LocationControlButton.qml
│ │ ├── NetworkControlButton.qml
│ │ ├── QuietControlButton.qml
│ │ └── WiFiControlButton.qml
│ ├── images
│ │ ├── NOTICE.txt
│ │ ├── button_default.png
│ │ ├── button_pressed.png
│ │ ├── closeapp.svg
│ │ ├── glacier.svg
│ │ ├── graphics-wallpaper-home.jpg
│ │ ├── navigation_next_item.png
│ │ ├── navigation_previous_item.png
│ │ ├── notification-circle.png
│ │ ├── tab_selected.png
│ │ ├── tabs_standard.png
│ │ ├── textinput.png
│ │ ├── toolbar.png
│ │ ├── wallpaper-portrait-bubbles.png
│ │ └── wallpaper-portrait.png
│ ├── lockscreen
│ │ ├── DeviceLockUI.qml
│ │ ├── LockscreenClock.qml
│ │ ├── MediaControls.qml
│ │ ├── NumPadButton.qml
│ │ └── OperatorLine.qml
│ ├── mainscreen
│ │ ├── GlacierRotation.qml
│ │ ├── Pager.qml
│ │ └── Wallpaper.qml
│ ├── notifications
│ │ ├── NofiticationImage.js
│ │ ├── NotificationItem.qml
│ │ └── NotificationPreview.qml
│ ├── statusbar
│ │ ├── BatteryIndicator.qml
│ │ ├── BluetoothIndicator.qml
│ │ ├── CommonPanel.qml
│ │ ├── DataStatusItem.qml
│ │ ├── DeveloperModeIndicator.qml
│ │ ├── LocationIndicator.qml
│ │ ├── MediaController.qml
│ │ ├── NfcIndicator.qml
│ │ ├── NumButton.qml
│ │ ├── PowerSaveModeIndicator.qml
│ │ ├── SimIndicator.qml
│ │ ├── StatusbarItem.qml
│ │ ├── USBModeIndicator.qml
│ │ ├── WifiIndicator.qml
│ │ └── WifiPanel.qml
│ ├── system
│ │ ├── GeoClue2Agent.qml
│ │ ├── Screenshot.qml
│ │ └── ShutdownScreen.qml
│ ├── theme
│ │ ├── battery0.png
│ │ ├── battery1.png
│ │ ├── battery2.png
│ │ ├── battery3.png
│ │ ├── battery4.png
│ │ ├── battery5.png
│ │ ├── battery6.png
│ │ ├── battery_grid.png
│ │ ├── button_down.wav
│ │ ├── button_up.wav
│ │ ├── data_egprs.png
│ │ ├── data_gprs.png
│ │ ├── data_hspa.png
│ │ ├── data_lte.png
│ │ ├── data_unknown.png
│ │ ├── data_utms.png
│ │ ├── default-icon.png
│ │ ├── disabled-sim.png
│ │ ├── icon-m-framework-close-thumbnail.png
│ │ ├── icon_bluetooth.png
│ │ ├── icon_gps.png
│ │ ├── icon_music.png
│ │ ├── icon_nfc.png
│ │ ├── icon_signal_0.png
│ │ ├── icon_signal_1.png
│ │ ├── icon_signal_2.png
│ │ ├── icon_signal_3.png
│ │ ├── icon_signal_4.png
│ │ ├── icon_signal_5.png
│ │ ├── icon_wifi_0.png
│ │ ├── icon_wifi_1.png
│ │ ├── icon_wifi_2.png
│ │ ├── icon_wifi_3.png
│ │ ├── icon_wifi_4.png
│ │ ├── mask_multitask_shadow.png
│ │ └── nosim.png
│ └── volumecontrol
│ │ ├── AudioWarningDialog.qml
│ │ └── VolumeControl.qml
└── resources-qml.qrc
├── tests
├── CMakeLists.txt
├── lockscreen_preview
│ ├── CMakeLists.txt
│ ├── LocscreenTestWindow.qml
│ └── main.cpp
└── stubs
│ ├── lipsticksettings_stub.cpp
│ ├── lipsticksettings_stub.h
│ ├── wallclock_stub.cpp
│ └── wallclock_stub.h
├── transifex.yml
└── translations
├── glacier-home.ts
├── glacier-home_cs.ts
├── glacier-home_de.ts
├── glacier-home_es.ts
├── glacier-home_fi.ts
├── glacier-home_nl.ts
├── glacier-home_pl.ts
├── glacier-home_ru.ts
└── glacier-home_uk.ts
/.clang-format:
--------------------------------------------------------------------------------
1 | BasedOnStyle: WebKit
--------------------------------------------------------------------------------
/.github/workflows/clang-format-check.yml:
--------------------------------------------------------------------------------
1 | name: clang-format Check
2 | on: [push, pull_request]
3 | jobs:
4 | formatting-check:
5 | name: Formatting Check
6 | runs-on: ubuntu-latest
7 | steps:
8 | - uses: actions/checkout@v3
9 | - name: Run clang-format style check for C/C++/Protobuf programs.
10 | uses: jidicula/clang-format-action@v4.9.0
11 | with:
12 | clang-format-version: '13'
13 | check-path: '.'
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pro.user
2 | *.pyc
3 | .directory
4 | *.o
5 | *.so
6 | *.qmlc
7 | moc_*
8 | qrc_*
9 | .qmake.stash
10 | *.spec.*
11 | *.user*
12 | documentation.list
13 | examples/touch/glacier-components
14 | Makefile
15 | installroot/
16 | RPMS/
17 | debug*.list
18 | CMakeCache.txt
19 | *.qm
20 | *.cmake
21 | CMakeFiles
22 | lipstick
23 | lipstick_autogen
24 | prefix.sh
25 | install_manifest.txt
26 | build/
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.6.0)
2 |
3 | project(glacier-home
4 | VERSION 1.0
5 | DESCRIPTION "Glacier UX homescreen")
6 |
7 | set(CMAKE_AUTOMOC ON)
8 | set(CMAKE_AUTOUIC ON)
9 | set(CMAKE_AUTORCC ON)
10 |
11 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
12 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
13 |
14 | include(FindPkgConfig)
15 | include(FeatureSummary)
16 | include(GNUInstallDirs)
17 |
18 | option(USE_SYSTEMD "Use systemd services" ON)
19 | option(USE_GEOCLUE2 "Use geoclue2 location service. If no use classic geoclue" OFF)
20 | option(BUILD_TESTS "Build tests" OFF)
21 |
22 | set(QT_MIN_VERSION "6.2.0")
23 | set(CMAKE_INSTALL_PREFIX /usr)
24 | find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS
25 | Gui
26 | Qml
27 | Quick
28 | DBus
29 | WaylandCompositor
30 | LinguistTools)
31 |
32 | find_package(PkgConfig REQUIRED)
33 | pkg_check_modules(LIPSTICK lipstick-qt6 REQUIRED IMPORTED_TARGET)
34 | pkg_check_modules(NEMODEVICELOCK nemodevicelock REQUIRED IMPORTED_TARGET)
35 | pkg_check_modules(NEMOCONNECTIVITY nemoconnectivity REQUIRED IMPORTED_TARGET)
36 | pkg_check_modules(MLITE6 mlite6 REQUIRED IMPORTED_TARGET)
37 |
38 | find_package(ECM REQUIRED NO_MODULE)
39 | set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
40 | find_package(KF6BluezQt REQUIRED)
41 |
42 | add_definitions(-DBLUEZQT_VERSION_MAJOR=${KF6BluezQt_VERSION_MAJOR})
43 | add_definitions(-DBLUEZQT_VERSION_MINOR=${KF6BluezQt_VERSION_MINOR})
44 |
45 | add_subdirectory(lib)
46 | add_subdirectory(src)
47 | add_subdirectory(settings-plugins)
48 |
49 | if(USE_SYSTEMD)
50 | install(FILES data/lipstick.service DESTINATION /usr/lib/systemd/user)
51 | endif()
52 |
53 | if(BUILD_TESTS)
54 | find_package(Glacier 1.1 COMPONENTS App REQUIRED)
55 | add_subdirectory(tests)
56 | endif()
57 |
58 | install(FILES data/nemovars.conf
59 | DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-home)
60 | install(FILES
61 | data/90-glacier-powerkey.conf
62 | data/90-glacier-devlock.conf
63 | DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/mce)
64 |
65 | # Translations
66 | file(GLOB TS_FILES translations/*.ts)
67 | qt6_add_translation(QM_FILES ${TS_FILES})
68 | add_custom_target(translations DEPENDS ${QM_FILES})
69 | add_dependencies(lipstick translations)
70 |
71 | install(FILES ${QM_FILES}
72 | DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-home/translations)
73 |
74 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
75 |
--------------------------------------------------------------------------------
/COPYING.BSD:
--------------------------------------------------------------------------------
1 | Redistribution and use in source and binary forms, with or without
2 | modification, are permitted provided that the following conditions are
3 | met:
4 |
5 | (1) Redistributions of source code must retain the above copyright
6 | notice, this list of conditions and the following disclaimer.
7 |
8 | (2) Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in
10 | the documentation and/or other materials provided with the
11 | distribution.
12 |
13 | (3)The name of the author may not be used to
14 | endorse or promote products derived from this software without
15 | specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
21 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 | POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/COPYING.MIT:
--------------------------------------------------------------------------------
1 | Permission is hereby granted, free of charge, to any person obtaining a copy
2 | of this software and associated documentation files (the "Software"), to deal
3 | in the Software without restriction, including without limitation the rights
4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5 | copies of the Software, and to permit persons to whom the Software is
6 | furnished to do so, subject to the following conditions:
7 |
8 |
9 | The above copyright notice and this permission notice shall be included in
10 | all copies or substantial portions of the Software.
11 |
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Glacier Home a nice user experience for touchscreens.
2 |
3 | You are welcome to contribute and give feedback.
4 |
--------------------------------------------------------------------------------
/data/90-glacier-devlock.conf:
--------------------------------------------------------------------------------
1 | /system/osso/dsm/locks/devicelock_in_lockscreen=true
2 |
--------------------------------------------------------------------------------
/data/90-glacier-powerkey.conf:
--------------------------------------------------------------------------------
1 | /system/osso/dsm/powerkey/actions_long_on=dbus1
2 | /system/osso/dsm/powerkey/dbus_action1=power-key-menu
3 |
--------------------------------------------------------------------------------
/data/lipstick.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Glacier Home UX
3 | Requires=dbus.socket pre-user-session.target
4 | After=pre-user-session.target
5 |
6 | [Service]
7 | Type=notify
8 | EnvironmentFile=-/usr/share/lipstick-glacier-home-qt5/nemovars.conf
9 | EnvironmentFile=-/var/lib/environment/compositor/*.conf
10 | ExecStart=/usr/bin/lipstick $LIPSTICK_OPTIONS --systemd
11 | Restart=always
12 | TimeoutStartSec=60
13 |
14 | [Install]
15 | WantedBy=user-session.target
16 |
--------------------------------------------------------------------------------
/data/nemovars.conf:
--------------------------------------------------------------------------------
1 | QT_QUICK_CONTROLS_STYLE=Nemo
2 | GLACIER_NATIVEORIENTATION=1
3 |
--------------------------------------------------------------------------------
/interfaces/org.lipstick.polkitAuthAgent.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/lib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_subdirectory(search)
2 |
--------------------------------------------------------------------------------
/lib/search/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(PROJECT glacierhomesearch)
2 |
3 | set(SRC
4 | searchpluginmanager.h
5 | searchpluginmanager.cpp)
6 |
7 | set(PUBLIC_HEADERS
8 | glaciersearchplugin.h)
9 |
10 | include_directories(${CMAKE_SOURCE_DIR}/src)
11 |
12 | add_library(${PROJECT} SHARED ${SRC} ${HEADERS} ${PUBLIC_HEADERS})
13 | add_library(GlacierHome::Search ALIAS ${PROJECT})
14 |
15 | target_link_libraries(${PROJECT}
16 | Qt6::Core)
17 |
18 | set_target_properties(${PROJECT} PROPERTIES VERSION 0.1 SOVERSION 0)
19 | add_definitions( -DINSTALL_LIBDIR="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
20 | add_subdirectory(plugins)
21 |
22 | install(TARGETS ${PROJECT}
23 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/)
24 |
25 | install(FILES ${PUBLIC_HEADERS}
26 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glacier-home)
27 |
--------------------------------------------------------------------------------
/lib/search/glaciersearchplugin.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #ifndef GLACIERSEARCHPLUGIN_H
21 | #define GLACIERSEARCHPLUGIN_H
22 |
23 | #include
24 | #include
25 | #include
26 | #include
27 |
28 | class GLACIER_EXPORT GlacierSearchPlugin : public QObject {
29 | Q_OBJECT
30 | public:
31 | struct SearchResult {
32 | QString iconTitle;
33 | QString iconSource;
34 | QString category;
35 | QString extraCaption;
36 | QMap action;
37 | };
38 |
39 | virtual void search(QString searchString) = 0;
40 | signals:
41 | void searchResultReady(QList results);
42 | };
43 | Q_DECLARE_INTERFACE(GlacierSearchPlugin, "GlacierHome.SearchPlugin")
44 |
45 | #endif // GLACIERSEARCHPLUGIN_H
46 |
--------------------------------------------------------------------------------
/lib/search/plugins/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_subdirectory(application)
2 |
--------------------------------------------------------------------------------
/lib/search/plugins/application/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | SET(PLUGINNAME application)
2 |
3 | set(SRC ${PLUGINNAME}searchplugin.cpp)
4 | SET(HEADERS ${PLUGINNAME}searchplugin.h)
5 |
6 | include_directories(${CMAKE_SOURCE_DIR}/lib)
7 | set(CMAKE_AUTOMOC ON)
8 | add_definitions(-DQT_PLUGIN)
9 |
10 | add_library(${PLUGINNAME} MODULE ${SRC} ${HEADERS})
11 |
12 | target_link_libraries(${PLUGINNAME} PUBLIC
13 | Qt6::Core
14 | Qt6::DBus
15 | GlacierHome::Search
16 | PkgConfig::LIPSTICK)
17 |
18 | install(TARGETS ${PLUGINNAME}
19 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/glacier-home/plugins/search)
20 |
--------------------------------------------------------------------------------
/lib/search/plugins/application/applicationsearchplugin.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #include "applicationsearchplugin.h"
21 |
22 | ApplicationSearchPlugin::ApplicationSearchPlugin(QObject* parent)
23 | : m_launchModel(new LauncherModel)
24 | {
25 | }
26 |
27 | void ApplicationSearchPlugin::search(QString searchString)
28 | {
29 | m_searchResults.clear();
30 |
31 | for (int i = 0; i < m_launchModel.itemCount(); i++) {
32 | QObject* item = m_launchModel.get(i);
33 | if (item->property("title").toString().toLower().indexOf(searchString) != -1
34 | && !item->property("isBlacklisted").toBool()) {
35 | SearchResult result;
36 | result.iconTitle = item->property("title").toString();
37 |
38 | QString iconSource = item->property("iconId").toString();
39 | if (iconSource.isEmpty()) {
40 | iconSource = "/usr/share/glacier-home/qml/theme/default-icon.png";
41 | } else {
42 | if (iconSource.startsWith("/")) {
43 | iconSource = "file://" + iconSource;
44 | } else if (!iconSource.startsWith("file:///")) {
45 | iconSource = "image://theme/" + iconSource;
46 | }
47 | }
48 | result.iconSource = iconSource;
49 |
50 | result.category = tr("Application");
51 | result.extraCaption = tr("installed on your device");
52 | QMap action;
53 | action.insert("type", "exec");
54 | action.insert("app_id", i);
55 | result.action = action;
56 |
57 | m_searchResults.push_back(result);
58 | }
59 | }
60 |
61 | if (!m_searchResults.isEmpty()) {
62 | emit searchResultReady(m_searchResults);
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/search/plugins/application/applicationsearchplugin.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #ifndef APPLICATIONSEARCHPLUGIN_H
21 | #define APPLICATIONSEARCHPLUGIN_H
22 |
23 | #include
24 | #include
25 |
26 | class ApplicationSearchPlugin : public GlacierSearchPlugin {
27 | Q_OBJECT
28 | Q_INTERFACES(GlacierSearchPlugin)
29 | Q_PLUGIN_METADATA(IID "GlacierHome.SearchPlugin")
30 | public:
31 | explicit ApplicationSearchPlugin(QObject* parent = nullptr);
32 | void search(QString searchString);
33 |
34 | private:
35 | LauncherModel m_launchModel;
36 | QList m_searchResults;
37 | };
38 |
39 | #endif // APPLICATIONSEARCHPLUGIN_H
40 |
--------------------------------------------------------------------------------
/lib/search/searchpluginmanager.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #include "searchpluginmanager.h"
21 | #include
22 | #include
23 | #include
24 |
25 | #ifndef INSTALL_LIBDIR
26 | #error INTALLINSTALL_LIBDIR is not set!
27 | #endif
28 |
29 | SearchPluginManager::SearchPluginManager(QObject* parent)
30 | : QObject { parent }
31 | {
32 | QTimer::singleShot(0, this, SLOT(loadSearchPlugins()));
33 | }
34 |
35 | SearchPluginManager::~SearchPluginManager()
36 | {
37 | foreach (const GlacierSearchPlugin* plugin, m_pluginList) {
38 | disconnect(plugin, &GlacierSearchPlugin::searchResultReady, this, &SearchPluginManager::searchResultPluginHandler);
39 | delete plugin;
40 | }
41 | }
42 |
43 | void SearchPluginManager::search(QString searchString)
44 | {
45 | m_searchResults.clear();
46 |
47 | foreach (GlacierSearchPlugin* plugin, m_pluginList) {
48 | plugin->search(searchString);
49 | }
50 | }
51 |
52 | void SearchPluginManager::loadSearchPlugins()
53 | {
54 | QDir pluginsDir(QString::fromUtf8(INSTALL_LIBDIR) + "/glacier-home/plugins/search");
55 | QList pluginsLibList = pluginsDir.entryList(QDir::Files);
56 |
57 | for (const QString& file : std::as_const(pluginsLibList)) {
58 | QPluginLoader pluginLoader(pluginsDir.path() + "/" + file);
59 |
60 | QObject* plugin = pluginLoader.instance();
61 | if (plugin) {
62 | GlacierSearchPlugin* searchPlugin = qobject_cast(plugin);
63 | if (searchPlugin != nullptr) {
64 | m_pluginList.push_back(searchPlugin);
65 | connect(searchPlugin, &GlacierSearchPlugin::searchResultReady, this, &SearchPluginManager::searchResultReady);
66 | } else {
67 | qWarning() << "CANT CAST PLIUGIN FROM" << pluginsDir.path() + "/" + file;
68 | }
69 | } else {
70 | delete plugin;
71 | }
72 | }
73 | }
74 |
75 | void SearchPluginManager::searchResultPluginHandler(QList results)
76 | {
77 | m_searchResults.append(results);
78 | emit searchResultReady(m_searchResults);
79 | }
80 |
--------------------------------------------------------------------------------
/lib/search/searchpluginmanager.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #ifndef SEARCHPLUGINMANAGER_H
21 | #define SEARCHPLUGINMANAGER_H
22 |
23 | #include "glaciersearchplugin.h"
24 | #include
25 | #include
26 | #include
27 |
28 | class SearchPluginManager : public QObject {
29 | Q_OBJECT
30 | public:
31 | explicit SearchPluginManager(QObject* parent = nullptr);
32 | virtual ~SearchPluginManager();
33 |
34 | void search(QString searchString);
35 |
36 | signals:
37 | void searchResultReady(QList results);
38 |
39 | private slots:
40 | void loadSearchPlugins();
41 | void searchResultPluginHandler(QList results);
42 |
43 | private:
44 | QList m_pluginList;
45 | QList m_searchResults;
46 | };
47 |
48 | #endif // SEARCHPLUGINMANAGER_H
49 |
--------------------------------------------------------------------------------
/rpm/lipstick-glacier-home-qt5.spec:
--------------------------------------------------------------------------------
1 | Name: lipstick-glacier-home-qt5
2 | Summary: A nice homescreen for Glacier experience
3 | Version: 0.27
4 | Release: 2
5 | Group: System/GUI/Other
6 | License: BSD
7 | URL: https://github.com/nemomobile-ux/glacier-home
8 | Source0: %{name}-%{version}.tar.bz2
9 |
10 | Requires: lipstick-qt5 >= 0.17.0
11 | Requires: nemo-qml-plugin-configuration-qt5
12 | Requires: nemo-qml-plugin-notifications-qt5
13 | Requires: nemo-qml-plugin-time-qt5
14 | Requires: nemo-qml-plugin-dbus-qt5
15 | Requires: nemo-qml-plugin-statusnotifier
16 | Requires: nemo-qml-plugin-connectivity
17 | Requires: nemo-qml-plugin-contacts-qt5
18 | Requires: qt5-qtfeedback
19 | %if 0%{?fedora}
20 | Requires: qt5-qtdeclarative
21 | %else
22 | Requires: qt5-qtdeclarative-import-window2
23 | Requires: qt5-qtdeclarative-import-sensors
24 | Requires: qt5-qtdeclarative-plugin-layouts
25 | %endif
26 | Requires: qt5-qtquickcontrols >= 5.3.1
27 | Requires: qt5-qtquickcontrols-nemo >= 5.1.1
28 | Requires: nemo-qml-plugin-systemsettings >= 0.2.30
29 | Requires: connman-qt5
30 | Requires: libqofono-qt5-declarative
31 | Requires: libqofonoext-declarative
32 | Requires: libngf-qt5-declarative
33 | Requires: nemo-theme-glacier
34 | %if 0%{?fedora}
35 | Requires: open-sans-fonts
36 | %else
37 | Requires: google-opensans-fonts
38 | %endif
39 | Requires: mpris-qt5-qml-plugin
40 | Requires: glacier-settings
41 | Requires: glacier-gallery-qmlplugin
42 | Requires: libmce-qt5-declarative >= 1.3.0
43 | Requires: pulseaudio-modules-nemo-parameters
44 | Requires: libqofonoext-declarative
45 | %if 0%{?fedora}
46 | Requires: qt5-qtmultimedia
47 | %else
48 | Requires: qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer
49 | Requires: qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer
50 | Requires: qt5-qtmultimedia-plugin-audio-pulseaudio
51 | %endif
52 | Requires: kf5bluezqt-declarative
53 |
54 | BuildRequires: cmake
55 | BuildRequires: extra-cmake-modules >= 5.68.0
56 | BuildRequires: pkgconfig(Qt5Core)
57 | BuildRequires: pkgconfig(Qt5Quick)
58 | BuildRequires: pkgconfig(lipstick-qt5) >= 0.12.0
59 | BuildRequires: pkgconfig(Qt5WaylandCompositor)
60 | BuildRequires: pkgconfig(Qt5WaylandClient)
61 | BuildRequires: pkgconfig(nemodevicelock)
62 | BuildRequires: kf5bluezqt-bluez5-devel >= 5.68.0
63 | BuildRequires: qt5-qttools-linguist >= 5.9
64 |
65 | Provides: lipstick-colorful-home-qt5
66 |
67 | Conflicts: lipstick-example-home
68 |
69 | %description
70 | A homescreen for Nemo Mobile
71 |
72 | %prep
73 | %setup -q -n %{name}-%{version}
74 |
75 | %build
76 | mkdir build
77 | cd build
78 | %cmake -DCMAKE_VERBOSE_MAKEFILE=ON ..
79 | cmake --build .
80 |
81 | %install
82 | cd build
83 | rm -rf %{buildroot}
84 | DESTDIR=%{buildroot} cmake --build . --target install
85 |
86 | mkdir -p %{buildroot}%{_userunitdir}/user-session.target.wants/
87 | ln -s ../lipstick.service %{buildroot}%{_userunitdir}/user-session.target.wants/lipstick.service
88 |
89 | %files
90 | %defattr(-,root,root,-)
91 | %{_sysconfdir}/mce/90-glacier-*.conf
92 | %{_bindir}/lipstick
93 | %{_userunitdir}/lipstick.service
94 | %{_userunitdir}/user-session.target.wants/lipstick.service
95 | %{_datadir}/lipstick-glacier-home-qt5/nemovars.conf
96 | %{_datadir}/lipstick-glacier-home-qt5/qml
97 | %{_datadir}/lipstick-glacier-home-qt5/translations
98 | %{_datadir}/glacier-settings/
99 | %{_datadir}/mapplauncherd/privileges.d/glacier-home.privileges
100 |
101 | %post
102 | systemctl-user --no-block restart lipstick.service
103 |
--------------------------------------------------------------------------------
/settings-plugins/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_subdirectory(desktop)
2 | add_subdirectory(wallpaper)
3 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | SET(SRC desktopsettingsplugin.cpp)
2 | SET(HEADERS desktopsettingsplugin.h)
3 |
4 | SET(PLUGINS_FILES
5 | desktop.qml
6 | desktop.svg)
7 |
8 | set(CMAKE_AUTOMOC ON)
9 |
10 | add_definitions(-DQT_PLUGIN)
11 |
12 | add_library(desktop MODULE ${SRC} ${HEADERS})
13 | target_include_directories(desktop PUBLIC "/usr/include/glacier-settings/")
14 |
15 | target_link_libraries(desktop
16 | Qt6::Gui
17 | Qt6::Qml
18 | Qt6::Quick
19 | -lglaciersettings)
20 |
21 | install(TARGETS desktop
22 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/glacier-settings/)
23 |
24 | INSTALL(FILES ${PLUGINS_FILES}
25 | DESTINATION /usr/share/glacier-settings/plugins/desktop/)
26 |
27 | # Translations
28 | file(GLOB TS_FILES translations/*.ts)
29 | #set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_INSTALL_LOCALEDIR})
30 | qt6_add_translation(QM_FILES ${TS_FILES})
31 | add_custom_target(desktop_translations DEPENDS ${QM_FILES})
32 | add_dependencies(desktop desktop_translations)
33 |
34 | install(FILES ${QM_FILES}
35 | DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-settings/translations)
36 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/desktop.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018-2022 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | import QtQuick
21 | import Nemo
22 | import Nemo.Controls
23 |
24 | import Nemo.Configuration 1.0
25 |
26 | import Glacier.Controls.Settings 1.0
27 |
28 | Page {
29 | id:desktopSettingsPage
30 |
31 | headerTools: HeaderToolsLayout { showBackButton: true; title: qsTr("Desktop")}
32 |
33 | ConfigurationValue {
34 | id: windowedMode
35 | key: "/home/glacier/windowedMode"
36 | defaultValue: false
37 | }
38 |
39 | ConfigurationValue {
40 | id: alwaysShowSearch
41 | key: "/home/glacier/appLauncher/alwaysShowSearch"
42 | defaultValue: true
43 | }
44 |
45 | ConfigurationValue {
46 | id: infinityPager
47 | key: "/home/glacier/homeScreen/infinityPager"
48 | defaultValue: false
49 | }
50 |
51 | ConfigurationValue {
52 | id: windowAnimation
53 | key: "/home/glacier/homeScreen/windowAnimation"
54 | defaultValue: true
55 | }
56 |
57 | SettingsColumn{
58 | id: windowedModeSettings
59 | spacing: Theme.itemSpacingLarge
60 |
61 |
62 | RightCheckBox{
63 | id: windowedModeCheck
64 | checked: windowedMode.value
65 | onClicked: windowedMode.value = checked
66 | label: qsTr("Enable windowed mode");
67 | }
68 |
69 | RightCheckBox{
70 | id: alwaysShowSearchCheck
71 | checked: alwaysShowSearch.value
72 | onClicked: alwaysShowSearch.value = checked
73 | label: qsTr("Always show search panel");
74 | }
75 |
76 | RightCheckBox{
77 | id: infinityPagerCheck
78 | checked: infinityPager.value
79 | onClicked: infinityPager.value = checked
80 | label: qsTr("Infinite scrolling main screen");
81 | }
82 |
83 | RightCheckBox{
84 | id: windowAnimationCheck
85 | checked: windowAnimation.value
86 | onClicked: windowAnimation.value = checked
87 | label: qsTr("Window animation");
88 | }
89 |
90 | }
91 | }
92 |
93 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/desktop.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/desktopsettingsplugin.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #include "desktopsettingsplugin.h"
21 |
22 | DesktopSettingsPlugin::DesktopSettingsPlugin(QObject* parent)
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/desktopsettingsplugin.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #ifndef DESKTOPSETTINGSPLUGIN_H
21 | #define DESKTOPSETTINGSPLUGIN_H
22 |
23 | #include
24 |
25 | class DesktopSettingsPlugin : public GlacierSettingsPlugin {
26 | Q_OBJECT
27 | Q_INTERFACES(GlacierSettingsPlugin)
28 | Q_PLUGIN_METADATA(IID "Glacier.SettingsPlugin")
29 | public:
30 | explicit DesktopSettingsPlugin(QObject* parent = nullptr);
31 | PluginCategory category() { return PluginCategory::Personalization; }
32 | QString id() { return "desktop"; }
33 | QString title() { return tr("Desktop"); }
34 | QString description() { return tr("Setup desktop behavior"); }
35 | QString qmlPath() { return "/usr/share/glacier-settings/plugins/desktop/desktop.qml"; }
36 | QString icon() { return "/usr/share/glacier-settings/plugins/desktop/desktop.svg"; }
37 | bool enabled() { return true; }
38 | };
39 |
40 | #endif // DESCTOPSETTINGSPLUGIN_H
41 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/translations/desktop.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DesktopSettingsPlugin
6 |
7 |
8 | Desktop
9 |
10 |
11 |
12 |
13 | Setup desktop behavior
14 |
15 |
16 |
17 |
18 | desktop
19 |
20 |
21 | Desktop
22 |
23 |
24 |
25 |
26 | Enable windowed mode
27 |
28 |
29 |
30 |
31 | Always show search panel
32 |
33 |
34 |
35 |
36 | Infinite scrolling main screen
37 |
38 |
39 |
40 |
41 | Window animation
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/translations/desktop_cs.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 | DesktopSettingsPlugin
4 |
5 |
6 | Desktop
7 | Plocha
8 |
9 |
10 |
11 | Setup desktop behavior
12 | Nastavit chování plochy
13 |
14 |
15 |
16 | desktop
17 |
18 |
19 | Desktop
20 | Plocha
21 |
22 |
23 |
24 | Enable windowed mode
25 | Povolit režim v okně
26 |
27 |
28 |
29 | Always show search panel
30 | Vždy zobrazovat panel vyhledávání
31 |
32 |
33 |
34 | Infinite scrolling main screen
35 | Nekonečná domovká obrazovka
36 |
37 |
38 |
39 | Window animation
40 | Animace oken
41 |
42 |
43 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/translations/desktop_de.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DesktopSettingsPlugin
6 |
7 |
8 | Desktop
9 | Desktop
10 |
11 |
12 |
13 | Setup desktop behavior
14 |
15 |
16 |
17 |
18 | desktop
19 |
20 |
21 | Desktop
22 | Desktop
23 |
24 |
25 |
26 | Enable windowed mode
27 | Fenstermodus aktivieren
28 |
29 |
30 |
31 | Always show search panel
32 | Suchfeld immer anzeigen
33 |
34 |
35 |
36 | Infinite scrolling main screen
37 |
38 |
39 |
40 |
41 | Window animation
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/translations/desktop_es.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DesktopSettingsPlugin
6 |
7 |
8 | Desktop
9 | Escritorio
10 |
11 |
12 |
13 | Setup desktop behavior
14 |
15 |
16 |
17 |
18 | desktop
19 |
20 |
21 | Desktop
22 | Escritorio
23 |
24 |
25 |
26 | Enable windowed mode
27 | Habilitar modo de ventana
28 |
29 |
30 |
31 | Always show search panel
32 | Mostrar siempre panel Buscar
33 |
34 |
35 |
36 | Infinite scrolling main screen
37 |
38 |
39 |
40 |
41 | Window animation
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/translations/desktop_fi.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DesktopSettingsPlugin
6 |
7 |
8 | Desktop
9 | Työpöytä
10 |
11 |
12 |
13 | Setup desktop behavior
14 |
15 |
16 |
17 |
18 | desktop
19 |
20 |
21 | Desktop
22 | Työpöytä
23 |
24 |
25 |
26 | Enable windowed mode
27 | Käytä ikkunoitua tilaa
28 |
29 |
30 |
31 | Always show search panel
32 | Näytä haku aina
33 |
34 |
35 |
36 | Infinite scrolling main screen
37 |
38 |
39 |
40 |
41 | Window animation
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/translations/desktop_nl.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DesktopSettingsPlugin
6 |
7 |
8 | Desktop
9 | Desktop
10 |
11 |
12 |
13 | Setup desktop behavior
14 |
15 |
16 |
17 |
18 | desktop
19 |
20 |
21 | Desktop
22 | Desktop
23 |
24 |
25 |
26 | Enable windowed mode
27 | Activeer venstermodus
28 |
29 |
30 |
31 | Always show search panel
32 | Toon altijd het zoekpaneel
33 |
34 |
35 |
36 | Infinite scrolling main screen
37 |
38 |
39 |
40 |
41 | Window animation
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/translations/desktop_pl.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DesktopSettingsPlugin
6 |
7 |
8 | Desktop
9 | Pulpit
10 |
11 |
12 |
13 | Setup desktop behavior
14 |
15 |
16 |
17 |
18 | desktop
19 |
20 |
21 | Desktop
22 | Pulpit
23 |
24 |
25 |
26 | Enable windowed mode
27 | Włącz tryb okienkek
28 |
29 |
30 |
31 | Always show search panel
32 | Zawsze pokazuj panel wyszukiwania
33 |
34 |
35 |
36 | Infinite scrolling main screen
37 |
38 |
39 |
40 |
41 | Window animation
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/translations/desktop_ru.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DesktopSettingsPlugin
6 |
7 |
8 | Desktop
9 | Рабочий стол
10 |
11 |
12 |
13 | Setup desktop behavior
14 | Настроить поведение рабочего стола
15 |
16 |
17 |
18 | desktop
19 |
20 |
21 | Desktop
22 | Рабочий стол
23 |
24 |
25 |
26 | Enable windowed mode
27 | Включить поддержку многооконности
28 |
29 |
30 |
31 | Always show search panel
32 | Всегда показывать панель поиска
33 |
34 |
35 |
36 | Infinite scrolling main screen
37 |
38 |
39 |
40 |
41 | Window animation
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/settings-plugins/desktop/translations/desktop_uk.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DesktopSettingsPlugin
6 |
7 |
8 | Desktop
9 | Робочий стіл
10 |
11 |
12 |
13 | Setup desktop behavior
14 |
15 |
16 |
17 |
18 | desktop
19 |
20 |
21 | Desktop
22 | Робочий стіл
23 |
24 |
25 |
26 | Enable windowed mode
27 | Увімкнути віконний режим
28 |
29 |
30 |
31 | Always show search panel
32 | Завжди показувати панель пошуку
33 |
34 |
35 |
36 | Infinite scrolling main screen
37 |
38 |
39 |
40 |
41 | Window animation
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | SET(SRC wallpapersettingsplugin.cpp)
2 | SET(HEADERS wallpapersettingsplugin.h)
3 |
4 | SET(PLUGINS_FILES
5 | wallpaper.qml
6 | selectImage.qml
7 | wallpaper.svg)
8 |
9 | set(CMAKE_AUTOMOC ON)
10 |
11 | add_definitions(-DQT_PLUGIN)
12 |
13 | add_library(wallpaper MODULE ${SRC} ${HEADERS})
14 | target_include_directories(wallpaper PUBLIC "/usr/include/glacier-settings/")
15 |
16 | target_link_libraries(wallpaper
17 | Qt6::Gui
18 | Qt6::Qml
19 | Qt6::Quick
20 | -lglaciersettings)
21 |
22 | install(TARGETS wallpaper
23 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/glacier-settings/)
24 |
25 | INSTALL(FILES ${PLUGINS_FILES}
26 | DESTINATION /usr/share/glacier-settings/plugins/wallpaper/)
27 |
28 | # Translations
29 | file(GLOB TS_FILES translations/*.ts)
30 | #set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_INSTALL_LOCALEDIR})
31 | qt6_add_translation(QM_FILES ${TS_FILES})
32 | add_custom_target(wallpaper_translations DEPENDS ${QM_FILES})
33 | add_dependencies(wallpaper wallpaper_translations)
34 |
35 | install(FILES ${QM_FILES}
36 | DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-settings/translations)
37 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/selectImage.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018-2022 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | import QtQuick
21 | import Nemo
22 | import Nemo.Controls
23 |
24 | import Nemo.Configuration 1.0
25 | import org.nemomobile.gallery 1.0
26 |
27 | import Glacier.Controls.Settings 1.0
28 |
29 | Page {
30 | id: wallpaperSelectPage
31 |
32 | headerTools: HeaderToolsLayout { showBackButton: true; title: qsTr("Select wallpaper")}
33 |
34 | property string valueKey: ""
35 |
36 | ConfigurationValue {
37 | id: wallpaper
38 | key: wallpaperSelectPage.valueKey
39 | }
40 |
41 | GalleryView {
42 | anchors{
43 | fill: parent
44 | topMargin: Theme.itemSpacingLarge
45 | }
46 | baseThumbnailSize: (parent.height>parent.width) ? parent.width/4 : parent.height/4
47 | model: GalleryModel {
48 | id: gallery
49 | }
50 |
51 | delegate: GalleryDelegate {
52 | MouseArea {
53 | anchors.fill: parent
54 | onClicked: {
55 | wallpaper.value = url
56 | pageStack.pop();
57 | }
58 | }
59 | }
60 | }
61 |
62 | Component.onCompleted: {
63 | gallery.createFilter(gallery, "imagesfilter", "GalleryStartsWithFilter", "mimeType", "image/")
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/translations/wallpaper.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | WallpaperSettingsPlugin
6 |
7 |
8 | Wallpaper
9 |
10 |
11 |
12 |
13 | Select background image
14 |
15 |
16 |
17 |
18 | selectImage
19 |
20 |
21 | Select wallpaper
22 |
23 |
24 |
25 |
26 | wallpaper
27 |
28 |
29 | Wallpapers
30 |
31 |
32 |
33 |
34 | Use parallax effect for wallpaper
35 |
36 |
37 |
38 |
39 | Use different images for lockscreen and home screen
40 |
41 |
42 |
43 |
44 | Homescreen wallpaper
45 |
46 |
47 |
48 |
49 | Wallpaper
50 |
51 |
52 |
53 |
54 | Lockscreen wallpaper
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/translations/wallpaper_cs.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 | WallpaperSettingsPlugin
4 |
5 |
6 | Wallpaper
7 | Tapeta
8 |
9 |
10 |
11 | Select background image
12 | Zvolit obrázek pozadí
13 |
14 |
15 |
16 | selectImage
17 |
18 |
19 | Select wallpaper
20 | Zvolit tapetu
21 |
22 |
23 |
24 | wallpaper
25 |
26 |
27 | Wallpapers
28 | Tapety
29 |
30 |
31 |
32 | Use parallax effect for wallpaper
33 | Použít efekt parallaxy pro tapetu
34 |
35 |
36 |
37 | Use different images for lockscreen and home screen
38 | Použít jiné obrázky pro zamykací a domácí obrazovku
39 |
40 |
41 |
42 | Homescreen wallpaper
43 | Tapeta domácí obrazovky
44 |
45 |
46 |
47 | Wallpaper
48 | Tapeta
49 |
50 |
51 |
52 | Lockscreen wallpaper
53 | Tapeta zamykací obrazovky
54 |
55 |
56 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/translations/wallpaper_de.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | WallpaperSettingsPlugin
6 |
7 |
8 | Wallpaper
9 | Hintergrund
10 |
11 |
12 |
13 | Select background image
14 |
15 |
16 |
17 |
18 | selectImage
19 |
20 |
21 | Select wallpaper
22 | Hintergrundbild auswählen
23 |
24 |
25 |
26 | wallpaper
27 |
28 |
29 | Wallpapers
30 | Hintergrund
31 |
32 |
33 |
34 | Use parallax effect for wallpaper
35 | Parallaxe auf Hintergrund anwenden
36 |
37 |
38 |
39 | Use different images for lockscreen and home screen
40 | Unterschiedliche Bilder für Lockscreen und Homescreen verwenden
41 |
42 |
43 |
44 | Homescreen wallpaper
45 | Homescreen-Hintergrund
46 |
47 |
48 |
49 | Wallpaper
50 | Hintergrund
51 |
52 |
53 |
54 | Lockscreen wallpaper
55 | Lockscreen-Hintergrund
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/translations/wallpaper_es.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | WallpaperSettingsPlugin
6 |
7 |
8 | Wallpaper
9 | Fondo de pantalla
10 |
11 |
12 |
13 | Select background image
14 |
15 |
16 |
17 |
18 | selectImage
19 |
20 |
21 | Select wallpaper
22 | Elegir fondo de pantalla
23 |
24 |
25 |
26 | wallpaper
27 |
28 |
29 | Wallpapers
30 | Fondo de pantallas
31 |
32 |
33 |
34 | Use parallax effect for wallpaper
35 | Usar efecto paralaje para fondo de pantalla
36 |
37 |
38 |
39 | Use different images for lockscreen and home screen
40 | Usar diferentes imágenes para pantalla de bloqueo e inicio
41 |
42 |
43 |
44 | Homescreen wallpaper
45 | Fondo de pantalla de inicio
46 |
47 |
48 |
49 | Wallpaper
50 | Fondo de pantalla
51 |
52 |
53 |
54 | Lockscreen wallpaper
55 | Fondo de pantalla de bloqueo
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/translations/wallpaper_fi.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | WallpaperSettingsPlugin
6 |
7 |
8 | Wallpaper
9 | Taustakuva
10 |
11 |
12 |
13 | Select background image
14 |
15 |
16 |
17 |
18 | selectImage
19 |
20 |
21 | Select wallpaper
22 | Valitse taustakuva
23 |
24 |
25 |
26 | wallpaper
27 |
28 |
29 | Wallpapers
30 | Taustakuvat
31 |
32 |
33 |
34 | Use parallax effect for wallpaper
35 | Käytä parallaksitehostetta taustakuvalle
36 |
37 |
38 |
39 | Use different images for lockscreen and home screen
40 | Käytä eri taustakuvaa lukitus- ja kotinäytössä
41 |
42 |
43 |
44 | Homescreen wallpaper
45 | Kotinäytön taustakuva
46 |
47 |
48 |
49 | Wallpaper
50 | Taustakuva
51 |
52 |
53 |
54 | Lockscreen wallpaper
55 | Lukitusnäytön taustakuva
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/translations/wallpaper_nl.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | WallpaperSettingsPlugin
6 |
7 |
8 | Wallpaper
9 | Achtergrond
10 |
11 |
12 |
13 | Select background image
14 |
15 |
16 |
17 |
18 | selectImage
19 |
20 |
21 | Select wallpaper
22 | Selecteer achtergrond
23 |
24 |
25 |
26 | wallpaper
27 |
28 |
29 | Wallpapers
30 | Achtergronden
31 |
32 |
33 |
34 | Use parallax effect for wallpaper
35 | Gebruik parallax effect
36 |
37 |
38 |
39 | Use different images for lockscreen and home screen
40 | Gebruik een andere achtergrond voor het vergrendelscherm als het hoofdscherm
41 |
42 |
43 |
44 | Homescreen wallpaper
45 | Hoofdscherm achtergrond
46 |
47 |
48 |
49 | Wallpaper
50 | Achtergrond
51 |
52 |
53 |
54 | Lockscreen wallpaper
55 | Vergrendelscherm achtergrond
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/translations/wallpaper_pl.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | WallpaperSettingsPlugin
6 |
7 |
8 | Wallpaper
9 | Tapeta
10 |
11 |
12 |
13 | Select background image
14 |
15 |
16 |
17 |
18 | selectImage
19 |
20 |
21 | Select wallpaper
22 | Wybierz tapetę
23 |
24 |
25 |
26 | wallpaper
27 |
28 |
29 | Wallpapers
30 | Tapety
31 |
32 |
33 |
34 | Use parallax effect for wallpaper
35 | Użyj efektu paralaksy dla tapety
36 |
37 |
38 |
39 | Use different images for lockscreen and home screen
40 | Użyj innych obrazów dla ekranu blokowania i ekranu domowego
41 |
42 |
43 |
44 | Homescreen wallpaper
45 | Tapeta ekranu domowego
46 |
47 |
48 |
49 | Wallpaper
50 | Tapeta
51 |
52 |
53 |
54 | Lockscreen wallpaper
55 | Tapeta ekranu blokowania
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/translations/wallpaper_ru.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 | WallpaperSettingsPlugin
4 |
5 |
6 | Wallpaper
7 | Обои
8 |
9 |
10 |
11 | Select background image
12 | Выберите обои
13 |
14 |
15 |
16 | selectImage
17 |
18 |
19 | Select wallpaper
20 | Выбрать обои
21 |
22 |
23 |
24 | wallpaper
25 |
26 |
27 | Wallpapers
28 | Обои
29 |
30 |
31 |
32 | Use parallax effect for wallpaper
33 | Использовать эффект паралакса для обоев
34 |
35 |
36 |
37 | Use different images for lockscreen and home screen
38 | Использовать разные изображения для экрана блокировки и домашнего экрана
39 |
40 |
41 |
42 | Homescreen wallpaper
43 | Обои домашнего экрана
44 |
45 |
46 |
47 | Wallpaper
48 | Обои
49 |
50 |
51 |
52 | Lockscreen wallpaper
53 | Обои экрана блокировки
54 |
55 |
56 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/translations/wallpaper_uk.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | WallpaperSettingsPlugin
6 |
7 |
8 | Wallpaper
9 | Тема
10 |
11 |
12 |
13 | Select background image
14 |
15 |
16 |
17 |
18 | selectImage
19 |
20 |
21 | Select wallpaper
22 | Виберіть тему
23 |
24 |
25 |
26 | wallpaper
27 |
28 |
29 | Wallpapers
30 | Теми
31 |
32 |
33 |
34 | Use parallax effect for wallpaper
35 | Використовуйте ефект паралакса для тем
36 |
37 |
38 |
39 | Use different images for lockscreen and home screen
40 | Використовуйте різні зображення для екрана блокування та головного екрана
41 |
42 |
43 |
44 | Homescreen wallpaper
45 | Зображення для головного екрана
46 |
47 |
48 |
49 | Wallpaper
50 | Тема
51 |
52 |
53 |
54 | Lockscreen wallpaper
55 | Зображення для екрана в режимі блокування
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/wallpaper.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/wallpapersettingsplugin.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #include "wallpapersettingsplugin.h"
21 |
22 | WallpaperSettingsPlugin::WallpaperSettingsPlugin(QObject* parent)
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/settings-plugins/wallpaper/wallpapersettingsplugin.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #ifndef WALLPAPERSETTINGSPLUGIN_H
21 | #define WALLPAPERSETTINGSPLUGIN_H
22 |
23 | #include
24 |
25 | class WallpaperSettingsPlugin : public GlacierSettingsPlugin {
26 | Q_OBJECT
27 | Q_INTERFACES(GlacierSettingsPlugin)
28 | Q_PLUGIN_METADATA(IID "Glacier.SettingsPlugin")
29 | public:
30 | explicit WallpaperSettingsPlugin(QObject* parent = nullptr);
31 | PluginCategory category() { return PluginCategory::Personalization; }
32 | QString id() { return "wallpaper"; }
33 | QString title() { return tr("Wallpaper"); }
34 | QString description() { return tr("Select background image"); }
35 | QString qmlPath() { return "/usr/share/glacier-settings/plugins/wallpaper/wallpaper.qml"; }
36 | QString icon() { return "/usr/share/glacier-settings/plugins/wallpaper/wallpaper.svg"; }
37 | bool enabled() { return true; }
38 | };
39 |
40 | #endif // WALLPAPERSETTINGSPLUGIN_H
41 |
--------------------------------------------------------------------------------
/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | file(GLOB_RECURSE QML_JS_FILES *.qml *.js)
2 |
3 | set(SRC
4 | main.cpp
5 | fileutils.cpp
6 | fileutils.h
7 | mceconnect.cpp
8 | mceconnect.h
9 | logging.h
10 | logging.cpp
11 | glacier_global.h
12 | models/glacierwindowmodel.cpp
13 | models/glacierwindowmodel.h
14 | models/controlcenterbuttonsmodel.cpp
15 | models/controlcenterbuttonsmodel.h
16 | models/searchmodel.h
17 | models/searchmodel.cpp
18 | ${QML_JS_FILES})
19 |
20 | #add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/geoagent.h ${CMAKE_CURRENT_SOURCE_DIR}/geoagent.cpp
21 | # DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.GeoClue2.Agent.xml
22 | # COMMENT "Generate adaptors files for Dbus service"
23 | # COMMAND qdbusxml2cpp -l GeoclueAgent -i geoclueagent.h -a geoagent.h: ${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.GeoClue2.Agent.xml
24 | # COMMAND qdbusxml2cpp -i geoagent.h -l GeoclueAgent -i geoclueagent.h -a :geoagent.cpp ${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.GeoClue2.Agent.xml
25 | # WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
26 |
27 | #set_property(SOURCE geoagent.h PROPERTY SKIP_AUTOGEN ON)
28 | #set_property(SOURCE geoagent.cpp PROPERTY SKIP_AUTOGEN ON)
29 |
30 | if(USE_GEOCLUE2)
31 | add_compile_options(-DUSE_GEOCLUE2)
32 |
33 | set(GEOCLUE_SRC
34 | geoclueagent.cpp
35 | geoclueagent.h
36 | geoagent.cpp
37 | geoagent.h)
38 | endif()
39 |
40 | add_executable(lipstick ${SRC} ${GEOCLUE_SRC} ${PUBLIC_HEADERS})
41 |
42 | include_directories(${CMAKE_SOURCE_DIR}/lib)
43 |
44 | target_link_libraries(lipstick PUBLIC
45 | Qt6::Gui
46 | Qt6::Qml
47 | Qt6::Quick
48 | Qt6::DBus
49 | GlacierHome::Search
50 | PkgConfig::LIPSTICK
51 | PkgConfig::MLITE6
52 | PkgConfig::NEMODEVICELOCK
53 | PkgConfig::NEMOCONNECTIVITY)
54 |
55 | target_link_libraries(lipstick PUBLIC
56 | Qt6::WaylandCompositor)
57 |
58 | install(TARGETS lipstick RUNTIME
59 | DESTINATION ${CMAKE_INSTALL_BINDIR})
60 | install(DIRECTORY qml
61 | DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-home)
62 |
--------------------------------------------------------------------------------
/src/fileutils.h:
--------------------------------------------------------------------------------
1 | #ifndef FILEUTILS_H
2 | #define FILEUTILS_H
3 |
4 | #include
5 |
6 | class FileUtils : public QObject {
7 | Q_OBJECT
8 | public:
9 | explicit FileUtils(QObject* parent = 0);
10 |
11 | Q_INVOKABLE QString getScreenshotPath();
12 | Q_INVOKABLE QStringList getBlacklistedApplications();
13 |
14 | private:
15 | void makeDefaultMenu();
16 | };
17 |
18 | #endif // FILEUTILS_H
19 |
--------------------------------------------------------------------------------
/src/geoagent.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by qdbusxml2cpp version 0.8
3 | * Command line was: qdbusxml2cpp -i geoagent.h -l GeoclueAgent -i geoclueagent.h -a :geoagent.cpp /home/nemo/work/glacier-home/src/org.freedesktop.GeoClue2.Agent.xml
4 | *
5 | * qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd.
6 | *
7 | * This is an auto-generated file.
8 | * Do not edit! All changes made to it will be lost.
9 | */
10 |
11 | #include "geoagent.h"
12 | #include "geoclueagent.h"
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 |
21 | /*
22 | * Implementation of adaptor class AgentAdaptor
23 | */
24 |
25 | AgentAdaptor::AgentAdaptor(GeoclueAgent* parent)
26 | : QDBusAbstractAdaptor(parent)
27 | {
28 | // constructor
29 | setAutoRelaySignals(true);
30 | }
31 |
32 | AgentAdaptor::~AgentAdaptor()
33 | {
34 | // destructor
35 | }
36 |
37 | uint AgentAdaptor::maxAccuracyLevel() const
38 | {
39 | // get the value of property MaxAccuracyLevel
40 | return qvariant_cast(parent()->property("MaxAccuracyLevel"));
41 | }
42 |
43 | void AgentAdaptor::AuthorizeApp(const QString& desktop_id, uint req_accuracy_level, bool& authorized, uint& allowed_accuracy_level)
44 | {
45 | // handle method call org.freedesktop.GeoClue2.Agent.AuthorizeApp
46 | authorized = parent()->AuthorizeApp(desktop_id, req_accuracy_level, allowed_accuracy_level);
47 | }
48 |
--------------------------------------------------------------------------------
/src/geoagent.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by qdbusxml2cpp version 0.8
3 | * Command line was: qdbusxml2cpp -l GeoclueAgent -i geoclueagent.h -a geoagent.h: src/org.freedesktop.GeoClue2.Agent.xml
4 | *
5 | * qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd.
6 | *
7 | * This is an auto-generated file.
8 | * This file may have been hand-edited. Look for HAND-EDIT comments
9 | * before re-generating it.
10 | */
11 |
12 | #ifndef GEOAGENT_H
13 | #define GEOAGENT_H
14 |
15 | #include "geoclueagent.h"
16 | #include
17 | #include
18 | QT_BEGIN_NAMESPACE
19 | class QByteArray;
20 | template
21 | class QList;
22 | template
23 | class QMap;
24 | class QString;
25 | class QStringList;
26 | class QVariant;
27 | QT_END_NAMESPACE
28 |
29 | /*
30 | * Adaptor class for interface org.freedesktop.GeoClue2.Agent
31 | */
32 | class AgentAdaptor : public QDBusAbstractAdaptor {
33 | Q_OBJECT
34 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.GeoClue2.Agent")
35 | Q_CLASSINFO("D-Bus Introspection", ""
36 | " \n"
37 | " \n"
38 | " \n"
39 | " \n"
40 | " \n"
41 | " \n"
42 | " \n"
43 | " \n"
44 | " \n"
45 | "")
46 | public:
47 | AgentAdaptor(GeoclueAgent* parent);
48 | virtual ~AgentAdaptor();
49 |
50 | inline GeoclueAgent* parent() const
51 | {
52 | return static_cast(QObject::parent());
53 | }
54 |
55 | public: // PROPERTIES
56 | Q_PROPERTY(uint MaxAccuracyLevel READ maxAccuracyLevel)
57 | uint maxAccuracyLevel() const;
58 |
59 | public Q_SLOTS: // METHODS
60 | void AuthorizeApp(const QString& desktop_id, uint req_accuracy_level, bool& authorized, uint& allowed_accuracy_level);
61 | Q_SIGNALS: // SIGNALS
62 | };
63 |
64 | #endif
65 |
--------------------------------------------------------------------------------
/src/geoclueagent.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2021 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 | #ifndef GEOCLUE_AGENT_H
32 | #define GEOCLUE_AGENT_H
33 |
34 | #include
35 | #include
36 | #include
37 | #include
38 | #include
39 | #include
40 | #include
41 | #include
42 |
43 | class GeoclueAgent : public QObject {
44 | Q_OBJECT
45 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.GeoClue2.Agent")
46 | Q_PROPERTY(bool inUse READ inUse NOTIFY inUseChanged)
47 | Q_SCRIPTABLE Q_PROPERTY(uint MaxAccuracyLevel READ MaxAccuracyLevel)
48 |
49 | public : explicit GeoclueAgent(QObject* parent = nullptr);
50 | uint MaxAccuracyLevel();
51 | bool inUse() { return m_inUse; }
52 |
53 | signals:
54 | void inUseChanged(bool inUse);
55 |
56 | public slots:
57 | Q_SCRIPTABLE bool AuthorizeApp(QString desktop_id, uint req_accuracy_level, uint& allowed_accuracy_level);
58 | bool requiresAuthorization();
59 |
60 | void locationEnabledItemChanded();
61 | void loactionLevelItemChanged();
62 |
63 | private slots:
64 | void onServiceRegistred(const QString& service);
65 | void onServiceUnregistred(const QString& service);
66 | void authorizationRequestAnswer(QDBusPendingCallWatcher* call);
67 | void propertiesChanged(QString interface, QVariantMap properties);
68 |
69 | private:
70 | void authorizationRequest();
71 | void deleteClient();
72 |
73 | bool m_inUse;
74 | bool m_authRequest;
75 |
76 | bool m_locationEnabled;
77 | uint m_locationLevel;
78 | };
79 | #endif
80 |
--------------------------------------------------------------------------------
/src/glacier_global.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #ifndef GLACIER_GLOBAL_H
21 | #define GLACIER_GLOBAL_H
22 |
23 | #if defined(GLACIER_LIBRARY)
24 | #define GLACIER_EXPORT Q_DECL_EXPORT
25 | #else
26 | #define GLACIER_EXPORT Q_DECL_IMPORT
27 | #endif
28 |
29 | #endif // GLACIER_GLOBAL_H
30 |
--------------------------------------------------------------------------------
/src/logging.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | #include "logging.h"
33 |
34 | Q_LOGGING_CATEGORY(lcGlacierHomeCoreLog, "org.glacier.home", QtWarningMsg)
35 |
--------------------------------------------------------------------------------
/src/logging.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | #ifndef LOGGING_H
33 | #define LOGGING_H
34 |
35 | #include
36 |
37 | Q_DECLARE_LOGGING_CATEGORY(lcGlacierHomeCoreLog)
38 |
39 | #endif // LOGGING_H
40 |
--------------------------------------------------------------------------------
/src/mceconnect.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2021-2022 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | #ifndef MCECONNECT_H
33 | #define MCECONNECT_H
34 |
35 | #include
36 |
37 | class MceConnect : public QObject {
38 | Q_OBJECT
39 | Q_PROPERTY(bool mouseAvailable READ mouseAvailable NOTIFY mouseAvailableChanged)
40 | Q_PROPERTY(bool keyboardeAvailable READ keyboardAvailable NOTIFY keyboardAvailableChanged)
41 | Q_PROPERTY(bool rebootDialogVisible READ rebootDialogVisible WRITE rebootDialogVisible NOTIFY rebootDialogVisibleChanged)
42 |
43 | public:
44 | explicit MceConnect(QObject* parent = 0);
45 | bool mouseAvailable() { return m_mouseAvailable; }
46 | bool keyboardAvailable() { return m_keyboardAvailable; }
47 | bool rebootDialogVisible() { return m_rebootDialogVisible; }
48 |
49 | signals:
50 | void powerKeyPressed();
51 | void mouseAvailableChanged();
52 | void keyboardAvailableChanged();
53 | void rebootDialogVisibleChanged();
54 |
55 | public:
56 | void rebootDialogVisible(const bool visible);
57 |
58 | private slots:
59 | void getPowerKeyAction(const QString& action);
60 | void getMouseAction(const QString& mouse_state);
61 | void getKeyboardAction(const QString& keyboard_state);
62 |
63 | private:
64 | bool m_mouseAvailable;
65 | bool m_keyboardAvailable;
66 | bool m_rebootDialogVisible;
67 | };
68 |
69 | #endif // MCECONNECT_H
70 |
--------------------------------------------------------------------------------
/src/models/controlcenterbuttonsmodel.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2021 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | #ifndef CONTROLCENTERBUTTONSMODEL_H
33 | #define CONTROLCENTERBUTTONSMODEL_H
34 |
35 | #include
36 | #include
37 |
38 | class ControlCenterButtonsModel : public QAbstractListModel {
39 | Q_OBJECT
40 | public:
41 | explicit ControlCenterButtonsModel(QObject* parent = nullptr);
42 |
43 | int rowCount(const QModelIndex& parent = QModelIndex()) const;
44 | QVariant data(const QModelIndex& index, int role) const;
45 | QHash roleNames() const { return hash; }
46 |
47 | Q_INVOKABLE QStringList allButtons();
48 |
49 | private:
50 | void loadDefaultConfig();
51 | void loadConfig();
52 | void saveConfig();
53 |
54 | QHash hash;
55 | QStringList m_buttonList;
56 | QString m_configFilePath;
57 | };
58 |
59 | #endif // CONTROLCENTERBUTTONSMODEL_H
60 |
--------------------------------------------------------------------------------
/src/models/glacierwindowmodel.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | #include "glacierwindowmodel.h"
33 | #include "logging.h"
34 |
35 | GlacierWindowModel::GlacierWindowModel()
36 | : WindowModel()
37 | {
38 | }
39 |
40 | int GlacierWindowModel::getWindowIdForTitle(QString title)
41 | {
42 | return m_titles.value(title, 0);
43 | }
44 |
45 | bool GlacierWindowModel::approveWindow(LipstickCompositorWindow* window)
46 | {
47 | bool accepted = window->isInProcess() == false
48 | && window->category() != QLatin1String("overlay")
49 | && window->category() != QLatin1String("cover")
50 | && window->title() != QLatin1String("maliit-server");
51 | if (accepted) {
52 | m_titles.insert(window->title(), window->windowId());
53 | }
54 | return accepted;
55 | }
56 |
57 | void GlacierWindowModel::removeWindowForTitle(QString title)
58 | {
59 | qCDebug(lcGlacierHomeCoreLog) << "Removing window: " + title;
60 | m_titles.remove(title);
61 | }
62 |
--------------------------------------------------------------------------------
/src/models/glacierwindowmodel.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | #ifndef GLACIERWINDOWMODEL_H
33 | #define GLACIERWINDOWMODEL_H
34 | #include
35 | #include
36 | class LipstickCompositorWindow;
37 | class QWaylandSurfaceItem;
38 |
39 | class Q_DECL_EXPORT GlacierWindowModel : public WindowModel {
40 | Q_OBJECT
41 | public:
42 | explicit GlacierWindowModel();
43 | bool approveWindow(LipstickCompositorWindow* window);
44 | Q_INVOKABLE int getWindowIdForTitle(QString title);
45 | Q_INVOKABLE void removeWindowForTitle(QString title);
46 |
47 | private:
48 | QHash m_titles;
49 | };
50 |
51 | #endif // GLACIERWINDOWMODEL_H
52 |
--------------------------------------------------------------------------------
/src/models/searchmodel.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #include "searchmodel.h"
21 |
22 | SearchModel::SearchModel(QObject* parent)
23 | : QAbstractListModel { parent }
24 | , m_manager(new SearchPluginManager(this))
25 | {
26 | m_hash.insert(Qt::UserRole, QByteArray("iconTitle"));
27 | m_hash.insert(Qt::UserRole + 1, QByteArray("iconSource"));
28 | m_hash.insert(Qt::UserRole + 2, QByteArray("category"));
29 | m_hash.insert(Qt::UserRole + 3, QByteArray("extraCaption"));
30 | m_hash.insert(Qt::UserRole + 4, QByteArray("action"));
31 |
32 | connect(m_manager, &SearchPluginManager::searchResultReady, this, &SearchModel::searchResultHandler);
33 | }
34 |
35 | int SearchModel::rowCount(const QModelIndex& parent) const
36 | {
37 | return m_searchResults.count();
38 | }
39 |
40 | QVariant SearchModel::data(const QModelIndex& index, int role) const
41 | {
42 | if (!index.isValid()) {
43 | return QVariant();
44 | }
45 |
46 | if (index.row() >= m_searchResults.size()) {
47 | return QVariant();
48 | }
49 |
50 | GlacierSearchPlugin::SearchResult result = m_searchResults.at(index.row());
51 | if (role == Qt::UserRole) {
52 | return result.iconTitle;
53 | }
54 | if (role == Qt::UserRole + 1) {
55 | return result.iconSource;
56 | }
57 | if (role == Qt::UserRole + 2) {
58 | return result.category;
59 | }
60 | if (role == Qt::UserRole + 3) {
61 | return result.extraCaption;
62 | }
63 | if (role == Qt::UserRole + 4) {
64 | return result.action;
65 | }
66 |
67 | return QVariant();
68 | }
69 |
70 | void SearchModel::search(QString searchString)
71 | {
72 | m_manager->search(searchString);
73 | }
74 |
75 | void SearchModel::searchResultHandler(QList results)
76 | {
77 | beginResetModel();
78 | m_searchResults.clear();
79 | m_searchResults = results;
80 | endResetModel();
81 | emit countChanged();
82 | }
83 |
84 | int SearchModel::count() const
85 | {
86 | return m_searchResults.count();
87 | }
88 |
--------------------------------------------------------------------------------
/src/models/searchmodel.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #ifndef SEARCHMODEL_H
21 | #define SEARCHMODEL_H
22 |
23 | #include
24 | #include
25 |
26 | #include
27 |
28 | class SearchModel : public QAbstractListModel {
29 | Q_OBJECT
30 | Q_PROPERTY(int count READ count NOTIFY countChanged FINAL)
31 |
32 | public:
33 | explicit SearchModel(QObject* parent = nullptr);
34 |
35 | int rowCount(const QModelIndex& parent = QModelIndex()) const;
36 | QVariant data(const QModelIndex& index, int role) const;
37 | QHash roleNames() const { return m_hash; }
38 |
39 | Q_INVOKABLE void search(QString searchString);
40 | int count() const;
41 |
42 | signals:
43 | void countChanged();
44 |
45 | private slots:
46 | void searchResultHandler(QList results);
47 |
48 | private:
49 | QHash m_hash;
50 | SearchPluginManager* m_manager;
51 | QList m_searchResults;
52 | };
53 |
54 | #endif // SEARCHMODEL_H
55 |
--------------------------------------------------------------------------------
/src/nemovars.conf:
--------------------------------------------------------------------------------
1 | QT_QUICK_CONTROLS_STYLE=Nemo
2 | GLACIER_NATIVEORIENTATION=1
3 |
--------------------------------------------------------------------------------
/src/org.freedesktop.GeoClue2.Agent.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
11 |
12 |
20 |
21 |
22 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/qml/appswitcher/CloseButton.qml:
--------------------------------------------------------------------------------
1 |
2 | // This file is part of glacier-home, a nice user experience for touchscreens.
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
5 | // of this software and associated documentation files (the "Software"), to deal
6 | // in the Software without restriction, including without limitation the rights
7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | // copies of the Software, and to permit persons to whom the Software is
9 | // furnished to do so, subject to the following conditions:
10 | //
11 | // The above copyright notice and this permission notice shall be included in
12 | // all copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 | //
22 | // Copyright (c) 2012, Timur Kristóf
23 | // Copyright (c) 2023-2024, Chupigin Sergey (NeoChapay)
24 |
25 | import QtQuick
26 |
27 | Image {
28 | id: closeButton
29 | signal clicked()
30 |
31 | source: '/usr/share/glacier-home/qml/images/closeapp.svg'
32 | sourceSize.width: width
33 | sourceSize.height: height
34 |
35 | MouseArea {
36 | anchors.fill: parent
37 | onClicked: closeButton.clicked()
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/qml/appswitcher/SwitcherItem.qml:
--------------------------------------------------------------------------------
1 |
2 | // This file is part of colorful-home, a nice user experience for touchscreens.
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
5 | // of this software and associated documentation files (the "Software"), to deal
6 | // in the Software without restriction, including without limitation the rights
7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | // copies of the Software, and to permit persons to whom the Software is
9 | // furnished to do so, subject to the following conditions:
10 | //
11 | // The above copyright notice and this permission notice shall be included in
12 | // all copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 | //
22 | // Copyright (c) 2011, Tom Swindell
23 | // Copyright (c) 2012, Timur Kristóf
24 | // Copyright (c) 2018-2025, Sergey Chupligin
25 |
26 | import QtQuick
27 | import Nemo.Controls
28 |
29 | import org.nemomobile.lipstick 0.1
30 |
31 | Item {
32 | id: switcherItemRoot
33 |
34 | WindowPixmapItem {
35 | id: windowPixmap
36 | anchors.fill: parent
37 | windowId: model.window
38 | smooth: true
39 |
40 | opacity: switcherRoot.closeMode ? .6 : 1
41 | Behavior on opacity { NumberAnimation { duration: 300; easing.type: Easing.OutBack } }
42 | }
43 |
44 | function close() {
45 | Lipstick.compositor.closeClientForWindowId(model.window)
46 | }
47 |
48 | MouseArea {
49 | anchors.fill: parent
50 | onClicked: {
51 | if (!switcherRoot.closeMode) {
52 | Lipstick.compositor.windowToFront(model.window);
53 | } else {
54 | switcherRoot.closeMode = false
55 | }
56 | }
57 |
58 | onPressAndHold: {
59 | switcherRoot.closeMode = true;
60 | }
61 |
62 | }
63 | SequentialAnimation {
64 | id: closeAnimation
65 | ParallelAnimation {
66 | NumberAnimation {
67 | target: switcherItemRoot
68 | property: "scale"
69 | duration: 200
70 | to: 0.0
71 | }
72 |
73 | NumberAnimation {
74 | target: switcherItemRoot
75 | property: "opacity"
76 | duration: 150
77 | to: 0.0
78 | }
79 | }
80 | ScriptAction {
81 | script: switcherItemRoot.close()
82 | }
83 | }
84 |
85 | CloseButton {
86 | id: closeButton
87 | width: parent.height / 4
88 | height: width
89 | Behavior on scale { PropertyAnimation { duration: 300; easing.type: Easing.OutBack } }
90 | scale: switcherRoot.closeMode ? 1 : 0
91 | opacity: scale
92 | enabled: !closeAnimation.running
93 | anchors {
94 | bottom: parent.bottom
95 | bottomMargin: height*0.5
96 | horizontalCenter: parent.horizontalCenter
97 | }
98 | onClicked: closeAnimation.start()
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/src/qml/compositor/WindowWrapperAlpha.qml:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2013 Jolla Ltd, Robin Burchell:
2 | // Copyright (c) 2024, Sergey Chupligin
3 | //
4 | // This file is part of colorful-home, a nice user experience for touchscreens.
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | // SOFTWARE.
23 |
24 | import QtQuick
25 |
26 | WindowWrapperBase {
27 | id: wrapper
28 | ShaderEffect {
29 | anchors.fill: parent
30 | z: 2
31 |
32 | // source Item must be a texture provider
33 | property Item source: wrapper.window
34 |
35 | fragmentShader: "
36 | uniform sampler2D source;
37 | uniform mediump float qt_Opacity;
38 | varying highp vec2 qt_TexCoord0;
39 | void main() {
40 | gl_FragColor = (qt_Opacity * texture2D(source, qt_TexCoord0));
41 | }"
42 | }
43 | onWindowChanged: {
44 | if (window != null) {
45 | // do not paint the QWaylandSurfaceItem, just use it as
46 | // a texture provider
47 | window.setPaintEnabled(false)
48 | }
49 | }
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/src/qml/compositor/WindowWrapperBase.qml:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2013 Jolla Ltd.
2 | // Copyright (c) 2022-2024, Chupligin Sergey
3 | // This file is part of glacier-home, a nice user experience for touchscreens.
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | import QtQuick
24 | import QtQml
25 |
26 | Item {
27 | id: wrapper
28 |
29 | property Item window
30 |
31 | width: window ? window.width : 0
32 | height: window ? window.height : 0
33 |
34 | function animateIn() {
35 | if(comp.lastClick != null) {
36 | toX.from = comp.lastClick[0]
37 | toY.from = comp.lastClick[1]
38 | openFromIcon.start();
39 | }
40 | }
41 |
42 | Component.onCompleted: {
43 | window.parent = wrapper
44 | }
45 |
46 | ParallelAnimation{
47 | id: openFromIcon
48 | PropertyAnimation{
49 | target: window
50 | property: "width"
51 | from: 0
52 | to: parent.width
53 | duration: 300
54 | }
55 | PropertyAnimation{
56 | target: window
57 | property: "height"
58 | from: 0
59 | to: parent.height
60 | duration: 300
61 | }
62 | PropertyAnimation{
63 | id: toX
64 | target: wrapper
65 | property: "x"
66 | to: 0
67 | duration: 300
68 | }
69 | PropertyAnimation{
70 | id: toY
71 | target: wrapper
72 | property: "y"
73 | to: 0
74 | duration: 300
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/qml/connectivity/ConnectionSelector.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 |
3 | Item {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/qml/connectivity/VpnAgent.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 |
3 | Item {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/qml/dialogs/BtObexRequestConfirmationDialog.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2021-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Nemo.Controls
34 |
35 | import Nemo.Dialogs
36 |
37 | QueryDialog {
38 | id: btObexRequestConfirmationDialog
39 | visible: false
40 | property string deviceName: ""
41 | property string fileName: ""
42 |
43 | inline: false
44 |
45 | cancelText: qsTr("Cancel")
46 | acceptText: qsTr("Download")
47 | headingText: deviceName+" "+qsTr("send you file")
48 | subLabelText: fileName
49 |
50 | icon: "image://theme/file-download"
51 |
52 | onAccepted: {
53 | bluetoothObexAgent.requestConfirmationAccept()
54 | }
55 |
56 | onCanceled: {
57 | bluetoothObexAgent.requestConfirmationReject()
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/qml/dialogs/BtRequestConfirmationDialog.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2020-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Nemo.Controls
34 |
35 | import Nemo.Dialogs 1.0
36 |
37 | QueryDialog {
38 | id: btRequestConfirmationDialog
39 | visible: false
40 | property string mac: ""
41 | property string deviceName: ""
42 | property string deviceCode: ""
43 |
44 | inline: false
45 |
46 | cancelText: qsTr("Cancel")
47 | acceptText: qsTr("Connect")
48 | headingText: qsTr("Connect to device ") + deviceName
49 | subLabelText: qsTr("code: ") + deviceCode
50 |
51 | icon: "image://theme/link"
52 |
53 | onAccepted: {
54 | console.log("Paring to "+mac)
55 | bluetoothAgent.requestConfirmationAccept()
56 | }
57 |
58 | onCanceled: {
59 | bluetoothAgent.requestConfirmationReject()
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/qml/dialogs/UsbModeDialog.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2019-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Nemo.Controls
34 |
35 | import org.nemomobile.systemsettings 1.0
36 |
37 | import Nemo.Dialogs 1.0
38 |
39 |
40 | SelectionDialog{
41 | id: selectionDialog
42 |
43 | property bool mustBeShowed: false
44 |
45 | visible: mustBeShowed && LipstickSettings.lockscreenVisible !== true
46 |
47 | USBSettings{
48 | id: usbSettings
49 | }
50 |
51 | ListModel{
52 | id: modesModel
53 | ListElement {
54 | name: qsTr("Connection sharing")
55 | mode: "connection_sharing"
56 | }
57 | ListElement {
58 | name: qsTr("MTP")
59 | mode: "mtp_mode"
60 | }
61 | ListElement{
62 | name: qsTr("Charging only")
63 | mode: "charging_only"
64 | }
65 | ListElement{
66 | name: qsTr("Developer mode")
67 | mode: "developer_mode"
68 | }
69 | }
70 |
71 | cancelText: qsTr("Cancel")
72 | acceptText: qsTr("Ok")
73 | headingText: qsTr("Select USB mode")
74 |
75 | model: modesModel
76 |
77 | onAccepted:{
78 | selectionDialog.close()
79 | }
80 |
81 | onSelectedIndexChanged: {
82 | usbSettings.currentMode = modesModel.get(selectedIndex).mode
83 | selectionDialog.close()
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/src/qml/feedspage/BluetoothControlButton.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | import QtQuick
21 | import Nemo.Controls
22 |
23 | import Connman
24 | import org.kde.bluezqt as BluezQt
25 |
26 | ControlButton {
27 | id: bluetoothButton
28 |
29 | image: "image://theme/bluetooth-b"
30 | activated: bluetoothModel.powered
31 |
32 | assignedSettingsPage: "bluez"
33 |
34 | property QtObject _bluetoothManager: BluezQt.Manager
35 | property QtObject _adapter: _bluetoothManager.usableAdapter
36 |
37 | TechnologyModel {
38 | id: bluetoothModel
39 | name: "bluetooth"
40 |
41 | onPoweredChanged: {
42 | bluetoothButton.activated = bluetoothModel.powered
43 | }
44 | }
45 |
46 | onClicked: bluetoothModel.powered = !bluetoothButton.activated;
47 |
48 | Connections{
49 | target: _bluetoothManager
50 | function onUsableAdapterChanged() {
51 | _adapter = _bluetoothManager.usableAdapter
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/qml/feedspage/CellularDataControlButton.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | import QtQuick
21 | import Nemo.Controls
22 | import Connman
23 | import QOfono
24 | import Nemo.Connectivity
25 |
26 | ControlButton{
27 | id: cellularDataControlButton
28 |
29 | image: cellularRegistration.status ? "image://theme/exchange-alt" :"/usr/share/glacier-home/qml/theme/nosim.png"
30 | assignedSettingsPage: "mobile"
31 | activated: cellularNetworkTechnology.connected
32 |
33 | NetworkTechnology {
34 | id: cellularNetworkTechnology
35 | path: "/net/connman/technology/cellular"
36 | }
37 |
38 | OfonoManager {
39 | id: manager
40 | }
41 |
42 | OfonoConnMan {
43 | id: ofonoConnMan
44 | modemPath: manager.defaultModem
45 | }
46 |
47 | OfonoContextConnection {
48 | id: contextConnection
49 | contextPath: (ofonoConnMan.contexts !== undefined && ofonoConnMan.contexts.length > 0) ? ofonoConnMan.contexts[0] : ""
50 | }
51 |
52 |
53 | MobileDataConnection{
54 | id: mobileData
55 | }
56 |
57 | OfonoNetworkRegistration{
58 | id: cellularRegistration
59 | modemPath: manager.defaultModem
60 | }
61 |
62 | onClicked: {
63 | if(mobileData.presentSimCount != 0) {
64 | mobileData.autoConnect = !mobileData.autoConnect
65 | console.log("mobileData.autoConnect " + mobileData.autoConnect)
66 | }
67 | contextConnection.active = !contextConnection.active
68 |
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/qml/feedspage/ControlButton.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018-2023 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | import QtQuick
21 | import Nemo
22 | import Nemo.Controls
23 |
24 | Item {
25 | id: contolButton
26 | property alias image: icon.source
27 |
28 | property bool activated: false
29 | property bool connected: false
30 |
31 | //propertys for settings application
32 | property string assignedSettingsPage: ""
33 | property string assignedSettingsPageParams: ""
34 |
35 | signal clicked();
36 | signal pressed();
37 |
38 | width: Theme.itemHeightExtraLarge
39 | height: Theme.itemHeightExtraLarge
40 |
41 | Rectangle{
42 | id: button
43 | width: contolButton.width
44 | height: contolButton.height
45 |
46 | radius: parent.height*0.5
47 |
48 | color: activated ? Theme.accentColor : Theme.textColor
49 |
50 | NemoIcon {
51 | id: icon
52 | anchors.centerIn: parent
53 |
54 | width: parent.width*0.6
55 | height: parent.height*0.6
56 |
57 | sourceSize.width: Theme.dp(86)
58 | sourceSize.height: Theme.dp(86)
59 |
60 | color: activated ? Theme.textColor : Theme.fillColor
61 | }
62 | }
63 |
64 | MouseArea{
65 | anchors.fill: parent
66 | onClicked: {
67 | contolButton.clicked()
68 | }
69 |
70 | onPressAndHold: {
71 | contolButton.pressed()
72 |
73 | //if we have assignet settings page close controlCenter
74 | //and show settings application
75 | if(assignedSettingsPage != "") {
76 | controlCenterArea.openSettingsPage(assignedSettingsPage,assignedSettingsPageParams)
77 | }
78 | }
79 | }
80 | }
81 |
82 |
--------------------------------------------------------------------------------
/src/qml/feedspage/ControlCenter.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2017 Samuel Pavlovic
4 | ** Copyright (C) 2020-2024 Chupligin Sergey
5 | ** All rights reserved.
6 | **
7 | ** You may use this file under the terms of BSD license as follows:
8 | **
9 | ** Redistribution and use in source and binary forms, with or without
10 | ** modification, are permitted provided that the following conditions are met:
11 | ** * Redistributions of source code must retain the above copyright
12 | ** notice, this list of conditions and the following disclaimer.
13 | ** * Redistributions in binary form must reproduce the above copyright
14 | ** notice, this list of conditions and the following disclaimer in the
15 | ** documentation and/or other materials provided with the distribution.
16 | ** * Neither the name of the author nor the
17 | ** names of its contributors may be used to endorse or promote products
18 | ** derived from this software without specific prior written permission.
19 | **
20 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
24 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | **
31 | ****************************************************************************************/
32 |
33 | import QtQuick
34 | import Nemo
35 | import Nemo.Controls
36 |
37 | import org.nemomobile.statusnotifier
38 | import org.nemomobile.glacier
39 |
40 | import Nemo.DBus
41 |
42 | import "../statusbar"
43 |
44 | Item{
45 | id: controlCenterArea
46 | clip: true
47 |
48 | function openSettingsPage(plugin,extended) {
49 | settingsInterface.call("openSettingsPage",[plugin, extended])
50 | }
51 |
52 | ControlCenterButtonsModel{
53 | id: controlCenterButtonModel
54 | }
55 |
56 | DBusInterface {
57 | id: settingsInterface
58 |
59 | service: "org.nemomobile.qmlsettings"
60 | path: "/"
61 | iface: "org.nemomobile.qmlsettings"
62 |
63 | signalsEnabled: true
64 | }
65 |
66 | Row {
67 | id: fastActions
68 |
69 | spacing: (controlCenterArea.width-Theme.itemHeightExtraLarge*5)/4
70 |
71 | width: parent.width
72 | height: parent.height
73 |
74 | Repeater{
75 | id: buttonRepeater
76 | model: controlCenterButtonModel
77 | delegate: Loader{
78 | source: "/usr/share/glacier-home/qml/feedspage/"+path+".qml"
79 | }
80 | }
81 | }
82 | }
83 |
84 |
--------------------------------------------------------------------------------
/src/qml/feedspage/LocationControlButton.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | import QtQuick
21 | import Nemo.Controls
22 |
23 | import Nemo.Configuration
24 |
25 | ControlButton {
26 | id: locationButton
27 |
28 | image: "image://theme/map-marker-alt"
29 | assignedSettingsPage: "gps"
30 |
31 | activated: loactionLevel.value != 0
32 |
33 | ConfigurationValue {
34 | id: loactionLevel
35 | key: "/home/glacier/loaction/enabled"
36 | defaultValue: "0"
37 | }
38 |
39 | onClicked: {
40 | if(loactionLevel.value == 0) {
41 | loactionLevel.value = 1
42 | } else {
43 | loactionLevel.value = 0
44 | }
45 | loactionLevel.sync()
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/qml/feedspage/NetworkControlButton.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018-2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | import QtQuick
21 | import Nemo.Controls
22 |
23 | import Connman
24 |
25 |
26 | ControlButton {
27 | id: networkControlButton
28 | property alias networkingModel: networkingModel.name
29 |
30 | TechnologyModel {
31 | id: networkingModel
32 |
33 | onTechnologiesChanged: {
34 | networkControlButton.enabled = networkingModel.powered
35 | }
36 |
37 | onPoweredChanged: {
38 | networkControlButton.enabled = networkingModel.powered
39 | }
40 |
41 | onConnectedChanged: {
42 | networkControlButton.activated = networkingModel.connected
43 | }
44 | }
45 |
46 | Image {
47 | width: parent.width*0.4
48 | height: width
49 | source: "image://theme/times"
50 |
51 | fillMode: Image.PreserveAspectFit
52 |
53 | anchors{
54 | top: parent.top
55 | topMargin: width*0.1
56 | left: parent.left
57 | leftMargin: width*0.1
58 | }
59 |
60 | visible: !networkingModel.available
61 | }
62 |
63 | enabled: networkingModel.powered
64 | activated: networkingModel.connected
65 |
66 | onClicked: {
67 | if(networkingModel.powered) {
68 | networkingModel.powered = false
69 | } else {
70 | networkingModel.powered = true
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/qml/feedspage/QuietControlButton.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | import QtQuick
21 | import Nemo.Controls
22 |
23 | import org.nemomobile.systemsettings
24 |
25 |
26 | ControlButton {
27 | id: quietControlButton
28 |
29 | image: "image://theme/moon"
30 | activated: profileControl.profile == "silent"
31 |
32 | ProfileControl{
33 | id: profileControl
34 | }
35 |
36 | onClicked: {
37 | if(profileControl.profile != "silent")
38 | {
39 | profileControl.profile = "silent"
40 | }
41 | else
42 | {
43 | profileControl.profile = "general"
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/qml/feedspage/WiFiControlButton.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018-2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | import QtQuick
21 | import Nemo.Controls
22 |
23 | import Connman
24 |
25 |
26 | ControlButton {
27 | id: wifiButton
28 |
29 | image: "image://theme/wifi"
30 | assignedSettingsPage: "wifi"
31 |
32 | TechnologyModel {
33 | id: wifiNetworkingModel
34 | name: "wifi"
35 |
36 | onTechnologiesChanged: {
37 | wifiButton.activated = wifiNetworkingModel.powered
38 | }
39 |
40 | onPoweredChanged: {
41 | wifiButton.activated = wifiNetworkingModel.powered
42 | }
43 | }
44 |
45 | onClicked: wifiNetworkingModel.powered = !wifiButton.activated;
46 | }
47 |
--------------------------------------------------------------------------------
/src/qml/images/NOTICE.txt:
--------------------------------------------------------------------------------
1 | Notice some of these images are derived from Google applications resources. They were provided under the following license:
2 | You may use the materials in this directory without restriction to develop your apps and to use in your apps.
3 |
--------------------------------------------------------------------------------
/src/qml/images/button_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/button_default.png
--------------------------------------------------------------------------------
/src/qml/images/button_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/button_pressed.png
--------------------------------------------------------------------------------
/src/qml/images/closeapp.svg:
--------------------------------------------------------------------------------
1 |
2 |
50 |
--------------------------------------------------------------------------------
/src/qml/images/graphics-wallpaper-home.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/graphics-wallpaper-home.jpg
--------------------------------------------------------------------------------
/src/qml/images/navigation_next_item.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/navigation_next_item.png
--------------------------------------------------------------------------------
/src/qml/images/navigation_previous_item.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/navigation_previous_item.png
--------------------------------------------------------------------------------
/src/qml/images/notification-circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/notification-circle.png
--------------------------------------------------------------------------------
/src/qml/images/tab_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/tab_selected.png
--------------------------------------------------------------------------------
/src/qml/images/tabs_standard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/tabs_standard.png
--------------------------------------------------------------------------------
/src/qml/images/textinput.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/textinput.png
--------------------------------------------------------------------------------
/src/qml/images/toolbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/toolbar.png
--------------------------------------------------------------------------------
/src/qml/images/wallpaper-portrait-bubbles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/wallpaper-portrait-bubbles.png
--------------------------------------------------------------------------------
/src/qml/images/wallpaper-portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/images/wallpaper-portrait.png
--------------------------------------------------------------------------------
/src/qml/lockscreen/LockscreenClock.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2023-2025 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Nemo
34 | import Nemo.Controls
35 |
36 | import org.nemomobile.devicelock
37 |
38 | Item {
39 | id: lockscreenClock
40 | height: dateDisplay.height+timeDisplay.height+Theme.itemSpacingHuge
41 | width: timeDisplay.width
42 |
43 | anchors.topMargin: Theme.itemSpacingHuge
44 |
45 | Text {
46 | id: timeDisplay
47 | anchors.centerIn: parent
48 | font.pixelSize: Theme.fontSizeExtraLarge*3
49 | lineHeight: 0.85
50 | font.weight: Font.Light
51 | horizontalAlignment: Text.AlignHCenter
52 | color: Theme.textColor
53 | text: Qt.formatDateTime(wallClock.time, "hh:mm")
54 | style: Text.Raised;
55 | styleColor: Theme.backgroundColor
56 | }
57 |
58 | Text {
59 | id: dateDisplay
60 |
61 | font.pixelSize: Theme.fontSizeSmall
62 | font.capitalization: Font.AllUppercase
63 | color: Theme.textColor
64 |
65 | anchors {
66 | right: timeDisplay.right
67 | bottom: timeDisplay.top
68 | bottomMargin: -Theme.itemSpacingHuge
69 | }
70 |
71 | text: Qt.formatDateTime(wallClock.time, "ddd, MMM d")
72 | style: Text.Raised;
73 | styleColor: Theme.backgroundColor
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/qml/lockscreen/OperatorLine.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2020-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Nemo
34 | import Nemo.Controls
35 | import QOfono
36 |
37 | Row{
38 | id: operatorLine
39 | property var modems: []
40 |
41 |
42 | OfonoManager {
43 | id: ofonoManager
44 | onModemsChanged: {
45 | recalcModel()
46 | }
47 | Component.onCompleted: {
48 | recalcModel()
49 | }
50 |
51 | function recalcModel() {
52 | operatorLine.modems = [];
53 | for(var i = 0; i < ofonoManager.modems.length; i++) {
54 | operatorLine.modems.push(modems[i]);
55 | }
56 | operatorLineRepeater.model = operatorLine.modems;
57 | }
58 | }
59 |
60 | Repeater{
61 | id: operatorLineRepeater
62 |
63 | delegate: Text{
64 | id: operatorText
65 | font.pointSize: 9
66 | color: Theme.textColor
67 | horizontalAlignment: Text.AlignHCenter
68 |
69 | OfonoNetworkRegistration{
70 | id: cellularRegistration
71 | modemPath: modelData
72 |
73 | onNameChanged: {
74 | operatorText.text = name
75 | }
76 | }
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/src/qml/mainscreen/Pager.qml:
--------------------------------------------------------------------------------
1 | // This file is part of colorful-home, a nice user experience for touchscreens.
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | // SOFTWARE.
20 | //
21 | // Copyright (c) 2012, Timur Kristóf
22 | // Copyright (C) 2024 Chupligin Sergey (NeoChapay)
23 |
24 | import QtQuick
25 |
26 | PathView {
27 | id: pager
28 | highlightRangeMode: PathView.ApplyRange
29 | preferredHighlightBegin: 0.5
30 | preferredHighlightEnd: 0.5
31 | flickDeceleration: -10
32 | highlightMoveDuration: 200
33 | snapMode: PathView.SnapOneItem
34 |
35 | path: Path {
36 | startX: - width * model.count / 2 + width / 2
37 | startY: height / 2
38 | PathLine {
39 | x: width * model.count / 2 + width / 2
40 | y: height / 2
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/qml/mainscreen/Wallpaper.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2020-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import QtQuick.Window
34 |
35 | import org.nemomobile.lipstick
36 | import org.nemomobile.devicelock
37 | import Nemo.Configuration
38 |
39 | Item {
40 | id: wallpaper
41 |
42 | property double maxX: desktop.width*0.1
43 | property double maxY: desktop.height*0.1
44 |
45 | ConfigurationValue {
46 | id: wallpaperSource
47 | key: "/home/glacier/homeScreen/wallpaperImage"
48 | defaultValue: "/usr/share/glacier-home/qml/images/wallpaper-portrait-bubbles.png"
49 | }
50 |
51 | Image {
52 | id:wallpaperImage
53 | width: wallpaper.width+maxX*4
54 | height: wallpaper.height+maxY*4
55 |
56 | x: -maxX
57 | y: -maxY
58 |
59 | source: wallpaperSource.value
60 | fillMode: Image.PreserveAspectCrop
61 |
62 | Behavior on x {
63 | NumberAnimation { duration: 200 }
64 | }
65 |
66 | Behavior on y {
67 | NumberAnimation { duration: 200 }
68 | }
69 | }
70 |
71 | //TODO: fix this QtGraphicalEffects removed from Qt6
72 | /*FastBlur {
73 | anchors.fill: wallpaperImage
74 | source: wallpaperImage
75 | radius: 100
76 | opacity: Lipstick.compositor.gestureArea.active ? 1.0 - Lipstick.compositor.gestureArea.progress / (Math.min(Screen.width, Screen.height)) : 1.0
77 | visible: Lipstick.compositor.topmostWindow !== Lipstick.compositor.homeWindow
78 | NumberAnimation {
79 | properties: "opacity"
80 | duration: 200
81 | }
82 | }*/
83 | }
84 |
--------------------------------------------------------------------------------
/src/qml/notifications/NofiticationImage.js:
--------------------------------------------------------------------------------
1 | .pragma library
2 |
3 | var defaultIcon = "/usr/share/glacier-home/qml/images/glacier.svg"
4 |
5 | function iconAlias(icon) {
6 |
7 | var aliases = {
8 | 'icon-system-charging' : 'plug',
9 | 'icon-system-usb' : 'usb'
10 | }
11 | if (aliases[icon] !== undefined) {
12 | return aliases[icon];
13 | }
14 | return icon
15 |
16 | }
17 |
18 | function notificationImage(icon, appIcon) {
19 | if (icon) {
20 | if(icon.indexOf("/") === 0) {
21 | return "file://" + icon
22 | } else {
23 | return "image://theme/" + iconAlias(icon)
24 | }
25 | } else if (appIcon) {
26 | if(appIcon.indexOf("/") === 0) {
27 | return "file://" + appIcon
28 | } else {
29 | return "image://theme/" + iconAlias(appIcon)
30 | }
31 | } else {
32 | return defaultIcon
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/qml/statusbar/BluetoothIndicator.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2023-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Connman
34 |
35 | StatusbarItem {
36 | id: bluetoothIndicator
37 | iconSize: parent.height * 0.671875
38 | iconSizeHeight: parent.height
39 | source: "/usr/share/glacier-home/qml/theme/icon_bluetooth.png"
40 | visible: bluetoothTechnology.powered
41 |
42 | transparent: true
43 |
44 |
45 | NetworkTechnology {
46 | id: bluetoothTechnology
47 | path: "/net/connman/technology/bluetooth"
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/qml/statusbar/DeveloperModeIndicator.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2020-2024 Sergey Chupligin (NeoChapay)
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import org.glacier.developermode
34 |
35 | StatusbarItem {
36 | id: developerModeIndicator
37 | iconSize: statusbarRight.height
38 |
39 | visible: developerMode.enabled
40 |
41 | source: "image://theme/bug"
42 |
43 | DeveloperMode{
44 | id: developerMode
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/qml/statusbar/LocationIndicator.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2020-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import org.nemomobile.glacier
34 | import Nemo.Configuration
35 |
36 | StatusbarItem {
37 | id: gpsIndicator
38 | iconSize: statusbarRight.height * 0.75
39 | iconSizeHeight: statusbarRight.height
40 |
41 | visible: loactionLevel.value != 0
42 | transparent: (usegeoclue2) ? !geoAgent.inUse : false
43 |
44 | source: "/usr/share/glacier-home/qml/theme/icon_gps.png"
45 |
46 | ConfigurationValue {
47 | id: loactionLevel
48 | key: "/home/glacier/loaction/enabled"
49 | defaultValue: "0"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/qml/statusbar/NfcIndicator.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2024 Chupligin Sergey
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public License
15 | * along with this library; see the file COPYING.LIB. If not, write to
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | * Boston, MA 02110-1301, USA.
18 | */
19 |
20 | import QtQuick
21 | import Nemo.DBus
22 | import Nemo.Ngf
23 |
24 | import org.nemomobile.systemsettings
25 |
26 | StatusbarItem {
27 | id: nfcIndicator
28 | iconSize: parent.height * 0.671875
29 | iconSizeHeight: parent.height
30 | source: "/usr/share/glacier-home/qml/theme/icon_nfc.png"
31 | visible: nfcSettings.enabled
32 |
33 | NfcSettings{
34 | id: nfcSettings
35 | }
36 |
37 | NonGraphicalFeedback {
38 | id: getNfc
39 | event: "nfc_touch"
40 | }
41 |
42 | DBusInterface {
43 | bus: DBus.SystemBus
44 | service: 'org.sailfishos.nfc.daemon'
45 | path: '/nfc0'
46 | iface: 'org.sailfishos.nfc.Adapter'
47 | signalsEnabled: true
48 |
49 | function tagsChanged(tagPath) {
50 | if(tagPath != "") {
51 | getNfc.play()
52 | }
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/qml/statusbar/NumButton.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2014 Aleksi Suomalainen
4 | ** Copyright (C) 2020-2024 Chupligin Sergey (NeoChapay)
5 | ** All rights reserved.
6 | **
7 | ** You may use this file under the terms of BSD license as follows:
8 | **
9 | ** Redistribution and use in source and binary forms, with or without
10 | ** modification, are permitted provided that the following conditions are met:
11 | ** * Redistributions of source code must retain the above copyright
12 | ** notice, this list of conditions and the following disclaimer.
13 | ** * Redistributions in binary form must reproduce the above copyright
14 | ** notice, this list of conditions and the following disclaimer in the
15 | ** documentation and/or other materials provided with the distribution.
16 | ** * Neither the name of the author nor the
17 | ** names of its contributors may be used to endorse or promote products
18 | ** derived from this software without specific prior written permission.
19 | **
20 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
24 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | **
31 | ****************************************************************************************/
32 | import QtQuick
33 | import Nemo.Controls
34 |
35 | Rectangle {
36 | id: btn
37 | Layout.fillWidth: true
38 | Layout.fillHeight: true
39 | color: "transparent"
40 | border.color: "white"
41 | property alias text: txt.text
42 | MouseArea {
43 | anchors.fill: parent
44 | onClicked: {
45 | pinquery.text += btn.text
46 | }
47 | }
48 |
49 | Text {
50 | id: txt
51 | anchors.centerIn: parent
52 | color: "white"
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/qml/statusbar/PowerSaveModeIndicator.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2020-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Nemo.Mce
34 |
35 | StatusbarItem {
36 | id: powerSaveModeIndicator
37 |
38 | McePowerSaveMode{
39 | id: mcePowerSaveMode
40 | }
41 |
42 | iconSize: parent.height
43 | iconSizeHeight: parent.height
44 |
45 | visible: mcePowerSaveMode.active
46 |
47 | source: "image://theme/leaf"
48 | }
49 |
--------------------------------------------------------------------------------
/src/qml/statusbar/StatusbarItem.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 |
34 | Item {
35 | id: statusbarItem
36 |
37 | property alias source: icon.source
38 | property double iconSize
39 | property double iconSizeHeight
40 |
41 | property bool transparent: false
42 |
43 | width: iconSize
44 | height: iconSizeHeight ? iconSizeHeight : iconSize
45 |
46 | Image {
47 | width: parent.width
48 | height: parent.height
49 | id: icon
50 | anchors.centerIn: parent
51 | opacity: statusbarItem.transparent ? 0.5 : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/qml/statusbar/USBModeIndicator.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2020-2024 Sergey Chupligin (NeoChapay)
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import org.nemomobile.systemsettings
34 |
35 | StatusbarItem {
36 | id: developerModeIndicator
37 | iconSize: statusbarRight.height
38 |
39 | visible: modeIsVisible(usbModeSettings.currentMode)
40 |
41 | function modeIsVisible(current) {
42 | var modes = [ "developer_mode", "mtp_mode" ]
43 |
44 | for (var i = 0; i < modes.length; i++) {
45 | if (modes[i] == current) {
46 | return true;
47 | }
48 | }
49 | return false;
50 | }
51 |
52 | source: "image://theme/usb"
53 |
54 | USBSettings{
55 | id: usbModeSettings
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/src/qml/statusbar/WifiIndicator.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2020-2024 Sergey Chupligin
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Connman
34 |
35 | StatusbarItem {
36 | id: wifiStatus
37 | iconSize: statusbarRight.height
38 | visible: wlan.powered
39 | source: {
40 | if (wlan.connected) {
41 | if (networkManager.defaultRoute.strength >= 59) {
42 | return "/usr/share/glacier-home/qml/theme/icon_wifi_4.png"
43 | } else if (networkManager.defaultRoute.strength >= 55) {
44 | return "/usr/share/glacier-home/qml/theme/icon_wifi_3.png"
45 | } else if (networkManager.defaultRoute.strength >= 50) {
46 | return "/usr/share/glacier-home/qml/theme/icon_wifi_2.png"
47 | } else if (networkManager.defaultRoute.strength >= 40) {
48 | return "/usr/share/glacier-home/qml/theme/icon_wifi_1.png"
49 | } else {
50 | return "/usr/share/glacier-home/qml/theme/icon_wifi_0.png"
51 | }
52 | }
53 | return "image://theme/icon_wifi_touch"
54 | }
55 |
56 | NetworkTechnology {
57 | id: wlan
58 | path: "/net/connman/technology/wifi"
59 | }
60 |
61 | NetworkManager {
62 | id: networkManager
63 | function updateTechnologies() {
64 | if (available && technologiesEnabled) {
65 | wlan.path = networkManager.technologyPathForType("wifi")
66 | }
67 | }
68 | onAvailableChanged: updateTechnologies()
69 | onTechnologiesEnabledChanged: updateTechnologies()
70 | onTechnologiesChanged: updateTechnologies()
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/qml/system/GeoClue2Agent.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2022-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import org.nemomobile.glacier
34 |
35 | GlacierGeoAgent{
36 | id: geoAgent
37 | }
38 |
--------------------------------------------------------------------------------
/src/qml/system/Screenshot.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2020-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Nemo.Controls
34 |
35 | import org.nemomobile.lipstick
36 | import Nemo.Notifications
37 | import Nemo.Ngf
38 | import Nemo
39 | import org.nemomobile.glacier 1
40 |
41 | Item {
42 | id: screenShoter
43 | property var filePath: "";
44 |
45 | function capture() {
46 | filePath = fileUtils.getScreenshotPath();
47 |
48 | if(Lipstick.takeScreenshot(filePath)) {
49 | captureNoize.play()
50 | saveNotify.publish()
51 |
52 | console.log("Capture:"+filePath)
53 | }else{
54 | console.log("Capture fail")
55 | }
56 | }
57 |
58 | NonGraphicalFeedback {
59 | id: captureNoize
60 | event: "camera_shutter"
61 | }
62 |
63 | Notification{
64 | id: saveNotify
65 | category: qsTr("Desktop")
66 | summary: qsTr("Screenshot saved")
67 | body: ""
68 | itemCount: 1
69 | remoteActions: [ {
70 | "name": "default",
71 | "service": "org.nemomobile.gallery",
72 | "path": "/org/nemomobile/gallery",
73 | "iface": "org.nemomobile.gallery",
74 | "method": "showDir",
75 | "arguments": [filePath]
76 | }]
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/src/qml/system/ShutdownScreen.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2021-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Nemo
34 | import Nemo.Controls
35 | import org.nemomobile.lipstick
36 | import ".."
37 | import "../mainscreen/"
38 |
39 | Rectangle {
40 | id: shutdownWindow
41 | width: initialSize.width
42 | height: initialSize.height
43 | color: Theme.backgroundColor
44 |
45 | property bool shouldVisible
46 | opacity: shutdownScreen.windowVisible
47 |
48 | GlacierRotation {
49 | id: glacierRotation
50 | rotationParent: shutdownWindow.parent
51 | }
52 |
53 | Connections {
54 | target: shutdownScreen
55 | function onWindowVisibleChanged(windowVisible) {
56 | if (shutdownScreen.windowVisible) {
57 | glacierRotation.rotateRotationParent(nativeOrientation)
58 | }
59 | }
60 | }
61 |
62 | Image {
63 | id: logoImage
64 | anchors.centerIn: parent
65 | source: shutdownMode ? "" : "image://theme/graphic-nemo-logo"
66 | }
67 |
68 | Text {
69 | visible: !shutdownMode
70 | anchors.top: logoImage.bottom
71 | anchors.topMargin: Theme.itemSpacingLarge
72 | anchors.horizontalCenter: parent.horizontalCenter
73 | color: Theme.textColor
74 | text: qsTr("Shutting down")
75 | font.pixelSize:Theme.fontSizeMedium
76 | }
77 |
78 | Behavior on opacity {
79 | NumberAnimation {
80 | duration: 500
81 | onRunningChanged: if (!running && shutdownWindow.opacity == 0) shutdownScreen.windowVisible = false
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/src/qml/theme/battery0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/battery0.png
--------------------------------------------------------------------------------
/src/qml/theme/battery1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/battery1.png
--------------------------------------------------------------------------------
/src/qml/theme/battery2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/battery2.png
--------------------------------------------------------------------------------
/src/qml/theme/battery3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/battery3.png
--------------------------------------------------------------------------------
/src/qml/theme/battery4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/battery4.png
--------------------------------------------------------------------------------
/src/qml/theme/battery5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/battery5.png
--------------------------------------------------------------------------------
/src/qml/theme/battery6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/battery6.png
--------------------------------------------------------------------------------
/src/qml/theme/battery_grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/battery_grid.png
--------------------------------------------------------------------------------
/src/qml/theme/button_down.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/button_down.wav
--------------------------------------------------------------------------------
/src/qml/theme/button_up.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/button_up.wav
--------------------------------------------------------------------------------
/src/qml/theme/data_egprs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/data_egprs.png
--------------------------------------------------------------------------------
/src/qml/theme/data_gprs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/data_gprs.png
--------------------------------------------------------------------------------
/src/qml/theme/data_hspa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/data_hspa.png
--------------------------------------------------------------------------------
/src/qml/theme/data_lte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/data_lte.png
--------------------------------------------------------------------------------
/src/qml/theme/data_unknown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/data_unknown.png
--------------------------------------------------------------------------------
/src/qml/theme/data_utms.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/data_utms.png
--------------------------------------------------------------------------------
/src/qml/theme/default-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/default-icon.png
--------------------------------------------------------------------------------
/src/qml/theme/disabled-sim.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/disabled-sim.png
--------------------------------------------------------------------------------
/src/qml/theme/icon-m-framework-close-thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon-m-framework-close-thumbnail.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_bluetooth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_bluetooth.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_gps.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_gps.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_music.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_nfc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_nfc.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_signal_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_signal_0.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_signal_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_signal_1.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_signal_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_signal_2.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_signal_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_signal_3.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_signal_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_signal_4.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_signal_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_signal_5.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_wifi_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_wifi_0.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_wifi_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_wifi_1.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_wifi_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_wifi_2.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_wifi_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_wifi_3.png
--------------------------------------------------------------------------------
/src/qml/theme/icon_wifi_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/icon_wifi_4.png
--------------------------------------------------------------------------------
/src/qml/theme/mask_multitask_shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/mask_multitask_shadow.png
--------------------------------------------------------------------------------
/src/qml/theme/nosim.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nemomobile-ux/glacier-home/bbaf21b56125db2280d294fbda1c0a7ece4e4c06/src/qml/theme/nosim.png
--------------------------------------------------------------------------------
/src/qml/volumecontrol/AudioWarningDialog.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2020-2024 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import Nemo.Controls
34 |
35 | import Nemo.Dialogs
36 |
37 | import org.nemomobile.lipstick
38 |
39 | QueryDialog {
40 | id: audioWarningDialog
41 | visible: false
42 | inline: true
43 |
44 | cancelText: qsTr("Cancel")
45 | acceptText: qsTr("Ok")
46 | headingText: qsTr("Dangerous volume level!")
47 | subLabelText: qsTr("Do you want to continue?")
48 |
49 | onAccepted: {
50 | volumeControl.setWarningAcknowledged(true)
51 | }
52 |
53 | onSelected: {
54 | audioWarningDialog.close()
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/resources-qml.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qml/images/button_default.png
4 | qml/images/button_pressed.png
5 | qml/images/navigation_next_item.png
6 | qml/images/navigation_previous_item.png
7 | qml/images/tab_selected.png
8 | qml/images/tabs_standard.png
9 | qml/images/textinput.png
10 | qml/images/toolbar.png
11 | qml/images/graphics-wallpaper-home.jpg
12 | qml/images/battery0.png
13 | qml/images/battery1.png
14 | qml/images/battery2.png
15 | qml/images/battery3.png
16 | qml/images/battery4.png
17 | qml/images/battery5.png
18 | qml/images/battery6.png
19 | qml/theme/icon-m-framework-close-thumbnail.png
20 | qml/images/notification-circle.png
21 | qml/images/wallpaper-portrait-bubbles.png
22 |
23 |
24 |
--------------------------------------------------------------------------------
/tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_subdirectory(lockscreen_preview)
2 |
--------------------------------------------------------------------------------
/tests/lockscreen_preview/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(PROJECT lockscreen_preview)
2 | add_executable(${PROJECT}
3 | main.cpp
4 | ../stubs/lipsticksettings_stub.cpp
5 | ../stubs/lipsticksettings_stub.h
6 | ../stubs/wallclock_stub.cpp
7 | ../stubs/wallclock_stub.h)
8 |
9 | add_compile_definitions("SOURCE_ROOT=\"${CMAKE_SOURCE_DIR}\"")
10 |
11 | target_link_libraries(${PROJECT} PUBLIC
12 | Qt6::Gui
13 | Qt6::Qml
14 | Qt6::Quick
15 | Glacier::App)
16 |
--------------------------------------------------------------------------------
/tests/lockscreen_preview/LocscreenTestWindow.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2025 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | import QtQuick
33 | import QtQuick.Controls
34 |
35 | ApplicationWindow {
36 | id: root
37 |
38 | Component.onCompleted: {
39 | var lockScreen = Qt.createComponent(sourceDir + "/src/qml/Lockscreen.qml");
40 | if (lockScreen.status == Component.Ready) {
41 | lockScreen.createObject(root, {x: 0, y: 0});
42 | } else {
43 | console.log("Error loading component:", lockScreen.errorString());
44 | }
45 | }
46 |
47 | Rectangle{
48 | anchors.fill: parent
49 | color: "green"
50 |
51 | Label{
52 | anchors.centerIn: parent
53 | text: "DESKTOP"
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/tests/lockscreen_preview/main.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************************
2 | **
3 | ** Copyright (C) 2025 Chupligin Sergey
4 | ** All rights reserved.
5 | **
6 | ** You may use this file under the terms of BSD license as follows:
7 | **
8 | ** Redistribution and use in source and binary forms, with or without
9 | ** modification, are permitted provided that the following conditions are met:
10 | ** * Redistributions of source code must retain the above copyright
11 | ** notice, this list of conditions and the following disclaimer.
12 | ** * Redistributions in binary form must reproduce the above copyright
13 | ** notice, this list of conditions and the following disclaimer in the
14 | ** documentation and/or other materials provided with the distribution.
15 | ** * Neither the name of the author nor the
16 | ** names of its contributors may be used to endorse or promote products
17 | ** derived from this software without specific prior written permission.
18 | **
19 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
23 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | **
30 | ****************************************************************************************/
31 |
32 | #include
33 | #include
34 | #include
35 |
36 | #include
37 |
38 | #include "../stubs/lipsticksettings_stub.h"
39 | #include "../stubs/wallclock_stub.h"
40 | #include "qqmlcontext.h"
41 |
42 | #ifndef SOURCE_ROOT
43 | #error "Source dir not deffined"
44 | #endif
45 |
46 | int main(int argc, char** argv)
47 | {
48 | QGuiApplication* app = GlacierApp::app(argc, argv);
49 | QQmlApplicationEngine* engine = GlacierApp::engine(app);
50 |
51 | QString sourceDir = QString(SOURCE_ROOT);
52 | LipstickSettingsStub lipstickSettings;
53 | WallClockStub wallClock;
54 |
55 | engine->rootContext()->setContextProperty("LipstickSettings", &lipstickSettings);
56 | engine->rootContext()->setContextProperty("wallClock", &wallClock);
57 | engine->rootContext()->setContextProperty("sourceDir", sourceDir);
58 |
59 | QQuickWindow* window = GlacierApp::showWindow(sourceDir + "/tests/lockscreen_preview/LocscreenTestWindow.qml");
60 | window->setTitle(QObject::tr("Lockscreen test"));
61 |
62 | return app->exec();
63 | }
64 |
--------------------------------------------------------------------------------
/tests/stubs/lipsticksettings_stub.cpp:
--------------------------------------------------------------------------------
1 | #include "lipsticksettings_stub.h"
2 |
3 | LipstickSettingsStub::LipstickSettingsStub(QObject* parent)
4 | : QObject { parent }
5 | , m_lockscreenVisible(true)
6 | {
7 | }
8 |
9 | bool LipstickSettingsStub::lockscreenVisible() const
10 | {
11 | return m_lockscreenVisible;
12 | }
13 |
14 | void LipstickSettingsStub::setLockscreenVisible(bool newLockscreenVisible)
15 | {
16 | if (m_lockscreenVisible == newLockscreenVisible)
17 | return;
18 | m_lockscreenVisible = newLockscreenVisible;
19 | emit lockscreenVisibleChanged();
20 | }
21 |
--------------------------------------------------------------------------------
/tests/stubs/lipsticksettings_stub.h:
--------------------------------------------------------------------------------
1 | #ifndef LIPSTICKSETTINGS_STUB_H
2 | #define LIPSTICKSETTINGS_STUB_H
3 |
4 | #include
5 |
6 | class LipstickSettingsStub : public QObject {
7 | Q_OBJECT
8 | Q_PROPERTY(bool lockscreenVisible READ lockscreenVisible WRITE setLockscreenVisible NOTIFY lockscreenVisibleChanged FINAL)
9 |
10 | public:
11 | explicit LipstickSettingsStub(QObject* parent = nullptr);
12 |
13 | bool lockscreenVisible() const;
14 | void setLockscreenVisible(bool newLockscreenVisible);
15 |
16 | signals:
17 | void lockscreenVisibleChanged();
18 |
19 | private:
20 | bool m_lockscreenVisible;
21 | };
22 |
23 | #endif // LIPSTICKSETTINGS_STUB_H
24 |
--------------------------------------------------------------------------------
/tests/stubs/wallclock_stub.cpp:
--------------------------------------------------------------------------------
1 | #include "wallclock_stub.h"
2 |
3 | WallClockStub::WallClockStub(QObject* parent)
4 | : QObject { parent }
5 | , m_time(QDateTime::currentDateTime())
6 | {
7 | }
8 |
9 | QDateTime WallClockStub::time() const
10 | {
11 | return m_time;
12 | }
13 |
14 | void WallClockStub::setTime(const QDateTime& newTime)
15 | {
16 | if (m_time == newTime)
17 | return;
18 | m_time = newTime;
19 | emit timeChanged();
20 | }
21 |
--------------------------------------------------------------------------------
/tests/stubs/wallclock_stub.h:
--------------------------------------------------------------------------------
1 | #ifndef WALLCLOCK_STUB_H
2 | #define WALLCLOCK_STUB_H
3 |
4 | #include
5 | #include
6 |
7 | class WallClockStub : public QObject {
8 | Q_OBJECT
9 | Q_PROPERTY(QDateTime time READ time WRITE setTime NOTIFY timeChanged FINAL)
10 | public:
11 | explicit WallClockStub(QObject* parent = nullptr);
12 | QDateTime time() const;
13 | void setTime(const QDateTime& newTime);
14 |
15 | signals:
16 | void timeChanged();
17 |
18 | private:
19 | QDateTime m_time;
20 | };
21 |
22 | #endif // WALLCLOCK_STUB_H
23 |
--------------------------------------------------------------------------------
/transifex.yml:
--------------------------------------------------------------------------------
1 | git:
2 | filters:
3 | - filter_type: file
4 | file_format: QT
5 | source_language: en
6 | source_file: translations/glacier-home.ts
7 | translation_files_expression: 'translations/glacier-home_.ts'
8 | - filter_type: file
9 | file_format: QT
10 | source_language: en
11 | source_file: 'settings-plugins/desktop/translations/desktop.ts'
12 | translation_files_expression: 'settings-plugins/desktop/translations/desktop_.ts'
13 | - filter_type: file
14 | file_format: QT
15 | source_language: en
16 | source_file: 'settings-plugins/wallpaper/translations/wallpaper.ts'
17 | translation_files_expression: 'settings-plugins/wallpaper/translations/wallpaper_.ts'
18 |
--------------------------------------------------------------------------------