コード例 #1
0
QTM_BEGIN_NAMESPACE

QGeoTiledMapPixmapObjectInfo::QGeoTiledMapPixmapObjectInfo(QGeoTiledMapData *mapData, QGeoMapObject *mapObject)
    : QGeoTiledMapObjectInfo(mapData, mapObject),
      pixmapItem2(0)
{
    pixmap = static_cast<QGeoMapPixmapObject*>(mapObject);

    connect(pixmap,
            SIGNAL(coordinateChanged(QGeoCoordinate)),
            this,
            SLOT(coordinateChanged(QGeoCoordinate)));
    connect(pixmap,
            SIGNAL(pixmapChanged(QPixmap)),
            this,
            SLOT(pixmapChanged(QPixmap)));
    connect(pixmap,
            SIGNAL(offsetChanged(QPoint)),
            this,
            SLOT(offsetChanged(QPoint)));

    pixmapItem1 = new QGraphicsPixmapItem();
    graphicsItem = pixmapItem1;

    pixmapChanged(this->pixmap->pixmap());
    coordinateChanged(this->pixmap->coordinate());
}
コード例 #2
0
QTM_BEGIN_NAMESPACE

QGeoTiledMapCustomObjectInfo::QGeoTiledMapCustomObjectInfo(QGeoTiledMapData *mapData, QGeoMapObject *mapObject)
    : QGeoTiledMapObjectInfo(mapData, mapObject)
{
    custom = static_cast<QGeoMapCustomObject*>(mapObject);

    connect(custom,
            SIGNAL(triggerUpdate()),
            this,
            SLOT(updateTriggered()));
    connect(custom,
            SIGNAL(graphicsItemChanged(QGraphicsItem*)),
            this,
            SLOT(graphicsItemChanged(QGraphicsItem*)));
    connect(custom,
            SIGNAL(offsetChanged(QPoint)),
            this,
            SLOT(offsetChanged(QPoint)));

    graphicsItem = 0;

    graphicsItemChanged(this->custom->graphicsItem());
    offsetChanged(this->custom->offset());
}
コード例 #3
0
void QGeoMapCustomObject::setOffset(const QPoint &offset)
{
    if (d_ptr->offset != offset) {
        d_ptr->offset = offset;
        emit offsetChanged(offset);
    }
}
コード例 #4
0
ファイル: cartesianwidget.cpp プロジェクト: hvugar/widget
void CartesianWidget::setOffset(int offsetX, int offsetY)
{
    m_offsetX = offsetX;
    m_offsetY = offsetY;

    emit offsetChanged(m_offsetX, m_offsetY);
}
コード例 #5
0
InterpolatingGraph::InterpolatingGraph(QCustomPlot *plot, const DoubleSeries &d, PlotSettings::ScalingMode scalingMode, PlotSettings::ScaleType scaleType) :
    Graph(plot),
    series(d),
    plot(plot),
    lastUpdate(-1),
    currentMin(std::numeric_limits<double>::max()),
    currentMax(std::numeric_limits<double>::min()),
    currentScalingMode(PlotSettings::NOSCALING),
    currentScaleType(PlotSettings::LINSCALE)
{
    setObjectName("InterpolatingGraph");
    connect(&series, SIGNAL(newData(qint64)), this, SLOT(onNewData(qint64)));
    connect(&series, SIGNAL(offsetChanged()), this, SLOT(onOffsetChanged()));

    graph = plot->addGraph();
    // Ensure value axis is visible.
    plot->yAxis->setVisible(true);
    plot->yAxis->setGrid(true);

    configureAppearance(graph);
    initialize(graph, series);
    rescale(scalingMode, scaleType);

    updatePlot(scalingMode);
}
コード例 #6
0
ファイル: submenu.cpp プロジェクト: CerebrosuS/plasma-desktop
void SubMenu::setOffset(int offset)
{
    if (m_offset != offset) {
        m_offset = offset;

        emit offsetChanged();
    }
}
コード例 #7
0
/*!
    \internal
*/
void QDeclarativeSearchModelBase::setOffset(int offset)
{
    if (m_request.offset() == offset)
        return;

    m_request.setOffset(offset);
    emit offsetChanged();
}
コード例 #8
0
ファイル: videorendereritem.cpp プロジェクト: akhilo/cmplayer
void VideoRendererItem::setOffset(const QPoint &offset) {
	if (d->offset != offset) {
		d->offset = offset;
		emit offsetChanged(d->offset);
		d->updateGeometry(false);
        update();
	}
}
コード例 #9
0
//---------------------------------------------------------------------------
//
// User clicked Cancel
//
void AmorDialog::slotCancel()
{
    // restore offset
    KConfig *config = kapp->config();
    KConfigGroupSaver cs(config, "General");
    emit offsetChanged(config->readNumEntry("Offset"));
    reject();
}
コード例 #10
0
void QGalleryQueryRequest::setOffset(int offset)
{
    const int boundedOffset = qMax(0, offset);
    if (d_func()->offset != boundedOffset) {
        d_func()->offset = boundedOffset;

        emit offsetChanged();
    }
}
コード例 #11
0
void QDeclarativeGalleryQueryModel::setOffset(int offset)
{
    if (m_request.offset() != offset) {
        m_request.setOffset(offset);

        deferredExecute();

        emit offsetChanged();
    }
}
コード例 #12
0
ファイル: qgraphicseffect.cpp プロジェクト: AtlantisCD9/Qt
void QGraphicsDropShadowEffect::setOffset(const QPointF &offset)
{
    Q_D(QGraphicsDropShadowEffect);
    if (d->filter->offset() == offset)
        return;

    d->filter->setOffset(offset);
    updateBoundingRect();
    emit offsetChanged(offset);
}
コード例 #13
0
void AmplitudeWidget::setOffset(double newOffset)
{
  newOffset = bound(newOffset, 0.0, maxOffset());
  //if(_offset != newOffset) {
    _offset = newOffset;
    _offsetInv = maxOffset() - _offset;
    emit offsetChanged(_offset);
    emit offsetInvChanged(offsetInv());
  //}
}
コード例 #14
0
QTM_BEGIN_NAMESPACE

