setIconSize( QSize( ITEM_HEIGHT,ITEM_HEIGHT ) );
setAlternatingRowColors( true );
+#ifndef WIN32
+ // Fixme - A bit UGLY
QFont f = font();
- f.setPointSize( f.pointSize() + 1 );
+ int pSize = f.pointSize();
+ if( pSize > 0 )
+ f.setPointSize( pSize + 1 );
+ else
+ f.setPixelSize( f.pixelSize() + 1 );
setFont( f );
+#endif
#define BI( a,b) QIcon a##_icon = QIcon( QPixmap( b##_xpm ))
BI( audio, audio );
SLOT(menuAction( QObject *)) );
menusUpdateMapper = new QSignalMapper();
- connect( menusMapper, SIGNAL( mapped(QObject *) ), this,
+ connect( menusUpdateMapper, SIGNAL( mapped(QObject *) ), this,
SLOT(menuUpdateAction( QObject *)) );
}
}
}
+void DialogsProvider::quit()
+{
+ p_intf->b_die = VLC_TRUE;
+ QApplication::quit();
+}
+
void DialogsProvider::streaminfoDialog()
{
StreamInfoDialog::getInstance( p_intf, true )->toggleVisible();
void DialogsProvider::simpleOpenDialog()
{
}
+void DialogsProvider::bookmarksDialog()
+{
+}
+
+
void DialogsProvider::popupMenu( int i_dialog )
{
public slots:
void playlistDialog();
+ void bookmarksDialog();
void streaminfoDialog();
void prefsDialog();
void messagesDialog();
void menuAction( QObject *);
void menuUpdateAction( QObject *);
void streamingDialog();
+ void quit();
};
QVLCMenu::createMenuBar( menuBar(), p_intf );
- timeLabel = new QLabel( this );
- nameLabel = new QLabel( this );
+ timeLabel = new QLabel( 0 );
+ nameLabel = new QLabel( 0 );
statusBar()->addWidget( nameLabel, 4 );
statusBar()->addPermanentWidget( timeLabel, 1 );
THEMIM->getIM(),SLOT( sliderUpdate( float ) ) );
/* Actions */
- connect( ui.playButton, SLOT( clicked() ), this, SLOT( play() ) );
- connect( ui.stopButton, SLOT( clicked() ), this, SLOT( stop() ) );
- connect( ui.nextButton, SLOT( clicked() ), this, SLOT( next() ) );
- connect( ui.prevButton, SLOT( clicked() ), this, SLOT( prev() ) );
+ connect( ui.playButton, SIGNAL( clicked() ), this, SLOT( play() ) );
+ connect( ui.stopButton, SIGNAL( clicked() ), this, SLOT( stop() ) );
+ connect( ui.nextButton, SIGNAL( clicked() ), this, SLOT( next() ) );
+ connect( ui.prevButton, SIGNAL( clicked() ), this, SLOT( prev() ) );
- connect( ui.playlistButton, SLOT(clicked()),
+ connect( ui.playlistButton, SIGNAL(clicked()),
THEDP, SLOT( playlistDialog() ) );
var_Create( p_intf, "interaction", VLC_VAR_ADDRESS );
#include <QSlider>
#include <QMouseEvent>
+#include <QLayout>
class DirectSlider : public QSlider
{
public:
- DirectSlider( QWidget *_parent ) : QSlider( _parent ) {};
- DirectSlider( Qt::Orientation q,QWidget *_parent ) : QSlider( q,_parent )
+DirectSlider( QWidget *_parent ) : QSlider( _parent ) {};
+DirectSlider( Qt::Orientation q,QWidget *_parent ) : QSlider( q,_parent )
{};
virtual ~DirectSlider() {};
{
if(event->button() == Qt::LeftButton)
{
+#ifdef WIN32
+ int width = qobject_cast<QWidget*>(parent())->sizeHint().width() -
+ 2 * qobject_cast<QWidget*>(parent())->layout()->margin();
+#else
+ int width = width();
+#endif
int pos = (int)(minimum() +
- (double)(event->x())/width()*(maximum()-minimum()) );
+ (double)(event->x())/width*(maximum()-minimum()) );
setSliderPosition( pos );
QSlider::mousePressEvent(event);
}
static void fixStyle( QWidget *w)
{
QStyle *style = qApp->style();
+#if 0
// Plastique is too dark.
/// theming ? getting KDE data ? ?
if( qobject_cast<QPlastiqueStyle *>(style) )
plt.setColor( QPalette::Inactive, QPalette::Window, vlg );
w->setPalette( plt );
}
+#endif
}
QVLCFrame( intf_thread_t *_p_intf ) : QWidget( NULL ), p_intf( _p_intf )