~ubuntu-branches/ubuntu/precise/fritzing/precise

« back to all changes in this revision

Viewing changes to src/viewlayer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Georges Khaznadar
  • Date: 2011-08-26 10:11:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110826101105-w5hmn7zcf93ig5v6
Tags: 0.6.3b-1
* upgrapded to the newer upstream version
* parameters of the function GraphicsUtils::distanceFromLine in 
  src/svg/groundplanegenerator.cpp:767 are now declared as doubles,
  which Closes: #636441
* the new version fixes src/utils/folderutils.cpp, which
  Closes: #636061

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
********************************************************************
20
20
 
21
 
$Revision: 5206 $:
 
21
$Revision: 5308 $:
22
22
$Author: cohen@irascible.com $:
23
 
$Date: 2011-07-08 23:59:08 +0200 (Fri, 08 Jul 2011) $
 
23
$Date: 2011-07-30 21:09:56 +0200 (Sat, 30 Jul 2011) $
24
24
 
25
25
********************************************************************/
26
26
 
28
28
#include "debugdialog.h"
29
29
#include <qmath.h>
30
30
 
31
 
qreal ViewLayer::zIncrement = 0.00001;  // 0.000000001;
 
31
double ViewLayer::zIncrement = 0.00001;  // 0.000000001;
32
32
 
33
33
QHash<ViewLayer::ViewLayerID, StringPair * > ViewLayer::names;
34
34
QMultiHash<ViewLayer::ViewLayerID, ViewLayer::ViewLayerID> ViewLayer::alternatives;
46
46
static LayerList NonCopperLayers;  // just NonCopperLayers in pcb view
47
47
 
48
48
 
49
 
ViewLayer::ViewLayer(ViewLayerID viewLayerID, bool visible, qreal initialZ )
 
49
ViewLayer::ViewLayer(ViewLayerID viewLayerID, bool visible, double initialZ )
50
50
{
51
51
        m_viewLayerID = viewLayerID;
52
52
        m_visible = visible;
153
153
        }
154
154
}
155
155
 
156
 
qreal ViewLayer::nextZ() {
157
 
        qreal temp = m_nextZ;
 
156
double ViewLayer::nextZ() {
 
157
        double temp = m_nextZ;
158
158
        m_nextZ += zIncrement;
159
159
        return temp;
160
160
}
167
167
        return m_viewLayerID;
168
168
}
169
169
 
170
 
qreal ViewLayer::incrementZ(qreal z) {
 
170
double ViewLayer::incrementZ(double z) {
171
171
        return (z + zIncrement);
172
172
}
173
173
 
174
 
qreal ViewLayer::getZIncrement() {
 
174
double ViewLayer::getZIncrement() {
175
175
        return zIncrement;
176
176
}
177
177
 
204
204
        return m_childLayers;
205
205
}
206
206
 
207
 
bool ViewLayer::alreadyInLayer(qreal z) {
 
207
bool ViewLayer::alreadyInLayer(double z) {
208
208
        return (z >= m_initialZ && z <= m_nextZ);
209
209
}
210
210
 
215
215
        names.clear();
216
216
}
217
217
 
218
 
void ViewLayer::resetNextZ(qreal z) {
 
218
void ViewLayer::resetNextZ(double z) {
219
219
        m_nextZ = qFloor(m_initialZ) + z - floor(z);
220
220
}
221
221