bool SCgTupleArranger::configDialog() { if(!mDialog) createDialog(); mDialog->setParent(mView->viewport(), Qt::Dialog); // Create ghost only for visible objects if (!findArrangeItems()) return false; createGhosts(mArrangeItems); recalculateGhostsPosition(); bool res = mDialog->exec() == QDialog::Accepted; mDialog->setParent(0, Qt::Dialog); if (res == QDialog::Rejected) { deleteGhosts(); mArrangeItems.clear(); mBusPairs.clear(); mTupleNode = 0; } return res; }
int main(int argc, char **argv) { /* Create the heightMap */ SetHeightMap(); /* Test printout for the fractal for(int x=0; x<gridSize; x++) for(int y=0; y<gridSize; y++) printf("heightMap[%d][%d] is %f\n", x, y, heightMap[x][y]);*/ /* Create adjacency list */ createAdjacencyList(); printf("Number of dots is %d\n", numDots); /* create objects*/ createPacman(); createGhosts(); /* Initialise GLUT - our window, our callbacks, etc */ InitialiseGLUT(argc, argv); /* Do any one-time openGl initialisation that we might require */ InitialiseOpenGL(); /* Start up our timer. */ InitialiseTimer(); /* Start drawing the scene */ InitialiseScene(); /* Enter the main loop */ glutIdleFunc(UpdateFrame); glutMainLoop(); /* when the window closes, we will end up here. */ return 0; }