src/spacenav-demo-qt.cpp
author František Kučera <franta-hg@frantovo.cz>
Wed, 06 Mar 2019 20:28:34 +0100
branchv_0
changeset 1 2a3e9f07c128
parent 0 37aa134ae57b
child 2 21b0b2b0547e
permissions -rw-r--r--
receive spacenav events (in separate thread) and print them on stderr

/**
 * Spacenav Demo Qt
 * Copyright © 2018 František Kučera (Frantovo.cz, GlobalCode.info)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
#include <stdio.h>

#include <QApplication>
#include <QThread>

#include <stdlib.h>
#include <signal.h>
#include <X11/Xlib.h>
#include <spnav.h>

#include "SpacenavReceiver.h"
//#include "SpacenavWindow.h"

int main(int argc, char**argv) {
	setlocale(LC_ALL, "");
	QApplication app(argc, argv);

	SpacenavReceiver t;
	t.start();
	
	// SpacenavWindow w;
	// w.show();

	return app.exec();
}