Example #1
0
CuteChessCoreApplication::CuteChessCoreApplication(int& argc, char* argv[])
	: QCoreApplication(argc, argv),
	  m_engineManager(0),
	  m_gameManager(0)
{
	Mersenne::initialize(QTime(0,0,0).secsTo(QTime::currentTime()));

	QCoreApplication::setOrganizationName(QLatin1String("cutechess"));
	QCoreApplication::setOrganizationDomain(QLatin1String("cutechess.org"));
	QCoreApplication::setApplicationName(QLatin1String("cutechess"));

	// Use Ini format on all platforms
	QSettings::setDefaultFormat(QSettings::IniFormat);

	#if QT_VERSION >= 0x050000
	qInstallMessageHandler(CuteChessCoreApplication::messageHandler);
	#else
	qInstallMsgHandler(CuteChessCoreApplication::messageHandler);
	#endif

	// Load the engines
	QString configFile("engines.json");
	if (!QFile::exists(configFile))
		configFile = configPath() + "/" + configFile;
	engineManager()->loadEngines(configFile);
}
Example #2
0
CuteChessApplication::CuteChessApplication(int& argc, char* argv[])
	: QApplication(argc, argv),
	  m_engineManager(nullptr),
	  m_gameManager(nullptr),
	  m_gameDatabaseManager(nullptr),
	  m_gameDatabaseDialog(nullptr)
{
	Mersenne::initialize(QTime(0,0,0).msecsTo(QTime::currentTime()));

	// Set the application icon
	QIcon icon;
	icon.addFile(":/icons/cutechess_512x512.png");
	icon.addFile(":/icons/cutechess_256x256.png");
	icon.addFile(":/icons/cutechess_128x128.png");
	icon.addFile(":/icons/cutechess_64x64.png");
	icon.addFile(":/icons/cutechess_32x32.png");
	icon.addFile(":/icons/cutechess_24x24.png");
	icon.addFile(":/icons/cutechess_16x16.png");
	setWindowIcon(icon);

	setQuitOnLastWindowClosed(false);

	QCoreApplication::setOrganizationName("cutechess");
	QCoreApplication::setOrganizationDomain("cutechess.org");
	QCoreApplication::setApplicationName("cutechess");
	QCoreApplication::setApplicationVersion(CUTECHESS_VERSION);

	// Use Ini format on all platforms
	QSettings::setDefaultFormat(QSettings::IniFormat);

	// Load the engines
	engineManager()->loadEngines(configPath() + QLatin1String("/engines.json"));

	// Read the game database state
	gameDatabaseManager()->readState(configPath() + QLatin1String("/gamedb.bin"));

	connect(this, SIGNAL(lastWindowClosed()), this, SLOT(onLastWindowClosed()));
	connect(this, SIGNAL(aboutToQuit()), this, SLOT(onAboutToQuit()));
}
Example #3
0
UIManager* EngineDomain::uiManager()
{
	return engineManager()->uiManager();
}
Example #4
0
SceneManager* EngineDomain::sceneManager()
{
    return engineManager()->sceneManager();
}
Example #5
0
VisualManager* EngineDomain::visualManager()
{
    return engineManager()->visualManager();
}
Example #6
0
AssetManager* EngineDomain::assetManager()
{
    return engineManager()->assetManager();
}
Example #7
0
PhysicsManager* EngineDomain::physicsManager()
{
    return engineManager()->physicsManager();
}
Example #8
0
RenderingManager* EngineDomain::renderingManager()
{
	return engineManager()->renderingManager();
}
Example #9
0
MeshManager* EngineDomain::meshManager()
{
	return engineManager()->meshManager();
}
Example #10
0
FontManager* EngineDomain::fontManager()
{
	return engineManager()->fontManager();
}
Example #11
0
GraphicsManager* EngineDomain::graphicsManager()
{
	return engineManager()->graphicsManager();
}
Example #12
0
ShaderManager* EngineDomain::shaderManager()
{
	return engineManager()->shaderManager();
}
Example #13
0
AudioManager * EngineDomain::audioManager()
{
	return engineManager()->audioManager();
}
Example #14
0
InputManager* EngineDomain::inputManager()
{
	return engineManager()->inputManager();
}
Example #15
0
AnimationManager* EngineDomain::animationManager()
{
    return engineManager()->animationManager();
}
Example #16
0
PlatformManager* EngineDomain::platformManager()
{
	return engineManager()->platformManager();
}