~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to lib/kofficeui/KoPageLayoutColumns.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-04-20 21:38:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060420213853-j5lxluqvymxt2zny
Tags: 1:1.5.0-0ubuntu2
UbuntuĀ uploadĀ 

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
 * Copyright (C) 2005 Thomas Zander <zander@kde.org>
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU Library General Public
 
7
 * License as published by the Free Software Foundation; version 2.
 
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., 51 Franklin Street, Fifth Floor,
 
17
 * Boston, MA 02110-1301, USA.
 
18
 */
 
19
 
 
20
// Description: Page Layout Dialog (sources)
 
21
 
 
22
#ifndef kopagelayoutcolumns_h
 
23
#define kopagelayoutcolumns_h
 
24
 
 
25
#include <KoUnit.h>
 
26
#include <KoPageLayout.h>
 
27
#include <KoPageLayoutColumnsBase.h>
 
28
 
 
29
class QWidget;
 
30
class KoUnitDoubleSpinBox;
 
31
class KoPagePreview;
 
32
 
 
33
/**
 
34
 * This class is a widget that shows the KoColumns data structure and allows the user to change it.
 
35
 */
 
36
class KoPageLayoutColumns : public KoPageLayoutColumnsBase {
 
37
    Q_OBJECT
 
38
 
 
39
public:
 
40
    /**
 
41
     * Contructor
 
42
     * @param parent the parent widget
 
43
     * @param columns the KoColumns data structure that this dialog should be initialzed with
 
44
     * @param unit the unit-type (mm/cm/inch) that the dialog should show
 
45
     * @param layout the page layout that the preview should be initialzed with.
 
46
     */
 
47
    KoPageLayoutColumns(QWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout);
 
48
 
 
49
    /**
 
50
     * Update the page preview widget with the param layout.
 
51
     * @param layout the new layout
 
52
     */
 
53
    void setLayout(KoPageLayout &layout);
 
54
public slots:
 
55
 
 
56
    /**
 
57
     * Enable the user to edit the columns
 
58
     * @param on if true enable the user to change the columns count
 
59
     */
 
60
    void setEnableColumns(bool on);
 
61
 
 
62
signals:
 
63
    void propertyChange(KoColumns &columns);
 
64
 
 
65
protected:
 
66
    KoColumns m_columns;
 
67
    KoPagePreview *m_preview;
 
68
    KoUnitDoubleSpinBox *m_spacing;
 
69
 
 
70
private slots:
 
71
    void nColChanged( int );
 
72
    void nSpaceChanged( double );
 
73
};
 
74
 
 
75
#endif