Ejemplo n.º 1
0
bool UDiskMountDevice::update()
{
    bool res = false;
    res = setLabel(calcLabel()) || res;
    res = setIsExternal(calcIsExternal()) || res;
    res = setMediaType(calcMediaType()) || res;
    res = setIconName(calcIconName()) || res;

    res = setIsMounted(mDbus->property("DeviceIsMounted").toBool()) || res;

    if (mDbus->property("DeviceIsDrive").toBool())
        res = setIsEjectable(mDbus->property("DriveIsMediaEjectable").toBool());

    res = setSize(mDbus->property("DeviceSize").toULongLong()) || res;
    res = setVendor(mDbus->property("DriveVendor").toString()) || res;
    res = setModel(mDbus->property("DriveModel").toString()) || res;
    res = setFileSystem(mDbus->property("IdType").toString()) || res;

    QStringList paths = mDbus->property("DeviceMountPaths").toStringList();
    if (!paths.empty())
        res = setMountPath(paths.first()) || res;

    if (res)
        emit changed();

    return res;
}
Ejemplo n.º 2
0
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);
}
Ejemplo n.º 3
0
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 );
}
Ejemplo n.º 4
0
SpiralShapeFactory::SpiralShapeFactory()
: KoShapeFactoryBase(SpiralShapeId, QObject::tr("Spiral"))
{
    setToolTip(QObject::tr("A spiral shape"));
    setIconName(koIconNameCStr("spiral-shape"));
    setFamily("geometric");
    setLoadingPriority(1);
}
KarbonFilterEffectsToolFactory::KarbonFilterEffectsToolFactory()
    : KoToolFactoryBase("KarbonFilterEffectsTool")
{
    setToolTip(i18n("Filter effects editing"));
    setToolType("karbon,krita");
    setIconName(koIconNameCStr("tool_imageeffects")); // TODO: better icon, e.g. black Fx bad on dark UI
    setPriority(3);
}
Ejemplo n.º 6
0
KarbonPatternToolFactory::KarbonPatternToolFactory()
    : KoToolFactoryBase("KarbonPatternTool")
{
    setToolTip(i18n("Pattern editing"));
    setSection(mainToolType());
    setIconName(koIconNameCStr("pattern"));
    setPriority(8);
}
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"));
}
Ejemplo n.º 8
0
VideoShapeFactory::VideoShapeFactory()
    : KoShapeFactoryBase(VIDEOSHAPEID, i18n("Video"))
{
    setToolTip(i18n("Video, embedded or fullscreen"));
    setIconName(koIconName("video-x-generic"));
    setXmlElementNames(KoXmlNS::draw, QStringList("plugin"));
    setLoadingPriority(2);
}
Ejemplo n.º 9
0
KoPABackgroundToolFactory::KoPABackgroundToolFactory()
    : KoToolFactoryBase("KoPABackgroundTool")
{
    setToolType("calligraflow, calligrastage");
    setActivationShapeId("flake/always");
    setIconName(koIconName("backgroundtool"));
    setPriority(3);
}
Ejemplo n.º 10
0
StateShapeFactory::StateShapeFactory()
    : KoShapeFactoryBase(STATESHAPEID,
                         i18n("State Shape"))
{
    setToolTip(i18n("A state shape"));
    setIconName(koIconName("stateshape"));
    setXmlElementNames("http://kde.org/braindump", QStringList("state"));
}
Ejemplo n.º 11
0
KarbonCalligraphicShapeFactory::KarbonCalligraphicShapeFactory()
        : KoShapeFactoryBase(KarbonCalligraphicShapeId, i18n("A calligraphic shape"))
{
    setToolTip(i18n("Calligraphic Shape"));
    setIconName(koIconName("calligraphy"));
    setLoadingPriority(1);
    setHidden(true);
}
Ejemplo n.º 12
0
ArtisticTextToolFactory::ArtisticTextToolFactory()
    : KoToolFactoryBase("ArtisticTextTool")
{
    setToolTip(i18n("Artistic text editing"));
    setToolType(dynamicToolType());
    setIconName(koIconNameCStr("artistic_text"));
    setPriority(1);
    setActivationShapeId(ArtisticTextShapeID);
}
Ejemplo n.º 13
0
KPrAnimationToolFactory::KPrAnimationToolFactory()
    : KoToolFactoryBase("Animation Tool")
{
    setToolTip(i18n("Animation"));
    setToolType("calligrastage");
    setPriority(40);
    setIconName(koIconName("animation-stage"));
    setActivationShapeId("flake/edit");
}
Ejemplo n.º 14
0
KoPencilToolFactory::KoPencilToolFactory()
        : KoToolFactoryBase("KoPencilTool")
{
    setToolTip(i18n("Freehand path"));
    setToolType("karbon, krita");
    setIconName(koIconNameCStr("draw-freehand"));
    setPriority(3);
    setActivationShapeId("flake/edit");
}
Ejemplo n.º 15
0
WebToolFactory::WebToolFactory()
    : KoToolFactoryBase("WebToolFactoryID")
{
    setToolTip(i18n("Web shape editing"));
    setToolType(dynamicToolType());
    setIconName(koIconNameCStr("applications-internet"));
    setPriority(1);
    setActivationShapeId(WEBSHAPEID);
}
Ejemplo n.º 16
0
TextToolFactory::TextToolFactory()
        : KoToolFactoryBase("TextTool")
{
    setToolTip(i18n("Text editing"));
    setToolType(dynamicToolType()+",calligrawords,calligraauthor");
    setIconName(koIconNameCStr("tool-text"));
    setPriority(1);
    setActivationShapeId(TextShape_SHAPEID "," AnnotationShape_SHAPEID);
}
ReferencesToolFactory::ReferencesToolFactory()
        : KoToolFactoryBase("ReferencesToolFactory_ID")
{
    setToolTip(i18n("References"));
    setToolType("calligrawords");
    setIconName(koIconNameCStr("tool_references"));
    setPriority(20);
    setActivationShapeId(TextShape_SHAPEID);
}
Ejemplo n.º 18
0
KoPanToolFactory::KoPanToolFactory()
        : KoToolFactoryBase(KoPanTool_ID)
{
    setToolTip(i18n("Pan"));
    setToolType(navigationToolType());
    setPriority(5);
    setIconName(koIconName("hand"));
    setActivationShapeId("flake/always");
}
Ejemplo n.º 19
0
KoZoomToolFactory::KoZoomToolFactory()
        : KoToolFactoryBase("ZoomTool")
{
    setToolTip(i18n("Zoom"));
    setSection(navigationToolType());
    setPriority(0);
    setIconName(koIconNameCStr("tool_zoom"));
    setActivationShapeId("flake/always");
}
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);
}
Ejemplo n.º 21
0
KarbonCalligraphyToolFactory::KarbonCalligraphyToolFactory()
        : KoToolFactoryBase("KarbonCalligraphyTool")
{
    setToolTip(i18n("Calligraphy"));
    setToolType("karbon,krita");
    setIconName(koIconNameCStr("calligraphy"));
    setPriority(3);
    setActivationShapeId("flake/edit");
}
Ejemplo n.º 22
0
KGuiItem::KGuiItem( const QString &text,    const QString &iconName,
                    const QString &toolTip, const QString &whatsThis )
{
    d = new KGuiItemPrivate;
    d->m_text = text;
    d->m_toolTip = toolTip;
    d->m_whatsThis = whatsThis;
    setIconName( iconName );
}
KoCreatePathToolFactory::KoCreatePathToolFactory()
        : KoToolFactoryBase(KoCreatePathTool_ID)
{
    setToolTip(QObject::tr("Create Path"));
    setToolType(mainToolType());
    setPriority(2);
    setIconName(koIconNameCStr("createpath"));
    setActivationShapeId("flake/edit");
}
Ejemplo n.º 24
0
KWPageToolFactory::KWPageToolFactory()
    : KoToolFactoryBase("PageToolFactory_ID")
{
    setToolTip(i18n("Page layout"));
    setToolType(dynamicToolType()+",calligrawords, calligraauthor");
    setIconName(koIconNameCStr("tool_pagelayout"));
    setPriority(25);
    setActivationShapeId("flake/always");
}
Ejemplo n.º 25
0
StateToolFactory::StateToolFactory()
    : KoToolFactoryBase("StateToolFactoryID")
{
    setToolTip(i18n("State Tool"));
    setToolType(dynamicToolType());
    setIconName(koIconNameCStr("statetool"));
    setPriority(1);
    setActivationShapeId(STATESHAPEID);
}
Ejemplo n.º 26
0
KoPathToolFactory::KoPathToolFactory()
        : KoToolFactoryBase("PathToolFactoryId")
{
    setToolTip(i18n("Path editing"));
    setToolType(dynamicToolType());
    setIconName(koIconNameCStr("editpath"));
    setPriority(2);
    setActivationShapeId(KoPathShapeId);
}
SimpleEntryToolFactory::SimpleEntryToolFactory()
    : KoToolFactoryBase("SimpleEntryToolFactoryId")
{
    setToolTip( i18n( "Music editing" ) );
    setIconName(koIconNameCStr("music-note-16th"));
    setToolType( dynamicToolType() );
    setPriority( 1 );
    setActivationShapeId( MusicShapeId );
}
Ejemplo n.º 28
0
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
}
Ejemplo n.º 29
0
KarbonGradientToolFactory::KarbonGradientToolFactory()
        : KoToolFactoryBase("KarbonGradientTool")
{
    setToolTip(i18n("Gradient editing"));
    setToolType("karbon");
    setIconName(koIconName("gradient"));
    // or probably rather "fill-gradient", please request that icon on TechBase
    setPriority(3);
}
Ejemplo n.º 30
0
VectorToolFactory::VectorToolFactory()
    : KoToolFactoryBase("VectorToolFactoryId")
{
    setToolTip(i18n("Vector Image (EMF/WMF/SVM/SVG) tool"));
    setIconName(koIconNameNeededWithSubs("a generic vector image icon", "x-shape-vectorimage", "application-x-wmf"));
    setToolType( dynamicToolType() );
    setPriority( 1 );
    setActivationShapeId( VectorShape_SHAPEID );
}