Deprecated--
[kdeartwork.git] / kscreensaver / kdesavers / sspreviewarea.h
blob5a7eebc8de10dfcb29e87d5331fae6c8f0d5dfe6
1 //============================================================================
2 //
3 // KRotation screen saver for KDE
4 // Copyright (C) 2004 Georg Drenkhahn
5 // $Id$
6 //
7 //============================================================================
9 #ifndef SSPREVIEWAREA_H
10 #define SSPREVIEWAREA_H
12 #include <qwidget.h>
13 //Added by qt3to4:
14 #include <QResizeEvent>
16 /** @brief Reimplementation of QWidget emitting a signal if resized.
18 * This class is equalt to QWidget except for the fact that the signal resized()
19 * is emitted if the widget gets resized. By this signaling mechanism it is
20 * possible to resize the embedded GL area object within the screen saver setup
21 * dialog.
23 * In the constructor of the dialog widget (KPendulumSetup::KPendulumSetup(),
24 * KRotationSetup::KRotationSetup()) the signal SsPreviewArea::resized() is
25 * connected with a slot of the screensaver class
26 * (KPendulumSaver::resizeGlArea(), KRotationSaver::resizeGlArea()). This slot
27 * function calls the reimplemented QGLWidget::resizeGL() method of the GL
28 * widgets (PendulumGLWidget::resizeGL(), RotationGLWidget::resizeGL()) which
29 * really resizes the GL scenery. */
30 class SsPreviewArea : public QWidget
32 Q_OBJECT
34 public:
35 /** @brief Constructor for SsPreviewArea
36 * @param parent Pointer tp parent widget, forwarded to the QWidget
37 * constructor
39 * The constructor just calls QWidget::QWidget() with the given arguments.
41 SsPreviewArea(QWidget* parent = NULL);
43 protected:
44 /** @brief Called if widget gets resized.
45 * @param e Pointer to the corresponding QResizeEvent object containing the
46 * resize information
48 * Reimplemented event handler from QWidget. Only the signal resized() is
49 * emitted. */
50 virtual void resizeEvent(QResizeEvent* e);
52 signals:
53 /** @brief Signal which is emitted in the resizeEvent() method.
54 * @param e Pointer to the corresponding QResizeEvent object */
55 void resized(QResizeEvent* e);
58 #endif