Exemplo n.º 1
0
void CVVKeyPoint::setZoomableImage(ZoomableImage *image)
{
	image_ = image;
	updateImageSet(image->visibleArea(), image->zoom());
	connect(image, SIGNAL(updateArea(QRectF, qreal)), this,
		SLOT(updateImageSet(const QRectF &, const qreal &)));
}
Exemplo n.º 2
0
void MainWindow::draggedRect(QRectF rect)
{
    QList<QPointF> coords;
    coords.append(rect.topLeft());
    coords.append(rect.bottomRight());
    mc->setViewAndZoomIn(coords);

    double latminpoint = rect.bottom();
    double latmaxpoint = rect.top();
    double lonminpoint = rect.left();
    double lonmaxpoint = rect.right();

    if ( latminpoint > latmaxpoint ) switchPoint( latminpoint, latmaxpoint );
    if ( lonminpoint > lonmaxpoint ) switchPoint( lonminpoint, lonmaxpoint );

    ui->minLatField->setText(QString::number(latminpoint));
    ui->maxLatField->setText(QString::number(latmaxpoint));
    ui->minLonField->setText(QString::number(lonminpoint));
    ui->maxLonField->setText(QString::number(lonmaxpoint));

    updateArea();

    QList<Point*> points;
    points.append(new Point(lonminpoint, latminpoint, "1"));
    points.append(new Point(lonminpoint, latmaxpoint, "1"));
    points.append(new Point(lonmaxpoint, latmaxpoint, "1"));
    points.append(new Point(lonmaxpoint, latminpoint, "1"));
    points.append(new Point(lonminpoint, latminpoint, "1"));
    QPen* linepen = new QPen(Qt::red);
    linepen->setWidth(2);
    LineString* ls = new LineString(points, "Boundary Area", linepen);
    mainlayer->clearGeometries();
    mainlayer->addGeometry(ls);
}
void CropImageOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
{
	NodeOperation::determineResolution(resolution, preferredResolution);
	updateArea();
	resolution[0] = this->m_xmax - this->m_xmin;
	resolution[1] = this->m_ymax - this->m_ymin;
}
Exemplo n.º 4
0
//Cook A's thread
//executes everything cook A does
void chefFun(void *ptr) {

    // Initialize info for the chef
    Data *chef = (Data *) ptr;
    printf("Chef %i: Initialized.\n", chef->ID);
    int j;
    int m_temp ;

    while(1) {

        // If the recipe returned is a dummy recipe, there are no more recipes
        // left and the chef can end
        if(recipesIndex == MAXRECIPES && (chef->step == -1)) {
            printf("Chef %i: Out of tasks to do\n", chef->ID);
            return;
        }
        takeRecipe(chef);
        checkChefs(chef);
        updateArea(chef);
        clearAreas(chef);
        executeInArea(chef);
        checkFinished(chef);

    }

}
void KisToolPolylineBase::cancelStroke()
{
    if (!m_dragging) return;

    m_dragging = false;
    m_points.clear();
    m_closeSnappingActivated = false;
    updateArea();
}
Exemplo n.º 6
0
/*!
  Intialise the polygon using the collection of image points. This method
  compute come internal variables such as center, area, ...

  \warning the corners must be ordered (either clockwise or counter clockwise).

  \param corners : The corners of the polyon.
*/
void
vpPolygon::init(const std::vector<vpImagePoint>& corners)
{
  _corners = corners;

  updateBoundingBox();
  updateArea();
  updateCenter();
}
Exemplo n.º 7
0
void MyScrollArea::setWidget(QWidget *w)
{
    widget = w;
    widget->setParent(viewport());
    if (!widget->testAttribute(Qt::WA_Resized))
        widget->resize(widget->sizeHint());

    verticalScrollBar()->setValue(0);
    verticalScrollBar()->setValue(0);

    updateArea();
}
void KisToolPolylineBase::endStroke()
{
    if (!m_dragging) return;

    m_dragging = false;
    if(m_points.count() > 1) {
        finishPolyline(m_points);
    }
    m_points.clear();
    m_closeSnappingActivated = false;
    updateArea();
}
Exemplo n.º 9
0
ItemContainer::ItemContainer(QPixmap &graph,State s,QWidget *parent)
    :width(300),height(300),state(s),level(state.N),
    pieceWidth(width/level),pieceHeight(height/level),
    picture(graph),paintoption(paintAll),QWidget(parent)
{
    resize(width,height);
    trimPicture();//trim the picture and save it to myPicture
    createPieces();//setup pieces
    timer = new QTimer(this);
    connect(timer,SIGNAL(timeout()),this,SLOT(updateArea()));
    connect(this,SIGNAL(moveDone()),this,SLOT(processNextMove()));//actually It could be done with invoking.
    setFocusPolicy(Qt::StrongFocus);
}
Exemplo n.º 10
0
int ItemContainer::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: updateArea(); break;
        default: ;
        }
        _id -= 1;
    }
    return _id;
}
Exemplo n.º 11
0
void Window::resizeAndUpdateArea()
{
  int realw = win_w;
  if (realw == AUTOSIZE) {
    realw = getWishWidth();
    if (realw == AUTOSIZE)
      realw = Curses::getmaxx() - win_x;
  }
  int realh = win_h;
  if (realh == AUTOSIZE) {
    realh = getWishHeight();
    if (realh == AUTOSIZE)
      realh = Curses::getmaxy() - win_y;
  }

  panel->moveResize(0, 0, realw, realh);

  Container::moveResize(1, 1, MAX(0, realw - 2), MAX(0, realh - 2));
  updateArea();
}
void CropBaseOperation::initExecution()
{
	this->m_inputOperation = this->getInputSocketReader(0);
	updateArea();
}
Exemplo n.º 13
0
void MainWindow::on_minLatField_editingFinished()
{
    updateArea();
}
Exemplo n.º 14
0
void MainWindow::on_maxLonField_editingFinished()
{
    updateArea();
}
Exemplo n.º 15
0
void KListWidgetPrivate::itemsInserted(int index, int n)
{
	updateArea();
}
Exemplo n.º 16
0
void MyScrollArea::resizeEvent(QResizeEvent *event)
{
    updateArea();
}
Exemplo n.º 17
0
void KListWidgetPrivate::modelReset()
{
	m_indexSelect = -1;
	m_indexWidgetItemBegin = 0;
	updateArea();
}
Exemplo n.º 18
0
void KListWidgetPrivate::itemsRemoved(int index, int n)
{
	updateArea();
}