AS_IF([test "${SYS}" = "darwin"], [enable_qt4=no])
])
AS_IF([test "${enable_qt4}" != "no"], [
- PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.2.0], [
+ PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.3.0], [
VLC_ADD_PLUGIN([qt4])
AC_DEFINE([HAVE_QT4], 1, [Define to 1 if you have QT4 library.])
ALIASES="${ALIASES} qvlc"
setAttribute( Qt::WA_PaintOnScreen, true );
/* The core can ask through a callback to show the video. */
-#if HAS_QT43
connect( this, SIGNAL(askVideoWidgetToShow( unsigned int, unsigned int)),
this, SLOT(SetSizing(unsigned int, unsigned int )),
Qt::BlockingQueuedConnection );
-#else
-#warning This is broken. Fix it with a QEventLoop with a processEvents ()
- connect( this, SIGNAL(askVideoWidgetToShow( unsigned int, unsigned int)),
- this, SLOT(SetSizing(unsigned int, unsigned int )) );
-#endif
}
void VideoWidget::paintEvent(QPaintEvent *ev)
dialogBox->setFileMode( QFileDialog::ExistingFiles );
dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
-#if HAS_QT43
dialogBox->restoreState(
getSettings()->value( "file-dialog-state" ).toByteArray() );
-#endif
/* We don't want to see a grip in the middle of the window, do we? */
dialogBox->setSizeGripEnabled( false );
/* Ugly hacks to get the good Widget */
//This lineEdit is the normal line in the fileDialog.
-#if HAS_QT43
lineFileEdit = dialogBox->findChildren<QLineEdit*>()[0];
-#else
- lineFileEdit = dialogBox->findChildren<QLineEdit*>()[1];
-#endif
/* Make a list of QLabel inside the QFileDialog to access the good ones */
QList<QLabel *> listLabel = dialogBox->findChildren<QLabel*>();
FileOpenPanel::~FileOpenPanel()
{
-#if HAS_QT43
getSettings()->setValue( "file-dialog-state", dialogBox->saveState() );
-#endif
}
/* Show a fileBrowser to select a subtitle */
getSettings()->beginGroup("Playlist");
-#if HAS_QT43
if( getSettings()->contains( "headerState" ) )
{
view->header()->restoreState(
getSettings()->value( "headerState" ).toByteArray() );
}
else
-#endif
{
/* Configure the size of the header */
view->header()->resizeSection( 0, 200 );
StandardPLPanel::~StandardPLPanel()
{
-#if HAS_QT43
getSettings()->beginGroup("Playlist");
getSettings()->setValue( "headerState", view->header()->saveState() );
getSettings()->endGroup();
-#endif
}
optionWidgets.append( ui.outputModule );
optionWidgets.append( ui.volNormBox );
/*Little mofification of ui.volumeValue to compile with Qt < 4.3 */
-#if HAS_QT43
ui.volumeValue->setButtonSymbols(QAbstractSpinBox::NoButtons);
-#endif
optionWidgets.append( ui.volumeValue );
updateAudioOptions( ui.outputModule->currentIndex() );
#include <QEvent>
-#define HAS_QT43 ( QT_VERSION >= 0x040300 )
+#if ( QT_VERSION < 0x040300 )
+# error Update your Qt
+#endif
enum {
QT_NORMAL_MODE = 0,
#define TOGGLEV( x ) { if( x->isVisible() ) x->hide(); \
else x->show(); }
-#if HAS_QT43
- #define setLayoutMargins( a, b, c, d, e) setContentsMargins( a, b, c, d )
-#else
- #define setLayoutMargins( a, b, c, d, e) setMargin( e )
-#endif
+#define setLayoutMargins( a, b, c, d, e) setContentsMargins( a, b, c, d )
#define getSettings() p_intf->p_sys->mainSettings