not necessary
[kdeartwork.git] / kscreensaver / kdesavers / sspreviewarea.h
blob53e676fbf8fda4a79695ebddb0b00f6228d7fcd3
1 /*============================================================================
3 * Screensaver preview area helper class
5 * Copyright (C) 2004 Georg Drenkhahn, Georg.Drenkhahn@gmx.net
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License as published by the Free Software
9 * Foundation; either version 2 of the License or (at your option) version 3 or
10 * any later version accepted by the membership of KDE e.V. (or its successor
11 * approved by the membership of KDE e.V.), which shall act as a proxy defined
12 * in Section 14 of version 3 of the license.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * details.
19 *===========================================================================*/
21 #ifndef SSPREVIEWAREA_H
22 #define SSPREVIEWAREA_H
24 #include <qwidget.h>
26 /** @brief Reimplementation of QWidget emitting a signal if resized.
28 * This class is equalt to QWidget except for the fact that the signal resized()
29 * is emitted if the widget gets resized. By this signaling mechanism it is
30 * possible to resize the embedded GL area object within the screen saver setup
31 * dialog.
33 * In the constructor of the dialog widget (KPendulumSetup::KPendulumSetup(),
34 * KRotationSetup::KRotationSetup()) the signal SsPreviewArea::resized() is
35 * connected with a slot of the screensaver class
36 * (KPendulumSaver::resizeGlArea(), KRotationSaver::resizeGlArea()). This slot
37 * function calls the reimplemented QGLWidget::resizeGL() method of the GL
38 * widgets (PendulumGLWidget::resizeGL(), RotationGLWidget::resizeGL()) which
39 * really resizes the GL scenery. */
40 class SsPreviewArea : public QWidget
42 Q_OBJECT
44 public:
45 /** @brief Constructor for SsPreviewArea
46 * @param parent Pointer tp parent widget, forwarded to the QWidget
47 * constructor
49 * The constructor just calls QWidget::QWidget() with the given arguments.
51 SsPreviewArea(QWidget* parent = NULL);
53 protected:
54 /** @brief Called if widget gets resized.
55 * @param e Pointer to the corresponding QResizeEvent object containing the
56 * resize information
58 * Reimplemented event handler from QWidget. Only the signal resized() is
59 * emitted. */
60 virtual void resizeEvent(QResizeEvent* e);
62 signals:
63 /** @brief Signal which is emitted in the resizeEvent() method.
64 * @param e Pointer to the corresponding QResizeEvent object */
65 void resized(QResizeEvent* e);
68 #endif