Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!Setting("kiosk", "calibrated", false).value().toBool()) {
- QProcess calibrator;
- calibrator.start("xinput_calibrator --output-type xinput");
- if (calibrator.waitForFinished()) {
- QFile writeFile (QDir::home().path() + "/.xsession");
- writeFile.open(QFile::WriteOnly);
- QTextStream str (&writeFile);
- while (!calibrator.atEnd()) {
- QByteArray tmp_calibrator = calibrator.readLine();
- if (tmp_calibrator.contains("xinput set-int-prop"))
- str << tmp_calibrator.trimmed() << "\n";
- }
- str << "$HOME/VTCKiosk";
- writeFile.close();
- }
- calibrator.close();
- KLOG() << QObject::tr("Run Calibrator.");
- qDebug() << "Run Calibrator.";
- }
Add Comment
Please, Sign In to add comment