Esempio n. 1
0
KarbonPart::KarbonPart(QWidget* parentWidget, const char* widgetName, QObject* parent, const char* name, bool singleViewMode)
        : KoDocument(parentWidget, parent, singleViewMode), d(new Private())
{
    Q_UNUSED(widgetName);
    d->document.setResourceManager(resourceManager());

    setObjectName(name);
    setComponentData(KarbonFactory::componentData(), false);
    setTemplateType("karbon_template");
    resourceManager()->setUndoStack(undoStack());

    initConfig();

    // set as default paper
    KoPageLayout pl = pageLayout();
    pl.format = KoPageFormat::defaultFormat();
    pl.orientation = KoPageFormat::Portrait;
    pl.width = MM_TO_POINT(KoPageFormat::width(pl.format, pl.orientation));
    pl.height = MM_TO_POINT(KoPageFormat::height(pl.format, pl.orientation));
    setPageLayout(pl);
}
Esempio n. 2
0
FlowPart::FlowPart(QObject *parent)
    : KoPart(parent)
{
    setTemplateType("flow_template");
    setComponentData(FlowFactory::componentData());
}
Esempio n. 3
0
Part::Part(QObject *parent)
    : KoPart(parent)
{
    setComponentData( Factory::global(), false ); // Do not load plugins now (the view will load them)
    setTemplateType( "plan_template" );
}
Esempio n. 4
0
KPrPart::KPrPart(QObject *parent)
    : KoPart(parent)
{
    setTemplateType("stage_template");
    setComponentData(KPrFactory::componentData());
}
Esempio n. 5
0
CAuPart::CAuPart(QObject *parent)
    : KWPart(parent)
{
    setComponentData(CAuFactory::componentData());
    setTemplateType("words_template");
}