00001
00002
00003
00004
00005
00006
00007 #ifndef GRID_LINE_LIMITER_H
00008 #define GRID_LINE_LIMITER_H
00009
00010 #include <QRectF>
00011
00012 class Document;
00013 class DocumentModelCoords;
00014 class DocumentModelGridDisplay;
00015 class MainWindowModel;
00016 class Transformation;
00017
00019 extern const int DEFAULT_MAXIMUM_GRID_LINES;
00020
00023 class GridLineLimiter
00024 {
00025 public:
00027 GridLineLimiter ();
00028
00030 void limitForXTheta (const Document &document,
00031 const Transformation &transformation,
00032 const DocumentModelCoords &modelCoords,
00033 const MainWindowModel &modelMainWindow,
00034 const DocumentModelGridDisplay &modelGrid,
00035 double &startX,
00036 double &stepX) const;
00037
00039 void limitForYRadius (const Document &document,
00040 const Transformation &transformation,
00041 const DocumentModelCoords &modelCoords,
00042 const MainWindowModel &modelMainWindow,
00043 const DocumentModelGridDisplay &modelGrid,
00044 double &startY,
00045 double &stepY) const;
00046
00047 private:
00048
00049 QRectF documentBounds (const Document &document,
00050 const Transformation &transformation) const;
00051
00052 };
00053
00054 #endif // GRID_LINE_LIMITER_H