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

« back to all changes in this revision

Viewing changes to kpresenter/footer_header.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:
1
 
/* This file is part of the KDE project
2
 
   Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3
 
 
4
 
   This library is free software; you can redistribute it and/or
5
 
   modify it under the terms of the GNU Library General Public
6
 
   License as published by the Free Software Foundation; either
7
 
   version 2 of the License, or (at your option) any later version.
8
 
 
9
 
   This library is distributed in the hope that it will be useful,
10
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
 
   Library General Public License for more details.
13
 
 
14
 
   You should have received a copy of the GNU Library General Public License
15
 
   along with this library; see the file COPYING.LIB.  If not, write to
16
 
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
 
   Boston, MA 02111-1307, USA.
18
 
*/
19
 
 
20
 
#ifndef FOOTER_HEADER_H
21
 
#define FOOTER_HEADER_H
22
 
 
23
 
#include <qvbox.h>
24
 
#include <ktoolbar.h>
25
 
 
26
 
class KPresenterDoc;
27
 
class KToolBar;
28
 
 
29
 
class QTabWidget;
30
 
class QCheckBox;
31
 
class QPushButton;
32
 
class QColor;
33
 
class QFont;
34
 
 
35
 
/******************************************************************/
36
 
/* Class: KPFooterHeaderEditor                                    */
37
 
/******************************************************************/
38
 
 
39
 
class KPFooterHeaderEditor : public QVBox
40
 
{
41
 
    Q_OBJECT
42
 
 
43
 
public:
44
 
    KPFooterHeaderEditor( KPresenterDoc *_doc );
45
 
    ~KPFooterHeaderEditor();
46
 
 
47
 
    void allowClose()
48
 
    { _allowClose = true; }
49
 
 
50
 
    void updateSizes();
51
 
 
52
 
    void setShowHeader( bool b );
53
 
    void setShowFooter( bool b );
54
 
 
55
 
protected:
56
 
    void setupHeader();
57
 
    void setupFooter();
58
 
 
59
 
    void resizeEvent( QResizeEvent *e ) {
60
 
        QVBox::resizeEvent( e );
61
 
        htool2->updateRects( true );
62
 
        ftool2->updateRects( true );
63
 
    }
64
 
    void closeEvent( QCloseEvent *e ) {
65
 
        // this dialog must not get closed!!
66
 
        if ( !_allowClose ) {
67
 
            hide();
68
 
            e->ignore();
69
 
        } else {
70
 
            QVBox::closeEvent( e );
71
 
        }
72
 
    }
73
 
 
74
 
    QTabWidget *tabwidget;
75
 
    QCheckBox *showHeader, *showFooter;
76
 
    QPushButton *updatePage, *closeDia, *penBrush1, *penBrush2;
77
 
    KToolBar *htool2, *ftool2;
78
 
 
79
 
    KPresenterDoc *doc;
80
 
    bool _allowClose;
81
 
 
82
 
    int h_bold, h_italic, h_underline, h_color, h_aleft, h_acenter, h_aright, h_font, h_size, h_pgnum;
83
 
    int f_bold, f_italic, f_underline, f_color, f_aleft, f_acenter, f_aright, f_font, f_size, f_pgnum;
84
 
 
85
 
public slots:
86
 
    void slotCloseDia();
87
 
 
88
 
protected slots:
89
 
    void slotShowHeader();
90
 
    void slotShowFooter();
91
 
    void slotUpdatePage();
92
 
    void slotHeaderPenBrush();
93
 
    void slotFooterPenBrush();
94
 
 
95
 
    void headerFont( const QString &f );
96
 
    void headerSize( const QString &s );
97
 
    void headerBold();
98
 
    void headerItalic();
99
 
    void headerUnderline();
100
 
    void headerColor();
101
 
    void headerAlignLeft();
102
 
    void headerAlignCenter();
103
 
    void headerAlignRight();
104
 
    void headerInsertPageNum();
105
 
 
106
 
    void footerFont( const QString &f );
107
 
    void footerSize( const QString &s );
108
 
    void footerBold();
109
 
    void footerItalic();
110
 
    void footerUnderline();
111
 
    void footerColor();
112
 
    void footerAlignLeft();
113
 
    void footerAlignCenter();
114
 
    void footerAlignRight();
115
 
    void footerInsertPageNum();
116
 
 
117
 
    void headerFontChanged( const QFont & );
118
 
    void headerColorChanged( const QColor &c );
119
 
    void headerAlignChanged( int ha );
120
 
 
121
 
    void footerFontChanged( const QFont &f );
122
 
    void footerColorChanged( const QColor &c );
123
 
    void footerAlignChanged( int ha );
124
 
 
125
 
    void tabSelected( const QString &s );
126
 
 
127
 
};
128
 
 
129
 
#endif