summaryrefslogtreecommitdiffstats
path: root/kscreensaver/kdesavers/sspreviewarea.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
commit8b2aa1b5301ab60368a03e36df4ff5216726e87d (patch)
tree36163d4ee667c23b5cf232df2f3004cd0a76202a /kscreensaver/kdesavers/sspreviewarea.h
downloadtdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.tar.gz
tdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.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/kdeartwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscreensaver/kdesavers/sspreviewarea.h')
-rw-r--r--kscreensaver/kdesavers/sspreviewarea.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/kscreensaver/kdesavers/sspreviewarea.h b/kscreensaver/kdesavers/sspreviewarea.h
new file mode 100644
index 00000000..5b14f09d
--- /dev/null
+++ b/kscreensaver/kdesavers/sspreviewarea.h
@@ -0,0 +1,57 @@
+//============================================================================
+//
+// KRotation screen saver for KDE
+// Copyright (C) 2004 Georg Drenkhahn
+// $Id$
+//
+//============================================================================
+
+#ifndef SSPREVIEWAREA_H
+#define SSPREVIEWAREA_H
+
+#include <qwidget.h>
+
+/** @brief Reimplementation of QWidget emitting a signal if resized.
+ *
+ * This class is equalt to QWidget except for the fact that the signal resized()
+ * is emitted if the widget gets resized. By this signaling mechanism it is
+ * possible to resize the embedded GL area object within the screen saver setup
+ * dialog.
+ *
+ * In the constructor of the dialog widget (KPendulumSetup::KPendulumSetup(),
+ * KRotationSetup::KRotationSetup()) the signal SsPreviewArea::resized() is
+ * connected with a slot of the screensaver class
+ * (KPendulumSaver::resizeGlArea(), KRotationSaver::resizeGlArea()). This slot
+ * function calls the reimplemented QGLWidget::resizeGL() method of the GL
+ * widgets (PendulumGLWidget::resizeGL(), RotationGLWidget::resizeGL()) which
+ * really resizes the GL scenery. */
+class SsPreviewArea : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ /** @brief Constructor for SsPreviewArea
+ * @param parent Pointer tp parent widget, forwarded to the QWidget
+ * constructor
+ * @param name Pointer to widget name, forwarded to the QWidget constructor
+ *
+ * The constructor just calls QWidget::QWidget() with the given arguments.
+ */
+ SsPreviewArea(QWidget* parent = NULL, const char* name = NULL);
+
+ protected:
+ /** @brief Called if widget gets resized.
+ * @param e Pointer to the corresponding QResizeEvent object containing the
+ * resize information
+ *
+ * Reimplemented event handler from QWidget. Only the signal resized() is
+ * emitted. */
+ virtual void resizeEvent(QResizeEvent* e);
+
+ signals:
+ /** @brief Signal which is emitted in the resizeEvent() method.
+ * @param e Pointer to the corresponding QResizeEvent object */
+ void resized(QResizeEvent* e);
+};
+
+#endif