dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
loadtask.h
Go to the documentation of this file.
1 
13 /*
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * for more details.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, see <http://www.gnu.org/licenses/>
26 */
27 #ifndef LOADTASK_H
28 #define LOADTASK_H
29 
30 #include <QString>
31 #include "../core/point.h"
32 
33 using namespace core;
34 namespace internals
35 {
36 struct LoadTask
37  {
38  friend bool operator==(LoadTask const& lhs,LoadTask const& rhs);
39  public:
40  core::Point Pos; //Tile position in quadtile format
41  int Zoom; //Number of zoom levels, in quadtile format
42 
43 
44  LoadTask(Point pos, int zoom)
45  {
46  Pos = pos;
47  Zoom = zoom;
48  }
50  {
51  Pos=core::Point(-1,-1);
52  Zoom=-1;
53  }
54  bool HasValue()
55  {
56  return !(Zoom==-1);
57  }
58 
59  QString ToString()const
60  {
61  return QString::number(Zoom) + " - " + Pos.ToString();
62  }
63  };
64 }
65 #endif // LOADTASK_H
QString ToString() const
Definition: loadtask.h:59
core::Point Pos
Definition: loadtask.h:40
bool operator==(Point const &lhs, Point const &rhs)
Definition: point.cpp:49
LoadTask(Point pos, int zoom)
Definition: loadtask.h:44