Example #1
0
void Plant::reset() {
    weight = startAtOnce() ? initWeight : 0.;
    totalWeight = n*initWeight;
    Lz = fz = LA_per_plant = lai = dweight = 0.;
    changePhase(Unlimited);
    updateCrownZoneArea();
}
AnonymousServer::AnonymousServer(int port, QObject *parent)
    : QTcpServer(parent), phase(0)
{
    listen(QHostAddress::Any, port);

    phaseTimer = new QTimer(this);

    connect(phaseTimer, SIGNAL(timeout()), SLOT(changePhase()));
    phaseTimer->start(PhaseChange);
}