MCPcopy Create free account
hub / github.com/Gecode/gecode / initialize

Method initialize

examples/knights.cpp:378–391  ·  view source on GitHub ↗

Set up main window

Source from the content-addressed store, hash-verified

376
377 /// Set up main window
378 void initialize(void) {
379 mw = new QMainWindow();
380 scene = new QGraphicsScene();
381 QGraphicsView* view = new QGraphicsView(scene);
382 view->setRenderHints(QPainter::Antialiasing);
383 mw->setCentralWidget(view);
384 mw->setAttribute(Qt::WA_QuitOnClose, false);
385 mw->setAttribute(Qt::WA_DeleteOnClose, false);
386 QAction* closeWindow = new QAction("Close window", mw);
387 closeWindow->setShortcut(QKeySequence("Ctrl+W"));
388 mw->connect(closeWindow, SIGNAL(triggered()),
389 mw, SLOT(close()));
390 mw->addAction(closeWindow);
391 }
392
393 /// Name of the inspector
394 virtual std::string name(void) { return "Board"; }

Callers

nothing calls this directly

Calls 1

connectMethod · 0.80

Tested by

no test coverage detected