KoFormulaShapeFactory::KoFormulaShapeFactory() : KoShapeFactoryBase(KoFormulaShapeId, i18n( "Formula" ) ) { setToolTip(i18n( "A formula")); setIcon( "x-shape-formula" ); // The following lines let the formula shape load both embedded and // inline formulas. // // The line below tells the shape registry which XML elements that // the shape supports. // // FIXME: Find out if inline formulas are supported by ODF. QList<QPair<QString, QStringList> > elementNamesList; elementNamesList.append(qMakePair(QString(KoXmlNS::draw), QStringList("object"))); elementNamesList.append(qMakePair(QString(KoXmlNS::math), QStringList("math"))); setOdfElements(elementNamesList); setLoadingPriority( 1 ); /* KoShapeTemplate t; t.id = KoFormulaShapeId; t.name = i18n("Formula"); t.toolTip = i18n("A formula"); t.icon = ""; //TODO add it props = new KoProperties(); t.properties = props; addTemplate( t );*/ }
VectorShapeFactory::VectorShapeFactory() : KoShapeFactoryBase(VectorShape_SHAPEID, i18n("Vector image")) { setToolTip(i18n("A shape that shows a vector image (EMF/WMF/SVM)")); setIconName(koIconNameNeededWithSubs("a generic vector image icon", "x-shape-vectorimage", "application-x-wmf")); setXmlElementNames(KoXmlNS::draw, QStringList("image")); setLoadingPriority(5); }
ArtworkCalligraphicShapeFactory::ArtworkCalligraphicShapeFactory(QObject *parent) : KShapeFactoryBase(parent, ArtworkCalligraphicShapeId, i18n("A calligraphic shape")) { setToolTip(i18n("Calligraphic Shape")); setIcon("calligraphy"); setLoadingPriority(1); setHidden(true); }
MusicShapeFactory::MusicShapeFactory() : KoShapeFactoryBase(MusicShapeId, i18n( "Music Shape" ) ) { setToolTip( i18n( "A shape which provides a music editor" ) ); setIconName(koIconNameCStrNeededWithSubs("icon for the Music Shape","musicshape", "music-note-16th")); setXmlElementNames( "http://www.calligra.org/music", QStringList("shape") ); setLoadingPriority( 1 ); }
SpiralShapeFactory::SpiralShapeFactory() : KoShapeFactoryBase(SpiralShapeId, QObject::tr("Spiral")) { setToolTip(QObject::tr("A spiral shape")); setIconName(koIconNameCStr("spiral-shape")); setFamily("geometric"); setLoadingPriority(1); }
SpiralShapeFactory::SpiralShapeFactory(QObject *parent) : KShapeFactoryBase(parent, SpiralShapeId, i18n("Spiral")) { setToolTip(i18n("A spiral shape")); setIcon("spiral-shape"); setFamily("geometric"); setLoadingPriority(1); }
ArtisticTextShapeFactory::ArtisticTextShapeFactory() : KoShapeFactoryBase(ArtisticTextShapeID, i18n("ArtisticTextShape")) { setToolTip(i18n("A shape which shows a single text line")); setIconName(koIconNameCStr("x-shape-text")); setLoadingPriority( 5 ); setXmlElementNames(KoXmlNS::svg, QStringList("text")); }
KarbonCalligraphicShapeFactory::KarbonCalligraphicShapeFactory() : KoShapeFactoryBase(KarbonCalligraphicShapeId, i18n("A calligraphic shape")) { setToolTip(i18n("Calligraphic Shape")); setIconName(koIconName("calligraphy")); setLoadingPriority(1); setHidden(true); }
VideoShapeFactory::VideoShapeFactory() : KoShapeFactoryBase(VIDEOSHAPEID, i18n("Video")) { setToolTip(i18n("Video, embedded or fullscreen")); setIconName(koIconName("video-x-generic")); setXmlElementNames(KoXmlNS::draw, QStringList("plugin")); setLoadingPriority(2); }
KoRectangleShapeFactory::KoRectangleShapeFactory( QObject *parent ) : KoShapeFactory( parent, KoRectangleShapeId, i18n( "A rectangle shape" ) ) { setToolTip( i18n( "A rectangle" ) ); setIcon("rectangle-shape"); setFamily("geometric"); setOdfElementNames( KoXmlNS::draw, QStringList( "rect" ) ); setLoadingPriority( 1 ); }
KoConnectionShapeFactory::KoConnectionShapeFactory() : KoShapeFactoryBase(KOCONNECTIONSHAPEID, i18n("Tie")) { setToolTip(i18n("A connection between two other shapes")); setIconName(koIconNameCStr("x-shape-connection")); setXmlElementNames(KoXmlNS::draw, QStringList("connector")); setLoadingPriority(1); setHidden(true); // Don't show this shape in collections. Only ConnectionTool should create }
KPrPlaceholderShapeFactory::KPrPlaceholderShapeFactory( QObject *parent ) : KoShapeFactory( parent, KPrPlaceholderShapeId, i18n( "Placeholder shape" ) ) { QStringList elementNames; elementNames << "text-box" << "object" << "image"; setOdfElementNames( KoXmlNS::draw, elementNames ); // use a really high number as we want to be used before the normal shapes try to load it setLoadingPriority( 1000 ); }
KexiRelationDesignFactory::KexiRelationDesignFactory() : KoShapeFactoryBase("KexiRelationDesignShape", i18n("Kexi Relation Design")) { setToolTip(i18n("A kexi relation design shape")); setIconName(koIconNameCStr("calligrakexi")); setXmlElementNames("http://www.calligra.org/kexirelationdesign", QStringList("shape")); setLoadingPriority(1); }
SvgShapeFactory::SvgShapeFactory() : KoShapeFactoryBase(SVGSHAPEFACTORYID, QObject::tr("Embedded svg shape")) { setLoadingPriority(10); setXmlElementNames(QString(KoXmlNS::draw), QStringList("image")); // hide from add shapes docker as the shape is not able to be dragged onto // the canvas as createDefaultShape returns 0. setHidden(true); }
KoPathShapeFactory::KoPathShapeFactory(const QStringList&) : KoShapeFactoryBase(KoPathShapeId, i18n("Simple path shape")) { setToolTip(i18n("A simple path shape")); setIconName(koIconName("pathshape")); QStringList elementNames; elementNames << "path" << "line" << "polyline" << "polygon"; setXmlElementNames(KoXmlNS::draw, elementNames); setLoadingPriority(0); }
EllipseShapeFactory::EllipseShapeFactory() : KoShapeFactoryBase(EllipseShapeId, i18n("Ellipse")) { setToolTip(i18n( "An ellipse")); setIcon("ellipse-shape"); setFamily("geometric"); QStringList elementNames; elementNames << "ellipse" << "circle"; setOdfElementNames(KoXmlNS::draw, elementNames); setLoadingPriority(1); }
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); }
TextShapeFactory::TextShapeFactory(QObject *parent) : KShapeFactoryBase(parent, TextShape_SHAPEID, i18n("Text")) { setToolTip(i18n("A shape that shows text")); QList<QPair<QString, QStringList> > odfElements; odfElements.append(QPair<QString, QStringList>(KOdfXmlNS::draw, QStringList("text-box"))); odfElements.append(QPair<QString, QStringList>(KOdfXmlNS::table, QStringList("table"))); setOdfElements(odfElements); setLoadingPriority(1); KoShapeTemplate t; t.name = i18n("Text"); t.icon = "x-shape-text"; t.toolTip = i18n("Text Shape"); KProperties *props = new KProperties(); t.properties = props; props->setProperty("demo", true); addTemplate(t); }
StarShapeFactory::StarShapeFactory() : KoShapeFactoryBase(StarShapeId, i18n("A star shape")) { setToolTip(i18n("A star")); setIconName(koIconNameCStr("star-shape")); QStringList elementNames; elementNames << "regular-polygon" << "custom-shape"; setXmlElementNames(KoXmlNS::draw, elementNames); setLoadingPriority(5); KoShapeTemplate t; t.id = KoPathShapeId; t.templateId = "star"; t.name = i18n("Star"); t.family = "geometric"; t.toolTip = i18n("A star"); t.iconName = koIconName("star-shape"); KoProperties *props = new KoProperties(); props->setProperty("corners", 5); QVariant v; v.setValue(QColor(Qt::yellow)); props->setProperty("background", v); t.properties = props; addTemplate(t); t.id = KoPathShapeId; t.templateId = "flower"; t.name = i18n("Flower"); t.family = "funny"; t.toolTip = i18n("A flower"); t.iconName = koIconName("flower-shape"); props = new KoProperties(); props->setProperty("corners", 5); props->setProperty("baseRadius", 10.0); props->setProperty("tipRadius", 50.0); props->setProperty("baseRoundness", 0.0); props->setProperty("tipRoundness", 40.0); v.setValue(QColor(Qt::magenta)); props->setProperty("background", v); t.properties = props; addTemplate(t); t.id = KoPathShapeId; t.templateId = "pentagon"; t.name = i18n("Pentagon"); t.family = "geometric"; t.toolTip = i18n("A pentagon"); t.iconName = koIconName("pentagon-shape"); props = new KoProperties(); props->setProperty("corners", 5); props->setProperty("convex", true); props->setProperty("tipRadius", 50.0); props->setProperty("tipRoundness", 0.0); v.setValue(QColor(Qt::blue)); props->setProperty("background", v); t.properties = props; addTemplate(t); t.id = KoPathShapeId; t.templateId = "hexagon"; t.name = i18n("Hexagon"); t.family = "geometric"; t.toolTip = i18n("A hexagon"); t.iconName = koIconName("hexagon-shape"); props = new KoProperties(); props->setProperty("corners", 6); props->setProperty("convex", true); props->setProperty("tipRadius", 50.0); props->setProperty("tipRoundness", 0.0); v.setValue(QColor(Qt::blue)); props->setProperty("background", v); t.properties = props; addTemplate(t); }