Ejemplo n.º 1
0
	void CustomWebView::zoomOut ()
	{
		int i = LevelForZoom (zoomFactor ());

		if (i > 0)
			SetZoom (Zooms_ [i - 1]);
	}
Ejemplo n.º 2
0
	void CustomWebView::zoomIn ()
	{
		int i = LevelForZoom (zoomFactor ());

		if (i < Zooms_.size () - 1)
			SetZoom (Zooms_ [i + 1]);
	}
Ejemplo n.º 3
0
void IPImageViewer::resizeEvent(QResizeEvent *)
{
    if(_zoomFitMode)
    {
        zoomFit();
        emit zoomChanged(zoomFactor());
    }
}
Ejemplo n.º 4
0
	void CustomWebView::zoomIn ()
	{
		int i = LevelForZoom (zoomFactor ());

		if (i < Zooms_.size () - 1)
			setZoomFactor (Zooms_ [i + 1]);

		emit invalidateSettings ();
	}
Ejemplo n.º 5
0
	void CustomWebView::zoomOut ()
	{
		int i = LevelForZoom (zoomFactor ());

		if (i > 0)
			setZoomFactor (Zooms_ [i - 1]);

		emit invalidateSettings ();
	}
Ejemplo n.º 6
0
void IPImageViewer::showEvent(QShowEvent *)
{
    //updateImage();

    if(_zoomFitMode)
    {
        zoomFit();
        emit zoomChanged(zoomFactor());
    }
}
Ejemplo n.º 7
0
std::string PclCameraWrapper::toString()
{
    std::stringstream ss;
    ss << "[Camera] Position: " << getPos();
    ss << ", Up vector: " << getView();
    ss << ", Focal point: " << getFocal();
    ss << ", Clipping planes depth: " << getClip();
    ss << ", Fovy: " << getFovy();
    // Additional infos
    ss << "\n[Camera] Zoom factor" << zoomFactor();
    return ss.str();
}
Ejemplo n.º 8
0
	void CustomWebView::wheelEvent (QGraphicsSceneWheelEvent *e)
	{
		if (e->modifiers () & Qt::ControlModifier)
		{
			int degrees = e->delta () / 8;
			qreal delta = static_cast<qreal> (degrees) / 150;
			setZoomFactor (zoomFactor () + delta);
			e->accept ();
		}
		else
			QGraphicsWebView::wheelEvent (e);
	}
