Esempio n. 1
0
void Actions::setType(int type, QString name){
    isLoad=true;
    ui->textEdit->clear();
    Name=name;
    Type=type;
    loadActions();
    isLoad=false;
    ui->textEdit->setFocus();
}
/*Main function
Initializes the draw area object, menus and actions(buttons), 
sets name of the window and size
*/
MainWindow::MainWindow()
{
	drawArea = new DrawArea();
	setCentralWidget(drawArea);
	loadActions();
	loadMenus();

	setWindowTitle(tr("TamVisualizer"));
	resize(500, 500);

}
Esempio n. 3
0
void NetworkManager::loadSettings(bool init, bool *changed)
{
	Config config("control");
	config.beginGroup("general");
	QString username = config.value("username", QString());
	QUrl base = QUrl::fromUserInput(config.value("url", QString()));
	m_localAnswers = config.value("answers", QStringList());
	rebuildAnswers();
	if (username != m_username || base != m_base)
		*changed = true;
	else
		*changed = false;
	m_username = username;
	m_base = base;
	if (init)
		loadActions();
}
Esempio n. 4
0
void
App::initGUI()
{
    // Construct the main window
    _mainwindow.reset(new QMainWindow);

    loadActions();
    loadStatusBar();

    // TODO test this on a non-tiling WM
    QDesktopWidget *desktopwidget = desktop();
    int preferredwidth = 1024;
    int preferredheight = 768;
    int leftmargin = (desktopwidget->width() - preferredwidth) / 2;
    int topmargin  = (desktopwidget->height() - preferredheight) / 2;
    _mainwindow->move(leftmargin, topmargin);

    // Display the main window
    _mainwindow->setVisible(true);

    newGame();
}
Esempio n. 5
0
void GameModule::load(const char *filename) {
	debug(0, "GameModule::load()");

	unload();

	Common::File fd;

	if (!fd.open(filename))
		error("GameModule::load() Could not open %s", filename);

	loadBgSprites(fd);
	loadCameraInits(fd);
	loadWalkRects(fd);
	loadSceneExits(fd);
	loadBgObjects(fd);
	loadAnimations(fd);
	loadSceneObjectDefs(fd);
	loadSceneObjectInits(fd);
	loadActions(fd);
	loadGuiSpriteIndices(fd);
	loadInventoryItemSpriteIndices(fd);
	loadInventoryItemInfos(fd);
	loadDialogItemSpriteIndices(fd);
	loadSceneSounds(fd);
	loadPreloadSounds(fd);

	fd.seek(0xC);
	_fieldC = fd.readUint32LE();

	fd.seek(0x1A8);
	_buttheadObjectIndex = fd.readUint32LE();

	fd.close();

	debug(0, "GameModule::load() OK");
}
Esempio n. 6
0
void Scheduler::reload()
{
	loadActions(m_actions);
}