* intf_qt.cpp: Qt interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_qt.cpp,v 1.1 2001/03/15 01:42:20 sam Exp $
+ * $Id: intf_qt.cpp,v 1.7 2001/05/30 17:03:12 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#include "threads.h"
#include "mtime.h"
#include "tests.h"
-#include "modules.h"
#include "stream_control.h"
#include "input_ext-intf.h"
#include "main.h"
+#include "modules.h"
+#include "modules_export.h"
+
} /* extern "C" */
#include <qapplication.h>
#include <qmessagebox.h>
#include <qlabel.h>
#include <qtimer.h>
+#include <qiconset.h>
#include <qvbox.h>
#include <qhbox.h>
void DateDisplay ( int );
void About ( void );
- void Unimplemented( void ) { intf_WarnMsg( 3, "intf warning: "
+ void Unimplemented( void ) { intf_WarnMsg( 1, "intf warning: "
"unimplemented function" ); };
private:
QLabel *p_date;
};
-#include "intf_qt.moc"
+#ifdef BUILTIN
+# include "BUILTIN_intf_qt.moc"
+#else
+# include "intf_qt.moc"
+#endif
#define SLIDER_MIN 0x00000
#define SLIDER_MAX 0x10000
p_toolbar = new QToolBar( this, "toolbar" );
p_toolbar->setHorizontalStretchable( TRUE );
- QPixmap pixmap = QPixmap( 0, 0 );
+ QIconSet * set = new QIconSet();
+ QPixmap pixmap = set->pixmap( QIconSet::Automatic, QIconSet::Normal );
#define addbut( l, t, s ) new QToolButton( pixmap, l, t, this, s, p_toolbar );
addbut( "Open", "Open a File", SLOT(FileOpen()) );
void IntfWindow::Manage( void )
{
/* Manage the slider */
- if( p_intf->p_input != NULL )
+ if( p_intf->p_input != NULL && p_intf->p_input->stream.b_seekable )
{
int i_value = p_slider->value();
#undef p_area
}
- /* If the "display popup" flag has changed */
+ /* If the "display popup" flag has changed, popup the context menu */
if( p_intf->b_menu_change )
{
- /* FIXME: find a way to display this menu right under the mouse */
- p_popup->popup( QPoint(
- p_intf->p_sys->p_app->desktop()->width() / 2,
- p_intf->p_sys->p_app->desktop()->height() / 2 ), 0 );
+ p_popup->popup( QCursor::pos() );
p_intf->b_menu_change = 0;
}