void GNode::setSelectedBrush(const QBrush& selectedBrush)
{
  s_selectedBrush = selectedBrush;
  emit propertyChanged("SelectedBrush");
  emit hasChanges();
  update();
}
void GNode::setFont(const QFont &font)
{
  m_font = font;
  emit propertyChanged("Font");
  emit hasChanges();
  onCreateTextItem();
}
void GNode::setBrush(const QBrush& brush)
{
  m_brush = brush;
  emit propertyChanged("Brush");
  emit hasChanges();
  update();
}
void GNode::setSelectedPen(const QPen& selectedPen)
{
  s_selectedPen = selectedPen;
  emit propertyChanged("SelectedPen");
  emit hasChanges();
  update();
}
void GNode::setCornerRadius(int cornerRadius)
{
  m_cornerRadius = cornerRadius;
  emit propertyChanged("CornerRadius");
  emit hasChanges();
  onCreateTextItem();
}
void GNode::setPen(const QPen& pen)
{
  m_pen = pen;
  emit propertyChanged("Pen");
  emit hasChanges();
  update();
}
void GNode::setSize(int size)
{
  m_size = size;
  onCreateTextItem();
  emit propertyChanged("Size");
  emit hasChanges();
}
void GNode::setCaption(const QString &caption)
{
  m_caption = caption;
  onCreateTextItem();
  emit propertyChanged("Caption");
  emit hasChanges();
}
void GNode::setId(const QString &id)
{
  m_id = id;
  onCreateTextItem();
  emit propertyChanged("Id");
  emit hasChanges();
}
Example #10
0
void GNode::setMargin(int margin)
{
  if (2 * margin < m_size - 2 * m_margin)
  {
    m_margin = margin;
    onCreateTextItem();
    emit propertyChanged("Margin");
    emit hasChanges();
  }
}
Example #11
0
void ItemEditorWidget::commitData(QAbstractItemModel *model) const
{
    if ( hasChanges() ) {
        if (m_noteEditor != NULL) {
            model->setData(m_index, m_noteEditor->toPlainText(), contentType::notes);
            m_noteEditor->document()->setModified(false);
        } else {
            m_itemWidget->setModelData(m_editor, model, m_index);
        }
    }
}
Example #12
0
void GNode::onChildHasChanges()
{
  emit hasChanges();
}
Example #13
0
void Prj::updateActions()
{
    // TODO: realize the correct updates
    m_saveAction->setEnabled(hasChanges());
    m_closeAction->setEnabled(isOpen());
}