~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kformula/KFormulaPartView.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
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>
5
 
 
 
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
                 
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>
49
50
 
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 );
54
55
 
55
56
    if ( !doc->isReadWrite() )
85
86
    m_pasteAction;
86
87
 
87
88
    m_addBracketAction = new KAction( KIcon("paren"), i18n("Add Bracket"),
88
 
                                      actionCollection(), "addbracket" );
 
89
                                      actionCollection(), "addbracket" );
89
90
//    connect();
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;
146
147
 
147
148
void KFormulaPartView::resizeEvent( QResizeEvent * )
148
149
{
149
 
    m_canvasController->setGeometry( 0, 0, width(), height() );
 
150
    static_cast<KoCanvasControllerWidget*>(m_canvasController)->setGeometry( 0, 0, width(), height() );
150
151
}
151
152
 
152
153
void KFormulaPartView::cursorChanged( bool visible, bool selecting )