您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ widthChanged函数代码示例

51自学网 2021-06-03 09:56:36
  C++
这篇教程C++ widthChanged函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中widthChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ widthChanged函数的具体用法?C++ widthChanged怎么用?C++ widthChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了widthChanged函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: connect

void Highlight::setItem(QQuickItem *item){    if (m_item)        m_item->disconnect(this);    if (item) {        connect(item, SIGNAL(xChanged()), SLOT(adjust()));        connect(item, SIGNAL(yChanged()), SLOT(adjust()));        connect(item, SIGNAL(widthChanged()), SLOT(adjust()));        connect(item, SIGNAL(heightChanged()), SLOT(adjust()));        connect(item, SIGNAL(rotationChanged()), SLOT(adjust()));        connect(item, SIGNAL(transformOriginChanged(TransformOrigin)),                SLOT(adjust()));    }    QQuickWindow *view = item->window();    QQuickItem * contentItem = view->contentItem();    if (contentItem) {        connect(contentItem, SIGNAL(xChanged()), SLOT(adjust()));        connect(contentItem, SIGNAL(yChanged()), SLOT(adjust()));        connect(contentItem, SIGNAL(widthChanged()), SLOT(adjust()));        connect(contentItem, SIGNAL(heightChanged()), SLOT(adjust()));        connect(contentItem, SIGNAL(rotationChanged()), SLOT(adjust()));        connect(contentItem, SIGNAL(transformOriginChanged(TransformOrigin)),                SLOT(adjust()));    }    m_item = item;    setContentsSize(view->size());    adjust();}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:29,


示例2: disconnect

