PictureShapeFactory::PictureShapeFactory() : KoShapeFactoryBase(PICTURESHAPEID, i18n("Image")) { setToolTip(i18n("Image shape that can display jpg, png etc.")); setIconName(koIconNameCStr("x-shape-image")); setLoadingPriority(1); QList<QPair<QString, QStringList> > elementNamesList; elementNamesList.append(qMakePair(QString(KoXmlNS::draw), QStringList("image"))); elementNamesList.append(qMakePair(QString(KoXmlNS::svg), QStringList("image"))); setXmlElements(elementNamesList); }
ThreedShapeFactory::ThreedShapeFactory() : KoShapeFactoryBase(THREEDSHAPEID, i18n("3D Scene")) { setToolTip(i18n("Shape that displays a simple 3D scene.")); //KIconLoader::global()->addAppDir("kchart"); setIconName(koIconName("x-shape-3d")); setLoadingPriority(1); // Tell the shape loader which tag we can store QList<QPair<QString, QStringList> > elementNamesList; elementNamesList.append(qMakePair(QString(KoXmlNS::dr3d), QStringList("scene"))); setXmlElements(elementNamesList); }
EllipseShapeFactory::EllipseShapeFactory() : KoShapeFactoryBase(EllipseShapeId, QObject::tr("Ellipse")) { setToolTip(QObject::tr("An ellipse")); setIconName(koIconNameCStr("ellipse-shape")); setFamily("geometric"); setLoadingPriority(1); QList<QPair<QString, QStringList> > elementNamesList; elementNamesList.append(qMakePair(QString(KoXmlNS::draw), QStringList("circle"))); elementNamesList.append(qMakePair(QString(KoXmlNS::draw), QStringList("ellipse"))); elementNamesList.append(qMakePair(QString(KoXmlNS::svg), QStringList("circle"))); elementNamesList.append(qMakePair(QString(KoXmlNS::svg), QStringList("ellipse"))); setXmlElements(elementNamesList); }
AnnotationTextShapeFactory::AnnotationTextShapeFactory() : KoShapeFactoryBase(AnnotationShape_SHAPEID, i18n("Annotation")) { setToolTip(i18n("Annotation shape to show annotation content")); QList<QPair<QString, QStringList> > odfElements; odfElements.append(QPair<QString, QStringList>(KoXmlNS::office, QStringList("annotation"))); setXmlElements(odfElements); KoShapeTemplate t; t.name = i18n("Annotation"); t.iconName = koIconName("x-shape-text"); // Any icon for now :) t.toolTip = i18n("Annotation Shape"); KoProperties *props = new KoProperties(); t.properties = props; props->setProperty("demo", true); addTemplate(t); }