aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core-utils/lumina-config/pages
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core-utils/lumina-config/pages')
-rw-r--r--src-qt5/core-utils/lumina-config/pages/PageWidget.h2
-rw-r--r--src-qt5/core-utils/lumina-config/pages/getPage.h34
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_compton.cpp14
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_compton.ui7
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui256
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_main.cpp85
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_main.h6
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_main.ui11
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_mouse.cpp217
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_mouse.h43
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_mouse.ui31
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.cpp110
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.h53
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.ui427
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_session_options.cpp16
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_session_options.ui7
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_theme.cpp48
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_theme.h3
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_theme.ui334
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp6
-rw-r--r--src-qt5/core-utils/lumina-config/pages/pages.pri12
21 files changed, 1397 insertions, 325 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/PageWidget.h b/src-qt5/core-utils/lumina-config/pages/PageWidget.h
index 2d663e71..8cd23db7 100644
--- a/src-qt5/core-utils/lumina-config/pages/PageWidget.h
+++ b/src-qt5/core-utils/lumina-config/pages/PageWidget.h
@@ -52,7 +52,7 @@ public slots:
//Simplification function for widget connections
virtual void settingChanged(){
- emit HasPendingChanges(true);
+ emit HasPendingChanges(true);
}
};
diff --git a/src-qt5/core-utils/lumina-config/pages/getPage.h b/src-qt5/core-utils/lumina-config/pages/getPage.h
index f77a72c8..c7b5b076 100644
--- a/src-qt5/core-utils/lumina-config/pages/getPage.h
+++ b/src-qt5/core-utils/lumina-config/pages/getPage.h
@@ -26,19 +26,31 @@ static QList<PAGEINFO> KnownPages(){
// Valid Groups: ["appearance", "interface", "session", "user"]
QList<PAGEINFO> list;
//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("wallpaper", QObject::tr("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("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("autostart", QObject::tr("Autostart"), 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("Applications"), 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-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");
- list << PageInfo("session-locale", QObject::tr("Localization Options"), QObject::tr("Locale Settings"), "preferences-desktop-locale",QObject::tr("Change the default locale settings for this user"), "user", QStringList(), QStringList() << "user"<<"locale"<<"language"<<"translations");
+ list << PageInfo("interface-desktop", QObject::tr("Desktop"), 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("Panels"), 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("Menu"), 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");
+ list << PageInfo("session-locale", QObject::tr("Localization"), QObject::tr("Locale Settings"), "preferences-desktop-locale",QObject::tr("Change the default locale settings for this user"), "user", QStringList(), QStringList() << "user"<<"locale"<<"language"<<"translations");
list << PageInfo("session-options", QObject::tr("General Options"), QObject::tr("User Settings"), "configure",QObject::tr("Change basic user settings such as time/date formats"), "user", QStringList(), QStringList() << "user"<<"settings"<<"time"<<"date"<<"icon"<<"reset"<<"numlock"<<"clock");
- return list;
+ list << PageInfo("input-devices", QObject::tr("Input Device Settings"), QObject::tr("Input Device Settings"), "preferences-desktop-peripherals",QObject::tr("Adjust keyboard and mouse devices"), "user", QStringList(), QStringList() << "user"<<"speed"<<"accel"<<"mouse" << "keyboard");
+ // list << PageInfo("mouse-settings", QObject::tr("TrueOS Mouse Settings"), QObject::tr("TrueOS Mouse Settings"), "preferences-desktop-mouse",QObject::tr("Adjust mouse devices"), "user", QStringList(), QStringList() << "user"<<"speed"<<"accel"<<"mouse");
+ //Now sort the items according to the translated name
+ QStringList names;
+ for(int i=0; i<list.length(); i++){ names << list[i].name; }
+ names.sort(Qt::CaseInsensitive);
+ QList<PAGEINFO> sorted;
+ for(int i=0; i<names.length(); i++){
+ for(int j=0; j<list.length(); j++){
+ if(list[j].name==names[i]){ sorted << list.takeAt(j); break; }
+ }
+ }
+ return sorted;
}
//Add any sub-pages here
@@ -55,6 +67,8 @@ static QList<PAGEINFO> KnownPages(){
#include "page_session_locale.h"
#include "page_session_options.h"
#include "page_compton.h"
+#include "page_mouse.h"
+// #include "page_mouse_trueos.h"
static PageWidget* GetNewPage(QString id, QWidget *parent){
//Find the page that matches this "id"
@@ -71,6 +85,8 @@ static PageWidget* GetNewPage(QString id, QWidget *parent){
else if(id=="session-locale"){ page = new page_session_locale(parent); }
else if(id=="session-options"){ page = new page_session_options(parent); }
else if(id=="compton"){ page = new page_compton(parent); }
+ else if(id=="input-devices"){ page = new page_mouse(parent); }
+ // else if(id=="mouse-settings"){ page = new page_mouse_trueos(parent); }
//Return the main control_panel page as the fallback/default
if(page==0){ id.clear(); page = new page_main(parent); }
page->setWhatsThis(id);
diff --git a/src-qt5/core-utils/lumina-config/pages/page_compton.cpp b/src-qt5/core-utils/lumina-config/pages/page_compton.cpp
index 0003c9c8..8cdb2ea7 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_compton.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_compton.cpp
@@ -12,10 +12,10 @@
// 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()) );
- connect(ui->check_disablecompton, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) );
- updateIcons();
+ ui->setupUi(this);
+ connect(ui->text_file, SIGNAL(textChanged()), this, SLOT(settingChanged()) );
+ connect(ui->check_disablecompton, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) );
+ updateIcons();
}
page_compton::~page_compton(){
@@ -29,22 +29,24 @@ void page_compton::SaveSettings(){
emit HasPendingChanges(false);
QSettings settings("lumina-desktop","sessionsettings");
settings.setValue("enableCompositing", !ui->check_disablecompton->isChecked());
+ settings.setValue("compositingWithGpuAccelOnly", ui->check_GPUverify->isChecked());
QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf";
LUtils::writeFile(set, ui->text_file->toPlainText().split("\n"),true);
}
void page_compton::LoadSettings(int){
- emit HasPendingChanges(false);
emit ChangePageTitle( tr("Compositor Settings") );
QSettings settings("lumina-desktop","sessionsettings");
ui->check_disablecompton->setChecked( !settings.value("enableCompositing", true).toBool() );
+ ui->check_GPUverify->setChecked( settings.value("compositingWithGpuAccelOnly", true).toBool() );
QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf";
qDebug() << "Load Compton settings:" << set;
ui->text_file->setPlainText( LUtils::readFile(set).join("\n") );
+ emit HasPendingChanges(false);
}
void page_compton::updateIcons(){
-
+emit HasPendingChanges(false);
}
//=================
diff --git a/src-qt5/core-utils/lumina-config/pages/page_compton.ui b/src-qt5/core-utils/lumina-config/pages/page_compton.ui
index 9083a2fb..857331d6 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_compton.ui
+++ b/src-qt5/core-utils/lumina-config/pages/page_compton.ui
@@ -34,6 +34,13 @@
</widget>
</item>
<item>
+ <widget class="QCheckBox" name="check_GPUverify">
+ <property name="text">
+ <string>Only use compositing with GPU acceleration </string>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QPlainTextEdit" name="text_file"/>
</item>
</layout>
diff --git a/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui b/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui
index ef72c4f1..8440e198 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui
+++ b/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui
@@ -29,11 +29,138 @@
<item>
<widget class="QTabWidget" name="tabWidget_apps">
<property name="currentIndex">
- <number>1</number>
+ <number>0</number>
</property>
<property name="movable">
<bool>false</bool>
</property>
+ <widget class="QWidget" name="tab_auto">
+ <attribute name="title">
+ <string>Basic Settings</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_7">
+ <item>
+ <layout class="QGridLayout" name="gridLayout_6">
+ <item row="0" column="0">
+ <layout class="QFormLayout" name="formLayout_10">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::ExpandingFieldsGrow</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_37">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Web Browser:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QToolButton" name="tool_default_webbrowser">
+ <property name="text">
+ <string notr="true">...</string>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_38">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>E-Mail Client:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QToolButton" name="tool_default_email">
+ <property name="text">
+ <string notr="true">...</string>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="1">
+ <layout class="QFormLayout" name="formLayout_11">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_39">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>File Manager:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_40">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Virtual Terminal:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QToolButton" name="tool_default_filemanager">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QToolButton" name="tool_default_terminal">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
<widget class="QWidget" name="tab_defaults">
<attribute name="title">
<string>Advanced</string>
@@ -163,133 +290,6 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_auto">
- <attribute name="title">
- <string>Basic Settings</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_7">
- <item>
- <layout class="QGridLayout" name="gridLayout_6">
- <item row="0" column="0">
- <layout class="QFormLayout" name="formLayout_10">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::ExpandingFieldsGrow</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label_37">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Web Browser:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QToolButton" name="tool_default_webbrowser">
- <property name="text">
- <string notr="true">...</string>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_38">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>E-Mail Client:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QToolButton" name="tool_default_email">
- <property name="text">
- <string notr="true">...</string>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="0" column="1">
- <layout class="QFormLayout" name="formLayout_11">
- <item row="0" column="0">
- <widget class="QLabel" name="label_39">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>File Manager:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_40">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Virtual Terminal:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QToolButton" name="tool_default_filemanager">
- <property name="text">
- <string>...</string>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QToolButton" name="tool_default_terminal">
- <property name="text">
- <string>...</string>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="verticalSpacer_4">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
</widget>
</item>
</layout>
diff --git a/src-qt5/core-utils/lumina-config/pages/page_main.cpp b/src-qt5/core-utils/lumina-config/pages/page_main.cpp
index 1bdd3107..e60606f3 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_main.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_main.cpp
@@ -13,10 +13,12 @@
//==========
page_main::page_main(QWidget *parent) : PageWidget(parent), ui(new Ui::page_main()){
ui->setupUi(this);
+ findShort = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F), this, SLOT(showFind()));
ui->treeWidget->setMouseTracking(true);
ui->treeWidget->setSortingEnabled(false); //the QTreeView sort flag always puts them in backwards (reverse-alphabetical)
- connect(ui->treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(itemTriggered(QTreeWidgetItem*)) );
- connect(ui->treeWidget, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(itemTriggered(QTreeWidgetItem*)) );
+ connect(ui->treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(itemTriggered(QTreeWidgetItem*, int)) );
+ connect(ui->treeWidget, SIGNAL(itemPressed(QTreeWidgetItem*,int)), this, SLOT(itemTriggered(QTreeWidgetItem*, int)) );
+
connect(ui->lineEdit, SIGNAL(textChanged(QString)), this, SLOT(searchChanged(QString)) );
}
@@ -25,10 +27,15 @@ page_main::~page_main(){
}
void page_main::setPreviousPage(QString id){
+ if(id.isEmpty()){ return; }
for(int i=0; i<ui->treeWidget->topLevelItemCount(); i++){
for(int j=0; j<ui->treeWidget->topLevelItem(i)->childCount(); j++){
if(ui->treeWidget->topLevelItem(i)->child(j)->whatsThis(0)==id){
- ui->treeWidget->setCurrentItem(ui->treeWidget->topLevelItem(i)->child(j));
+ ui->treeWidget->setCurrentItem(ui->treeWidget->topLevelItem(i)->child(j), 0);
+ ui->treeWidget->scrollToItem(ui->treeWidget->topLevelItem(i)->child(j));
+ return; //found item - done
+ }else if(ui->treeWidget->topLevelItem(i)->child(j)->whatsThis(1)==id){
+ ui->treeWidget->setCurrentItem(ui->treeWidget->topLevelItem(i)->child(j), 1);
ui->treeWidget->scrollToItem(ui->treeWidget->topLevelItem(i)->child(j));
return; //found item - done
}
@@ -39,19 +46,24 @@ void page_main::setPreviousPage(QString id){
void page_main::UpdateItems(QString search){
ui->treeWidget->clear();
+ ui->treeWidget->setColumnCount(2);
//First create the categories
QTreeWidgetItem *interface = new QTreeWidgetItem();
interface->setIcon(0, LXDG::findIcon("preferences-desktop",""));
interface->setText(0, tr("Interface Configuration"));
+ interface->setFirstColumnSpanned(true);
QTreeWidgetItem *appearance = new QTreeWidgetItem();
appearance->setIcon(0, LXDG::findIcon("preferences-desktop-color",""));
appearance->setText(0, tr("Appearance"));
+ appearance->setFirstColumnSpanned(true);
QTreeWidgetItem *session = new QTreeWidgetItem();
session->setIcon(0, LXDG::findIcon("preferences-system-session-services",""));
- session->setText(0, tr("Desktop Session Options"));
+ session->setText(0, tr("Desktop Defaults"));
+ session->setFirstColumnSpanned(true);
QTreeWidgetItem *user = new QTreeWidgetItem();
user->setIcon(0, LXDG::findIcon("preferences-desktop-user",""));
user->setText(0, tr("User Settings"));
+ user->setFirstColumnSpanned(true);
//Now go through and add in the known pages for each category
QStringList SL = search.split(" "); //search list
for(int i=0; i<INFO.length(); i++){
@@ -66,24 +78,40 @@ void page_main::UpdateItems(QString search){
if(!ok){ continue; } //no duplicates between search terms and available info
}
//qDebug() << "Item Found:" << INFO[i].id << INFO[i].title;
- QTreeWidgetItem *it = new QTreeWidgetItem();
- it->setIcon(0, LXDG::findIcon(INFO[i].icon,"") );
- it->setText(0, INFO[i].name);
- it->setStatusTip(0, INFO[i].comment);
- it->setToolTip(0, INFO[i].comment);
- it->setWhatsThis(0, INFO[i].id);
- if(INFO[i].category=="interface"){ interface->addChild(it); }
- else if(INFO[i].category=="appearance"){ appearance->addChild(it); }
- else if(INFO[i].category=="session"){ session->addChild(it); }
- else if(INFO[i].category=="user"){ user->addChild(it); }
- else{ ui->treeWidget->addTopLevelItem(it); }
+ int col = 0;
+ QTreeWidgetItem *lastIt = 0;
+ if(INFO[i].category=="interface" && interface->childCount()>0 ){
+ if( interface->child( interface->childCount()-1)->text(1).isEmpty() ){ lastIt = interface->child(interface->childCount()-1); }
+ }else if(INFO[i].category=="appearance" && appearance->childCount()>0 ){
+ if( appearance->child(appearance->childCount()-1)->text(1).isEmpty() ){ lastIt = appearance->child(appearance->childCount()-1); }
+ }else if(INFO[i].category=="session" && session->childCount()>0 ){
+ if( session->child( session->childCount()-1)->text(1).isEmpty() ){ lastIt = session->child(session->childCount()-1); }
+ }else if(INFO[i].category=="user" && user->childCount()>0 ){
+ if( user->child( user->childCount()-1)->text(1).isEmpty() ){ lastIt = user->child(user->childCount()-1); }
+ }
+ if(lastIt==0){ lastIt = new QTreeWidgetItem(); col = 0;}
+ else{ col = 1; }
+ lastIt->setIcon(col, LXDG::findIcon(INFO[i].icon,"") );
+ lastIt->setText(col, INFO[i].name);
+ lastIt->setStatusTip(col, INFO[i].comment);
+ lastIt->setToolTip(col, INFO[i].comment);
+ lastIt->setWhatsThis(col, INFO[i].id);
+ if(col==0){
+ if(INFO[i].category=="interface"){ interface->addChild(lastIt); }
+ else if(INFO[i].category=="appearance"){ appearance->addChild(lastIt); }
+ else if(INFO[i].category=="session"){ session->addChild(lastIt); }
+ else if(INFO[i].category=="user"){ user->addChild(lastIt); }
+ else{ ui->treeWidget->addTopLevelItem(lastIt); }
+ }
}
//Now add the categories to the tree widget if they are non-empty
- if(interface->childCount()>0){ ui->treeWidget->addTopLevelItem(interface); interface->setExpanded(!search.isEmpty()); }
- if(appearance->childCount()>0){ ui->treeWidget->addTopLevelItem(appearance); appearance->setExpanded(!search.isEmpty()); }
- if(session->childCount()>0){ ui->treeWidget->addTopLevelItem(session); session->setExpanded(!search.isEmpty()); }
- if(user->childCount()>0){ ui->treeWidget->addTopLevelItem(user); user->setExpanded(!search.isEmpty()); }
+ if(interface->childCount()>0){ ui->treeWidget->addTopLevelItem(interface); interface->setExpanded(true); }
+ if(appearance->childCount()>0){ ui->treeWidget->addTopLevelItem(appearance); appearance->setExpanded(true); }
+ if(session->childCount()>0){ ui->treeWidget->addTopLevelItem(session); session->setExpanded(true); }
+ if(user->childCount()>0){ ui->treeWidget->addTopLevelItem(user); user->setExpanded(true); }
ui->treeWidget->sortItems(0, Qt::AscendingOrder);
+ ui->treeWidget->resizeColumnToContents(0);
+ ui->treeWidget->resizeColumnToContents(1);
}
//================
@@ -93,6 +121,11 @@ void page_main::SaveSettings(){
}
+void page_main::clearlineEdit(){
+ ui->lineEdit->clear();
+}
+
+
void page_main::LoadSettings(int){
emit HasPendingChanges(false);
emit ChangePageTitle( tr("Desktop Settings") );
@@ -109,11 +142,19 @@ void page_main::updateIcons(){
//=================
// PRIVATE SLOTS
//=================
-void page_main::itemTriggered(QTreeWidgetItem *it){
+void page_main::showFind(){
+ ui->lineEdit->setFocus();
+ ui->treeWidget->setCurrentItem(0);
+}
+
+void page_main::itemTriggered(QTreeWidgetItem *it, int col){
if(it->childCount()>0){
it->setExpanded( !it->isExpanded() );
- }else if(!it->whatsThis(0).isEmpty()){
- emit ChangePage(it->whatsThis(0));
+ it->setSelected(false);
+ }else if(!it->whatsThis(col).isEmpty()){
+ emit ChangePage(it->whatsThis(col));
+ }else{
+ it->setSelected(false);
}
}
diff --git a/src-qt5/core-utils/lumina-config/pages/page_main.h b/src-qt5/core-utils/lumina-config/pages/page_main.h
index 7c7539a3..095815e9 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_main.h
+++ b/src-qt5/core-utils/lumina-config/pages/page_main.h
@@ -20,6 +20,7 @@ public:
~page_main();
virtual void setPreviousPage(QString id);
+ void clearlineEdit();
public slots:
void SaveSettings();
@@ -29,11 +30,12 @@ public slots:
private:
Ui::page_main *ui;
QList<PAGEINFO> INFO;
-
+ QShortcut *findShort;
void UpdateItems(QString search);
private slots:
- void itemTriggered(QTreeWidgetItem*);
+ void showFind();
+ void itemTriggered(QTreeWidgetItem*, int);
void searchChanged(QString);
};
#endif
diff --git a/src-qt5/core-utils/lumina-config/pages/page_main.ui b/src-qt5/core-utils/lumina-config/pages/page_main.ui
index 2331152b..34033d39 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_main.ui
+++ b/src-qt5/core-utils/lumina-config/pages/page_main.ui
@@ -36,7 +36,7 @@
<item>
<widget class="QTreeWidget" name="treeWidget">
<property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
+ <enum>Qt::TabFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">QTreeWidget{background: transparent; }</string>
@@ -44,6 +44,15 @@
<property name="editTriggers">
<set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
</property>
+ <property name="tabKeyNavigation">
+ <bool>true</bool>
+ </property>
+ <property name="showDropIndicator" stdset="0">
+ <bool>false</bool>
+ </property>
+ <property name="selectionBehavior">
+ <enum>QAbstractItemView::SelectItems</enum>
+ </property>
<property name="iconSize">
<size>
<width>32</width>
diff --git a/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp
new file mode 100644
index 00000000..bda90ad4
--- /dev/null
+++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp
@@ -0,0 +1,217 @@
+//===========================================
+// 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_mouse.h"
+#include "ui_page_mouse.h"
+#include "getPage.h"
+
+#include <QSpinBox>
+#include <QDoubleSpinBox>
+
+//==========
+// PUBLIC
+//==========
+page_mouse::page_mouse(QWidget *parent) : PageWidget(parent), ui(new Ui::page_mouse()){
+ ui->setupUi(this);
+ devices = LInput::listDevices();
+ //DEBUG Code
+ /*qDebug() << "List Devices:";
+ for(int i=0; i<devices.length(); i++){
+ if(!devices[i]->isPointer()){
+ ::free( devices.takeAt(i));
+ i--;
+ }else{
+ qDebug() << "Found Pointer:" << devices[i]->devNumber();
+ qDebug() << " - isExtension:" << devices[i]->isExtension();
+ QList<int> props = devices[i]->listProperties();
+ qDebug() << " - Properties:";
+ for(int j=0; j<props.length(); j++){
+ qDebug() << " --" <<devices[i]->propertyName(props[j])+" ("+QString::number(props[j])+")" <<" = " << devices[i]->getPropertyValue(props[j]);
+ }
+ }
+ }*/
+ generateUI();
+}
+
+page_mouse::~page_mouse(){
+ for(int i=0; i<devices.length(); i++){ ::free(devices[i]); }
+}
+
+//================
+// PUBLIC SLOTS
+//================
+void page_mouse::SaveSettings(){
+
+ emit HasPendingChanges(false);
+}
+
+void page_mouse::LoadSettings(int){
+ emit HasPendingChanges(false);
+ emit ChangePageTitle( tr("Input Device Settings") );
+
+}
+
+void page_mouse::updateIcons(){
+ for(int i=0; i<ui->tabWidget->count(); i++){
+ ui->tabWidget->setTabIcon( i, LXDG::findIcon( "input-"+ui->tabWidget->tabWhatsThis(i).section(":",0,0), "" ) );
+ }
+}
+
+//=================
+// PRIVATE
+//=================
+void page_mouse::generateUI(){
+ ui->tabWidget->clear(); //remove all tabs (just in case)
+ int mouse = 1;
+ int keyboard = 1;
+ qDebug() << "Devices Found:" << devices.length();
+ for(int i=0; i<devices.length(); i++){
+ QTreeWidget *tree = 0;
+ if(!devices[i]->isExtension() || devices[i]->isPointer()){
+ if(devices[i]->isPointer() && devices[i]->listProperties().count() <4){ continue; } //filter out all the trivial/static mouse devices
+ //Make a new tab for this device
+ tree = new QTreeWidget(this);
+ tree->setHeaderHidden(true);
+ tree->setColumnCount(2);
+ connect(tree, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(itemClicked(QTreeWidgetItem*,int)) );
+ if(devices[i]->isPointer()){
+ int tab = ui->tabWidget->addTab(tree, LXDG::findIcon("input-mouse",""), QString(tr("Mouse #%1")).arg(QString::number(mouse)) );
+ ui->tabWidget->setTabWhatsThis(tab, "mouse:"+QString::number(devices[i]->devNumber()));
+ mouse++;
+ }else{
+ int tab = ui->tabWidget->addTab(tree, LXDG::findIcon("input-keyboard",""), QString(tr("Keyboard #%1")).arg(QString::number(keyboard)) );
+ ui->tabWidget->setTabWhatsThis(tab, "keyboard:"+QString::number(devices[i]->devNumber()) );
+ keyboard++;
+ }
+ }else{
+ //Find the associated tab for this extension device
+ int tab = 0;
+ QString type = devices[i]->isPointer() ? "mouse" : "keyboard";
+ int num = devices[i]->devNumber();
+ for(int t=ui->tabWidget->count()-1; t>0; t--){
+ if(ui->tabWidget->tabWhatsThis(t).startsWith(type) && ui->tabWidget->tabWhatsThis(t).section(":",-1).toInt() < num ){ tab = t; break; }
+ }
+ tree = static_cast<QTreeWidget*>( ui->tabWidget->widget(tab) );
+ }
+ if(tree!=0){ populateDeviceTree(tree, devices[i]); }
+ }
+}
+
+void page_mouse::populateDeviceTree(QTreeWidget *tree, LInputDevice *device){
+ QTreeWidgetItem *top = new QTreeWidgetItem(tree);
+ if(device->isExtension()){
+ top->setText( 0, QString(tr("Extension Device #%1")).arg(QString::number(tree->topLevelItemCount())) );
+ }else{ top->setText(0, tr("Master Device")); }
+ top->setWhatsThis(0, QString(device->isPointer() ? "mouse" : "keyboard")+":"+QString::number(device->devNumber()) ); //save this for later
+ top->setFirstColumnSpanned(true);
+ top->setExpanded(true);
+ tree->addTopLevelItem(top);
+ //Now add all the child properties to this item
+ QList<int> props = device->listProperties();
+ for(int i=0; i<props.length(); i++){
+ if(device->propertyName(props[i]).toLower().contains("matrix")){ continue; } //skip this one - can not change from UI and most people will never want to anyway
+ QTreeWidgetItem *tmp = new QTreeWidgetItem(top);
+ tmp->setWhatsThis(0, QString::number(props[i]) );
+ tmp->setText(0, device->propertyName(props[i]));
+ top->addChild(tmp);
+ populateDeviceItemValue(tree, tmp, device->getPropertyValue(props[i]), QString::number(device->devNumber())+":"+QString::number(props[i]) );
+ }
+ //Clean up the tree widget as needed
+ top->sortChildren(0, Qt::AscendingOrder);
+ tree->resizeColumnToContents(0);
+}
+
+void page_mouse::populateDeviceItemValue(QTreeWidget *tree, QTreeWidgetItem *it, QVariant value, QString id){
+ if(value.type()==QVariant::Int){
+ //Could be a boolian - check the name for known "enable" states
+ if(value.toInt() < 2 && (it->text(0).toLower().contains("enable") || it->text(0).toLower().contains("emulation") || it->text(0)==("XTEST Device") ) ){
+ //Just use a checkable column within the item
+ bool enabled = (value.toInt()==1);
+ it->setText(1,"");
+ it->setWhatsThis(1, "bool:"+id);
+ it->setCheckState(1, enabled ? Qt::Checked : Qt::Unchecked);
+ }else{
+ //Use a QSpinBox
+ QSpinBox *box = new QSpinBox();
+ box->setRange(0,100);
+ box->setValue( value.toInt() );
+ box->setWhatsThis("int:"+id);
+ tree->setItemWidget(it, 1, box);
+ connect(box, SIGNAL(valueChanged(int)), this, SLOT(valueChanged()) );
+ }
+ }else if(value.type()==QVariant::Double){
+ //Use a QDoubleSpinBox
+ QDoubleSpinBox *box = new QDoubleSpinBox();
+ box->setRange(0,1000);
+ box->setValue( value.toInt() );
+ box->setWhatsThis("double:"+id);
+ tree->setItemWidget(it, 1, box);
+ connect(box, SIGNAL(valueChanged(double)), this, SLOT(valueChanged()) );
+
+ }else if(value.canConvert< QList<QVariant> >()){
+ //Not Modifiable - just use the label in the item
+ QList<QVariant> list = value.toList();
+ QStringList txtList;
+ for(int i=0; i<list.length(); i++){ txtList << list[i].toString(); }
+ it->setText(1, txtList.join(", ") );
+ it->setToolTip(1, txtList.join(", "));
+ }else if( value.canConvert<QString>() ){
+ //Not Modifiable - just use the label in the item
+ it->setText(1, value.toString());
+ }
+}
+//=================
+// PRIVATE SLOTS
+//=================
+void page_mouse::valueChanged(){
+ //Now get the currently focused widget
+ QWidget *foc = this->focusWidget();
+ if(foc==0){ return; }
+ //qDebug() << "Focus Widget:" << foc->whatsThis();
+ //Now pull out the value and device/property numbers
+ unsigned int dev = foc->whatsThis().section(":",1,1).toInt();
+ int prop = foc->whatsThis().section(":",2,2).toInt();
+ QVariant value;
+ if(foc->whatsThis().startsWith("int:")){ value.setValue( static_cast<QSpinBox*>(foc)->value() ); }
+ else if(foc->whatsThis().startsWith("double:")){ value.setValue( static_cast<QDoubleSpinBox*>(foc)->value() ); }
+ //Now change the property for the device
+ qDebug() << " - Device:" <<dev << "prop:" << prop << "value:" << value;
+ for(int i=0; i<devices.length(); i++){
+ if(devices[i]->devNumber() == dev){
+ bool ok = devices[i]->setPropertyValue(prop, value);
+ if(ok){ foc->setStyleSheet(""); }
+ else{ foc->setStyleSheet("background: red"); }
+ //qDebug() << " - Changed property:" << (ok ? "success" : "failure");
+ break;
+ }
+ }
+}
+
+void page_mouse::itemClicked(QTreeWidgetItem *it, int col){
+ if(col!=1){ return; } //only care about value changes
+ if(it->whatsThis(1).isEmpty()){ return; }//not a checkable item
+ qDebug() << "item Clicked:" << it->whatsThis(1) << it->text(0);
+ //Now pull out the value and device/property numbers
+ unsigned int dev = it->whatsThis(1).section(":",1,1).toInt();
+ int prop = it->whatsThis(1).section(":",2,2).toInt();
+ QVariant value( (it->checkState(1)==Qt::Checked) ? 1 : 0 );
+ //Now change the property for the device
+ qDebug() << " - Device:" <<dev << "prop:" << prop << "value:" << value;
+ for(int i=0; i<devices.length(); i++){
+ if(devices[i]->devNumber() == dev){
+ //Since this "clicked" signal can get sent out even if the value has not changed, go ahead and make sure we have a different value first
+ QVariant current = devices[i]->getPropertyValue(prop);
+ //qDebug() << " - Current Value:" << current;
+ if(value.toInt()!=current.toInt()){
+ bool ok = devices[i]->setPropertyValue(prop, value);
+ //if(ok){ foc->setStyleSheet(""); }
+ //else{ foc->setStyleSheet("background: red"); }
+ qDebug() << " - Changed property:" << (ok ? "success" : "failure");
+ }
+ break;
+ }
+ }
+}
diff --git a/src-qt5/core-utils/lumina-config/pages/page_mouse.h b/src-qt5/core-utils/lumina-config/pages/page_mouse.h
new file mode 100644
index 00000000..5409a9c2
--- /dev/null
+++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.h
@@ -0,0 +1,43 @@
+//===========================================
+// 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_MOUSE_H
+#define _LUMINA_CONFIG_PAGE_MOUSE_H
+#include "../globals.h"
+#include "PageWidget.h"
+
+#include <LInputDevice.h>
+#include <QTreeWidgetItem>
+
+namespace Ui{
+ class page_mouse;
+};
+
+class page_mouse : public PageWidget{
+ Q_OBJECT
+public:
+ page_mouse(QWidget *parent);
+ ~page_mouse();
+
+public slots:
+ void SaveSettings();
+ void LoadSettings(int screennum);
+ void updateIcons();
+
+private:
+ Ui::page_mouse *ui;
+ QList<LInputDevice*> devices;
+
+ void generateUI();
+ void populateDeviceTree(QTreeWidget *tree, LInputDevice *device);
+ void populateDeviceItemValue(QTreeWidget *tree, QTreeWidgetItem *it, QVariant value, QString id);
+
+private slots:
+ void valueChanged();
+ void itemClicked(QTreeWidgetItem*, int);
+
+};
+#endif
diff --git a/src-qt5/core-utils/lumina-config/pages/page_mouse.ui b/src-qt5/core-utils/lumina-config/pages/page_mouse.ui
new file mode 100644
index 00000000..a6c2e53f
--- /dev/null
+++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.ui
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>page_mouse</class>
+ <widget class="QWidget" name="page_mouse">
+ <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">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.cpp b/src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.cpp
new file mode 100644
index 00000000..60bc2872
--- /dev/null
+++ b/src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.cpp
@@ -0,0 +1,110 @@
+//===========================================
+// 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_mouse_trueos.h"
+#include "ui_page_mouse_trueos.h"
+#include "getPage.h"
+
+#include <QDebug>
+#include <QProcess>
+
+
+//==========
+// PUBLIC
+//==========
+page_mouse_trueos::page_mouse_trueos(QWidget *parent) : PageWidget(parent), ui(new Ui::page_mouse_trueos()){
+ ui->setupUi(this);
+ QString program = "/usr/sbin/moused";
+
+ ui->slider_mouseAcceleration->setRange(1,200);
+ ui->slider_mouseAcceleration->setValue(100);
+ connect( ui->slider_mouseAcceleration, SIGNAL(valueChanged(int)), this, SLOT(setValue(double)));
+ realAccelValue = ( ui->slider_mouseAcceleration->value() / divisor);
+ realAccelValueString = QString::number(ui->slider_mouseAcceleration->value() / divisor, 'f', 2);
+
+ ui->slider_doubleClickThreshold->setRange(1,1000);
+ ui->slider_doubleClickThreshold->setValue(500);
+ connect( ui->slider_doubleClickThreshold, SIGNAL(valueChanged(int)), this, SLOT(setValue(double)));
+ realDoubleClickValue = (ui->slider_doubleClickThreshold->value());
+ realDoubleClickValueString = QString::number(ui->slider_doubleClickThreshold->value());
+
+ ui->combobox_resolutionBox->setCurrentIndex(1);
+ connect(ui->combobox_resolutionBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(setMouseResolution()) );
+
+ connect(ui->checkBoxHandedness, SIGNAL(toggled(bool)), this, SLOT(swapHandedness()) );
+ connect(ui->checkBoxTerminateDrift, SIGNAL(toggled(bool)), this, SLOT(terminateDrift()) );
+
+ connect( ui->button_apply, SIGNAL(clicked()), this, SLOT(updateMoused()));
+}
+
+page_mouse_trueos::~page_mouse_trueos(){
+}
+
+//================
+// PUBLIC SLOTS
+//================
+void page_mouse_trueos::SaveSettings(){
+
+ emit HasPendingChanges(false);
+}
+
+void page_mouse_trueos::LoadSettings(int){
+ emit HasPendingChanges(false);
+ emit ChangePageTitle( tr("Mouse Settings") );
+}
+
+//=================
+// PRIVATE
+//=================
+
+void page_mouse_trueos::swapHandedness(){
+ if(ui->checkBoxHandedness->isChecked()){
+ handString = "-m 1=3 -m 3=1";
+ }
+ else{
+ handString = "-m 1=1 -m 3=3";
+ }
+}
+
+void page_mouse_trueos::setMouseResolution(){
+ resolutionValue = ui->combobox_resolutionBox->itemText(ui->combobox_resolutionBox->currentIndex());
+ resString = "-r " + resolutionValue;
+}
+
+void page_mouse_trueos::setMouseAcceleration(){
+ realAccelValue = ( ui->slider_mouseAcceleration->value() / divisor);
+ realAccelValueString = QString::number( ui->slider_mouseAcceleration->value() / divisor, 'f', 2);
+ accelString = "-a " + realAccelValueString;
+}
+
+void page_mouse_trueos::setDoubleClickThreshold(){
+ realDoubleClickValueString = QString::number( ui->slider_doubleClickThreshold->value());
+ dclickString = "-C " + realDoubleClickValueString;
+}
+
+void page_mouse_trueos::terminateDrift(){
+ if(ui->checkBoxTerminateDrift->isChecked()){
+ driftString = "-T 4[,500[,4000]]";
+ }
+ else{
+ driftString = "";
+ }
+}
+
+void page_mouse_trueos::updateMoused(){
+ setMouseAcceleration(); setDoubleClickThreshold();
+ qDebug() << "handString" << handString;
+ qDebug() << "resString" << resString;
+ qDebug() << "accelString" << accelString;
+ qDebug() << "dclickString" << dclickString;
+ qDebug() << "driftstring" << driftString;
+ deviceString = "-p /dev/sysmouse";
+ mousedargs << deviceString << handString << resString << accelString << dclickString << driftString;
+ qDebug() << "mousedargs" << mousedargs;
+ QProcess *moused = new QProcess(this);
+ moused->start(program, mousedargs);
+}
+
diff --git a/src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.h b/src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.h
new file mode 100644
index 00000000..ff643747
--- /dev/null
+++ b/src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.h
@@ -0,0 +1,53 @@
+//===========================================
+// 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_MOUSE_TRUEOS_H
+#define _LUMINA_CONFIG_PAGE_MOUSE_TRUEOS_H
+#include "../globals.h"
+#include "PageWidget.h"
+
+#include <LInputDevice.h>
+#include <QTreeWidgetItem>
+
+namespace Ui{
+ class page_mouse_trueos;
+};
+
+class page_mouse_trueos : public PageWidget{
+ Q_OBJECT
+public:
+ page_mouse_trueos(QWidget *parent);
+ ~page_mouse_trueos();
+ const double divisor = 100;
+ double realAccelValue;
+ QString realAccelValueString;
+ double realDoubleClickValue;
+ QString realDoubleClickValueString;
+ QString resolutionValue;
+ QString handString;
+ QString resString;
+ QString dclickString;
+ QString driftString;
+ QString accelString;
+ QString program;
+ QStringList mousedargs;
+ QString deviceString;
+
+public slots:
+ void SaveSettings();
+ void LoadSettings(int screennum);
+// void updateIcons();
+ void swapHandedness();
+ void setMouseResolution();
+ void setMouseAcceleration();
+ void setDoubleClickThreshold();
+ void terminateDrift();
+ void updateMoused();
+
+private:
+ Ui::page_mouse_trueos *ui;
+};
+#endif
diff --git a/src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.ui b/src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.ui
new file mode 100644
index 00000000..6a974d4c
--- /dev/null
+++ b/src-qt5/core-utils/lumina-config/pages/page_mouse_trueos.ui
@@ -0,0 +1,427 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>page_mouse_trueos</class>
+ <widget class="QWidget" name="page_mouse_trueos">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>427</width>
+ <height>417</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>Mouse Acceleration</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>( default = 1)</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="1">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>0</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_5">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>2</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QSlider" name="slider_mouseAcceleration">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximum">
+ <number>200</number>
+ </property>
+ <property name="singleStep">
+ <number>20</number>
+ </property>
+ <property name="pageStep">
+ <number>20</number>
+ </property>
+ <property name="value">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="invertedAppearance">
+ <bool>false</bool>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::TicksAbove</enum>
+ </property>
+ <property name="tickInterval">
+ <number>20</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="1">
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <item>
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>Double Click Threshold</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_10">
+ <property name="text">
+ <string>(default = 500)</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="4" column="1">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>1ms</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_6">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_5">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>500ms</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_7">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>1s</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QSlider" name="slider_doubleClickThreshold">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximum">
+ <number>1000</number>
+ </property>
+ <property name="singleStep">
+ <number>25</number>
+ </property>
+ <property name="pageStep">
+ <number>25</number>
+ </property>
+ <property name="value">
+ <number>500</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::TicksAbove</enum>
+ </property>
+ <property name="tickInterval">
+ <number>100</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="5" column="1">
+ <widget class="Line" name="line_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="label_resolutionBox">
+ <property name="text">
+ <string>Resolution</string>
+ </property>
+ <property name="buddy">
+ <cstring>combobox_resolutionBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="combobox_resolutionBox">
+ <item>
+ <property name="text">
+ <string>low</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>medium-low</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>medium-high</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>high</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="checkBoxTerminateDrift">
+ <property name="text">
+ <string>Terminate Drift</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="checkBoxHandedness">
+ <property name="text">
+ <string>Switch Handedness</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_7">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="button_apply">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Apply</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp b/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp
index 91f3a0d0..1af87cd2 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp
@@ -33,6 +33,7 @@ page_session_options::page_session_options(QWidget *parent) : PageWidget(parent)
connect(ui->check_session_playloginaudio, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) );
connect(ui->check_session_playlogoutaudio, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) );
connect(ui->check_autoapplinks, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) );
+ connect(ui->check_watch_app_procs, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) );
updateIcons();
}
@@ -53,6 +54,14 @@ void page_session_options::SaveSettings(){
sessionsettings.setValue("TimeFormat", ui->line_session_time->text());
sessionsettings.setValue("DateFormat", ui->line_session_date->text());
sessionsettings.setValue("DateTimeOrder", ui->combo_session_datetimeorder->currentData().toString());
+
+ QString lopenWatchFile = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/nowatch";
+ if(QFile::exists(lopenWatchFile) && ui->check_watch_app_procs->isChecked()){
+ QFile::remove(lopenWatchFile);
+ }else if(!QFile::exists(lopenWatchFile) && !ui->check_watch_app_procs->isChecked()){
+ QFile file(lopenWatchFile);
+ if(file.open(QIODevice::WriteOnly) ){ file.close(); } //just need to touch it to create the file
+ }
emit HasPendingChanges(false);
}
@@ -71,6 +80,9 @@ void page_session_options::LoadSettings(int){
int index = ui->combo_session_datetimeorder->findData( sessionsettings.value("DateTimeOrder","timeonly").toString() );
ui->combo_session_datetimeorder->setCurrentIndex(index);
+ QString lopenWatchFile = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/nowatch";
+ ui->check_watch_app_procs->setChecked( !QFile::exists(lopenWatchFile) );
+
sessionLoadTimeSample();
sessionLoadDateSample();
QApplication::processEvents(); //throw away any interaction events from loading
@@ -122,12 +134,12 @@ void page_session_options::sessionChangeUserIcon(){
}
void page_session_options::sessionResetSys(){
- LUtils::LoadSystemDefaults();
+ LDesktopUtils::LoadSystemDefaults();
QTimer::singleShot(500,this, SLOT(LoadSettings()) );
}
void page_session_options::sessionResetLumina(){
- LUtils::LoadSystemDefaults(true); //skip OS customizations
+ LDesktopUtils::LoadSystemDefaults(true); //skip OS customizations
QTimer::singleShot(500,this, SLOT(LoadSettings()) );
}
diff --git a/src-qt5/core-utils/lumina-config/pages/page_session_options.ui b/src-qt5/core-utils/lumina-config/pages/page_session_options.ui
index 55d204ae..255166de 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_session_options.ui
+++ b/src-qt5/core-utils/lumina-config/pages/page_session_options.ui
@@ -60,6 +60,13 @@
</widget>
</item>
<item>
+ <widget class="QCheckBox" name="check_watch_app_procs">
+ <property name="text">
+ <string>Show application crash data</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
<widget class="QPushButton" name="push_session_setUserIcon">
diff --git a/src-qt5/core-utils/lumina-config/pages/page_theme.cpp b/src-qt5/core-utils/lumina-config/pages/page_theme.cpp
index 123812a1..52579ec2 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_theme.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_theme.cpp
@@ -14,6 +14,7 @@
//==========
page_theme::page_theme(QWidget *parent) : PageWidget(parent), ui(new Ui::page_theme()){
ui->setupUi(this);
+ findQt5Themes();
loading = false;
PINFO = new LPlugins(); //load the info class
connect(ui->spin_session_fontsize, SIGNAL(valueChanged(int)), this, SLOT(settingsChanged()) );
@@ -24,7 +25,7 @@ page_theme::page_theme(QWidget *parent) : PageWidget(parent), ui(new Ui::page_th
connect(ui->tool_session_newcolor, SIGNAL(clicked()), this, SLOT(sessionEditColor()) );
connect(ui->tool_session_newtheme, SIGNAL(clicked()), this, SLOT(sessionEditTheme()) );
connect(ui->combo_session_cursortheme, SIGNAL(currentIndexChanged(int)), this, SLOT(settingsChanged()) );
-
+ connect(ui->combo_qt5_theme, SIGNAL(currentIndexChanged(int)), this, SLOT(checkQt5Theme()) );
updateIcons();
}
@@ -41,6 +42,11 @@ void page_theme::SaveSettings(){
QString iconset = ui->combo_session_icontheme->currentText();
QString font = ui->font_session_theme->currentFont().family();
QString fontsize = QString::number(ui->spin_session_fontsize->value())+"pt";
+ QString qt5theme = ui->combo_qt5_theme->currentData().toString();
+ if(qt5theme=="internal_custom"){ qt5theme = ui->line_qt5_custom_theme->text(); }
+ QSettings sessionsettings("lumina-desktop","sessionsettings");
+ sessionsettings.setValue("Qt5_theme_engine", qt5theme);
+
//qDebug() << "Saving theme options:" << themefile << colorfile << iconset << font << fontsize;
LTHEME::setCurrentSettings( themefile, colorfile, iconset, font, fontsize);
LTHEME::setCursorTheme(ui->combo_session_cursortheme->currentText());
@@ -103,6 +109,15 @@ ui->combo_session_themefile->clear();
int cur = ui->combo_session_cursortheme->findText( LTHEME::currentCursor() );
if(cur>=0){ ui->combo_session_cursortheme->setCurrentIndex(cur); }
+ QSettings sessionsettings("lumina-desktop","sessionsettings");
+ QString qt5theme = sessionsettings.value("Qt5_theme_engine", "").toString();
+ int index = ui->combo_qt5_theme->findData(qt5theme);
+ if(index <0){
+ ui->line_qt5_custom_theme->setText(qt5theme);
+ index = ui->combo_qt5_theme->findData("internal_custom");
+ }
+ if(index>=0){ ui->combo_qt5_theme->setCurrentIndex(index); }
+ checkQt5Theme(); //update item visibility
QApplication::processEvents();
loading = false;
}
@@ -110,9 +125,35 @@ ui->combo_session_themefile->clear();
void page_theme::updateIcons(){
ui->tool_session_newtheme->setIcon( LXDG::findIcon("preferences-desktop-theme","") );
ui->tool_session_newcolor->setIcon( LXDG::findIcon("preferences-desktop-color","") );
+ ui->tabWidget->setTabIcon(0, LXDG::findIcon("user-desktop","desktop") );
+ ui->tabWidget->setTabIcon(1, LXDG::findIcon("preferences-system-windows","") );
}
//=================
+// PRIVATE
+//=================
+void page_theme::findQt5Themes(){
+ ui->combo_qt5_theme->clear();
+ ui->combo_qt5_theme->addItem( tr("None"), "");
+ ui->combo_qt5_theme->addItem( tr("Manual Setting"), "internal_custom");
+ //Now probe the system and list any themes that are found
+ QStringList paths = QCoreApplication::libraryPaths();
+ qDebug() << "Known Library Paths:" << paths;
+ QStringList engines;
+ for(int i=0; i<paths.length(); i++){
+ if(QFile::exists(paths[i]+"/platformthemes")){
+ QDir dir(paths[i]+"/platformthemes");
+ QStringList libs = dir.entryList(QStringList("lib*.so*"), QDir::Files, QDir::NoSort) ;
+ for(int j=0; j<libs.length(); j++){ engines << libs[j].section("lib",1,-1).section(".",0,-2).simplified(); }
+ }
+ }
+ engines.sort();
+ for(int i=0; i<engines.length(); i++){
+ if(i==0){ ui->combo_qt5_theme->insertSeparator(2); }
+ ui->combo_qt5_theme->addItem( engines[i], engines[i] );
+ }
+}
+//=================
// PRIVATE SLOTS
//=================
void page_theme::sessionEditColor(){
@@ -167,3 +208,8 @@ void page_theme::sessionEditTheme(){
}
emit HasPendingChanges(true);
}
+
+void page_theme::checkQt5Theme(){
+ ui->line_qt5_custom_theme->setVisible( ui->combo_qt5_theme->currentData().toString()=="internal_custom");
+ settingsChanged();
+}
diff --git a/src-qt5/core-utils/lumina-config/pages/page_theme.h b/src-qt5/core-utils/lumina-config/pages/page_theme.h
index a56fba7b..3257af9b 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_theme.h
+++ b/src-qt5/core-utils/lumina-config/pages/page_theme.h
@@ -31,6 +31,8 @@ private:
LPlugins *PINFO;
bool loading;
+ void findQt5Themes();
+
private slots:
void settingsChanged(){
//qDebug() << "Setting Changed:" << !loading;
@@ -38,5 +40,6 @@ private slots:
}
void sessionEditColor();
void sessionEditTheme();
+ void checkQt5Theme();
};
#endif
diff --git a/src-qt5/core-utils/lumina-config/pages/page_theme.ui b/src-qt5/core-utils/lumina-config/pages/page_theme.ui
index decd543f..ecc209ed 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_theme.ui
+++ b/src-qt5/core-utils/lumina-config/pages/page_theme.ui
@@ -6,14 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
+ <width>428</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QFormLayout" name="formLayout">
+ <layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>9</number>
</property>
@@ -26,155 +26,193 @@
<property name="bottomMargin">
<number>9</number>
</property>
- <item row="0" column="0">
- <widget class="QLabel" name="label_12">
- <property name="text">
- <string>Font:</string>
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>0</number>
</property>
+ <widget class="QWidget" name="tab_desktop">
+ <attribute name="title">
+ <string>Desktop Theme</string>
+ </attribute>
+ <layout class="QFormLayout" name="formLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_12">
+ <property name="text">
+ <string>Font:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QFontComboBox" name="font_session_theme">
+ <property name="editable">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_14">
+ <property name="text">
+ <string>Font Size:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="spin_session_fontsize">
+ <property name="suffix">
+ <string> point</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_16">
+ <property name="text">
+ <string>Theme Template:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_12">
+ <item>
+ <widget class="QComboBox" name="combo_session_themefile">
+ <property name="sizeAdjustPolicy">
+ <enum>QComboBox::AdjustToContents</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_session_newtheme">
+ <property name="toolTip">
+ <string>Create/Edit a theme template (Advanced)</string>
+ </property>
+ <property name="statusTip">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_17">
+ <property name="text">
+ <string>Color Scheme:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_19">
+ <item>
+ <widget class="QComboBox" name="combo_session_colorfile">
+ <property name="sizeAdjustPolicy">
+ <enum>QComboBox::AdjustToContents</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_session_newcolor">
+ <property name="toolTip">
+ <string>Create/Edit a color scheme</string>
+ </property>
+ <property name="statusTip">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_18">
+ <property name="text">
+ <string>Icon Pack:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QComboBox" name="combo_session_icontheme"/>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_31">
+ <property name="text">
+ <string>Mouse Cursors:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QComboBox" name="combo_session_cursortheme">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_cursor_sample">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string notr="true"/>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_apps">
+ <attribute name="title">
+ <string>Application Themes</string>
+ </attribute>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Qt5 Theme Engine</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QComboBox" name="combo_qt5_theme"/>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="line_qt5_custom_theme"/>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QFontComboBox" name="font_session_theme">
- <property name="editable">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_14">
- <property name="text">
- <string>Font Size:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QSpinBox" name="spin_session_fontsize">
- <property name="suffix">
- <string> point</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_16">
- <property name="text">
- <string>Theme Template:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_12">
- <item>
- <widget class="QComboBox" name="combo_session_themefile">
- <property name="sizeAdjustPolicy">
- <enum>QComboBox::AdjustToContents</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="tool_session_newtheme">
- <property name="toolTip">
- <string>Create/Edit a theme template (Advanced)</string>
- </property>
- <property name="statusTip">
- <string/>
- </property>
- <property name="text">
- <string>Edit</string>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_17">
- <property name="text">
- <string>Color Scheme:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_19">
- <item>
- <widget class="QComboBox" name="combo_session_colorfile">
- <property name="sizeAdjustPolicy">
- <enum>QComboBox::AdjustToContents</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="tool_session_newcolor">
- <property name="toolTip">
- <string>Create/Edit a color scheme</string>
- </property>
- <property name="statusTip">
- <string/>
- </property>
- <property name="text">
- <string>Edit</string>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_18">
- <property name="text">
- <string>Icon Pack:</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QComboBox" name="combo_session_icontheme"/>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="label_31">
- <property name="text">
- <string>Mouse Cursors:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QComboBox" name="combo_session_cursortheme">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_cursor_sample">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string notr="true"/>
- </property>
- <property name="text">
- <string notr="true"/>
- </property>
- <property name="scaledContents">
- <bool>true</bool>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- </layout>
- </item>
</layout>
</widget>
<resources/>
diff --git a/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp b/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp
index b54e07bd..b711d587 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp
@@ -32,7 +32,8 @@ page_wallpaper::~page_wallpaper(){
//================
void page_wallpaper::SaveSettings(){
QSettings settings("lumina-desktop","desktopsettings");
- QString DPrefix = "desktop-"+QString::number(cScreen)+"/";
+ QString screenID = QApplication::screens().at(cScreen)->name();
+ QString DPrefix = "desktop-"+screenID+"/";
QStringList bgs; //get the list of backgrounds to use
if(ui->radio_desk_multi->isChecked()){
for(int i=0; i<ui->combo_desk_bg->count(); i++){
@@ -56,7 +57,8 @@ void page_wallpaper::LoadSettings(int screennum){
cScreen = screennum; //save for later
loading = true;
QSettings settings("lumina-desktop","desktopsettings");
- QString DPrefix = "desktop-"+QString::number(cScreen)+"/";
+ QString screenID = QApplication::screens().at(cScreen)->name();
+ QString DPrefix = "desktop-"+screenID+"/";
QStringList bgs = settings.value(DPrefix+"background/filelist", QStringList()<<"default").toStringList();
ui->combo_desk_bg->clear();
diff --git a/src-qt5/core-utils/lumina-config/pages/pages.pri b/src-qt5/core-utils/lumina-config/pages/pages.pri
index b1db2860..02319976 100644
--- a/src-qt5/core-utils/lumina-config/pages/pages.pri
+++ b/src-qt5/core-utils/lumina-config/pages/pages.pri
@@ -13,7 +13,9 @@ HEADERS += $${PWD}/getPage.h \
$${PWD}/page_interface_panels.h \
$${PWD}/page_session_locale.h \
$${PWD}/page_session_options.h \
- $${PWD}/page_compton.h
+ $${PWD}/page_compton.h \
+ $${PWD}/page_mouse.h
+// $${PWD}/page_mouse_trueos.h
SOURCES += $${PWD}/page_main.cpp \
@@ -28,7 +30,9 @@ SOURCES += $${PWD}/page_main.cpp \
$${PWD}/page_interface_panels.cpp \
$${PWD}/page_session_locale.cpp \
$${PWD}/page_session_options.cpp \
- $${PWD}/page_compton.cpp
+ $${PWD}/page_compton.cpp \
+ $${PWD}/page_mouse.cpp
+// $${PWD}/page_mouse_trueos.cpp
FORMS += $${PWD}/page_main.ui \
@@ -43,4 +47,6 @@ FORMS += $${PWD}/page_main.ui \
$${PWD}/page_interface_panels.ui \
$${PWD}/page_session_locale.ui \
$${PWD}/page_session_options.ui \
- $${PWD}/page_compton.ui
+ $${PWD}/page_compton.ui \
+ $${PWD}/page_mouse.ui
+// $${PWD}/page_mouse_trueos.ui
bgstack15