Пример #1
0
void VCFrame::slotAddButton(QPoint p)
{
  VCButton* b = new VCButton(this);
  assert(b);
  b->init();
  b->show();
  
  if (buttonBehaviour() == VCFrame::Exclusive)
    {
      b->setExclusive(true);
    }
  else
    {
      b->setExclusive(false);
    }
  
  b->move(p);
    
  _app->doc()->setModified(true);
}
Пример #2
0
void VCFrame::addButton(QPoint at)
{
	VCButton* button = new VCButton(this);
	Q_ASSERT(button != NULL);
	button->show();

	if (this->buttonBehaviour() == VCFrame::Exclusive)
		button->setExclusive(true);
	else
		button->setExclusive(false);

	if (at.isNull() == false)
		button->move(at);
	else
		button->move(m_mousePressPoint);

	_app->virtualConsole()->setSelectedWidget(button);

	_app->doc()->setModified();
}