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

Method initialize

examples/queens.cpp:160–173  ·  view source on GitHub ↗

Set up main window

Source from the content-addressed store, hash-verified

158
159 /// Set up main window
160 void initialize(void) {
161 mw = new QMainWindow();
162 scene = new QGraphicsScene();
163 QGraphicsView* view = new QGraphicsView(scene);
164 view->setRenderHints(QPainter::Antialiasing);
165 mw->setCentralWidget(view);
166 mw->setAttribute(Qt::WA_QuitOnClose, false);
167 mw->setAttribute(Qt::WA_DeleteOnClose, false);
168 QAction* closeWindow = new QAction("Close window", mw);
169 closeWindow->setShortcut(QKeySequence("Ctrl+W"));
170 mw->connect(closeWindow, SIGNAL(triggered()),
171 mw, SLOT(close()));
172 mw->addAction(closeWindow);
173 }
174
175 /// Name of the inspector
176 virtual std::string name(void) { return "Board"; }

Callers

nothing calls this directly

Calls 1

connectMethod · 0.80

Tested by

no test coverage detected