QGeoTiledMapTextObjectInfo::QGeoTiledMapTextObjectInfo(QGeoTiledMapData *mapData, QGeoMapObject *mapObject)
    : QGeoTiledMapObjectInfo(mapData, mapObject)
{
    text = static_cast<QGeoMapTextObject*>(mapObject);

    connect(text,
            SIGNAL(textChanged(QString)),
            this,
            SLOT(textChanged(QString)));
    connect(text,
            SIGNAL(fontChanged(QFont)),
            this,
            SLOT(fontChanged(QFont)));
    connect(text,
            SIGNAL(penChanged(QPen)),
            this,
            SLOT(penChanged(QPen)));
    connect(text,
            SIGNAL(brushChanged(QBrush)),
            this,
            SLOT(brushChanged(QBrush)));
    connect(text,
            SIGNAL(offsetChanged(QPoint)),
            this,
            SLOT(offsetChanged(QPoint)));
    connect(text,
            SIGNAL(alignmentChanged(Qt::Alignment)),
            this,
            SLOT(alignmentChanged(Qt::Alignment)));

    textItem = new QGraphicsSimpleTextItem();
    graphicsItem = textItem;

    penChanged(text->pen());
    brushChanged(text->brush());
    originChanged(text->origin());
    fontChanged(text->font());
    textChanged(text->text());
}
コード例 #15
0
    void setObject(QGalleryQueryModel *object)
    {
        q_ptr = object;

        QObject::connect(&query, SIGNAL(resultSetChanged(QGalleryResultSet*)),
                q_ptr, SLOT(_q_resultSetChanged(QGalleryResultSet*)));
        QObject::connect(&query, SIGNAL(stateChanged(QGalleryAbstractRequest::State)),
                q_ptr, SIGNAL(stateChanged(QGalleryAbstractRequest::State)));
        QObject::connect(&query, SIGNAL(finished()), q_ptr, SIGNAL(finished()));
        QObject::connect(&query, SIGNAL(canceled()), q_ptr, SIGNAL(canceled()));
        QObject::connect(&query, SIGNAL(errorChanged()), q_ptr, SIGNAL(errorChanged()));
        QObject::connect(&query, SIGNAL(error(int,QString)), q_ptr, SIGNAL(error(int,QString)));
        QObject::connect(&query, SIGNAL(galleryChanged()), q_ptr, SIGNAL(galleryChanged()));
        QObject::connect(&query, SIGNAL(sortPropertyNamesChanged()), q_ptr, SIGNAL(sortPropertyNamesChanged()));
        QObject::connect(&query, SIGNAL(autoUpdateChanged()), q_ptr, SIGNAL(autoUpdateChanged()));
        QObject::connect(&query, SIGNAL(offsetChanged()), q_ptr, SIGNAL(offsetChanged()));
        QObject::connect(&query, SIGNAL(limitChanged()), q_ptr, SIGNAL(limitChanged()));
        QObject::connect(&query, SIGNAL(rootTypeChanged()), q_ptr, SIGNAL(rootTypeChanged()));
        QObject::connect(&query, SIGNAL(rootItemChanged()), q_ptr, SIGNAL(rootItemChanged()));
        QObject::connect(&query, SIGNAL(scopeChanged()), q_ptr, SIGNAL(scopeChanged()));
        QObject::connect(&query, SIGNAL(filterChanged()), q_ptr, SIGNAL(filterChanged()));
    }
