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")); }
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 ); }
StateShapeFactory::StateShapeFactory() : KoShapeFactoryBase(STATESHAPEID, i18n("State Shape")) { setToolTip(i18n("A state shape")); setIconName(koIconName("stateshape")); setXmlElementNames("http://kde.org/braindump", QStringList("state")); }
VideoShapeFactory::VideoShapeFactory() : KoShapeFactoryBase(VIDEOSHAPEID, i18n("Video")) { setToolTip(i18n("Video, embedded or fullscreen")); setIconName(koIconName("video-x-generic")); setXmlElementNames(KoXmlNS::draw, QStringList("plugin")); setLoadingPriority(2); }
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); }
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 }
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); }
KPrPlaceholderShapeFactory::KPrPlaceholderShapeFactory() : KoShapeFactoryBase(KPrPlaceholderShapeId, i18n( "Placeholder shape" ) ) { QStringList elementNames; elementNames << "text-box" << "object" << "image"; setXmlElementNames( KoXmlNS::draw, elementNames ); // use a really high number as we want to be used before the normal shapes try to load it setLoadingPriority( 1000 ); setHidden(true); }
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); }