~ubuntu-branches/ubuntu/edgy/koffice/edgy-updates

« back to all changes in this revision

Viewing changes to kword/tabledia.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040509113300-xi5t1z4yxe7n03x7
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#define tabledia_h
22
22
 
23
23
#include <kdialogbase.h>
24
 
#include <qlist.h>
 
24
#include <qptrlist.h>
25
25
 
26
26
#include "defs.h"
27
 
#include "border.h"
 
27
#include <koborder.h>
28
28
 
29
29
class KWCanvas;
30
30
class KWDocument;
 
31
class KWTableTemplateSelector;
 
32
 
31
33
class QGridLayout;
32
34
class QLabel;
33
35
class QListBox;
35
37
class QCheckBox;
36
38
class QButtonGroup;
37
39
class QComboBox;
 
40
class QSpinBox;
38
41
 
39
42
/******************************************************************/
40
43
/* Class: KWTablePreview                                          */
68
71
 
69
72
public:
70
73
    typedef int CellSize; // in fact KWTableFrameSet::CellSize, which is an enum
71
 
    KWTableDia( QWidget *parent, const char *name, KWCanvas *_canvas, KWDocument *_doc,
72
 
                int rows, int cols, CellSize wid, CellSize hei, bool floating );
 
74
    enum UseMode{ NEW, EDIT };
 
75
    KWTableDia( QWidget *parent, const char *name, UseMode _useMode, KWCanvas *_canvas, KWDocument *_doc,
 
76
                int rows, int cols, CellSize wid, CellSize hei, bool floating , const QString & _templateName,  int format);
73
77
 
74
78
protected:
75
 
    void readTableStyles();
76
79
    void setupTab1( int rows, int cols, CellSize wid, CellSize hei, bool floating );
77
 
    void setupTab2();
 
80
    void setupTab2( const QString &_templateName,  int format);
78
81
 
79
82
    QWidget *tab1;
80
83
    QLabel *lRows, *lCols, *lWid, *lHei;
 
84
    QComboBox *cHei, *cWid;
81
85
    QSpinBox *nRows, *nCols;
82
86
    KWTablePreview *preview;
83
87
    QCheckBox *cbIsFloating;
84
 
 
85
 
    QWidget *tab2;
86
 
    QWidget *preview2;
87
 
    QComboBox *cWid, *cHei;
88
 
    QLabel *lStyles;
89
 
    QListBox *lbStyles;
90
 
    QCheckBox *cbHeaderOnAllPages;
91
 
    QButtonGroup *bgHeader, *bgFirstCol, *bgBody;
92
 
    QCheckBox *cbHBorder, *cbHBack, *cbHFormat;
93
 
    QCheckBox *cbFCBorder, *cbFCBack, *cbFCFormat;
94
 
    QCheckBox *cbBodyBorder, *cbBodyBack, *cbBodyFormat;
95
 
 
96
 
    struct TableStyle {
97
 
        bool hasHeader, hasFirstCol;
98
 
 
99
 
        Border hTop, hBottom, hRight, hLeft;
100
 
        QBrush hBack;
101
 
        Border frTop, frBottom, frRigfrt, frLeft;
102
 
        QBrush frBack;
103
 
        Border bTop, bBottom, bRigbt, bLeft;
104
 
        QBrush bBack;
105
 
    };
106
 
 
107
 
    QList<TableStyle> tableStyles;
108
 
 
 
88
    QCheckBox *cbReapplyTemplate1, *cbReapplyTemplate2;
 
89
 
 
90
    QGridLayout *grid;
 
91
    KWTableTemplateSelector *tableTemplateSelector;
 
92
 
 
93
    UseMode m_useMode;
109
94
    KWCanvas *canvas;
110
95
    KWDocument *doc;
111
96
 
 
97
    int oldRowCount, oldColCount;
 
98
    QString oldTemplateName;
112
99
protected slots:
113
100
    void rowsChanged( int );
114
101
    void colsChanged( int );
 
102
    void slotSetReapply( bool );
115
103
    virtual void slotOk();
 
104
    void slotInlineTable( bool );
116
105
};
117
106
 
118
107
#endif