2 Copyright (C) 2010 by Juan Carlos Torres <jucato@kdemail.net>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of
7 the License or (at your option) version 3 or any later version
8 accepted by the membership of KDE e.V. (or its successor appro-
9 ved by the membership of KDE e.V.), which shall act as a proxy
10 defined in Section 14 of version 3 of the license.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see http://www.gnu.org/licenses/.
32 #include "ui_mainwindow.h"
35 * @brief Flash Strobe main window
37 * This is the main window for Flash Strobe. This simple
38 * class creates the widgets for controlling the flash
39 * and adds a MusicPlayer widget for playing music.
41 class MainWindow : public QWidget
46 MainWindow(QWidget* parent = 0);
51 * Slot for changing the strobing frequency. The actual
52 * frequency is computed to and displayed as beats per minute (bpm)
54 * @param frequency Strobing frequency in hertz. Valid range is
55 * from 2 to 8 Hz (120 to 600 bpm)
57 void frequencyChanged(int frequency);
60 * Slot to turn strobing on or off. Strobing frequency is
61 * set by the user. Flash intensity is fixed at 215 mA. The
62 * strobing repetition is controlled by a QTimer.
64 * @param checked Determines if strobing is on (@c true) or off (@c false)
66 void toggleStrobe(bool checked);
69 * Slot to enable or disable the widgets, depending on certain
70 * conditions, such as the camera shutter state. If the shutter
71 * is closed, widgets are disabled. The MusicPlayer widgets are
72 * controlled independently of the overall application state.
74 * @param enable Specifies if widgets are enabled (@c true) or disabled (@c false)
76 void toggleAppState(bool enable);
84 MusicPlayer* m_player;