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

« back to all changes in this revision

Viewing changes to kugar/shell_qt/kugarview.cpp

  • 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
/**************************************************************************
 
2
                                                  KugarView.cpp  -  description
 
3
                                                         -------------------
 
4
        begin                            : 2003-03-13 11:12:40
 
5
        copyright                        : (C) 2003 by Joris Marcillac
 
6
        email                            : jorismarcillac@ifrance.com
 
7
**************************************************************************/
 
8
 
 
9
/**************************************************************************
 
10
*                                                                         *
 
11
*   This program is free software; you can redistribute it and/or modify  *
 
12
*   it under the terms of the GNU General Public License as published by  *
 
13
*   the Free Software Foundation; either version 2 of the License, or     *
 
14
*   (at your option) any later version.                                   *
 
15
*                                                                         *
 
16
*       This program is distributed in the hope that it will be useful,   *
 
17
*       but WITHOUT ANY WARRANTY; without even the implied warranty of    *
 
18
*       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *
 
19
*       Library General Public License for more details.                  *
 
20
*                                                                         *
 
21
*       You should have received a copy of the GNU Library General Public *
 
22
*       License along with this library; if not, write to the Free        *
 
23
*       Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,   *
 
24
*       MA 02111-1307, USA                                                *
 
25
*                                                                         *
 
26
**************************************************************************/
 
27
#include <qwidget.h>
 
28
#include "kugarview.h"
 
29
#include <mreportviewer.h>
 
30
 
 
31
class KugarViewPrivate : public MReportViewer, public QShared
 
32
{
 
33
public:
 
34
 
 
35
        KugarViewPrivate(QWidget *parent=0, const char *name=0)
 
36
                :MReportViewer( parent, name )
 
37
        {
 
38
        }
 
39
 
 
40
        virtual ~KugarViewPrivate()
 
41
        {
 
42
        }
 
43
};
 
44
 
 
45
//    Constructs an empty report.
 
46
KugarView::KugarView(QWidget *parent, const char *name)
 
47
{
 
48
    d = new KugarViewPrivate( parent, name );
 
49
        Q_CHECK_PTR(d);
 
50
}
 
51
//      Constructs a copy of \a other.
 
52
KugarView::KugarView( const KugarView& other )
 
53
    : d( other.d )
 
54
{
 
55
    d->ref();
 
56
}
 
57
 
 
58
//    Sets the report equal to \a other.
 
59
KugarView& KugarView::operator=( const KugarView& other )
 
60
{
 
61
    other.d->ref();
 
62
    deref();
 
63
    d = other.d;
 
64
    return *this;
 
65
}
 
66
 
 
67
void KugarView::deref()
 
68
{
 
69
    if ( d->deref() ) {
 
70
        delete d;
 
71
        d = 0;
 
72
    }
 
73
}
 
74
 
 
75
KugarView::~KugarView()
 
76
{
 
77
    deref();
 
78
}
 
79
 
 
80
bool KugarView::setReportData(const QString& data)
 
81
{
 
82
        return d->setReportData( data );
 
83
}
 
84
 
 
85
bool KugarView::setReportData(QIODevice* dev)
 
86
{
 
87
        return d->setReportData( dev );
 
88
}
 
89
 
 
90
bool KugarView::setReportTemplate(const QString &tpl)
 
91
{
 
92
        return d->setReportTemplate( tpl );
 
93
}
 
94
 
 
95
bool KugarView::setReportTemplate(QIODevice *dev)
 
96
{
 
97
        return d->setReportTemplate( dev );
 
98
}
 
99
 
 
100
bool KugarView::renderReport()
 
101
{
 
102
        return d->renderReport();
 
103
}
 
104
 
 
105
void KugarView::clearReport()
 
106
{
 
107
        d->clearReport();
 
108
}
 
109
 
 
110
void KugarView::printReport()
 
111
{
 
112
        d->printReport();
 
113
}
 
114
 
 
115
void KugarView::show()
 
116
{
 
117
        d->show();
 
118
}
 
119
 
 
120