From d9ba230fbdae3ac7fa31bbaaf625d4fe258d04ab Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 15 Nov 2016 09:19:23 -0500 Subject: Add knowledge of the new jsonmenu panel plugin to lumina-config. --- src-qt5/core-utils/lumina-config/LPlugins.cpp | 9 +++++- src-qt5/core-utils/lumina-config/PanelWidget.cpp | 36 ++++++++++++++++++++---- 2 files changed, 38 insertions(+), 7 deletions(-) (limited to 'src-qt5/core-utils/lumina-config') diff --git a/src-qt5/core-utils/lumina-config/LPlugins.cpp b/src-qt5/core-utils/lumina-config/LPlugins.cpp index 089a181c..dfd490e6 100644 --- a/src-qt5/core-utils/lumina-config/LPlugins.cpp +++ b/src-qt5/core-utils/lumina-config/LPlugins.cpp @@ -173,6 +173,13 @@ void LPlugins::LoadPanelPlugins(){ info.ID = "audioplayer"; info.icon = "media-playback-start"; PANEL.insert(info.ID, info); + //JSON Menu Scripts + info = LPI(); //clear it + info.name = QObject::tr("Menu Script"); + info.description = QObject::tr("Run an external script to generate a user defined menu"); + info.ID = "jsonmenu"; + info.icon = "text-x-script"; + PANEL.insert(info.ID, info); } // DESKTOP PLUGINS @@ -293,7 +300,7 @@ void LPlugins::LoadMenuPlugins(){ info.ID = "app"; info.icon = "application-x-desktop"; MENU.insert(info.ID, info); - //Custom Apps + //JSON Menu Scripts info = LPI(); //clear it info.name = QObject::tr("Menu Script"); info.description = QObject::tr("Run an external script to generate a user defined menu"); diff --git a/src-qt5/core-utils/lumina-config/PanelWidget.cpp b/src-qt5/core-utils/lumina-config/PanelWidget.cpp index aff7bda3..d5d3d9bd 100644 --- a/src-qt5/core-utils/lumina-config/PanelWidget.cpp +++ b/src-qt5/core-utils/lumina-config/PanelWidget.cpp @@ -9,7 +9,7 @@ #include "GetPluginDialog.h" #include "AppDialog.h" - +#include "ScriptDialog.h" PanelWidget::PanelWidget(QWidget *parent, QWidget *Main, LPlugins *Pinfo) : QWidget(parent), ui(new Ui::PanelWidget){ ui->setupUi(this); @@ -66,6 +66,18 @@ void PanelWidget::LoadSettings(QSettings *settings, int Dnum, int Pnum){ it->setWhatsThis(plugs[i]); //make sure to preserve the entire plugin ID (is the unique version) ui->list_plugins->addItem(it); } + + }else if(pid.startsWith("jsonmenu")){ + LPI info = PINFO->panelPluginInfo( plugs[i].section("::::",0,0) ); + if(info.ID.isEmpty()){ continue; } //invalid plugin type (no longer available?) + QString exec = plugs[i].section("::::",1,1); + QListWidgetItem *item = new QListWidgetItem(); + item->setWhatsThis( plugs[i] ); + item->setIcon( LXDG::findIcon(plugs[i].section("::::",3,3),info.icon) ); + item->setText( plugs[i].section("::::",2,2) +" ("+info.name+")" ); + item->setToolTip( info.description ); + ui->list_plugins->addItem(item); + }else{ LPI info = PINFO->panelPluginInfo(pid); if(!info.ID.isEmpty()){ @@ -180,23 +192,35 @@ void PanelWidget::on_tool_addplugin_clicked(){ dlg.exec(); if(!dlg.selected){ return; } //cancelled QString pan = dlg.plugID; //getNewPanelPlugin(); + QListWidgetItem *it = 0; if(pan == "applauncher"){ //Prompt for the application to add QString app =getSysApp(); if(app.isEmpty()){ return; } //cancelled pan.append("::"+app); XDGDesktop desk(app); - QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(desk.icon,""), desk.name); + it = new QListWidgetItem( LXDG::findIcon(desk.icon,""), desk.name); it->setWhatsThis(pan); - ui->list_plugins->addItem(it); - ui->list_plugins->setCurrentItem(it); - ui->list_plugins->scrollToItem(it); + + }else if(pan=="jsonmenu"){ + //Need to prompt for the script file, name, and icon to use + //new ID format: "jsonmenu":::::::::::: + ScriptDialog SD(this); + SD.exec(); + if(!SD.isValid()){ return; } + LPI info = PINFO->panelPluginInfo(pan); + it = new QListWidgetItem( LXDG::findIcon(SD.icon(),"text-x-script"), SD.name()+" ("+info.ID+")" ); + it->setWhatsThis(info.ID+"::::"+SD.command()+"::::"+SD.name()+"::::"+SD.icon()); + it->setToolTip( info.description ); }else{ if(pan.isEmpty()){ return; } //nothing selected //Add the new plugin to the list LPI info = PINFO->panelPluginInfo(pan); - QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(info.icon,""), info.name); + it = new QListWidgetItem( LXDG::findIcon(info.icon,""), info.name); it->setWhatsThis(info.ID); + } + //Now add the new item to the list + if(it!=0){ ui->list_plugins->addItem(it); ui->list_plugins->setCurrentItem(it); ui->list_plugins->scrollToItem(it); -- cgit From 0afad0dbbae4440ec311e9682f62686889afbcce Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 15 Nov 2016 10:10:16 -0500 Subject: Add the new option for detection GPU accel to the compositor page. --- src-qt5/core-utils/lumina-config/pages/page_compton.cpp | 3 +++ src-qt5/core-utils/lumina-config/pages/page_compton.ui | 7 +++++++ 2 files changed, 10 insertions(+) (limited to 'src-qt5/core-utils/lumina-config') 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..e3bfe1fd 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_compton.cpp +++ b/src-qt5/core-utils/lumina-config/pages/page_compton.cpp @@ -15,6 +15,7 @@ page_compton::page_compton(QWidget *parent) : PageWidget(parent), ui(new Ui::pag ui->setupUi(this); connect(ui->text_file, SIGNAL(textChanged()), this, SLOT(settingChanged()) ); connect(ui->check_disablecompton, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) ); + connect(ui->check_GPUverify, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) ); updateIcons(); } @@ -29,6 +30,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); } @@ -38,6 +40,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 @@ -33,6 +33,13 @@ + + + + Only use compositing with GPU acceleration + + + -- cgit From 9c7a9458572362b968f862e8c29d74aa7cb8a702 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 15 Nov 2016 10:34:30 -0500 Subject: Add a general session option for whether to show the application crash notifications. --- .../lumina-config/pages/page_defaultapps.ui | 256 ++++++++++----------- .../lumina-config/pages/page_session_options.cpp | 12 + .../lumina-config/pages/page_session_options.ui | 7 + 3 files changed, 147 insertions(+), 128 deletions(-) (limited to 'src-qt5/core-utils/lumina-config') 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 @@ - 1 + 0 false + + + Basic Settings + + + + + + + + QFormLayout::ExpandingFieldsGrow + + + + + + 75 + true + + + + Web Browser: + + + + + + + ... + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 75 + true + + + + E-Mail Client: + + + + + + + ... + + + Qt::ToolButtonTextBesideIcon + + + + + + + + + + + + 75 + true + + + + File Manager: + + + + + + + + 75 + true + + + + Virtual Terminal: + + + + + + + ... + + + Qt::ToolButtonTextBesideIcon + + + + + + + ... + + + Qt::ToolButtonTextBesideIcon + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + Advanced @@ -163,133 +290,6 @@ - - - Basic Settings - - - - - - - - QFormLayout::ExpandingFieldsGrow - - - - - - 75 - true - - - - Web Browser: - - - - - - - ... - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 75 - true - - - - E-Mail Client: - - - - - - - ... - - - Qt::ToolButtonTextBesideIcon - - - - - - - - - - - - 75 - true - - - - File Manager: - - - - - - - - 75 - true - - - - Virtual Terminal: - - - - - - - ... - - - Qt::ToolButtonTextBesideIcon - - - - - - - ... - - - Qt::ToolButtonTextBesideIcon - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - 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 @@ -59,6 +59,13 @@ + + + + Show application crash data + + + -- cgit From 834e242d561f727a33f19f9e62ad0c8f9f903d0d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 17 Nov 2016 09:48:24 -0500 Subject: Add a new page for mouse-settings in lumina-config (disabled for the moment) --- src-qt5/core-utils/lumina-config/pages/getPage.h | 4 +- .../core-utils/lumina-config/pages/page_mouse.cpp | 65 ++++++++++++++++++++++ .../core-utils/lumina-config/pages/page_mouse.h | 33 +++++++++++ .../core-utils/lumina-config/pages/page_mouse.ui | 58 +++++++++++++++++++ src-qt5/core-utils/lumina-config/pages/pages.pri | 9 ++- 5 files changed, 165 insertions(+), 4 deletions(-) create mode 100644 src-qt5/core-utils/lumina-config/pages/page_mouse.cpp create mode 100644 src-qt5/core-utils/lumina-config/pages/page_mouse.h create mode 100644 src-qt5/core-utils/lumina-config/pages/page_mouse.ui (limited to 'src-qt5/core-utils/lumina-config') 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 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 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_mouse.cpp b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp new file mode 100644 index 00000000..675a8b25 --- /dev/null +++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp @@ -0,0 +1,65 @@ +//=========================================== +// 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(); +} + +page_mouse::~page_mouse(){ + +} + +//================ +// 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..f005760f --- /dev/null +++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.h @@ -0,0 +1,33 @@ +//=========================================== +// Lumina Desktop Source Code +// Copyright (c) 2016, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#ifndef _LUMINA_CONFIG_PAGE_MOUSE_H +#define _LUMINA_CONFIG_PAGE_MOUSE_H +#include "../globals.h" +#include "PageWidget.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; + +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 @@ + + + page_mouse + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + Mouse Acceleration + + + + + + + + + 20 + + + 4 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + 2 + + + + + + + + + + + + + + + + + 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 -- cgit From 7a0a00fde86468ddf5d6877a96a3e23ed123bb0a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 17 Nov 2016 11:17:57 -0500 Subject: Get a bit more of the input device class working - using lumina-config for testing on the new "mouse" page (which is still disabled for the moment). --- src-qt5/core-utils/lumina-config/globals.h | 2 ++ src-qt5/core-utils/lumina-config/lumina-config.pro | 1 + src-qt5/core-utils/lumina-config/pages/page_mouse.cpp | 16 ++++++++++++++-- src-qt5/core-utils/lumina-config/pages/page_mouse.h | 3 +++ 4 files changed, 20 insertions(+), 2 deletions(-) (limited to 'src-qt5/core-utils/lumina-config') diff --git a/src-qt5/core-utils/lumina-config/globals.h b/src-qt5/core-utils/lumina-config/globals.h index 0f94785c..ed7549aa 100644 --- a/src-qt5/core-utils/lumina-config/globals.h +++ b/src-qt5/core-utils/lumina-config/globals.h @@ -35,6 +35,8 @@ #include #include +#include "pages/PageWidget.h" + #endif //Now the global class for available system applications diff --git a/src-qt5/core-utils/lumina-config/lumina-config.pro b/src-qt5/core-utils/lumina-config/lumina-config.pro index fe5494de..57531e69 100644 --- a/src-qt5/core-utils/lumina-config/lumina-config.pro +++ b/src-qt5/core-utils/lumina-config/lumina-config.pro @@ -15,6 +15,7 @@ include(../../core/libLumina/LDesktopUtils.pri) #includes LUtils include(../../core/libLumina/LuminaXDG.pri) include(../../core/libLumina/LuminaSingleApplication.pri) include(../../core/libLumina/LuminaThemes.pri) +include(../../core/libLumina/LInputDevice.pri) SOURCES += main.cpp \ mainWindow.cpp \ diff --git a/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp index 675a8b25..0dabdf2d 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp +++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp @@ -14,11 +14,23 @@ 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(); + updateIcons(); + qDebug() << "List Devices:"; + QList devices = LInput::listDevices(); + for(int i=0; iisPointer()){ + ::free( devices.takeAt(i)); + i--; + }else{ + qDebug() << "Found Pointer:" << devices[i]->devNumber(); + qDebug() << " - isExtension:" << devices[i]->isExtension(); + devices[i]->listProperties(); + } + } } page_mouse::~page_mouse(){ - + for(int i=0; i + namespace Ui{ class page_mouse; }; @@ -26,6 +28,7 @@ public slots: private: Ui::page_mouse *ui; + QList devices; private slots: void accelChanged(int val); -- cgit From 44c2f396902ee2a9da898fd3965a7c5600d20118 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 17 Nov 2016 13:53:55 -0500 Subject: Commit some more work on the new input device framework. Got the properties getting listed now, just need to figure out how to read/set the various properties (no documentation on what the various inputs are for the XCB functions to do that). --- src-qt5/core-utils/lumina-config/pages/page_mouse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core-utils/lumina-config') diff --git a/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp index 0dabdf2d..dbe075d7 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp +++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp @@ -24,7 +24,7 @@ page_mouse::page_mouse(QWidget *parent) : PageWidget(parent), ui(new Ui::page_mo }else{ qDebug() << "Found Pointer:" << devices[i]->devNumber(); qDebug() << " - isExtension:" << devices[i]->isExtension(); - devices[i]->listProperties(); + qDebug() << " - Properties:" << devices[i]->listProperties(); } } } -- cgit