void CopyLocks::growCL() { int allocSize; key_t newshmkey; if (shminfo->allocdSize == 0) allocSize = CL_INITIAL_SIZE; else allocSize = shminfo->allocdSize + CL_INCREMENT; newshmkey = chooseShmkey(); idbassert((allocSize == CL_INITIAL_SIZE && !fCopyLocksImpl) || fCopyLocksImpl); if (!fCopyLocksImpl) fCopyLocksImpl = CopyLocksImpl::makeCopyLocksImpl(newshmkey, allocSize, r_only); else fCopyLocksImpl->grow(newshmkey, allocSize); shminfo->tableShmkey = currentShmkey = newshmkey; shminfo->allocdSize = allocSize; if (r_only) fCopyLocksImpl->makeReadOnly(); entries = fCopyLocksImpl->get(); // Temporary fix. Get rid of the old undo records that now point to nothing. // Would be nice to be able to carry them forward. confirmChanges(); }
ProcessImage::ProcessImage( QWidget* parent ): DropArea(parent), _currentItem(-1), _currentImage(-1) { layout = new QHBoxLayout( this ); layout->setContentsMargins(0,0,0,0); layout->setSpacing(0); QFrame *processLeftColFrame = new QFrame(); processLeftColFrame->setObjectName( "processLeftColFrame" ); QVBoxLayout *leftLayout = new QVBoxLayout( processLeftColFrame ); layout->addWidget( processLeftColFrame ); QHBoxLayout *topLayout = new QHBoxLayout(); topLayout->addWidget( backButton = new QPushButton( this ) ); backButton->setText( "Choisir un autre media" ); backButton->setObjectName("backButton"); connect(backButton, SIGNAL(clicked()), SLOT(onBackButtonClicked()) ); topLayout->addWidget( newSearch = new QPushButton( "Nouvelle recherche" ) ); newSearch->setObjectName("newSearch"); connect( newSearch, SIGNAL(clicked()), SLOT(onNewSearch()) ); topLayout->addStretch(0); topLayout->addWidget( nbFacesLbl = new QLabel( this ) ); nbFacesLbl->setObjectName( "nbFacesLbl" ); /* overlap = new QLabel( this ); overlap->setObjectName( "overlapLoader" ); QMovie *loaderMovie = new QMovie(":/res/loader.gif"); overlap->setMovie( loaderMovie ); loaderMovie->start() */ // overlap->setGeometry( imageLbl->geometry() ); // topLayout->addWidget( overlap ); leftLayout->addLayout( topLayout ); leftLayout->addWidget( theater = new Theater( this ) ); theater->imageOverlay->setOverlayText("Traitement en cours..."); connect( theater, SIGNAL(rectClicked(int)), SLOT(onPersonSelected(int)) ); QScrollArea *imagesScrollArea = new QScrollArea( this ); leftLayout->addWidget( imagesScrollArea ); imagesScrollArea->setWidgetResizable( true ); imagesScrollArea->setObjectName( "imagesScrollArea" ); imagesScrollArea->setWidget( showCase = new ShowCase( this ) ); connect( showCase, SIGNAL(imageSelected(int)), SLOT(loadImageData(int)) ); // COL 3 layout->addWidget( sidePanel = new SidePanel(this, "view") ); connect(sidePanel, SIGNAL(confirmChanges(QJsonObject)), SLOT(savePanelChanges(QJsonObject)) ); connect( sidePanel, SIGNAL(confirmPerson()), SLOT( onConfirmPerson()) ); connect( sidePanel, SIGNAL(refutePerson()), SLOT( onRefutePerson()) ); //COL2 QVBoxLayout* col2 = new QVBoxLayout(); col2->setSpacing(0); col2->addWidget( detectedFacesScrollArea = new QScrollArea( this ) ); detectedFacesScrollArea->setWidgetResizable( true ); detectedFacesScrollArea->setObjectName( "detectedFacesScrollArea" ); detectedFacesScrollArea->setWidget( detectedFaces = new DetectedFaces( this ) ); layout->addLayout( col2 ); connect( detectedFaces, SIGNAL(itemClicked(int)), SLOT(onPersonSelected(int)) ); connect( &Socket::sock(), SIGNAL(faceRecognized(int, int, int, int, int, int)), SLOT(onFaceRecognized(int, int, int, int, int, int)) ); connect( &Socket::sock(), SIGNAL(faceIs(int, QString, QString)), SLOT(onFaceIs(int, QString, QString)) ); connect( &Socket::sock(), SIGNAL(got(QJsonObject, QByteArray)), sidePanel, SLOT(populate(QJsonObject, QByteArray)) ); }