F:/KPlato/koffice/libs/kofficeui/KoRuler.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) 2006 Peter Simonsson <peter.simonsson@gmail.com>
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; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019 */
00020 
00021 // Description: Ruler (header)
00022 
00023 /******************************************************************/
00024 
00025 #ifndef koRuler_h
00026 #define koRuler_h
00027 
00028 #include <QWidget>
00029 
00030 #include <koffice_export.h>
00031 #include <KoUnit.h>
00032 
00033 class QPainter;
00034 class QPaintEvent;
00035 
00036 class KoViewConverter;
00037 
00038 class KoRulerPrivate;
00039 
00040 class KOFFICEUI_EXPORT KoRuler : public QWidget
00041 {
00042     Q_OBJECT
00043     public:
00044         KoRuler(QWidget* parent, Qt::Orientation orientation, KoViewConverter* viewConverter);
00045         ~KoRuler();
00046 
00048         KoUnit::Unit unit() const;
00049 
00051         double rulerLength() const;
00052 
00054         Qt::Orientation orientation() const;
00055 
00056         virtual QSize minimumSizeHint() const;
00057         virtual QSize sizeHint() const;
00058 
00059     public Q_SLOTS:
00061         void setUnit(KoUnit::Unit unit);
00062 
00067         void setOffset(int offset);
00068 
00070         void setRulerLength(double length);
00071 
00076         void setActiveRange(double start, double end);
00077 
00082         void setShowMousePosition(bool show);
00083 
00089         void updateMouseCoordinate(int coordinate);
00090 
00091     protected:
00092         virtual void paintEvent(QPaintEvent* event);
00093 
00095         double numberStepForUnit() const;
00096 
00097     private:
00098         KoRulerPrivate* d;
00099 };
00100 
00101 #endif

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