Ejemplo n.º 9
0
void PopupMenuImpl::addElementStyle(ItemIterationContext& context, HTMLElement& element)
{
    const ComputedStyle* style = m_ownerElement->itemComputedStyle(element);
    ASSERT(style);
    SharedBuffer* data = context.m_buffer;
    // TODO(tkent): We generate unnecessary "style: {\n},\n" even if no
    // additional style.
    PagePopupClient::addString("style: {\n", data);
    if (style->visibility() == HIDDEN)
        addProperty("visibility", String("hidden"), data);
    if (style->display() == NONE)
        addProperty("display", String("none"), data);
    const ComputedStyle& baseStyle = context.baseStyle();
    if (baseStyle.direction() != style->direction())
        addProperty("direction", String(style->direction() == RTL ? "rtl" : "ltr"), data);
    if (isOverride(style->unicodeBidi()))
        addProperty("unicodeBidi", String("bidi-override"), data);
    Color foregroundColor = style->visitedDependentColor(CSSPropertyColor);
    if (baseStyle.visitedDependentColor(CSSPropertyColor) != foregroundColor)
        addProperty("color", foregroundColor.serialized(), data);
    Color backgroundColor = style->visitedDependentColor(CSSPropertyBackgroundColor);
    if (context.backgroundColor() != backgroundColor && backgroundColor != Color::transparent)
        addProperty("backgroundColor", backgroundColor.serialized(), data);
    const FontDescription& baseFont = context.baseFont();
    const FontDescription& fontDescription = style->font().fontDescription();
    if (baseFont.computedPixelSize() != fontDescription.computedPixelSize()) {
        // We don't use FontDescription::specifiedSize() because this element
        // might have its own zoom level.
        addProperty("fontSize", fontDescription.computedSize() / zoomFactor(), data);
    }
    // Our UA stylesheet has font-weight:normal for OPTION.
    if (FontWeightNormal != fontDescription.weight())
        addProperty("fontWeight", String(fontWeightToString(fontDescription.weight())), data);
    if (baseFont.family() != fontDescription.family()) {
        PagePopupClient::addString("fontFamily: [\n", data);
        for (const FontFamily* f = &fontDescription.family(); f; f = f->next()) {
            addJavaScriptString(f->family().string(), data);
            if (f->next())
                PagePopupClient::addString(",\n", data);
        }
        PagePopupClient::addString("],\n", data);
    }
    if (baseFont.style() != fontDescription.style())
        addProperty("fontStyle", String(fontStyleToString(fontDescription.style())), data);
    if (baseFont.variant() != fontDescription.variant())
        addProperty("fontVariant", String(fontVariantToString(fontDescription.variant())), data);
    if (baseStyle.textTransform() != style->textTransform())
        addProperty("textTransform", String(textTransformToString(style->textTransform())), data);

    PagePopupClient::addString("},\n", data);
}
Ejemplo n.º 10
0
int QWebFrame::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 13)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 13;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< qreal*>(_v) = textSizeMultiplier(); break;
        case 1: *reinterpret_cast< qreal*>(_v) = zoomFactor(); break;
        case 2: *reinterpret_cast< QString*>(_v) = title(); break;
        case 3: *reinterpret_cast< QUrl*>(_v) = url(); break;
        case 4: *reinterpret_cast< QUrl*>(_v) = requestedUrl(); break;
        case 5: *reinterpret_cast< QUrl*>(_v) = baseUrl(); break;
        case 6: *reinterpret_cast< QIcon*>(_v) = icon(); break;
        case 7: *reinterpret_cast< QSize*>(_v) = contentsSize(); break;
        case 8: *reinterpret_cast< QPoint*>(_v) = scrollPosition(); break;
        case 9: *reinterpret_cast< bool*>(_v) = hasFocus(); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setTextSizeMultiplier(*reinterpret_cast< qreal*>(_v)); break;
        case 1: setZoomFactor(*reinterpret_cast< qreal*>(_v)); break;
        case 3: setUrl(*reinterpret_cast< QUrl*>(_v)); break;
        case 8: setScrollPosition(*reinterpret_cast< QPoint*>(_v)); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 10;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Ejemplo n.º 11
0
int QGraphicsWebView::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QGraphicsWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 17)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 17;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QString*>(_v) = title(); break;
        case 1: *reinterpret_cast< QIcon*>(_v) = icon(); break;
        case 2: *reinterpret_cast< qreal*>(_v) = zoomFactor(); break;
        case 3: *reinterpret_cast< QUrl*>(_v) = url(); break;
        case 4: *reinterpret_cast< bool*>(_v) = isModified(); break;
        case 5: *reinterpret_cast< bool*>(_v) = resizesToContents(); break;
        case 6: *reinterpret_cast< bool*>(_v) = isTiledBackingStoreFrozen(); break;
        case 7: *reinterpret_cast<int*>(_v) = QFlag(renderHints()); break;
        }
        _id -= 8;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 2: setZoomFactor(*reinterpret_cast< qreal*>(_v)); break;
        case 3: setUrl(*reinterpret_cast< QUrl*>(_v)); break;
        case 5: setResizesToContents(*reinterpret_cast< bool*>(_v)); break;
        case 6: setTiledBackingStoreFrozen(*reinterpret_cast< bool*>(_v)); break;
        case 7: setRenderHints(QFlag(*reinterpret_cast<int*>(_v))); break;
        }
        _id -= 8;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 8;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Ejemplo n.º 12
