Example #1
0
PictureShape::PictureShape()
    : KFrameShape(KOdfXmlNS::draw, "image"),
    m_imageCollection(0),
    m_renderQueue(new RenderQueue(this)),
    m_mode(Standard)
{
    setKeepAspectRatio(true);
    setFilterEffectStack(new KFilterEffectStack());
}
Example #2
0
KritaShape::KritaShape(const KUrl& url, const QString & profileName)
        : m_d(new Private())
{
    m_d->url = url;
    m_d->doc = 0;
    if (!url.isEmpty()) {
        importImage(url);
    }
    m_d->displayProfile = KoColorSpaceRegistry::instance()->profileByName(profileName);
    setKeepAspectRatio(true);
    moveToThread(QCoreApplication::instance()->thread()); // it's a QObject; lets make sure it always has a proper thread.
}
Example #3
0
PictureShape::PictureShape()
    : KoFrameShape(KoXmlNS::draw, "image")
    , m_imageCollection(0)
    , m_mirrorMode(MirrorNone)
    , m_colorMode(Standard)
    , m_proxy(this)
{
    setKeepAspectRatio(true);
    KoFilterEffectStack * effectStack = new KoFilterEffectStack();
    effectStack->setClipRect(QRectF(0, 0, 1, 1));
    setFilterEffectStack(effectStack);
}
Example #4
0
VideoShape::VideoShape()
    : KoFrameShape(KoXmlNS::draw, "plugin")
    , m_videoCollection(0)
    , m_videoEventAction(new VideoEventAction(this))
#ifdef SHOULD_BUILD_THUMBNAIL
    , m_thumbnailer(new VideoThumbnailer())
#endif
    , m_oldVideoData(0)
    , m_icon(koIcon("video-x-generic"))
{
    setKeepAspectRatio(true);
    addEventAction(m_videoEventAction);
}
Example #5
0
PictureShape::PictureShape()
: KoFrameShape(KoXmlNS::draw, "image")
, m_imageData(0)
{
    setKeepAspectRatio(true);
}
void KoAspectButton::keyReleaseEvent (QKeyEvent *e) {
    if(e->text() == " ") {
        setKeepAspectRatio(! d->keepAspect);
        e->accept();
    }
}
void KoAspectButton::mouseReleaseEvent (QMouseEvent *ev) {
    if(! isEnabled() || ev->button() != Qt::LeftButton)
        return;
    setKeepAspectRatio(!d->keepAspect);
}