Example #1
0
  void Scene::setRoot (Actor *actor)
  {
    if (root != NULL)
      root->scene = NULL;

    root = actor;
    root->scene = this;
    markChanged();
  }
Example #2
0
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);
        }
    }
}
Example #3
0
void TextBox::text(const std::string &text) {
  _text = text;
  markChanged();
}
Example #4
0
void Window::clearChildren() {
  _content->clearChildren();
  markChanged();
}