diff options
author | q5sys <jt@obs-sec.com> | 2016-11-20 01:43:17 -0500 |
---|---|---|
committer | q5sys <jt@obs-sec.com> | 2016-11-20 01:43:17 -0500 |
commit | b9840ef585385fece513e24e4cea193d35328dc0 (patch) | |
tree | baf3f6ea9b462bb35bb71679639dbc345b36f400 /src-qt5/core-utils/lumina-config/pages | |
parent | search clear function on ESC press (diff) | |
parent | Add a new dialog UI form (not integrated yet) for a front-end to "dd"ing ISO/... (diff) | |
download | lumina-b9840ef585385fece513e24e4cea193d35328dc0.tar.gz lumina-b9840ef585385fece513e24e4cea193d35328dc0.tar.bz2 lumina-b9840ef585385fece513e24e4cea193d35328dc0.zip |
search clear function on ESC press
Diffstat (limited to 'src-qt5/core-utils/lumina-config/pages')
10 files changed, 336 insertions, 132 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/getPage.h b/src-qt5/core-utils/lumina-config/pages/getPage.h index fba3998b..ea0cfb00 100644 --- a/src-qt5/core-utils/lumina-config/pages/getPage.h +++ b/src-qt5/core-utils/lumina-config/pages/getPage.h @@ -38,7 +38,7 @@ static QList<PAGEINFO> KnownPages(){ 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"); - + //list << PageInfo("mouse", QObject::tr("Mouse Settings"), QObject::tr("Mouse Settings"), "input-mouse",QObject::tr("Adjust mouse settings"), "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; } @@ -66,6 +66,7 @@ static QList<PAGEINFO> KnownPages(){ #include "page_session_locale.h" #include "page_session_options.h" #include "page_compton.h" +#include "page_mouse.h" static PageWidget* GetNewPage(QString id, QWidget *parent){ //Find the page that matches this "id" @@ -82,6 +83,7 @@ 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=="mouse"){ page = new page_mouse(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 5f7cd190..8cdb2ea7 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_compton.cpp +++ b/src-qt5/core-utils/lumina-config/pages/page_compton.cpp @@ -29,6 +29,7 @@ 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); } @@ -37,6 +38,7 @@ void page_compton::LoadSettings(int){ 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") ); 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_mouse.cpp b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp new file mode 100644 index 00000000..dbe075d7 --- /dev/null +++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp @@ -0,0 +1,77 @@ +//=========================================== +// 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" + +//========== +// PUBLIC +//========== +page_mouse::page_mouse(QWidget *parent) : PageWidget(parent), ui(new Ui::page_mouse()){ + ui->setupUi(this); + connect(ui->slider_accel, SIGNAL(valueChanged(int)), this, SLOT(accelChanged(int)) ); + updateIcons(); + qDebug() << "List Devices:"; + QList<LInputDevice*> devices = LInput::listDevices(); + 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(); + qDebug() << " - Properties:" << devices[i]->listProperties(); + } + } +} + +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("Desktop Settings") ); + +} + +void page_mouse::updateIcons(){ + +} + +//================= +// PRIVATE +//================= + +//================= +// PRIVATE SLOTS +//================= +void page_mouse::accelChanged(int val){ + if(val<=4){ + val = 4-val; + ui->label_accel->setText( QString("1/%1").arg(QString::number(val)) ); + QProcess::startDetached("xset mouse 1/"+QString::number(val)); + }else{ + val = val-4; + if(val%2==0){ + val = val/2; + ui->label_accel->setText( QString::number(val) ); + QProcess::startDetached("xset mouse "+QString::number(val)); + }else{ + ui->label_accel->setText( QString::number(val)+"/2" ); + QProcess::startDetached("xset mouse "+QString::number(val)+"/2"); + } + } +} 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..849917c5 --- /dev/null +++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.h @@ -0,0 +1,36 @@ +//=========================================== +// 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> + +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; + +private slots: + void accelChanged(int val); +}; +#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..619e38dc --- /dev/null +++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.ui @@ -0,0 +1,58 @@ +<?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="QFormLayout" name="formLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Mouse Acceleration</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QSlider" name="slider_accel"> + <property name="maximum"> + <number>20</number> + </property> + <property name="value"> + <number>4</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::TicksBelow</enum> + </property> + <property name="tickInterval"> + <number>2</number> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_accel"> + <property name="text"> + <string notr="true"/> + </property> + </widget> + </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 333f9da8..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 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/pages.pri b/src-qt5/core-utils/lumina-config/pages/pages.pri index b1db2860..b36ca7ba 100644 --- a/src-qt5/core-utils/lumina-config/pages/pages.pri +++ b/src-qt5/core-utils/lumina-config/pages/pages.pri @@ -13,7 +13,8 @@ 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 SOURCES += $${PWD}/page_main.cpp \ @@ -28,7 +29,8 @@ 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 FORMS += $${PWD}/page_main.ui \ @@ -43,4 +45,5 @@ 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 |