Exemplo n.º 1
0
void MyWindow::setHeight(int arg)
{
    if (m_height != arg&&arg<=maximumHeight ()&&arg>=minimumHeight ()) {
        m_height = arg;
        contentItem ()->setHeight (arg);
        emit heightChanged(arg);
    }
}
Exemplo n.º 2
0
void MyMenu::setHeight(int arg)
{
    int m_height = menu->height ();
    if (m_height != arg) {
        menu->setFixedHeight (arg);
        emit heightChanged(arg);
    }
}
Exemplo n.º 3
0
void saveAbleImage::setHeight(int height) {
    qDebug() << "height : "<< height;
    if(height_ != height){
        height_ = height;

        emit heightChanged();
    }
}
Exemplo n.º 4
0
void ScreenResolutionManager::setHeight(int height)
{
	if (m_height == height)
		return;

	m_height = height;
	emit heightChanged(m_height);
}
Exemplo n.º 5
0
PolygonItem::PolygonItem(QQuickItem *parent) :
	QQuickPaintedItem(parent),
	_color(QColor(255, 255, 255))
{
	setAntialiasing(true);
	connect(this, SIGNAL(widthChanged()), SLOT(onAppearanceChanged()));
	connect(this, SIGNAL(heightChanged()), SLOT(onAppearanceChanged()));
	connect(this, SIGNAL(colorChanged()), SLOT(onAppearanceChanged()));
}
Exemplo n.º 6
0
void Field::setHeight(int height)
{
    if (m_height == height) {
        return;
    }

    m_height = height;
    emit heightChanged(height);
}
XYChartBackgroundPainter::XYChartBackgroundPainter(QQuickItem* parent) :
    QQuickPaintedItem(parent),
    m_xyChartCore(0)
{
    setFlag(QQuickItem::ItemHasContents, true);

    connect(this, SIGNAL(widthChanged()), SLOT(triggerUpdate()));
    connect(this, SIGNAL(heightChanged()), SLOT(triggerUpdate()));
}
void InputRegion::setHeight(qreal height)
{
    Q_D(InputRegion);
    if (d->height != height) {
        d->height = height;
        d->scheduleUpdate();
        emit heightChanged();
    }
}
Exemplo n.º 9
0
void BooksListWatcher::setListView(QQuickItem* aView)
{
    if (iListView != aView) {
        const QSize oldSize(iSize);
        if (iListView) iListView->disconnect(this);
        iListView = aView;
        if (iListView) {
            connect(iListView,
                SIGNAL(widthChanged()),
                SLOT(onWidthChanged()));
            connect(iListView,
                SIGNAL(heightChanged()),
                SLOT(onHeightChanged()));
            connect(iListView,
                SIGNAL(contentXChanged()),
                SLOT(onContentXChanged()));
            connect(iListView,
                SIGNAL(contentYChanged()),
                SLOT(onContentYChanged()));
            connect(iListView,
                SIGNAL(contentWidthChanged()),
                SLOT(onContentSizeChanged()));
            connect(iListView,
                SIGNAL(contentHeightChanged()),
                SLOT(onContentSizeChanged()));
            iContentX = contentX();
            iContentY = contentY();
            updateCurrentIndex();
        } else {
            iContentX = iContentY = 0;
            iSize = QSize(0,0);
        }
        Q_EMIT listViewChanged();
        if (oldSize != iSize) {
            Q_EMIT sizeChanged();
        }
        if (oldSize.width() != iSize.width()) {
            Q_EMIT widthChanged();
        }
        if (oldSize.height() != iSize.height()) {
            Q_EMIT heightChanged();
        }
    }
}
Exemplo n.º 10
0
void User::setHeight(double height) {

    if(myHeight != height) {
        myHeight = height;
        updateHeight(height);
        calculateBMI();
        calculateBMR();
        emit heightChanged();
    }
}
Exemplo n.º 11
0
void QQuickPopupWindow::setPopupContentItem(QQuickItem *contentItem)
{
    if (!contentItem)
        return;

    contentItem->setParentItem(this->contentItem());
    connect(contentItem, SIGNAL(widthChanged()), this, SLOT(updateSize()));
    connect(contentItem, SIGNAL(heightChanged()), this, SLOT(updateSize()));
    m_contentItem = contentItem;
}
/*!
    \internal
*/
void QDeclarativeGeoMapQuickItem::setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map)
{
    QDeclarativeGeoMapItemBase::setMap(quickMap,map);
    if (map && quickMap) {
        QObject::connect(quickMap, SIGNAL(heightChanged()), this, SLOT(updateMapItem()));
        QObject::connect(quickMap, SIGNAL(widthChanged()), this, SLOT(updateMapItem()));
        QObject::connect(map, SIGNAL(cameraDataChanged(QGeoCameraData)), this, SLOT(updateMapItem()));
        updateMapItem();
    }
}
Exemplo n.º 13
0
void FilterWidget::setHeight(int h)
{
    if (h == ui->mSpinHeight->value())
        return;

    mEmitSignals = false;
    ui->mSpinHeight->setValue(h);
    mEmitSignals = true;

    emit heightChanged(h);
}
Exemplo n.º 14
0
void ToolBar::setExpand(bool expand, QString shapeType) {
    emit buttonChecked(shapeType);
    if (expand) {
        m_expanded = true;
        setFixedSize(TOOLBAR_WIDTH,
                              TOOLBAR_WIDGET_SIZE.height()*2+3);
        emit heightChanged();
    }

    update();
}
Exemplo n.º 15
0
void DotMatrixRepresentation::setHeight(int h)
{
	if(isw->getHeight() != h){
		isw->blockSignals(true);
		isw->setHeight(h);
		isw->blockSignals(false);

		dmWidget->setHeight(h);
		emit sizeChanged(QSize(isw->width(), h));
		emit heightChanged(h);
	}
}
void QQnxAbstractVirtualKeyboard::setHeight(int height)
{
    if (height == m_height)
        return;

    const int effectiveHeight = this->height();

    m_height = height;

    if (effectiveHeight != this->height())
        emit heightChanged(this->height());
}
Exemplo n.º 17
0
void TimelineModel::setCollapsedRowCount(int rows)
{
    Q_D(TimelineModel);
    if (d->collapsedRowCount != rows) {
        d->collapsedRowCount = rows;
        emit collapsedRowCountChanged();
        if (!d->expanded) {
            emit rowCountChanged();
            emit heightChanged(); // collapsed rows have a fixed size
        }
    }
}
Exemplo n.º 18
0
void TelegramGui::setHeight(int h)
{
    if( h == p->height )
        return;

    p->height = h;
    if( p->quit_state )
        return;

    tg_settings->setValue( "General/height", h );

    emit heightChanged();
}
Exemplo n.º 19
0
void QDeclarativeBasePositionerPrivate::unwatchChanges(QGraphicsObject* other)
{
    if (QGraphicsItemPrivate::get(other)->isDeclarativeItem) {
        QDeclarativeItemPrivate *otherPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(other));
        otherPrivate->removeItemChangeListener(this, watchedChanges);
    } else {
        Q_Q(QDeclarativeBasePositioner);
        QObject::disconnect(other, SIGNAL(widthChanged()), q, SLOT(graphicsWidgetGeometryChanged()));
        QObject::disconnect(other, SIGNAL(heightChanged()), q, SLOT(graphicsWidgetGeometryChanged()));
        QObject::disconnect(other, SIGNAL(opacityChanged()), q, SLOT(graphicsWidgetGeometryChanged()));
        QObject::disconnect(other, SIGNAL(visibleChanged()), q, SLOT(graphicsWidgetGeometryChanged()));
    }
}
Exemplo n.º 20
0
bool ExpandingDelegate::editorEvent(QEvent *event, QAbstractItemModel * /*model*/, const QStyleOptionViewItem & /*option*/, const QModelIndex &index)
{
    if (event->type() == QEvent::MouseButtonRelease) {
        event->accept();
        model()->setExpanded(index, !model()->isExpanded(index));
        heightChanged();

        return true;
    } else {
        event->ignore();
    }

    return false;
}
void QQnxAbstractVirtualKeyboard::setVisible(bool visible)
{
    if (visible == m_visible)
        return;

    const int effectiveHeight = height();

    m_visible = visible;

    emit visibilityChanged(visible);

    if (effectiveHeight != height())
        emit heightChanged(height());
}
Exemplo n.º 22
0
bool ExtendWidget::eventFilter(QObject *o, QEvent *e)
{
    Q_D(ExtendWidget);

    if (o == d->target) {
        if (e->type() == QEvent::Resize) {
            QResizeEvent *event = static_cast<QResizeEvent *>(e);
            if (event) {
                QSize size = event->size();

                if (size.width() != d->old_size.width()) {
                    emit widthChanged(size.width());
                }

                if (size.height() != d->old_size.height()) {
                    emit heightChanged(size.height());
                }

                if (size != d->old_size) {
                    emit sizeChanged(size);
                }

                d->old_size = size;
            }
        } else if (e->type() == QEvent::Move) {
            QMoveEvent *event = static_cast<QMoveEvent *>(e);

            if (event) {
                QPoint pos = event->pos();

                if (pos.x() != d->old_pos.x()) {
                    emit xChanged(pos.x());
                }

                if (pos.y() != d->old_pos.y()) {
                    emit yChanged(pos.y());
                }

                if (pos != d->old_pos) {
                    emit positionChanged(pos);
                }

                d->old_pos = pos;
            }
        }
    }

    return false;
}
Exemplo n.º 23
0
void ConstraintPresenter::updateHeight()
{
    if(m_viewModel.isRackShown())
    {
        m_view->setHeight(rack()->height() + 50);
    }
    // TODO else if(rack but not shown)
    else
    {
        m_view->setHeight(ConstraintHeader::headerHeight());
    }

    updateChildren();
    emit heightChanged();
}
Exemplo n.º 24
0
PngItem::PngItem(QDeclarativeItem *parent) :
	QDeclarativeItem(parent)
{
	image = new QImage(width(), height(), QImage::Format_RGB32);
	image->fill(Qt::green);

	setFlag(QGraphicsItem::ItemHasNoContents, false);

	recordTimer.setInterval(1000/30);
	connect(&recordTimer,SIGNAL(timeout()),this,SLOT(takeSnapshot()));

	connect(this,SIGNAL(widthChanged()),this,SLOT(widthChangedSlot()));

	connect(this,SIGNAL(heightChanged()),this,SLOT(heightChangedSlot()));
}
Exemplo n.º 25
0
void NotificationLayout::checkHeight()
{
    int h = 0;
    QHashIterator<uint, Notification*> it(m_notifications);
    while (it.hasNext())
    {
        it.next();
        h +=it.value()->height() + m_layout->spacing();
    }

    setMinimumSize(width(), h);
    setMaximumSize(width(), h);

    emit heightChanged(h);
}
Exemplo n.º 26
0
void ShaderEffectSource::updateSizeAndTexture()
{
    if (m_sourceItem) {
        QSize size = m_textureSize;
        if (size.isEmpty())
            size = QSize(m_sourceItem->width(), m_sourceItem->height());
        if (size.width() < 1)
            size.setWidth(1);
        if (size.height() < 1)
            size.setHeight(1);
        if (m_fbo && (m_fbo->size() != size || !m_fbo->isValid())) {
            delete m_fbo;
            m_fbo = 0;
            delete m_multisampledFbo;
            m_fbo = m_multisampledFbo = 0;
        }
        if (m_size.width() != size.width()) {
            m_size.setWidth(size.width());
            emit widthChanged();
        }
        if (m_size.height() != size.height()) {
            m_size.setHeight(size.height());
            emit heightChanged();
        }
        m_dirtyTexture = true;
    } else {
        if (m_size.width() != 0) {
            m_size.setWidth(0);
            emit widthChanged();
        }
        if (m_size.height() != 0) {
            m_size.setHeight(0);
            emit heightChanged();
        }
    }
}
Exemplo n.º 27
0
void DotMatrixRepresentation::setSize(const QSize &size)
{
	if(isw->getSize() != size){
		isw->blockSignals(true);
		isw->setSize(size);
		isw->blockSignals(false);

		dmWidget->setSize(size);

		update();
		emit sizeChanged(size);
		emit widthChanged(size.width());
		emit heightChanged(size.height());
	}
}
Exemplo n.º 28
0
void QDeclarativeFlipable::setBack(QGraphicsObject *back)
{
    Q_D(QDeclarativeFlipable);
    if (d->back) {
        qmlInfo(this) << tr("back is a write-once property");
        return;
    }
    d->back = back;
    d->back->setParentItem(this);
    if (Front == d->current)
        d->back->setOpacity(0.);
    connect(back, SIGNAL(widthChanged()),
            this, SLOT(retransformBack()));
    connect(back, SIGNAL(heightChanged()),
            this, SLOT(retransformBack()));
}
Exemplo n.º 29
0
void TimelineModel::setExpandedRowCount(int rows)
{
    Q_D(TimelineModel);
    if (d->expandedRowCount != rows) {
        int prevHeight = height();
        if (d->rowOffsets.length() > rows)
            d->rowOffsets.resize(rows);
        d->expandedRowCount = rows;
        emit expandedRowCountChanged();
        if (d->expanded) {
            emit rowCountChanged();
            if (height() != prevHeight)
                emit heightChanged();
        }
    }
}
Exemplo n.º 30
0
//Reimplemented
void PageItem::geometryChanged(const QRectF &newGeometry,
                               const QRectF &oldGeometry)
{
    if (newGeometry.size().isEmpty()) {
        return;
    }

    if (newGeometry.size() != oldGeometry.size()) {
        m_redrawTimer->start();
    }

    QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
    //Why aren't they automatically emuitted?
    emit widthChanged();
    emit heightChanged();
}