KPrPresentationHighlightStrategy::KPrPresentationHighlightStrategy( KPrPresentationTool * tool )
: KPrPresentationStrategyBase( tool )
{
    m_widget = new KPrPresentationHighlightWidget( canvas() ) ;
    setToolWidgetParent( m_widget );
    m_widget->show();
    m_widget->installEventFilter( m_tool );
}
SCPresentationDrawStrategy::SCPresentationDrawStrategy(SCPresentationTool * tool)
: SCPresentationStrategyBase(tool)
{
    m_widget = new SCPresentationDrawWidget(canvas());
    // TODO
    KIconLoader kicon("showcase");
    QPixmap pix(kicon.loadIcon("pen.png", kicon.Small));
    const qreal factor = 1.2;
    pix = pix.scaledToHeight(pix.height()*factor);
    pix = pix.scaledToWidth(pix.width()*factor);
    QCursor cur(pix);
    QApplication::setOverrideCursor(cur);

    setToolWidgetParent(m_widget);
    m_widget->show();
    m_widget->installEventFilter(m_tool);
}
Exemple #3
0
KPrPresentationBlackStrategy::KPrPresentationBlackStrategy( KPrPresentationTool * tool )
: KPrPresentationStrategyInterface( tool )
, m_blackWidget( new KPrPresentationBlackWidget( canvas() ) )
{
    // TODO
    QString str("kpresenter");
    KIconLoader kicon(str);
    str.clear();
    str.append("black.png");
    QPixmap pix(kicon.loadIcon(str, kicon.Small));
    float factor = 1.0;
    pix = pix.scaledToHeight(pix.height()*factor);
    pix = pix.scaledToWidth(pix.width()*factor);
    QCursor cur = QCursor(pix);
    QApplication::setOverrideCursor(cur);

    setToolWidgetParent( m_blackWidget );
    m_blackWidget->show();
    m_blackWidget->installEventFilter( m_tool );
}
Exemple #4
0
KPrPresentationBlackStrategy::~KPrPresentationBlackStrategy()
{
    setToolWidgetParent( canvas() );
    QApplication::restoreOverrideCursor();
    delete m_blackWidget;
}
SCPresentationDrawStrategy::~SCPresentationDrawStrategy()
{
    setToolWidgetParent(canvas()->canvasWidget());
    QApplication::restoreOverrideCursor();
}
KPrPresentationHighlightStrategy::~KPrPresentationHighlightStrategy()
{
    setToolWidgetParent( canvas()->canvasWidget() );
}