void Scene::setRoot (Actor *actor) { if (root != NULL) root->scene = NULL; root = actor; root->scene = this; markChanged(); }
void Field::setSize(int width, int height) { m_width = width; emit widthChanged(width); m_height = height; emit heightChanged(height); for (Cell *cell : m_cells) { delete cell; } m_cells.clear(); for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { Cell *cell = new Cell(x, y); connect(cell, SIGNAL(opened(int,int)), this, SLOT(onCellOpened(int,int))); connect(cell, SIGNAL(markChanged(Mark)), this, SLOT(onCellMarkChanged())); m_cells.append(cell); } } }
void TextBox::text(const std::string &text) { _text = text; markChanged(); }
void Window::clearChildren() { _content->clearChildren(); markChanged(); }