| 1 | /* smplayer, GUI front-end for mplayer.
|
|---|
| 2 | Copyright (C) 2006-2010 Ricardo Villalba <rvm@escomposlinux.org>
|
|---|
| 3 |
|
|---|
| 4 | This program is free software; you can redistribute it and/or modify
|
|---|
| 5 | it under the terms of the GNU General Public License as published by
|
|---|
| 6 | the Free Software Foundation; either version 2 of the License, or
|
|---|
| 7 | (at your option) any later version.
|
|---|
| 8 |
|
|---|
| 9 | This program is distributed in the hope that it will be useful,
|
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | GNU General Public License for more details.
|
|---|
| 13 |
|
|---|
| 14 | You should have received a copy of the GNU General Public License
|
|---|
| 15 | along with this program; if not, write to the Free Software
|
|---|
| 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 17 | */
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | #ifndef _HELPER_H_
|
|---|
| 21 | #define _HELPER_H_
|
|---|
| 22 |
|
|---|
| 23 | #include <QString>
|
|---|
| 24 | #include <QStringList>
|
|---|
| 25 | #include "audioequalizerlist.h"
|
|---|
| 26 |
|
|---|
| 27 | #ifdef Q_OS_WIN
|
|---|
| 28 | #include "config.h"
|
|---|
| 29 | #endif
|
|---|
| 30 |
|
|---|
| 31 | class Helper {
|
|---|
| 32 |
|
|---|
| 33 | public:
|
|---|
| 34 |
|
|---|
| 35 | // Format a time (hh:mm:ss)
|
|---|
| 36 | static QString formatTime(int secs);
|
|---|
| 37 |
|
|---|
| 38 | static QString timeForJumps(int secs);
|
|---|
| 39 |
|
|---|
| 40 | // Give a name for config (group name) based on dvd id
|
|---|
| 41 | /* static QString dvdForPref(const QString & dvd_id, int title); */
|
|---|
| 42 |
|
|---|
| 43 | #ifdef Q_OS_WIN
|
|---|
| 44 | static QString shortPathName(QString long_path);
|
|---|
| 45 |
|
|---|
| 46 | //! Enable or disables the screensaver
|
|---|
| 47 | /* static void setScreensaverEnabled(bool b); */
|
|---|
| 48 | #endif
|
|---|
| 49 |
|
|---|
| 50 | static void msleep(int ms);
|
|---|
| 51 |
|
|---|
| 52 | //! Change filenames like "C:/Program Files/" to "C:\Program Files\"
|
|---|
| 53 | static QString changeSlashes(QString filename);
|
|---|
| 54 |
|
|---|
| 55 | static bool directoryContainsDVD(QString directory);
|
|---|
| 56 |
|
|---|
| 57 | //! Returns an int with the version number of Qt at run-time.
|
|---|
| 58 | //! If version is 4.3.2 it returns 40302.
|
|---|
| 59 | static int qtVersion();
|
|---|
| 60 |
|
|---|
| 61 | //! Returns a string to be passed to mplayer with the audio equalizer
|
|---|
| 62 | //! values.
|
|---|
| 63 | static QString equalizerListToString(AudioEqualizerList values);
|
|---|
| 64 |
|
|---|
| 65 | static QStringList searchForConsecutiveFiles(const QString & initial_file);
|
|---|
| 66 | };
|
|---|
| 67 |
|
|---|
| 68 | #endif
|
|---|