In order for 'make depend' to be able to handle both Qt4/5 and Qt3,
they need to operate on different object file names.
renames qt*.o to qt3*.o for Qt3
renames qt*.cpp to qt3*.cpp for Qt3 (not essential but seems worthwhile)
moves Qt3's headers from include/qt*.h to win/Qt3/qt3*.h
copies include/qt_xpms.h (before rename) or win/Qt3/qt3_xpms.h (after)
to win/Qt/qt_xpms.h so that Qt4/5 no longer shares one header file
modifies win/Qt3/*.cpp and win/Qt3/qt3_win.h to reflect new header names
modifies Makefile.src to have Qt3 'moc' commands use new names
updates Makefile.src via re-running 'make depend'
'make depend' was only looking at include/*.h to find nested inclusion.
Now it will also look at win/*/*.h. That found a bunch of missing
dependencies for the old gnome sources and a few for Qt3.
Building without Qt still works. Building with it (any version) has
not been tested.
35 lines
700 B
C++
35 lines
700 B
C++
/* NetHack 3.6 qt_clust.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
|
|
/* Copyright (c) Warwick Allison, 1999. */
|
|
/* NetHack may be freely redistributed. See license for details. */
|
|
|
|
#ifndef clusterizer_H
|
|
#define clusterizer_H
|
|
|
|
#include <qrect.h>
|
|
|
|
class Clusterizer
|
|
{
|
|
public:
|
|
Clusterizer(int maxclusters);
|
|
~Clusterizer();
|
|
|
|
void add(int x, int y); // 1x1 rectangle (point)
|
|
void add(int x, int y, int w, int h);
|
|
void add(const QRect &rect);
|
|
|
|
void clear();
|
|
int
|
|
clusters()
|
|
{
|
|
return count;
|
|
}
|
|
const QRect &operator[](int i);
|
|
|
|
private:
|
|
QRect *cluster;
|
|
int count;
|
|
const int max;
|
|
};
|
|
|
|
#endif
|