コード例 #16
0
int AmplitudeWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QGLWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: rangeChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 1: offsetChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 2: offsetInvChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 3: setRange((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 4: setOffset((*reinterpret_cast< double(*)>(_a[1]))); break;
        }
        _id -= 5;
    }
    return _id;
}
コード例 #17
0
KoShadowConfigWidget::KoShadowConfigWidget( QWidget * parent )
    : QWidget( parent ), d( new Private() )
{
    d->widget.setupUi(this);
    d->widget.shadowOffset->setValue( 10.0 );
    d->widget.shadowAngle->setValue( 45.0 );
    d->widget.shadowAngle->setMinimum( 0.0 );
    d->widget.shadowAngle->setMaximum( 360.0 );
    d->widget.shadowOptions->setEnabled( false );

    d->actionShadowColor = new KoColorPopupAction(this);
    d->widget.shadowColor->setDefaultAction(d->actionShadowColor);

    connect( d->widget.shadowVisible, SIGNAL(toggled(bool)), this, SLOT(visibilityChanged()) );
    connect( d->widget.shadowVisible, SIGNAL(toggled(bool)), this, SIGNAL(shadowVisibilityChanged(bool)) );
    connect( d->actionShadowColor, SIGNAL(colorChanged(const KoColor&)), 
        this, SIGNAL(shadowColorChanged(const KoColor&)));
    connect( d->widget.shadowAngle, SIGNAL(valueChanged(qreal,bool)), this, SLOT(offsetChanged()));
    connect( d->widget.shadowOffset, SIGNAL(valueChangedPt(qreal)), this, SLOT(offsetChanged()));
}
コード例 #18
0
int Tiled::Internal::ResizeHelper::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: offsetChanged((*reinterpret_cast< const QPoint(*)>(_a[1]))); break;
        case 1: offsetXChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 2: offsetYChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 3: offsetBoundsChanged((*reinterpret_cast< const QRect(*)>(_a[1]))); break;
        case 4: setOldSize((*reinterpret_cast< const QSize(*)>(_a[1]))); break;
        case 5: setNewSize((*reinterpret_cast< const QSize(*)>(_a[1]))); break;
        case 6: setOffset((*reinterpret_cast< const QPoint(*)>(_a[1]))); break;
        case 7: setOffsetX((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 8: setOffsetY((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 9: setNewWidth((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 10: setNewHeight((*reinterpret_cast< int(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 11;
    }
    return _id;
}
コード例 #19
0
ファイル: timelinecells.cpp プロジェクト: linganesan/pencil
void TimeLineCells::mouseMoveEvent( QMouseEvent* event )
{
    if ( m_eType == TIMELINE_CELL_TYPE::Layers )
    {
        endY = event->pos().y();
        emit mouseMovedY( endY - startY );
    }
    int frameNumber = getFrameNumber( event->pos().x() );
    //int layerNumber = getLayerNumber( event->pos().y() );

    if ( m_eType == TIMELINE_CELL_TYPE::Tracks )
    {
        if ( primaryButton == Qt::MidButton )
        {
            // qMin( max_frame_offset, qMax ( min_frame_offset, draw_frame_offset ) )
            frameOffset = qMin( qMax( 0, frameLength - width() / getFrameSize() ), qMax( 0, frameOffset + lastFrameNumber - frameNumber ) );
            update();
            emit offsetChanged( frameOffset );
        }
        else
        {
            if ( timeLine->scrubbing )
            {
                mEditor->scrubTo( frameNumber );
            }
            else
            {
                if ( startLayerNumber != -1 && startLayerNumber < mEditor->object()->getLayerCount() )
                {
                    Layer *currentLayer = mEditor->object()->getLayer(startLayerNumber);

                    // Did we move to another frame ?
                    //
                    if ( frameNumber != lastFrameNumber ) {

                        // Check if the frame we clicked was selected
                        //
                        if ( canMoveFrame ) {

                            // If it is the case, we move the selected frames in the layer
                            //
                            movingFrames        = true;

                            int offset = frameNumber - lastFrameNumber;
                            currentLayer->moveSelectedFrames(offset);

                            mEditor->updateCurrentFrame();

                        }
                        else if ( canBoxSelect ){

                            // Otherwise, we do a box select
                            //
                            boxSelecting        = true;

                            currentLayer->deselectAll();
                            currentLayer->setFrameSelected(startFrameNumber, true);
                            currentLayer->extendSelectionTo(frameNumber);
                        }

                        lastFrameNumber = frameNumber;
                    }

                    currentLayer->mouseMove( event, frameNumber );
                }
            }
        }
    }
    timeLine->update();
}
コード例 #20
0
ファイル: fingering.cpp プロジェクト: Jojo-Schmitz/MuseScore
void Fingering::layout()
      {
      if (parent()) {
            Fraction tick = parent()->tick();
            const Staff* st = staff();
            if (st && st->isTabStaff(tick) && !st->staffType(tick)->showTabFingering()) {
                  setbbox(QRectF());
                  return;
                  }
            }

      TextBase::layout();
      rypos() = 0.0;    // handle placement below

      if (autoplace() && note()) {
            Note* n      = note();
            Chord* chord = n->chord();
            bool voices  = chord->measure()->hasVoices(chord->staffIdx());
            bool tight   = voices && chord->notes().size() == 1 && !chord->beam() && tid() != Tid::STRING_NUMBER;

            qreal headWidth = n->bboxRightPos();

            // update offset after drag
            qreal rebase = 0.0;
            if (offsetChanged() != OffsetChange::NONE)
                  rebase = rebaseOffset();

            // temporarily exclude self from chord shape
            setAutoplace(false);

            if (layoutType() == ElementType::CHORD) {
                  Stem* stem = chord->stem();
                  Segment* s = chord->segment();
                  Measure* m = s->measure();
                  qreal sp = spatium();
                  qreal md = minDistance().val() * sp;
                  SysStaff* ss = m->system()->staff(chord->vStaffIdx());
                  Staff* vStaff = chord->staff();     // TODO: use current height at tick

                  if (n->mirror())
                        rxpos() -= n->ipos().x();
                  rxpos() += headWidth * .5;
                  if (placeAbove()) {
                        if (tight) {
                              if (chord->stem())
                                    rxpos() -= 0.8 * sp;
                              rypos() -= 1.5 * sp;
                              }
                        else {
                              QRectF r = bbox().translated(m->pos() + s->pos() + chord->pos() + n->pos() + pos());
                              SkylineLine sk(false);
                              sk.add(r.x(), r.bottom(), r.width());
                              qreal d = sk.minDistance(ss->skyline().north());
                              qreal yd = 0.0;
                              if (d > 0.0 && isStyled(Pid::MIN_DISTANCE))
                                    yd -= d + height() * .25;
                              // force extra space above staff & chord (but not other fingerings)
                              qreal top;
                              if (chord->up() && chord->beam() && stem) {
                                    top = stem->y() + stem->bbox().top();
                                    }
                              else {
                                    Note* un = chord->upNote();
                                    top = qMin(0.0, un->y() + un->bbox().top());
                                    }
                              top -= md;
                              qreal diff = (bbox().bottom() + ipos().y() + yd + n->y()) - top;
                              if (diff > 0.0)
                                    yd -= diff;
                              if (offsetChanged() != OffsetChange::NONE) {
                                    // user moved element within the skyline
                                    // we may need to adjust minDistance, yd, and/or offset
                                    bool inStaff = placeAbove() ? r.bottom() + rebase > 0.0 : r.top() + rebase < staff()->height();
                                    rebaseMinDistance(md, yd, sp, rebase, inStaff);
                                    }
                              rypos() += yd;
                              }
                        }
                  else {
                        if (tight) {
                              if (chord->stem())
                                    rxpos() += 0.8 * sp;
                              rypos() += 1.5 * sp;
                              }
                        else {
                              QRectF r = bbox().translated(m->pos() + s->pos() + chord->pos() + n->pos() + pos());
                              SkylineLine sk(true);
                              sk.add(r.x(), r.top(), r.width());
                              qreal d = ss->skyline().south().minDistance(sk);
                              qreal yd = 0.0;
                              if (d > 0.0 && isStyled(Pid::MIN_DISTANCE))
                                    yd += d + height() * .25;
                              // force extra space below staff & chord (but not other fingerings)
                              qreal bottom;
                              if (!chord->up() && chord->beam() && stem) {
                                    bottom = stem->y() + stem->bbox().bottom();
                                    }
                              else {
                                    Note* dn = chord->downNote();
                                    bottom = qMax(vStaff->height(), dn->y() + dn->bbox().bottom());
                                    }
                              bottom += md;
                              qreal diff = bottom - (bbox().top() + ipos().y() + yd + n->y());
                              if (diff > 0.0)
                                    yd += diff;
                              if (offsetChanged() != OffsetChange::NONE) {
                                    // user moved element within the skyline
                                    // we may need to adjust minDistance, yd, and/or offset
                                    bool inStaff = placeAbove() ? r.bottom() + rebase > 0.0 : r.top() + rebase < staff()->height();
                                    rebaseMinDistance(md, yd, sp, rebase, inStaff);
                                    }
                              rypos() += yd;
                              }
                        }
                  }
            else if (tid() == Tid::LH_GUITAR_FINGERING) {
                  // place to left of note
                  qreal left = n->shape().left();
                  if (left - n->x() > 0.0)
                        rxpos() -= left;
                  else
                        rxpos() -= n->x();
                  }
            // for other fingering styles, do not autoplace

            // restore autoplace
            setAutoplace(true);
            }
      else if (offsetChanged() != OffsetChange::NONE) {
            // rebase horizontally too, as autoplace may have adjusted it
            rebaseOffset(false);
            }
      setOffsetChanged(false);
      }
コード例 #21
0
void SchedulerJobInstance::setOffset(int offset) {
	d->offset = offset;
	emit offsetChanged();
}
コード例 #22
0
void ViewerWindow::on_z_layerOffset_valueChanged(double ) {
	offsetChanged();
}
コード例 #23
0
void PatternNoteDisplay::setOffset(const int offset)
{
    _offset = offset;
    emit offsetChanged();
    update();
}
コード例 #24
0
//---------------------------------------------------------------------------
//
// User changed offset
//
void AmorDialog::slotOffset(int off)
{
    mConfig.mOffset = off;
    emit offsetChanged(mConfig.mOffset);
}