void ShaderEffectSource::setSourceItem(QDeclarativeItem *item){    if (item == m_sourceItem)        return;    if (m_sourceItem) {        disconnect(m_sourceItem, SIGNAL(widthChanged()), this, SLOT(markSourceSizeDirty()));        disconnect(m_sourceItem, SIGNAL(heightChanged()), this, SLOT(markSourceSizeDirty()));        if (m_refs)            detachSourceItem();    }    m_sourceItem = item;    if (m_sourceItem) {        // Must have some item as parent        if (m_sourceItem->parentItem() == 0)            m_sourceItem->setParentItem(this);        if (m_refs)            attachSourceItem();        connect(m_sourceItem, SIGNAL(widthChanged()), this, SLOT(markSourceSizeDirty()));        connect(m_sourceItem, SIGNAL(heightChanged()), this, SLOT(markSourceSizeDirty()));    }    updateSizeAndTexture();    emit sourceItemChanged();    emit repaintRequired();}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:32,


示例3: disconnect

void DeclarativeItemContainer::setDeclarativeItem(QDeclarativeItem *item, bool reparent){    if (m_declarativeItem) {        disconnect(m_declarativeItem.data(), 0, this, 0);    }    m_declarativeItem = item;    if (reparent) {        static_cast<QGraphicsItem *>(item)->setParentItem(this);    }    setMinimumWidth(item->implicitWidth());    setMinimumHeight(item->implicitHeight());    resize(item->width(), item->height());    connect(m_declarativeItem.data(), SIGNAL(widthChanged()), this, SLOT(widthChanged()));    connect(m_declarativeItem.data(), SIGNAL(heightChanged()), this, SLOT(heightChanged()));    if (m_declarativeItem.data()->metaObject()->indexOfProperty("minimumWidth") >= 0) {        QObject::connect(m_declarativeItem.data(), SIGNAL(minimumWidthChanged()), this, SLOT(minimumWidthChanged()));    }    if (m_declarativeItem.data()->metaObject()->indexOfProperty("minimumHeight") >= 0) {        QObject::connect(m_declarativeItem.data(), SIGNAL(minimumHeightChanged()), this, SLOT(minimumHeightChanged()));    }    minimumWidthChanged();    minimumHeightChanged();}
开发者ID:KDE,项目名称:kde-runtime,代码行数:25,


示例4: QQuickPaintedItem

    QmlMapControl::QmlMapControl (QQuickItem *parent) :        QQuickPaintedItem(parent)    {        setOpaquePainting(true);        setAcceptHoverEvents(true);        setAcceptedMouseButtons(Qt::AllButtons);        layermanager = new LayerManager(this, size);        screen_middle = QPoint(size.width()/2, size.height()/2);        mousepressed = false;        scaleVisible = true;        crosshairsVisible = true;        mymousemode = Panning;        mouse_wheel_events = true;        connect(ImageManager::instance(), SIGNAL(imageReceived()),                this, SLOT(updateRequestNew()));        connect(ImageManager::instance(), SIGNAL(loadingFinished()),                this, SLOT(loadingFinished()));        setWidth(size.width()+1);        setHeight(size.height()+1);        connect( this, SIGNAL(widthChanged()) , SLOT(sizeChanged()) );        connect( this, SIGNAL(heightChanged()), SLOT(sizeChanged()) );    }
开发者ID:sialan-labs,项目名称:kaqaz,代码行数:28,


示例5: xChanged

void ShapeSideBar::updateForCurrentPropertyChange(){	d->rectGroup->setVisible((bool)d->rectLayer);	d->textGroup->setVisible((bool)d->textLayer);		if (d->rectLayer)	{		emit xChanged(d->rectLayer->rect().x());		emit yChanged(d->rectLayer->rect().y());		emit widthChanged(d->rectLayer->rect().width());		emit heightChanged(d->rectLayer->rect().height());	}		if (d->textLayer)	{		if (d->textEdit->toPlainText() != d->textLayer->text())			d->textEdit->setText(d->textLayer->text());				QFont font = d->textLayer->font();		QString fontText = font.family() + " / " + font.styleName() + " / " + QString::number(font.pointSize()) + "pt";		d->fontButton->setText(fontText);				emit fontItalicChanged(font.italic());				auto alignment = d->textLayer->alignment();				for (Qt::Alignment alignElem : { Qt::AlignLeft, Qt::AlignHCenter, Qt::AlignRight, Qt::AlignTop, Qt::AlignVCenter, Qt::AlignBottom })		{			if (alignment & alignElem)				d->alignButtons[alignElem]->setChecked(true);		}	}}
开发者ID:h2so5,项目名称:PaintField,代码行数:33,


示例6: QQuickPaintedItem

CalcScreen::CalcScreen(QQuickItem *parent) :    QQuickPaintedItem(parent), m_calc(NULL){//    setFillColor(Qt::color1);    connect(this, SIGNAL( widthChanged() ), this, SLOT( setLcd() ));    connect(this, SIGNAL( heightChanged() ), this, SLOT( setLcd() ));}
开发者ID:labsin,项目名称:TilEm-Qml,代码行数:7,


示例7: QToolBar

/** * Constructor. */QG_PenToolBar::QG_PenToolBar( const QString & title, QWidget * parent )        : QToolBar(title, parent) {    this->setMinimumWidth(300);    this->setMaximumWidth(420);    colorBox = new QG_ColorBox(true, false, this, "colorbox");    colorBox->setMinimumWidth(64);    colorBox->setToolTip(tr("Line color"));    connect(colorBox, SIGNAL(colorChanged(const RS_Color&)),            this, SLOT(slotColorChanged(const RS_Color&)));    widthBox = new QG_WidthBox(true, false, this, "widthbox");    widthBox->setMinimumWidth(64);    widthBox->setToolTip(tr("Line width"));    connect(widthBox, SIGNAL(widthChanged(RS2::LineWidth)),            this, SLOT(slotWidthChanged(RS2::LineWidth)));    lineTypeBox = new QG_LineTypeBox(true, false, this, "lineTypebox");    lineTypeBox->setMinimumWidth(64);    lineTypeBox->setToolTip(tr("Line type"));    connect(lineTypeBox, SIGNAL(lineTypeChanged(RS2::LineType)),            this, SLOT(slotLineTypeChanged(RS2::LineType)));    currentPen.setColor(colorBox->getColor());    currentPen.setWidth(widthBox->getWidth());    currentPen.setLineType(lineTypeBox->getLineType());    addWidget(colorBox);    addWidget(widthBox);    addWidget(lineTypeBox);}
开发者ID:0825732889,项目名称:LibreCAD,代码行数:36,


示例8: Q_D

void QchScreenShot::setWidth(int w) {    if (w != width()) {        Q_D(QchScreenShot);        d->width = w;        emit widthChanged();    }}
开发者ID:marxoft,项目名称:qt-components-hildon,代码行数:7,


示例9: m_state

KWFrameGeometry::KWFrameGeometry(FrameConfigSharedState *state)        : m_state(state),        m_frame(0),        m_topOfPage(0),        m_blockSignals(false),        m_originalGeometryLock(false){    m_state->addUser();    widget.setupUi(this);    setUnit(m_state->document()->unit());    widget.width->setMinimum(0.0);    widget.height->setMinimum(0.0);    widget.leftMargin->setMinimum(0.0);    widget.rightMargin->setMinimum(0.0);    widget.bottomMargin->setMinimum(0.0);    widget.topMargin->setMinimum(0.0);    widget.keepAspect->setKeepAspectRatio(m_state->keepAspectRatio());    connect(widget.leftMargin, SIGNAL(valueChangedPt(qreal)), this, SLOT(syncMargins(qreal)));    connect(widget.rightMargin, SIGNAL(valueChangedPt(qreal)), this, SLOT(syncMargins(qreal)));    connect(widget.bottomMargin, SIGNAL(valueChangedPt(qreal)), this, SLOT(syncMargins(qreal)));    connect(widget.topMargin, SIGNAL(valueChangedPt(qreal)), this, SLOT(syncMargins(qreal)));    connect(widget.width, SIGNAL(valueChangedPt(qreal)), this, SLOT(widthChanged(qreal)));    connect(widget.height, SIGNAL(valueChangedPt(qreal)), this, SLOT(heightChanged(qreal)));    connect(m_state, SIGNAL(keepAspectRatioChanged(bool)), widget.keepAspect, SLOT(setKeepAspectRatio(bool)));    connect(widget.keepAspect, SIGNAL(keepAspectRatioChanged(bool)), this, SLOT(updateAspectRatio(bool)));    connect(widget.positionSelector, SIGNAL(positionSelected(KFlake::Position)),            this, SLOT(setGeometryAlignment(KFlake::Position)));}
开发者ID:KDE,项目名称:koffice,代码行数:34,


示例10: s

void DriverItem::updateText(){    if(m_item)    {        QString s(m_item->get("text"));        if(m_item->isOption())            s.append(QString::fromLatin1(": <%1>").arg(m_item->prettyText()));        if(m_item->type() == DrBase::List)        {            // remove all children: something has changed (otherwise this            // function would not be called), so it make sense to remove            // those children in all cases.            while(firstChild())                delete firstChild();            DrBase *ch = static_cast< DrListOption * >(m_item)->currentChoice();            if(ch && ch->type() == DrBase::ChoiceGroup)            {                // add new children                static_cast< DrChoiceGroup * >(ch)->createItem(this);                setOpen(true);            }        }        setText(0, s);    }    else        setText(0, "ERROR");    widthChanged();}
开发者ID:serghei,项目名称:kde3-kdelibs,代码行数:28,


示例11: QPlainTextEdit

GenericCodeEditor::GenericCodeEditor( Document *doc, QWidget *parent ):    QPlainTextEdit( parent ),    mDoc(doc),    mEditorBoxIsActive(false),    mLastCursorBlock(-1){    Q_ASSERT(mDoc != 0);    setFrameShape(QFrame::NoFrame);    viewport()->setAttribute( Qt::WA_MacNoClickThrough, true );    mLineIndicator = new LineIndicator(this);    mLineIndicator->move( contentsRect().topLeft() );    mOverlay = new QGraphicsScene(this);    QPalette overlayPalette;    overlayPalette.setBrush(QPalette::Base, Qt::NoBrush);    QGraphicsView *overlayView = new QGraphicsView(mOverlay, this);    overlayView->setFrameShape( QFrame::NoFrame );    overlayView->setPalette(overlayPalette);    overlayView->setFocusPolicy( Qt::NoFocus );    overlayView->setAttribute(Qt::WA_TransparentForMouseEvents, true);    overlayView->setSceneRect(QRectF(0,0,1,1));    overlayView->setAlignment(Qt::AlignLeft | Qt::AlignTop);    mOverlayWidget = overlayView;    mOverlayAnimator = new OverlayAnimator(this, mOverlay);    connect( mDoc, SIGNAL(defaultFontChanged()), this, SLOT(onDocumentFontChanged()) );    connect( this, SIGNAL(blockCountChanged(int)),             mLineIndicator, SLOT(setLineCount(int)) );    connect( mLineIndicator, SIGNAL( widthChanged() ),             this, SLOT( updateLayout() ) );    connect( this, SIGNAL(updateRequest(QRect,int)),             this, SLOT(updateLineIndicator(QRect,int)) );    connect( this, SIGNAL(selectionChanged()),             mLineIndicator, SLOT(update()) );    connect(this, SIGNAL(selectionChanged()), this, SLOT(updateDocLastSelection()));    connect( this, SIGNAL(cursorPositionChanged()),             this, SLOT(onCursorPositionChanged()) );    connect( Main::instance(), SIGNAL(applySettingsRequest(Settings::Manager*)),             this, SLOT(applySettings(Settings::Manager*)) );    QTextDocument *tdoc = doc->textDocument();    QPlainTextEdit::setDocument(tdoc);    onDocumentFontChanged();    doc->setLastActiveEditor(this);    applySettings( Main::settings() );}
开发者ID:ARTisERR0R,项目名称:supercollider,代码行数:59,


示例12: widthChanged

void MyMenu::setWidth(int arg){    int m_width = menu->width ();    if (m_width != arg) {        menu->setFixedWidth (arg);        emit widthChanged(arg);    }}
开发者ID:151706061,项目名称:QQStars,代码行数:8,


示例13: contentItem

void MyWindow::setWidth(int arg){    if (m_width != arg&&arg<=maximumWidth ()&&arg>=minimumWidth ()) {        m_width = arg;        contentItem ()->setWidth (arg);        emit widthChanged(arg);    }}
开发者ID:Jinxiaohai,项目名称:QT,代码行数:8,


示例14: setup

void Directory::setPixmap(QPixmap *px){	pix = px;	setup();	widthChanged(0);	invalidateHeight();	repaint();}
开发者ID:BackupTheBerlios,项目名称:kinneret,代码行数:8,


示例15: widthChanged

void ScreenResolutionManager::setWidth(int width){	if (m_width == width)		return;	m_width = width;	emit widthChanged(m_width);}
开发者ID:metamaker,项目名称:todos,代码行数:8,


示例16: widthChanged

/*!    /internal*/void QDeclarativeMapLineProperties::setWidth(qreal width){    if (width_ == width)        return;    width_ = width;    emit widthChanged(width_);}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:11,


示例17: widthChanged

void LineGraph::setWidth(int width){    if (m_width == width)        return;    m_width = width;    emit widthChanged(width);}
开发者ID:andeplane,项目名称:1DQuantumMechanics,代码行数:8,


示例18: QQuickPaintedItem

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()));}
开发者ID:KDE,项目名称:kqtquickcharts,代码行数:9,


示例19: QDeclarativeGeoMapItemBase

QDeclarativePolylineMapItem::QDeclarativePolylineMapItem(QQuickItem *parent):   QDeclarativeGeoMapItemBase(parent), dirtyMaterial_(true), updatingGeometry_(false){    setFlag(ItemHasContents, true);    QObject::connect(&line_, SIGNAL(colorChanged(QColor)),                     this, SLOT(updateAfterLinePropertiesChanged()));    QObject::connect(&line_, SIGNAL(widthChanged(qreal)),                     this, SLOT(updateAfterLinePropertiesChanged()));}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:9,


示例20: QQuickPaintedItem

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()));}
开发者ID:sand-dollar,项目名称:picaso-snake,代码行数:9,


