summaryrefslogtreecommitdiffstats
path: root/tdescreensaver/kdesavers/polygon.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-26 13:16:15 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-26 13:16:15 -0600
commit7e09b5c2efae58399621a938de26b9675b8ba621 (patch)
treede2c9535e1f4c48ae91910492d298eba1d593fd5 /tdescreensaver/kdesavers/polygon.h
parent159f7e147ac33c924b3ce9050c8f03cbc54916ee (diff)
downloadtdeartwork-7e09b5c2efae58399621a938de26b9675b8ba621.tar.gz
tdeartwork-7e09b5c2efae58399621a938de26b9675b8ba621.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdescreensaver/kdesavers/polygon.h')
-rw-r--r--tdescreensaver/kdesavers/polygon.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/tdescreensaver/kdesavers/polygon.h b/tdescreensaver/kdesavers/polygon.h
new file mode 100644
index 00000000..86c9d2aa
--- /dev/null
+++ b/tdescreensaver/kdesavers/polygon.h
@@ -0,0 +1,81 @@
+//-----------------------------------------------------------------------------
+//
+// kpolygon - Basic screen saver for KDE
+//
+// Copyright (c) Martin R. Jones 1996
+//
+
+#ifndef __POLYGON_H__
+#define __POLYGON_H__
+
+#include <tqtimer.h>
+#include <tqptrlist.h>
+
+#include <kdialogbase.h>
+#include <tdescreensaver.h>
+#include <krandomsequence.h>
+
+class kPolygonSaver : public KScreenSaver
+{
+ Q_OBJECT
+
+public:
+ kPolygonSaver( WId id );
+ virtual ~kPolygonSaver();
+
+ void setPolygon( int len, int ver );
+ void setSpeed( int spd );
+
+private:
+ void readSettings();
+ void blank();
+ void initialisePolygons();
+ void moveVertices();
+ void initialiseColor();
+ void nextColor();
+
+protected slots:
+ void slotTimeout();
+
+protected:
+ TQTimer timer;
+ unsigned numLines;
+ int numVertices;
+ int colorContext;
+ int speed;
+ TQColor colors[64];
+ int currentColor;
+ TQPtrList<TQPointArray> polygons;
+ TQMemArray<TQPoint> directions;
+ KRandomSequence rnd;
+};
+
+class kPolygonSetup : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ kPolygonSetup( TQWidget *parent = 0, const char *name = 0 );
+ ~kPolygonSetup();
+
+protected:
+ void readSettings();
+
+private slots:
+ void slotLength( int );
+ void slotVertices( int );
+ void slotSpeed( int );
+ void slotOk();
+ void slotHelp();
+
+private:
+ TQWidget *preview;
+ kPolygonSaver *saver;
+
+ int length;
+ int vertices;
+ int speed;
+};
+
+#endif
+