cadMousePro-gui/src/MouseMainWindow.cpp
author František Kučera <franta-hg@frantovo.cz>
Mon, 02 Sep 2019 00:23:37 +0200
branchv_0
changeset 17 d37c6dd9aa20
parent 16 2705911938b4
child 18 7323a89c15e9
permissions -rw-r--r--
tabs: Status, Configuration, About
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * cadMousePro
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info)
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
 * the Free Software Foundation, either version 3 of the License, or
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 * (at your option) any later version.
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 *
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 * GNU General Public License for more details.
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 *
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
 */
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
#include <QLabel>
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
#include <QPushButton>
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
#include "MouseMainWindow.h"
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
MouseMainWindow::MouseMainWindow() {
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
	proxy = new InfoGlobalcodeMouseCadMouseProInterface("info.globalcode.mouse.cadMousePro", "/info/globalcode/mouse/cadMousePro", connection, this);
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
	setWindowTitle("cadMousePro");
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    27
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    28
	initStatusPanel();
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    29
	initConfigurationPanel();
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    30
	initAboutPanel();
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    31
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    32
	setCentralWidget(tabs);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    33
	refresh();
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    34
}
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    35
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    36
void MouseMainWindow::initStatusPanel() {
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    37
	QWidget* panel = new QWidget(this);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    38
	QFormLayout* layout = new QFormLayout(panel);
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
	int f = 0;
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
	statusProxy->setEnabled(false);
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
	statusUPower->setEnabled(false);
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    44
	statusDevice->setEnabled(false);
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    45
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    46
	layout->setWidget(f++, QFormLayout::FieldRole, statusProxy);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    47
	layout->setWidget(f++, QFormLayout::FieldRole, statusUPower);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    48
	layout->setWidget(f++, QFormLayout::FieldRole, statusDevice);
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    49
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    50
	QPushButton* refreshButton = new QPushButton("Refresh", panel);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    51
	layout->setWidget(f++, QFormLayout::FieldRole, refreshButton);
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    52
	connect(refreshButton, &QPushButton::clicked, this, &MouseMainWindow::refresh);
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    53
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    54
	tabs->addTab(panel, "Status");
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    55
}
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    56
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    57
void MouseMainWindow::initConfigurationPanel() {
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    58
	QWidget* panel = new QWidget(this);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    59
	QFormLayout* layout = new QFormLayout(panel);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    60
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    61
	int f = 0;
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    62
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    63
	configureLiftOffDetection->setChecked(true);
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    64
	layout->setWidget(f++, QFormLayout::FieldRole, configureLiftOffDetection);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    65
	layout->setWidget(f++, QFormLayout::FieldRole, configureSmartScrolling);
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    66
	configureFrequency250->setChecked(true);
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    67
	layout->setWidget(f++, QFormLayout::FieldRole, configureFrequency125);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    68
	layout->setWidget(f++, QFormLayout::FieldRole, configureFrequency250);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    69
	layout->setWidget(f++, QFormLayout::FieldRole, configureFrequency500);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    70
	layout->setWidget(f++, QFormLayout::FieldRole, configureFrequency1000);
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    71
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    72
	QPushButton* configureButton = new QPushButton("Configure", panel);
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    73
	configureButton->setToolTip("n.b. current interface is write-only and the controls above just configures the mouse – does not show current configuration");
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    74
	layout->setWidget(f++, QFormLayout::FieldRole, configureButton);
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    75
	connect(configureButton, &QPushButton::clicked, this, &MouseMainWindow::configure);
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    76
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    77
	message->setReadOnly(true);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    78
	layout->setWidget(f++, QFormLayout::FieldRole, new QLabel("Result:", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    79
	layout->setWidget(f++, QFormLayout::FieldRole, message);
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    80
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    81
	tabs->addTab(panel, "Configuration");
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    82
}
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    83
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    84
void MouseMainWindow::initAboutPanel() {
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    85
	QWidget* panel = new QWidget(this);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    86
	QFormLayout* layout = new QFormLayout(panel);
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    87
	
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    88
	int f = 0;
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    89
	
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    90
	layout->setWidget(f, QFormLayout::LabelRole, new QLabel("Program name:", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    91
	layout->setWidget(f++, QFormLayout::FieldRole, new QLabel("cadMousePro", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    92
	
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    93
	layout->setWidget(f, QFormLayout::LabelRole, new QLabel("Description:", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    94
	layout->setWidget(f++, QFormLayout::FieldRole, new QLabel("configuration tool for 3DConnexion CadMouse Pro Wireless", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    95
	
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    96
	layout->setWidget(f, QFormLayout::LabelRole, new QLabel("Author:", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    97
	layout->setWidget(f++, QFormLayout::FieldRole, new QLabel("Ing. František Kučera, Frantovo.cz, GlobalCode.info", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    98
	
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
    99
	layout->setWidget(f, QFormLayout::LabelRole, new QLabel("License:", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
   100
	layout->setWidget(f++, QFormLayout::FieldRole, new QLabel("GNU GPLv3+", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
   101
	
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
   102
	layout->setWidget(f, QFormLayout::LabelRole, new QLabel("Contact and support:", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
   103
	layout->setWidget(f++, QFormLayout::FieldRole, new QLabel("https://mouse.globalcode.info/", panel));
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
   104
	
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
   105
	tabs->addTab(panel, "About");
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
   106
	
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   107
}
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   108
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   109
void MouseMainWindow::refresh() {
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   110
	statusProxy->setChecked(proxy->isValid());
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   111
	statusDevice->setChecked(proxy->devicePresent());
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   112
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   113
}
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   114
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   115
void MouseMainWindow::configure() {
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
   116
	message->setText("…");
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
   117
	
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   118
	int frequency; // TODO: get value from the group
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   119
	if (configureFrequency125->isChecked()) frequency = 125;
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   120
	else if (configureFrequency250->isChecked()) frequency = 250;
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   121
	else if (configureFrequency500->isChecked()) frequency = 500;
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   122
	else if (configureFrequency1000->isChecked()) frequency = 1000;
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   123
	else frequency = 250;
17
d37c6dd9aa20 tabs: Status, Configuration, About
František Kučera <franta-hg@frantovo.cz>
parents: 16
diff changeset
   124
16
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   125
	auto response = proxy->configure(configureLiftOffDetection->isChecked(), configureSmartScrolling->isChecked(), frequency);
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   126
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   127
	response.waitForFinished();
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   128
	if (response.isError()) message->setText("Error: " + response.error().message());
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   129
	else message->setText("mouse configured");
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   130
2705911938b4 GUI for mouse configuration over D-Bus daemon
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   131
}