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/.
22 * Flash Strobe - Strobe light application for the N900
24 * Use the N900's flash LEDs as a strobe light. The user can set the
25 * frequency of the strobing in beats per minute (bpm). Additionally,
26 * the user can open any audio file to play in the background. The
27 * camera shutters need to be kept open. For best results, close any
28 * program using the camera.
30 * 18 Do not point the flash at anyone's eyes
34 #include "mainwindow.h"
36 #include <QApplication>
37 #include <QMessageBox>
39 int main(int argc, char **argv)
41 QApplication app(argc, argv);
42 char device[15] = "/dev/video0";
44 // First check if there is even a camera at all. If none is found, notify the user and quit
45 if (Camera::open(device) == -1)
48 msg.setWindowTitle(QObject::tr("No Camera"));
49 msg.setText(QObject::tr("There was no camera found on this device. The program will now close"));
56 app.setApplicationName("flashstrobe");