示例21: widthChanged

void Field::setWidth(int width){    if (m_width == width) {        return;    }    m_width = width;    emit widthChanged(width);}
开发者ID:Proxxxy,项目名称:Pairs,代码行数:9,


示例22: Q_D

void InputRegion::setWidth(qreal width){    Q_D(InputRegion);    if (d->width != width) {        d->width = width;        d->scheduleUpdate();        emit widthChanged();    }}
开发者ID:WhiteSymmetry,项目名称:sailfish-browser,代码行数:9,


示例23: qDebug

void saveAbleImage::setWidth(int width){    qDebug() <<"width : "<< width;    if(width_ != width){        width_ = width;        emit widthChanged();    }}
开发者ID:Druage,项目名称:Pantheon,代码行数:9,


示例24: QDeclarativeGeoMapItemBase

QDeclarativeRectangleMapItem::QDeclarativeRectangleMapItem(QQuickItem *parent):   QDeclarativeGeoMapItemBase(parent), color_(Qt::transparent), dirtyMaterial_(true){    setFlag(ItemHasContents, true);    QObject::connect(&border_, SIGNAL(colorChanged(QColor)),                     this, SLOT(updateMapItemAssumeDirty()));    QObject::connect(&border_, SIGNAL(widthChanged(qreal)),                     this, SLOT(updateMapItemAssumeDirty()));}
开发者ID:amccarthy,项目名称:qtlocation,代码行数:9,


示例25: oldSize

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();        }    }}
开发者ID:TeamWew,项目名称:harbour-books,代码行数:44,


示例26: SIGNAL

/*!    /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();    }}
开发者ID:MarianMMX,项目名称:MarianMMX,代码行数:13,


示例27: connect

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;}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:10,


示例28: widthChanged

void FilterWidget::setWidth(int w){    if (w == ui->mSpinWidth->value())        return;    mEmitSignals = false;    ui->mSpinWidth->setValue(w);    mEmitSignals = true;    emit widthChanged(w);}
开发者ID:DeifLou,项目名称:anitools,代码行数:11,



注:本文中的widthChanged函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wifi_get_macaddr函数代码示例
C++ width函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。