Exemplo n.º 1
0
DrawableRectangle::DrawableRectangle (const DrawableRectangle& other)
    : DrawableShape (other),
      bounds (other.bounds),
      cornerSize (other.cornerSize)
{
    rebuildPath();
}
Exemplo n.º 2
0
void DrawableRectangle::setCornerSize (const RelativePoint& newSize)
{
    if (cornerSize != newSize)
    {
        cornerSize = newSize;
        rebuildPath();
    }
}
Exemplo n.º 3
0
//==============================================================================
void DrawableRectangle::setRectangle (const RelativeParallelogram& newBounds)
{
    if (bounds != newBounds)
    {
        bounds = newBounds;
        rebuildPath();
    }
}
Exemplo n.º 4
0
WireConnection::WireConnection(AbstractScheme *parent,
    GraphicsComponent *first, GraphicsComponent *second)
        :GraphicsComponent(parent)
{
    this->setFlags(this->flags() ^ QGraphicsItem::ItemIsMovable);
    this->setFlags(this->flags() ^ QGraphicsItem::ItemIsSelectable);
    this->first = first;
    this->second = second;

    QObject::connect(first, SIGNAL(itemMoved(GraphicsComponent*)), this, SLOT(componentMoved(GraphicsComponent*)));
    QObject::connect(second, SIGNAL(itemMoved(GraphicsComponent*)), this, SLOT(componentMoved(GraphicsComponent*)));

    rebuildPath();
}
Exemplo n.º 5
0
void Widget::serverDownloadStart()
{
   QTreeWidgetItem * item = ftpFiles->invisibleRootItem();
   QTreeWidgetItem * header = ftpFiles->headerItem();
   QStringList lst;
   Computer * comp;

   for(int i = 1; i < ftpFiles->columnCount(); i++)
   {
      lst = rebuildPath(item, "", i);
      comp = findByName(header->text(i));
      foreach(QString str, lst)
      {
          comp->getSocket()->write(QByteArray("ADFL::" + str.toAscii()));
      }
      comp->getSocket()->write(QByteArray("DNLD::"));
    }
Exemplo n.º 6
0
void WireConnection::componentMoved(GraphicsComponent *moved)
{
    rebuildPath();
}