0
void PopupMenuImpl::writeDocument(SharedBuffer* data) {
  HTMLSelectElement& ownerElement = *m_ownerElement;
  IntRect anchorRectInScreen = m_chromeClient->viewportToScreen(
      ownerElement.visibleBoundsInVisualViewport(),
      ownerElement.document().view());

  PagePopupClient::addString(
      "<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
  data->append(Platform::current()->loadResource("pickerCommon.css"));
  data->append(Platform::current()->loadResource("listPicker.css"));
  PagePopupClient::addString(
      "</style></head><body><div id=main>Loading...</div><script>\n"
      "window.dialogArguments = {\n",
      data);
  addProperty("selectedIndex", ownerElement.selectedListIndex(), data);
  const ComputedStyle* ownerStyle = ownerElement.computedStyle();
  ItemIterationContext context(*ownerStyle, data);
  context.serializeBaseStyle();
  PagePopupClient::addString("children: [\n", data);
  const HeapVector<Member<HTMLElement>>& items = ownerElement.listItems();
  for (; context.m_listIndex < items.size(); ++context.m_listIndex) {
    Element& child = *items[context.m_listIndex];
    if (!isHTMLOptGroupElement(child.parentNode()))
      context.finishGroupIfNecessary();
    if (isHTMLOptionElement(child))
      addOption(context, toHTMLOptionElement(child));
    else if (isHTMLOptGroupElement(child))
      addOptGroup(context, toHTMLOptGroupElement(child));
    else if (isHTMLHRElement(child))
      addSeparator(context, toHTMLHRElement(child));
  }
  context.finishGroupIfNecessary();
  PagePopupClient::addString("],\n", data);

  addProperty("anchorRectInScreen", anchorRectInScreen, data);
  float zoom = zoomFactor();
  float scaleFactor = m_chromeClient->windowToViewportScalar(1.f);
  addProperty("zoomFactor", zoom / scaleFactor, data);
  bool isRTL = !ownerStyle->isLeftToRightDirection();
  addProperty("isRTL", isRTL, data);
  addProperty("paddingStart",
              isRTL ? ownerElement.clientPaddingRight().toDouble() / zoom
                    : ownerElement.clientPaddingLeft().toDouble() / zoom,
              data);
  PagePopupClient::addString("};\n", data);
  data->append(Platform::current()->loadResource("pickerCommon.js"));
  data->append(Platform::current()->loadResource("listPicker.js"));
  PagePopupClient::addString("</script></body>\n", data);
}
Ejemplo n.º 13
0
void SinglePhotoPreviewLayout::updateZoomAndSize()
{
    // Set zoom for fit-in-window as minimum, but don't scale up images
    // that are smaller than the available space, only scale down.
    double fitZoom = d->zoomSettings()->fitToSizeZoomFactor(d->frameSize(), ImageZoomSettings::OnlyScaleDown);
    setMinZoomFactor(fitZoom);
    setMaxZoomFactor(12.0);

    // Is currently the zoom factor set to fit to window? Then set it again to fit the new size.
    if (zoomFactor() <= fitZoom || d->isFitToWindow)
    {
        fitToWindow();
    }

    updateLayout();
}
Ejemplo n.º 14
0
void WizWebEngineView::wheelEvent(QWheelEvent *event)
{
    qreal factor = 0;

    if (event->modifiers()==Qt::ControlModifier) {
        factor = zoomFactor();
        if (event->delta() > 0) {
            //放大
            factor += 0.1;
            factor = (factor > 5.0)?5.0:factor;
        } else {
            //缩小
            factor -= 0.1;
            factor = (factor < 0.5)?0.5:factor;
        }
        //setZoomFactor(factor);
    } else {
        event->ignore();
    }
}
void ColorChooserPopupUIController::writeDocument(SharedBuffer* data)
{
    Vector<ColorSuggestion> suggestions = m_client->suggestions();
    Vector<String> suggestionValues;
    for (unsigned i = 0; i < suggestions.size(); i++)
        suggestionValues.append(suggestions[i].color.serialized());
    IntRect anchorRectInScreen = m_chromeClient->viewportToScreen(m_client->elementRectRelativeToViewport());

    PagePopupClient::addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
    data->append(Platform::current()->loadResource("pickerCommon.css"));
    data->append(Platform::current()->loadResource("colorSuggestionPicker.css"));
    PagePopupClient::addString("</style></head><body><div id=main>Loading...</div><script>\n"
        "window.dialogArguments = {\n", data);
    PagePopupClient::addProperty("values", suggestionValues, data);
    PagePopupClient::addProperty("otherColorLabel", locale().queryString(WebLocalizedString::OtherColorLabel), data);
    addProperty("anchorRectInScreen", anchorRectInScreen, data);
    addProperty("zoomFactor", zoomFactor(), data);
    PagePopupClient::addString("};\n", data);
    data->append(Platform::current()->loadResource("pickerCommon.js"));
    data->append(Platform::current()->loadResource("colorSuggestionPicker.js"));
    PagePopupClient::addString("</script></body>\n", data);
}
Ejemplo n.º 16
0
double qPBReaderDocView::GetMultiplier()
{
   return zoomFactor();
}
Ejemplo n.º 17
0
void WebView::clickedFrameZoomReset()
{
    m_clickedFrame->setZoomFactor(zoomFactor());
}
Ejemplo n.º 18
0
bool SinglePhotoPreviewLayout::atMaxZoom() const
{
    return zoomFactor() >= d->maxZoom;
}
Ejemplo n.º 19
0
void ViewWindow::zoomDecrease()
{
	setZoomFactor( zoomFactor() - ZOOM_FACTOR_CHANGE );
}
Ejemplo n.º 20
0
bool SinglePhotoPreviewLayout::atMinZoom() const
{
    return zoomFactor() <= d->minZoom;
}
Ejemplo n.º 21
0
qreal ViewWindow::getZoomFactor() const
{
	return zoomFactor();
}
Ejemplo n.º 22
0
int QWebView::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: loadStarted(); break;
        case 1: loadProgress((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 2: loadFinished((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 3: titleChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 4: statusBarMessage((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 5: linkClicked((*reinterpret_cast< const QUrl(*)>(_a[1]))); break;
        case 6: selectionChanged(); break;
        case 7: iconChanged(); break;
        case 8: urlChanged((*reinterpret_cast< const QUrl(*)>(_a[1]))); break;
        case 9: stop(); break;
        case 10: back(); break;
        case 11: forward(); break;
        case 12: reload(); break;
        case 13: print((*reinterpret_cast< QPrinter*(*)>(_a[1]))); break;
        case 14: d->_q_pageDestroyed(); break;
        default: ;
        }
        _id -= 15;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QString*>(_v) = title(); break;
        case 1: *reinterpret_cast< QUrl*>(_v) = url(); break;
        case 2: *reinterpret_cast< QIcon*>(_v) = icon(); break;
        case 3: *reinterpret_cast< QString*>(_v) = selectedText(); break;
        case 4: *reinterpret_cast< bool*>(_v) = isModified(); break;
        case 5: *reinterpret_cast< qreal*>(_v) = textSizeMultiplier(); break;
        case 6: *reinterpret_cast< qreal*>(_v) = zoomFactor(); break;
        case 7: *reinterpret_cast<int*>(_v) = QFlag(renderHints()); break;
        }
        _id -= 8;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 1: setUrl(*reinterpret_cast< QUrl*>(_v)); break;
        case 5: setTextSizeMultiplier(*reinterpret_cast< qreal*>(_v)); break;
        case 6: setZoomFactor(*reinterpret_cast< qreal*>(_v)); break;
        case 7: setRenderHints(QFlag(*reinterpret_cast<int*>(_v))); break;
        }
        _id -= 8;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 8;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
void DateTimeChooserImpl::writeDocument(SharedBuffer* data)
{
    String stepString = String::number(m_parameters.step);
    String stepBaseString = String::number(m_parameters.stepBase, 11, WTF::TruncateTrailingZeros);
    String todayLabelString;
    String otherDateLabelString;
    if (m_parameters.type == InputTypeNames::month) {
        todayLabelString = locale().queryString(WebLocalizedString::ThisMonthButtonLabel);
        otherDateLabelString = locale().queryString(WebLocalizedString::OtherMonthLabel);
    } else if (m_parameters.type == InputTypeNames::week) {
        todayLabelString = locale().queryString(WebLocalizedString::ThisWeekButtonLabel);
        otherDateLabelString = locale().queryString(WebLocalizedString::OtherWeekLabel);
    } else {
        todayLabelString = locale().queryString(WebLocalizedString::CalendarToday);
        otherDateLabelString = locale().queryString(WebLocalizedString::OtherDateLabel);
    }

    addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
    data->append(Platform::current()->loadResource("pickerCommon.css"));
    data->append(Platform::current()->loadResource("pickerButton.css"));
    data->append(Platform::current()->loadResource("suggestionPicker.css"));
    data->append(Platform::current()->loadResource("calendarPicker.css"));
    addString("</style></head><body><div id=main>Loading...</div><script>\n"
              "window.dialogArguments = {\n", data);
    addProperty("anchorRectInScreen", m_parameters.anchorRectInScreen, data);
    float scaleFactor = m_chromeClient->windowToViewportScalar(1.0f);
    addProperty("zoomFactor", zoomFactor() / scaleFactor, data);
    addProperty("min", valueToDateTimeString(m_parameters.minimum, m_parameters.type), data);
    addProperty("max", valueToDateTimeString(m_parameters.maximum, m_parameters.type), data);
    addProperty("step", stepString, data);
    addProperty("stepBase", stepBaseString, data);
    addProperty("required", m_parameters.required, data);
    addProperty("currentValue", valueToDateTimeString(m_parameters.doubleValue, m_parameters.type), data);
    addProperty("locale", m_parameters.locale.getString(), data);
    addProperty("todayLabel", todayLabelString, data);
    addProperty("clearLabel", locale().queryString(WebLocalizedString::CalendarClear), data);
    addProperty("weekLabel", locale().queryString(WebLocalizedString::WeekNumberLabel), data);
    addProperty("axShowMonthSelector", locale().queryString(WebLocalizedString::AXCalendarShowMonthSelector), data);
    addProperty("axShowNextMonth", locale().queryString(WebLocalizedString::AXCalendarShowNextMonth), data);
    addProperty("axShowPreviousMonth", locale().queryString(WebLocalizedString::AXCalendarShowPreviousMonth), data);
    addProperty("weekStartDay", m_locale->firstDayOfWeek(), data);
    addProperty("shortMonthLabels", m_locale->shortMonthLabels(), data);
    addProperty("dayLabels", m_locale->weekDayShortLabels(), data);
    addProperty("isLocaleRTL", m_locale->isRTL(), data);
    addProperty("isRTL", m_parameters.isAnchorElementRTL, data);
    addProperty("mode", m_parameters.type.getString(), data);
    if (m_parameters.suggestions.size()) {
        Vector<String> suggestionValues;
        Vector<String> localizedSuggestionValues;
        Vector<String> suggestionLabels;
        for (unsigned i = 0; i < m_parameters.suggestions.size(); i++) {
            suggestionValues.append(valueToDateTimeString(m_parameters.suggestions[i].value, m_parameters.type));
            localizedSuggestionValues.append(m_parameters.suggestions[i].localizedValue);
            suggestionLabels.append(m_parameters.suggestions[i].label);
        }
        addProperty("suggestionValues", suggestionValues, data);
        addProperty("localizedSuggestionValues", localizedSuggestionValues, data);
        addProperty("suggestionLabels", suggestionLabels, data);
        addProperty("inputWidth", static_cast<unsigned>(m_parameters.anchorRectInScreen.width()), data);
        addProperty("showOtherDateEntry", LayoutTheme::theme().supportsCalendarPicker(m_parameters.type), data);
        addProperty("otherDateLabel", otherDateLabelString, data);
        addProperty("suggestionHighlightColor", LayoutTheme::theme().activeListBoxSelectionBackgroundColor().serialized(), data);
        addProperty("suggestionHighlightTextColor", LayoutTheme::theme().activeListBoxSelectionForegroundColor().serialized(), data);
    }
    addString("}\n", data);

    data->append(Platform::current()->loadResource("pickerCommon.js"));
    data->append(Platform::current()->loadResource("suggestionPicker.js"));
    data->append(Platform::current()->loadResource("calendarPicker.js"));
    addString("</script></body>\n", data);
}
Ejemplo n.º 24
0
void SkyMap::zoomOutOrMagStep( const int modifier ) {
    if ( modifier & Qt::AltModifier )
        decMagLimit( modifier );
    else
        setZoomFactor( Options::zoomFactor() / zoomFactor (modifier ) );
}
Ejemplo n.º 25
0
int QWebFrame::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: javaScriptWindowObjectCleared(); break;
        case 1: provisionalLoad(); break;
        case 2: titleChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 3: urlChanged((*reinterpret_cast< const QUrl(*)>(_a[1]))); break;
        case 4: initialLayoutCompleted(); break;
        case 5: iconChanged(); break;
        case 6: contentsSizeChanged((*reinterpret_cast< const QSize(*)>(_a[1]))); break;
        case 7: loadStarted(); break;
        case 8: loadFinished((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 9: { QVariant _r = evaluateJavaScript((*reinterpret_cast< const QString(*)>(_a[1])));
            if (_a[0]) *reinterpret_cast< QVariant*>(_a[0]) = _r; }  break;
        case 10: print((*reinterpret_cast< QPrinter*(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 11;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< qreal*>(_v) = textSizeMultiplier(); break;
        case 1: *reinterpret_cast< qreal*>(_v) = zoomFactor(); break;
        case 2: *reinterpret_cast< QString*>(_v) = title(); break;
        case 3: *reinterpret_cast< QUrl*>(_v) = url(); break;
        case 4: *reinterpret_cast< QUrl*>(_v) = requestedUrl(); break;
        case 5: *reinterpret_cast< QUrl*>(_v) = baseUrl(); break;
        case 6: *reinterpret_cast< QIcon*>(_v) = icon(); break;
        case 7: *reinterpret_cast< QSize*>(_v) = contentsSize(); break;
        case 8: *reinterpret_cast< QPoint*>(_v) = scrollPosition(); break;
        case 9: *reinterpret_cast< bool*>(_v) = hasFocus(); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setTextSizeMultiplier(*reinterpret_cast< qreal*>(_v)); break;
        case 1: setZoomFactor(*reinterpret_cast< qreal*>(_v)); break;
        case 3: setUrl(*reinterpret_cast< QUrl*>(_v)); break;
        case 8: setScrollPosition(*reinterpret_cast< QPoint*>(_v)); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 10;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Ejemplo n.º 26
0
QPoint WebPage::mapToViewport(const QPoint &pos) const
{
    return QPoint(pos.x() / zoomFactor(), pos.y() / zoomFactor());
}
Ejemplo n.º 27
0
void SimplePartWidget::zoomOut()
{
    setZoomFactor(zoomFactor() / zoomConstant);
    constrainSize();
}
Ejemplo n.º 28
0
void MarkdownViewer::zoom_out()
{
    setZoomFactor(zoomFactor() * 0.9);
}
Ejemplo n.º 29
0
void MarkdownViewer::zoom_in()
{
    setZoomFactor(zoomFactor() * 1.1);
}