summaryrefslogtreecommitdiffstats
path: root/kspread/KSpreadTableIface.h
blob: a1244ad5304c3180ac3ef21b2381accc62455ced (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/* This file is part of the KDE project
   
   Copyright 2000, 2003 Laurent Montel <[email protected]>
   Copyright 2002-2003 Joseph Wenninger <[email protected]>
   Copyright 2002 Philipp Mueller <[email protected]>
   Copyright 2002 Ariya Hidayat <[email protected]>
   Copyright 2002 John Dailey <[email protected]>
   Copyright 1999 Torben Weis <[email protected]>

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
*/

#ifndef KSPREAD_TABLE_IFACE_H
#define KSPREAD_TABLE_IFACE_H

#include <dcopobject.h>
#include <dcopref.h>

#include <tqstring.h>

namespace KSpread
{
class Sheet;
class CellProxy;

class SheetIface : virtual public DCOPObject
{
    K_DCOP
public:
    SheetIface( Sheet* );
    ~SheetIface();

    bool processDynamic( const TQCString& fun, const TQByteArray& data,
			 TQCString& replyType, TQByteArray &replyData );

    void sheetNameHasChanged();
k_dcop:
    virtual DCOPRef cell( int x, int y );
    virtual DCOPRef cell( const TQString& name );

    virtual DCOPRef column( int _col );
    virtual DCOPRef row( int _row );

    virtual TQString name() const;
    virtual int maxColumn() const;
    virtual int maxRow() const;
    virtual bool setSheetName( const TQString & name);


    virtual bool insertColumn( int col,int nbCol );
    virtual bool insertRow( int row,int nbRow);
    virtual void removeColumn( int col,int nbCol );
    virtual void removeRow( int row,int nbRow );

    virtual bool isHidden()const;
    virtual bool areaHasNoContent(TQRect area) const ;
    virtual bool areaHasNoComments(TQRect area) const ;

    virtual bool showGrid() const;
    virtual bool showFormula() const;
    virtual bool lcMode() const;
    virtual bool autoCalc() const;
    virtual bool showColumnNumber() const;
    virtual bool hideZero() const;
    virtual bool firstLetterUpper() const;
    virtual void setShowPageBorders( bool b );

    virtual float paperHeight() const;
    virtual float paperWidth() const ;
    virtual float leftBorder() const;
    virtual float rightBorder() const;
    virtual float topBorder() const;
    virtual float bottomBorder() const;
    TQString paperFormatString() const;

    TQString headLeft()const;
    TQString headMid()const;
    TQString headRight()const;
    TQString footLeft()const;
    TQString footMid()const;
    TQString footRight()const;

    void setHeaderLeft(const TQString & text);
    void setHeaderMiddle(const TQString & text);
    void setHeaderRight(const TQString & text);
    void setFooterLeft(const TQString & text);
    void setFooterMiddle(const TQString & text);
    void setFooterRight(const TQString & text);
    bool isProtected() const;
private:
    Sheet* m_sheet;
    CellProxy* m_proxy;
    TQCString ident;
};

} // namespace KSpread

#endif