示例#1
0
void GNode::setSelectedBrush(const QBrush& selectedBrush)
{
  s_selectedBrush = selectedBrush;
  emit propertyChanged("SelectedBrush");
  emit hasChanges();
  update();
}
示例#2
0
void GNode::setFont(const QFont &font)
{
  m_font = font;
  emit propertyChanged("Font");
  emit hasChanges();
  onCreateTextItem();
}
示例#3
0
void GNode::setBrush(const QBrush& brush)
{
  m_brush = brush;
  emit propertyChanged("Brush");
  emit hasChanges();
  update();
}
示例#4
0
void GNode::setSelectedPen(const QPen& selectedPen)
{
  s_selectedPen = selectedPen;
  emit propertyChanged("SelectedPen");
  emit hasChanges();
  update();
}
示例#5
0
void GNode::setCornerRadius(int cornerRadius)
{
  m_cornerRadius = cornerRadius;
  emit propertyChanged("CornerRadius");
  emit hasChanges();
  onCreateTextItem();
}
示例#6
0
void GNode::setPen(const QPen& pen)
{
  m_pen = pen;
  emit propertyChanged("Pen");
  emit hasChanges();
  update();
}
示例#7
0
void GNode::setSize(int size)
{
  m_size = size;
  onCreateTextItem();
  emit propertyChanged("Size");
  emit hasChanges();
}
示例#8
0
void GNode::setCaption(const QString &caption)
{
  m_caption = caption;
  onCreateTextItem();
  emit propertyChanged("Caption");
  emit hasChanges();
}
示例#9
0
void GNode::setId(const QString &id)
{
  m_id = id;
  onCreateTextItem();
  emit propertyChanged("Id");
  emit hasChanges();
}
示例#10
0
void GNode::setMargin(int margin)
{
  if (2 * margin < m_size - 2 * m_margin)
  {
    m_margin = margin;
    onCreateTextItem();
    emit propertyChanged("Margin");
    emit hasChanges();
  }
}
示例#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);
        }
    }
}
示例#12
0
void GNode::onChildHasChanges()
{
  emit hasChanges();
}
示例#13
0
void Prj::updateActions()
{
    // TODO: realize the correct updates
    m_saveAction->setEnabled(hasChanges());
    m_closeAction->setEnabled(isOpen());
}