Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrachytski <siarhei.rachytski@gmail.com>2013-01-24 17:59:02 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:49:14 +0300
commitf70230b4b71771350a54a3321dfd0c900fff8043 (patch)
tree33ab4c8762c573ccb2bf6741a708b979a28fcbf1 /qt_tstfrm
parent4a461d976c4c07821500da25b60c9c61d5d0eda8 (diff)
removed unused qt::Screen.
Diffstat (limited to 'qt_tstfrm')
-rw-r--r--qt_tstfrm/screen_qt.cpp42
-rw-r--r--qt_tstfrm/screen_qt.hpp52
2 files changed, 0 insertions, 94 deletions
diff --git a/qt_tstfrm/screen_qt.cpp b/qt_tstfrm/screen_qt.cpp
deleted file mode 100644
index bc84ff2997..0000000000
--- a/qt_tstfrm/screen_qt.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "screen_qt.hpp"
-
-#include <QtGui/QPainter>
-
-
-namespace qt
-{
- void Screen::drawPathImpl(vector<QPoint> const & path)
- {
- m_p->drawPolyline(&path[0], path.size());
- }
-
- void Screen::drawRect(m2::RectD const & r)
- {
- vector<m2::PointD> pts(5);
- pts[0] = r.LeftTop();
- pts[1] = r.RightTop();
- pts[2] = r.RightBottom();
- pts[3] = r.LeftBottom();
- pts[4] = r.LeftTop();
-
- drawPath(pts);
- }
-
- void Screen::drawLine(m2::PointD const & p1, m2::PointD const & p2)
- {
- m_p->drawLine(qpoint(p1), qpoint(p2));
- }
-
- void Screen::hatchRect(m2::RectD const & r)
- {
- const size_t numPoints = 8;
- for (size_t x = 0; x < numPoints; ++x)
- {
- for (size_t y = 0; y < numPoints; ++y)
- {
- m2::PointD point(r.LeftBottom().x + r.SizeX() * x / 8.0, r.LeftBottom().y + r.SizeY() * y / 8.0);
- drawLine(point, m2::PointD(point.x + r.SizeX() / 16.0, point.y + r.SizeY() / 16.0));
- }
- }
- }
-}
diff --git a/qt_tstfrm/screen_qt.hpp b/qt_tstfrm/screen_qt.hpp
deleted file mode 100644
index fbf5e11ad0..0000000000
--- a/qt_tstfrm/screen_qt.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#pragma once
-
-#include "../geometry/screenbase.hpp"
-#include "../geometry/rect2d.hpp"
-#include "../geometry/point2d.hpp"
-
-#include <QtCore/QPoint>
-
-class QPainter;
-
-namespace qt
-{
- class Screen
- {
- QPainter * m_p;
- ScreenBase m_convertor;
-
- void drawPathImpl(vector<QPoint> const & path);
-
- template <class T>
- inline QPoint qpoint(std::pair<T, T> const & p) const
- {
- m2::PointD pp = m_convertor.GtoP(m2::PointD(p.first, p.second));
- return QPoint(pp.x, pp.y);
- }
- inline QPoint qpoint(m2::PointD const & p) const
- {
- m2::PointD pp = m_convertor.GtoP(p);
- return QPoint(pp.x, pp.y);
- }
-
- public:
- void setPainter(QPainter * p) { m_p = p; }
- void onSize(int w, int h) { m_convertor.OnSize(0, 0, w, h); }
- void setFromRect(m2::RectD const & r) { m_convertor.SetFromRect(m2::AnyRectD(r)); }
-
- template <class TCont> void drawPath(TCont const & c)
- {
- vector<QPoint> qvec;
- qvec.reserve(c.size());
- for (typename TCont::const_iterator i = c.begin(); i != c.end(); ++i)
- qvec.push_back(qpoint(*i));
-
- drawPathImpl(qvec);
- }
-
- void drawLine(m2::PointD const & p1, m2::PointD const & p2);
-
- void drawRect(m2::RectD const & r);
- void hatchRect(m2::RectD const & r);
- };
-}