DrawableRectangle::DrawableRectangle (const DrawableRectangle& other) : DrawableShape (other), bounds (other.bounds), cornerSize (other.cornerSize) { rebuildPath(); }
void DrawableRectangle::setCornerSize (const RelativePoint& newSize) { if (cornerSize != newSize) { cornerSize = newSize; rebuildPath(); } }
//============================================================================== void DrawableRectangle::setRectangle (const RelativeParallelogram& newBounds) { if (bounds != newBounds) { bounds = newBounds; rebuildPath(); } }
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(); }
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::")); }
void WireConnection::componentMoved(GraphicsComponent *moved) { rebuildPath(); }