1
1
/* This file is part of the KDE project
2
2
Copyright (C) 2001 Andrea Rizzi <rizzi@kde.org>
3
Ulrich Kuettler <ulrich.kuettler@mailbox.tu-dresden.de>
4
2006 Martin Pfeiffer <hubipete@gmx.net>
3
Ulrich Kuettler <ulrich.kuettler@mailbox.tu-dresden.de>
4
2006 Martin Pfeiffer <hubipete@gmx.net>
5
* Copyright (C) 2010 Boudewijn Rempt <boud@kogmbh.com>
6
7
This library is free software; you can redistribute it and/or
7
8
modify it under the terms of the GNU Library General Public
8
9
License as published by the Free Software Foundation; either
26
27
#include "KFormulaPartFactory.h"
27
28
#include "KFormulaConfigDialog.h"
28
29
#include "KFormulaCanvas.h"
29
#include <KoCanvasController.h>
30
#include <KoCanvasControllerWidget.h>
30
31
#include <KoZoomHandler.h>
31
32
#include <kstandardaction.h>
32
33
#include <kaction.h>
50
51
m_formulaCanvas = new KFormulaCanvas( this, m_partDocument );
51
52
m_zoomHandler = new KoZoomHandler();
52
m_canvasController = new KoCanvasController( this );
53
m_canvasController = new KoCanvasControllerWidget( this );
53
54
m_canvasController->setCanvas( m_formulaCanvas );
55
56
if ( !doc->isReadWrite() )
87
88
m_addBracketAction = new KAction( KIcon("paren"), i18n("Add Bracket"),
88
actionCollection(), "addbracket" );
89
actionCollection(), "addbracket" );
90
91
// m_addBracketAction->set... ;
91
92
m_addFractionAction = new KAction( KIcon("frac"), i18n("Add Fraction"),
92
actionCollection(), "addfraction" );
93
actionCollection(), "addfraction" );
93
94
m_addRootAction = new KAction( KIcon("sqrt"), i18n("Add Root"),
94
actionCollection(), "addroot" );
95
actionCollection(), "addroot" );
95
96
m_addSumAction = new KAction( KIcon("sum"), i18n("Add Sum"),
96
actionCollection(), "addsum" );
97
actionCollection(), "addsum" );
97
98
m_addProductAction = new KAction( KIcon("prod"), i18n("Add Product"),
98
actionCollection(), "addproduct" );
99
actionCollection(), "addproduct" );
99
100
m_addIntegralAction = new KAction( KIcon("int"), i18n("Add Integral"),
100
actionCollection(), "addintegral" );
101
actionCollection(), "addintegral" );
101
102
m_addMatrixAction = new KAction( KIcon("matrix"), i18n("Add Matrix"),
102
actionCollection(), "addmatrix" );
103
actionCollection(), "addmatrix" );
103
104
m_addUpperLeftAction;
104
105
m_addLowerLeftAction;
105
106
m_addUpperRightAction;
147
148
void KFormulaPartView::resizeEvent( QResizeEvent * )
149
m_canvasController->setGeometry( 0, 0, width(), height() );
150
static_cast<KoCanvasControllerWidget*>(m_canvasController)->setGeometry( 0, 0, width(), height() );
152
153
void KFormulaPartView::cursorChanged( bool visible, bool selecting )