~ubuntu-branches/ubuntu/breezy/koffice/breezy-security

« back to all changes in this revision

Viewing changes to kspread/kspread_editors.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef __kspread_editors_h__
2
2
#define __kspread_editors_h__
3
3
 
4
 
#include <klineedit.h>
5
4
#include <kcompletion.h>
6
 
 
 
5
#include <qwidget.h>
7
6
class KSpreadCell;
8
7
class KSpreadCanvas;
9
8
 
10
9
 
11
 
class QWidget;
12
 
 
 
10
class QFont;
 
11
class KLineEdit;
13
12
class KSpreadCellEditor : public QWidget
14
13
{
15
14
    Q_OBJECT
17
16
    KSpreadCellEditor( KSpreadCell*, KSpreadCanvas* _parent = 0, const char* _name = 0 );
18
17
    ~KSpreadCellEditor();
19
18
 
20
 
    KSpreadCell* cell() { return m_pCell; }
 
19
    KSpreadCell* cell()const { return m_pCell; }
21
20
 
22
21
    virtual void handleKeyPressEvent( QKeyEvent* _ev ) = 0;
 
22
    virtual void setEditorFont(QFont const & font, bool updateSize) = 0;
23
23
    virtual QString text() const = 0;
24
24
    virtual void setText(QString text) = 0;
25
25
    virtual int cursorPosition() const = 0;
26
26
    virtual void setCursorPosition(int pos) = 0;
27
27
    // virtual void setFocus() = 0;
28
28
    virtual void insertFormulaChar(int c) = 0;
29
 
 
30
 
    KSpreadCanvas* canvas() { return m_pCanvas; }
 
29
    virtual void cut(){};
 
30
    virtual void paste(){};
 
31
    virtual void copy(){};
 
32
    KSpreadCanvas* canvas()const { return m_pCanvas; }
31
33
 
32
34
private:
33
35
    KSpreadCell* m_pCell;
42
44
    ~KSpreadTextEditor();
43
45
 
44
46
    virtual void handleKeyPressEvent( QKeyEvent* _ev );
 
47
    virtual void setEditorFont(QFont const & font, bool updateSize);
45
48
    virtual QString text() const;
46
49
    virtual void setText(QString text);
47
50
    virtual int cursorPosition() const;
48
51
    virtual void setCursorPosition(int pos);
49
52
    // virtual void setFocus();
50
53
    virtual void insertFormulaChar(int c);
51
 
 
52
 
    void checkChoose();
 
54
    virtual void cut();
 
55
    virtual void paste();
 
56
    virtual void copy();
 
57
    bool checkChoose();
53
58
    void blockCheckChoose( bool b ) { m_blockCheck = b; }
 
59
    bool sizeUpdate() const { return m_sizeUpdate; }
54
60
 
55
61
private slots:
56
62
    void slotTextChanged( const QString& text );
67
73
    //QLineEdit* m_pEdit;
68
74
    KLineEdit* m_pEdit;
69
75
    bool m_blockCheck;
 
76
    bool m_sizeUpdate;
 
77
    uint m_length;
 
78
    int  m_fontLength;
70
79
};
71
80
 
72
81