Fixing warnings on GCC... (I)
[qt-netbsd.git] / examples / desktop / screenshot / screenshot.h
blob9f1289e63aa3bb1f9846ee6723d2e2b9ffd003f1
1 /****************************************************************************
2 **
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
6 **
7 ** This file is part of the examples of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** No Commercial Usage
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
14 ** this package.
16 ** GNU Lesser General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU Lesser
18 ** General Public License version 2.1 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.LGPL included in the
20 ** packaging of this file. Please review the following information to
21 ** ensure the GNU Lesser General Public License version 2.1 requirements
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 ** In addition, as a special exception, Nokia gives you certain additional
25 ** rights. These rights are described in the Nokia Qt LGPL Exception
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
38 ** $QT_END_LICENSE$
40 ****************************************************************************/
42 #ifndef SCREENSHOT_H
43 #define SCREENSHOT_H
45 #include <QPixmap>
46 #include <QWidget>
48 QT_BEGIN_NAMESPACE
49 class QCheckBox;
50 class QGridLayout;
51 class QGroupBox;
52 class QHBoxLayout;
53 class QLabel;
54 class QPushButton;
55 class QSpinBox;
56 class QVBoxLayout;
57 QT_END_NAMESPACE
59 //! [0]
60 class Screenshot : public QWidget
62 Q_OBJECT
64 public:
65 Screenshot();
67 protected:
68 void resizeEvent(QResizeEvent *event);
70 private slots:
71 void newScreenshot();
72 void saveScreenshot();
73 void shootScreen();
74 void updateCheckBox();
76 private:
77 void createOptionsGroupBox();
78 void createButtonsLayout();
79 QPushButton *createButton(const QString &text, QWidget *receiver,
80 const char *member);
81 void updateScreenshotLabel();
83 QPixmap originalPixmap;
85 QLabel *screenshotLabel;
86 QGroupBox *optionsGroupBox;
87 QSpinBox *delaySpinBox;
88 QLabel *delaySpinBoxLabel;
89 QCheckBox *hideThisWindowCheckBox;
90 QPushButton *newScreenshotButton;
91 QPushButton *saveScreenshotButton;
92 QPushButton *quitScreenshotButton;
94 QVBoxLayout *mainLayout;
95 QGridLayout *optionsGroupBoxLayout;
96 QHBoxLayout *buttonsLayout;
98 //! [0]
100 #endif