diff options
Diffstat (limited to 'src-qt5/core-utils/lumina-config')
6 files changed, 131 insertions, 5 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/getPage.h b/src-qt5/core-utils/lumina-config/pages/getPage.h index b38e614f..6a35dbae 100644 --- a/src-qt5/core-utils/lumina-config/pages/getPage.h +++ b/src-qt5/core-utils/lumina-config/pages/getPage.h @@ -28,10 +28,11 @@ static QList<PAGEINFO> KnownPages(){ //Reminder: <ID>, <name>, <title>, <icon>, <comment>, <category>, <server subsytem list>, <search tags> list << PageInfo("wallpaper", QObject::tr("Change Wallpaper"), QObject::tr("Wallpaper Settings"), "preferences-desktop-wallpaper",QObject::tr("Change background image(s)"), "appearance", QStringList(), QStringList() << "background" << "wallpaper" << "color" << "image"); list << PageInfo("theme", QObject::tr("Change Desktop Theme"), QObject::tr("Theme Settings"), "preferences-desktop-theme",QObject::tr("Change interface fonts and colors"), "appearance", QStringList(), QStringList() << "background" << "interface" << "color" << "theme" << "plugins"); + list << PageInfo("compton", QObject::tr("Window Effects"), QObject::tr("Window Effects"), "window-duplicate",QObject::tr("Adjust transparency levels and window effects"), "appearance", QStringList(), QStringList() << "background" << "interface" << "color" << "transparency" << "windows" << "compositing"); list << PageInfo("autostart", QObject::tr("Startup Services and Applications"), QObject::tr("Startup Settings"), "preferences-system-session-services",QObject::tr("Automatically start applications or services"), "session", QStringList(), QStringList() << "apps" << "autostart" << "services" << "xdg" << "startup" << "session"); list << PageInfo("defaultapps", QObject::tr("Default Applications for File Type"), QObject::tr("Mimetype Settings"), "preferences-desktop-default-applications",QObject::tr("Change default applications"), "session", QStringList(), QStringList() << "apps" << "default" << "services" << "xdg" << "session"); list << PageInfo("fluxbox-keys", QObject::tr("Keyboard Shortcuts"), QObject::tr("Keyboard Shortcuts"), "preferences-desktop-keyboard",QObject::tr("Change keyboard shortcuts"), "session", QStringList(), QStringList() << "apps" << "fluxbox" << "keys" << "keyboard" << "session" << "launch"); - list << PageInfo("fluxbox-settings", QObject::tr("Window Manager"), QObject::tr("Window Settings"), "preferences-system-windows",QObject::tr("Change window settings and appearances"), "appearance", QStringList(), QStringList() << "window" << "frame" << "border" << "workspace" << "theme" << "fluxbox" << "session"); + list << PageInfo("fluxbox-settings", QObject::tr("Window Manager"), QObject::tr("Window Settings"), "preferences-system-windows-actions",QObject::tr("Change window settings and appearances"), "appearance", QStringList(), QStringList() << "window" << "frame" << "border" << "workspace" << "theme" << "fluxbox" << "session"); list << PageInfo("interface-desktop", QObject::tr("Desktop Icons and Plugins"), QObject::tr("Desktop Plugins"), "preferences-desktop-icons",QObject::tr("Change what icons or tools are embedded on the desktop"), "interface", QStringList(), QStringList() << "desktop" << "plugins" << "embed" << "icons" << "utilities"); list << PageInfo("interface-panel", QObject::tr("Floating Panels and Plugins"), QObject::tr("Panels and Plugins"), "configure-toolbars",QObject::tr("Change any floating panels and what they show"), "interface", QStringList(), QStringList() << "desktop" << "toolbar" << "panel" << "floating" << "plugins"); list << PageInfo("interface-menu", QObject::tr("Context Menu and Plugins"), QObject::tr("Menu Plugins"), "preferences-plugin",QObject::tr("Change what options are shown on the desktop context menu"), "interface", QStringList(), QStringList() << "desktop" << "menu" << "plugins" << "shortcuts"); @@ -53,6 +54,7 @@ static QList<PAGEINFO> KnownPages(){ #include "page_interface_menu.h" #include "page_session_locale.h" #include "page_session_options.h" +#include "page_compton.h" static PageWidget* GetNewPage(QString id, QWidget *parent){ //Find the page that matches this "id" @@ -67,6 +69,7 @@ static PageWidget* GetNewPage(QString id, QWidget *parent){ else if(id=="interface-menu"){ return new page_interface_menu(parent); } else if(id=="session-locale"){ return new page_session_locale(parent); } else if(id=="session-options"){ return new page_session_options(parent); } + else if(id=="compton"){ return new page_compton(parent); } //Return the main control_panel page as the fallback/default return new page_main(parent); } diff --git a/src-qt5/core-utils/lumina-config/pages/page_compton.cpp b/src-qt5/core-utils/lumina-config/pages/page_compton.cpp new file mode 100644 index 00000000..d0718dc2 --- /dev/null +++ b/src-qt5/core-utils/lumina-config/pages/page_compton.cpp @@ -0,0 +1,51 @@ +//=========================================== +// Lumina Desktop Source Code +// Copyright (c) 2016, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "page_compton.h" +#include "ui_page_compton.h" +#include "getPage.h" + +//========== +// PUBLIC +//========== +page_compton::page_compton(QWidget *parent) : PageWidget(parent), ui(new Ui::page_compton()){ + ui->setupUi(this); + connect(ui->text_file, SIGNAL(textChanged()), this, SLOT(settingChanged()) ); + updateIcons(); +} + +page_compton::~page_compton(){ + +} + +//================ +// PUBLIC SLOTS +//================ +void page_compton::SaveSettings(){ + + emit HasPendingChanges(false); + QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf"; + LUtils::writeFile(set, ui->text_file->toPlainText().split("\n") ); +} + +void page_compton::LoadSettings(int){ + emit HasPendingChanges(false); + emit ChangePageTitle( tr("Compositor Settings") ); + QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf"; + ui->text_file->setPlainText( LUtils::readFile(set).join("\n") ); +} + +void page_compton::updateIcons(){ + +} + +//================= +// PRIVATE +//================= + +//================= +// PRIVATE SLOTS +//================= diff --git a/src-qt5/core-utils/lumina-config/pages/page_compton.h b/src-qt5/core-utils/lumina-config/pages/page_compton.h new file mode 100644 index 00000000..5ca997ef --- /dev/null +++ b/src-qt5/core-utils/lumina-config/pages/page_compton.h @@ -0,0 +1,33 @@ +//=========================================== +// Lumina Desktop Source Code +// Copyright (c) 2016, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#ifndef _LUMINA_CONFIG_PAGE_COMPTON_H +#define _LUMINA_CONFIG_PAGE_COMPTON_H +#include "../globals.h" +#include "PageWidget.h" + +namespace Ui{ + class page_compton; +}; + +class page_compton : public PageWidget{ + Q_OBJECT +public: + page_compton(QWidget *parent); + ~page_compton(); + +public slots: + void SaveSettings(); + void LoadSettings(int screennum); + void updateIcons(); + +private: + Ui::page_compton *ui; + +private slots: + +}; +#endif diff --git a/src-qt5/core-utils/lumina-config/pages/page_compton.ui b/src-qt5/core-utils/lumina-config/pages/page_compton.ui new file mode 100644 index 00000000..32c153f7 --- /dev/null +++ b/src-qt5/core-utils/lumina-config/pages/page_compton.ui @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>page_compton</class> + <widget class="QWidget" name="page_compton"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> + <item> + <widget class="QPlainTextEdit" name="text_file"/> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src-qt5/core-utils/lumina-config/pages/page_sample.cpp b/src-qt5/core-utils/lumina-config/pages/page_sample.cpp index 0256df8d..b613bd95 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_sample.cpp +++ b/src-qt5/core-utils/lumina-config/pages/page_sample.cpp @@ -26,7 +26,7 @@ page_sample::~page_sample(){ //================ void page_sample::SaveSettings(){ - emit HasPendingChanged(false); + emit HasPendingChanges(false); } void page_sample::LoadSettings(int){ diff --git a/src-qt5/core-utils/lumina-config/pages/pages.pri b/src-qt5/core-utils/lumina-config/pages/pages.pri index 5e4ffca9..b1db2860 100644 --- a/src-qt5/core-utils/lumina-config/pages/pages.pri +++ b/src-qt5/core-utils/lumina-config/pages/pages.pri @@ -12,7 +12,8 @@ HEADERS += $${PWD}/getPage.h \ $${PWD}/page_interface_menu.h \ $${PWD}/page_interface_panels.h \ $${PWD}/page_session_locale.h \ - $${PWD}/page_session_options.h + $${PWD}/page_session_options.h \ + $${PWD}/page_compton.h SOURCES += $${PWD}/page_main.cpp \ @@ -26,7 +27,8 @@ SOURCES += $${PWD}/page_main.cpp \ $${PWD}/page_interface_menu.cpp \ $${PWD}/page_interface_panels.cpp \ $${PWD}/page_session_locale.cpp \ - $${PWD}/page_session_options.cpp + $${PWD}/page_session_options.cpp \ + $${PWD}/page_compton.cpp FORMS += $${PWD}/page_main.ui \ @@ -40,4 +42,5 @@ FORMS += $${PWD}/page_main.ui \ $${PWD}/page_interface_menu.ui \ $${PWD}/page_interface_panels.ui \ $${PWD}/page_session_locale.ui \ - $${PWD}/page_session_options.ui + $${PWD}/page_session_options.ui \ + $${PWD}/page_compton.ui |