summaryrefslogtreecommitdiffstats
path: root/ktux/spritemisc.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitae2a03c2941bf92573f89b88ef73f8aa842bea0a (patch)
tree3566563f3fb6ac3cb3496669d8f233062d3091bc /ktux/spritemisc.h
downloadtdetoys-ae2a03c2941bf92573f89b88ef73f8aa842bea0a.tar.gz
tdetoys-ae2a03c2941bf92573f89b88ef73f8aa842bea0a.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdetoys@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ktux/spritemisc.h')
-rw-r--r--ktux/spritemisc.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/ktux/spritemisc.h b/ktux/spritemisc.h
new file mode 100644
index 0000000..0a0d058
--- /dev/null
+++ b/ktux/spritemisc.h
@@ -0,0 +1,41 @@
+//-----------------------------------------------------------------------------
+//
+// spritemisc
+//
+// Copyright (c) Martin R. Jones 1999
+//
+
+#ifndef __SPRITEMISC_H__
+#define __SPRITEMISC_H__
+
+#include <qstring.h>
+#include <qsize.h>
+
+class SpriteRange
+{
+public:
+ SpriteRange(const QString &str);
+ SpriteRange(int l=0, int h=0) : mMin(l), mMax(h) {}
+
+ int min() const { return mMin; }
+ int max() const { return mMax; }
+
+ int random() const;
+
+ void set(int l, int h) { mMin=l; mMax=h; }
+ void set(const QString &str);
+
+ static void setFieldSize(const QSize &size);
+ static QSize fieldSize() { return mFieldSize; }
+
+protected:
+ int parse(const QString &str);
+
+protected:
+ int mMin;
+ int mMax;
+ static QSize mFieldSize;
+};
+
+#endif
+