From 5de3dd4762ca33a0f92e79ffa4fe2ff67069d531 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 24 Feb 2010 01:49:02 +0000 Subject: Added KDE3 version of ktechlab git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1095338 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/cells.cpp | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 src/cells.cpp (limited to 'src/cells.cpp') diff --git a/src/cells.cpp b/src/cells.cpp new file mode 100644 index 0000000..804a5dc --- /dev/null +++ b/src/cells.cpp @@ -0,0 +1,140 @@ +/*************************************************************************** + * Copyright (C) 2003-2004 by David Saxton * + * david@bluehaze.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#include "cells.h" + + + +#if 0 +class CellSmall +{ + public: + /** + * Resets bestScore, prevX, prevY, addedToLabels, it, permanent for each cell + */ + void reset(); + +// Point *point; // Pointer to the point in the TempLabelMap + short prevX, prevY; // Which cell this came from, (-1,-1) if originating cell + unsigned short CIpenalty; // 'Penalty' of using the cell from CNItem + unsigned short Cpenalty; // 'Penalty' of using the cell from Connector + unsigned short bestScore; // Best (lowest) score so far, _the_ best if it is permanent + unsigned char numCon; // Number of connectors through that point + bool permanent:1; // Whether the score can be improved on + bool addedToLabels:1; // Whether the cell has already been added to the list of cells to check +}; + +class CellBig +{ + public: + /** + * Resets bestScore, prevX, prevY, addedToLabels, it, permanent for each cell + */ + void reset(); + + Point *point; // Pointer to the point in the TempLabelMap + short prevX, prevY; // Which cell this came from, (-1,-1) if originating cell + unsigned short CIpenalty; // 'Penalty' of using the cell from CNItem + unsigned short Cpenalty; // 'Penalty' of using the cell from Connector + unsigned short bestScore; // Best (lowest) score so far, _the_ best if it is permanent + unsigned char numCon; // Number of connectors through that point + bool permanent:1; // Whether the score can be improved on + bool addedToLabels:1; // Whether the cell has already been added to the list of cells to check +}; +#endif + + +Cells::Cells( const uint w, const uint h ) +{ +#if 0 + kdDebug() << "sizeof(CellSmall)="<