Back to index

scribus-ng  1.3.4.dfsg+svn20071115
vruler.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008                           vruler.h  -  description
00009                              -------------------
00010     begin                : Wed Apr 11 2001
00011     copyright            : (C) 2001 by Franz Schmid
00012     email                : Franz.Schmid@altmuehlnet.de
00013  ***************************************************************************/
00014 
00015 /***************************************************************************
00016  *                                                                         *
00017  *   This program is free software; you can redistribute it and/or modify  *
00018  *   it under the terms of the GNU General Public License as published by  *
00019  *   the Free Software Foundation; either version 2 of the License, or     *
00020  *   (at your option) any later version.                                   *
00021  *                                                                         *
00022  ***************************************************************************/
00023 
00024 #ifndef VRULER_H
00025 #define VRULER_H
00026 
00027 #include <qwidget.h>
00028 #include <qpainter.h>
00029 #include "scribusapi.h"
00030 class ScribusDoc;
00031 class ScribusView;
00032 class PrefsManager;
00033 class ScribusView;
00034 
00038 class SCRIBUS_API Vruler : public QWidget
00039 {
00040        Q_OBJECT
00041 
00042 public:
00043        Vruler(ScribusView *pa, ScribusDoc *doc);
00044        ~Vruler() {};
00045        void paintEvent(QPaintEvent *e);
00046        void mousePressEvent(QMouseEvent *m);
00047        void mouseReleaseEvent(QMouseEvent *m);
00048        void mouseMoveEvent(QMouseEvent *m);
00049        void drawNumber(QString num, int starty, QPainter *p);
00050        double offs;
00051        bool repainted;
00052        int oldMark;
00053        bool Mpressed;
00054 private: // Private attributes
00056        ScribusDoc *currDoc;
00057        ScribusView *currView;
00058 
00059 public slots: // Public slots
00062        void Draw(int where);
00063        void unitChange();
00064 
00065 private:
00066        double iter, iter2;
00067        int cor;
00068        PrefsManager *prefsManager;
00069 };
00070 
00071 #endif