F:/KPlato/koffice/libs/kofficeui/KoPageLayoutSize.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002  * Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00003  * Copyright (C) 2005 Thomas Zander <zander@kde.org>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; version 2.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this library; see the file COPYING.LIB.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef kopagelayoutsize_h
00021 #define kopagelayoutsize_h
00022 
00023 #include <KoGlobal.h>
00024 #include <KoUnit.h>
00025 #include <kdialog.h>
00026 #include "KoPageLayout.h"
00027 #include "KoPageLayoutDia.h"
00028 
00029 class QGroupBox;
00030 class QButtonGroup;
00031 class QComboBox;
00032 class KoUnitDoubleSpinBox;
00033 class KoPageLayoutColumns;
00034 
00038 class KOFFICEUI_EXPORT KoPageLayoutSize : public QWidget
00039 {
00040     Q_OBJECT
00041 
00042 public:
00052     KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,
00053             const KoColumns& columns, bool unitChooser, bool enableBorders);
00054 
00058     bool queryClose();
00063     void setColumns(KoColumns &columns);
00064 
00065 public slots:
00070     void setUnit( KoUnit::Unit unit );
00075     void setEnableBorders(bool on);
00076 
00077 signals:
00084     void propertyChange(KoPageLayout &layout);
00085 
00086 protected:
00087     QComboBox *cpgFormat;
00088     KoUnitDoubleSpinBox *epgWidth;
00089     KoUnitDoubleSpinBox *epgHeight;
00090     KoUnitDoubleSpinBox *ebrLeft;
00091     KoUnitDoubleSpinBox *ebrRight;
00092     KoUnitDoubleSpinBox *ebrTop;
00093     KoUnitDoubleSpinBox *ebrBottom;
00094     KoPagePreview *pgPreview;
00095     QGroupBox *m_orientBox;
00096     QButtonGroup* m_orientGroup;
00097 
00098 protected slots:
00099     void formatChanged( int );
00100     void widthChanged( double );
00101     void heightChanged( double );
00102     void leftChanged( double );
00103     void rightChanged( double );
00104     void topChanged( double );
00105     void bottomChanged( double );
00106     void orientationChanged( int );
00107     void setUnitInt( int unit );
00108 
00109 private:
00110     void updatePreview();
00111     void setValues();
00112 
00113     KoUnit::Unit m_unit;
00114     KoPageLayout m_layout;
00115 
00116     bool m_blockSignals, m_haveBorders;
00117 };
00118 
00119 #endif

Généré le Wed Nov 22 23:41:05 2006 pour KPlato par  doxygen 1.5.1-p1