summaryrefslogtreecommitdiffstats
path: root/tdescreensaver/kdesavers/kvm.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/kvm.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/kvm.h')
-rw-r--r--tdescreensaver/kdesavers/kvm.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/tdescreensaver/kdesavers/kvm.h b/tdescreensaver/kdesavers/kvm.h
new file mode 100644
index 00000000..eb68d3a4
--- /dev/null
+++ b/tdescreensaver/kdesavers/kvm.h
@@ -0,0 +1,101 @@
+//-----------------------------------------------------------------------------
+//
+// kvm screensaver
+//
+
+#ifndef __KVM_H__
+#define __KVM_H__
+
+#include <tqtimer.h>
+#include <tqptrlist.h>
+
+#include <kdialogbase.h>
+#include <tdescreensaver.h>
+
+extern "C" {
+#include "vm.h"
+#include "vm_random.h"
+}
+
+#define THREAD_MAX_STACK_SIZE 10
+#define MAX_THREADS_NUM 20
+
+#define MAX_REFRESH_TIMEOUT 40
+
+typedef struct {
+ TQWidget *w;
+ int grid_width, grid_height;
+ int grid_margin_x;
+ int grid_margin_y;
+ int char_width, char_height;
+ bool insert_top_p, insert_bottom_p;
+ int density;
+ struct tvm_pool* pool;
+ char* modified;
+ int show_threads;
+
+ TQPixmap images;
+ int image_width, image_height;
+ int nglyphs;
+
+} m_state;
+
+
+class kVmSaver : public KScreenSaver
+{
+ Q_OBJECT
+
+public:
+ kVmSaver( WId id );
+ virtual ~kVmSaver();
+
+ void setSpeed( int spd );
+ void setRefreshTimeout( const int refreshTimeout );
+
+protected:
+ void blank();
+ void readSettings();
+ int getRandom( const int max_value );
+ void modifyArea( const int op );
+
+protected slots:
+ void slotTimeout();
+
+protected:
+ TQTimer timer;
+ int colorContext;
+
+ int speed;
+ m_state* pool_state;
+ int refreshStep;
+ int refreshTimeout;
+};
+
+
+class kVmSetup : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ kVmSetup( TQWidget *parent = NULL, const char *name = NULL );
+ ~kVmSetup();
+protected:
+ void readSettings();
+
+private slots:
+ void slotSpeed( int );
+ void slotRefreshTimeout( int num );
+ void slotOk();
+ void slotHelp();
+
+private:
+ TQWidget *preview;
+ kVmSaver *saver;
+
+ int speed;
+ int refreshTimeout;
+};
+
+
+#endif
+