* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#ifndef _QVLC_H_
-#define _QVLC_H_
+#ifndef QVLC_H_
+#define QVLC_H_
#ifdef HAVE_CONFIG_H
# include "config.h"
#include <vlc_playlist.h> /* playlist_t */
#include <QEvent>
+#include <QString>
#if ( QT_VERSION < 0x040300 )
# error Update your Qt version
enum {
DialogEventType = 0,
IMEventType = 100,
- PLEventType = 200
-};
-
-enum {
- DialogEvent_Type = QEvent::User + DialogEventType + 1,
- //PLUndockEvent_Type = QEvent::User + DialogEventType + 2;
- //PLDockEvent_Type = QEvent::User + DialogEventType + 3;
- SetVideoOnTopEvent_Type = QEvent::User + DialogEventType + 4,
+ PLEventType = 200,
+ MsgEventType = 300,
};
-class QApplication;
+class QVLCApp;
class QMenu;
class MainInterface;
-class DialogsProvider;
-class VideoWidget;
class QSettings;
struct intf_sys_t
{
vlc_thread_t thread;
- QApplication *p_app; /* Main Qt Application */
+ QVLCApp *p_app; /* Main Qt Application */
MainInterface *p_mi; /* Main Interface, NULL if DialogProvider Mode */
QSettings *mainSettings; /* Qt State settings not messing main VLC ones */
bool b_isDialogProvider; /* Qt mode or Skins mode */
+ int i_screenHeight; /* Detection of Small screens */
+
playlist_t *p_playlist; /* Core Playlist discussion */
- const char *psz_filepath; /* Last path used in dialogs */
+ QString filepath; /* Last path used in dialogs */
QMenu * p_popup_menu; /* The right click menu */
};
#define THEPL p_intf->p_sys->p_playlist
-#define QPL_LOCK vlc_object_lock( THEPL );
-#define QPL_UNLOCK vlc_object_unlock( THEPL );
+#define QPL_LOCK playlist_Lock( THEPL );
+#define QPL_UNLOCK playlist_Unlock( THEPL );
#define THEDP DialogsProvider::getInstance()
#define THEMIM MainInputManager::getInstance( p_intf )
#define qfu( i ) QString::fromUtf8( i )
-#define qtr( i ) QString::fromUtf8( _(i) )
-#define qtu( i ) (i).toUtf8().data()
-#define qta( i ) (i).toAscii().data()
+#define qtr( i ) QString::fromUtf8( vlc_gettext(i) )
+#define qtu( i ) ((i).toUtf8().constData())
#define CONNECT( a, b, c, d ) connect( a, SIGNAL( b ), c, SLOT(d) )
#define BUTTONACT( b, a ) connect( b, SIGNAL( clicked() ), this, SLOT(a) )
#define getSettings() p_intf->p_sys->mainSettings
-#include <QString>
-/* Replace separators on Windows because Qt is always using / */
-static inline QString toNativeSeparators( QString s )
-{
-#ifdef WIN32
- for (int i=0; i<(int)s.length(); i++)
- {
- if (s[i] == QLatin1Char('/'))
- s[i] = QLatin1Char('\\');
- }
-#endif
- return s;
-}
-
-static inline QString removeTrailingSlash( QString s )
-{
- if( ( s.length() > 1 ) && ( s[s.length()-1] == QLatin1Char( '/' ) ) )
- s.remove( s.length() - 1, 1 );
- return s;
-}
-
-#define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) )
-
#endif