#include "dialogs/errors.hpp"
#include "dialogs/interaction.hpp"
+#include "main_interface.hpp"
#include <QLabel>
#include <QLineEdit>
panel->setLayout( grid );
layout->addWidget( panel );
}
- else if( p_dialog->i_flags & DIALOG_USER_PROGRESS ||
- /* TEMPORARY ! */ p_dialog->i_flags & DIALOG_INTF_PROGRESS )
+ else if( p_dialog->i_flags & DIALOG_USER_PROGRESS )
{
dialog = new QWidget( 0 );layout = new QVBoxLayout( dialog );
layout->setMargin( 2 );
progressBar->setOrientation( Qt::Horizontal );
layout->addWidget( progressBar );
}
+ else if( p_dialog->i_flags & DIALOG_INTF_PROGRESS )
+ {
+ progressBar = p_intf->p_sys->p_mi->pgBar;
+ progressBar->show();
+ }
else if( p_dialog->i_flags & DIALOG_PSZ_INPUT_OK_CANCEL )
{
dialog = new QWidget( 0 );layout = new QVBoxLayout( dialog );
void InteractionDialog::update()
{
- if( p_dialog->i_flags & DIALOG_USER_PROGRESS )
+ if( p_dialog->i_flags & DIALOG_USER_PROGRESS ||
+ p_dialog->i_flags & DIALOG_INTF_PROGRESS )
{
assert( progressBar );
- progressBar->setValue( (int)(p_dialog->val.f_float*10) );
+ progressBar->setValue( (int)( p_dialog->val.f_float * 10 ) );
description->setText( qfu( p_dialog->psz_description ) );
msg_Dbg( p_intf, "Setting progress to %i", progressBar->value() );
}
+
+ if( ( p_dialog->i_flags & DIALOG_INTF_PROGRESS ) &&
+ ( p_dialog->val.f_float >= 100.0 ) )
+ progressBar->hide();
}
InteractionDialog::~InteractionDialog()
vlc_mutex_unlock( &p_dialog->p_interaction->object_lock );
playlist_Signal( THEPL );
}
+
#include <QToolBar>
#include <QGroupBox>
#include <QDate>
+#include <QProgressBar>
#include <assert.h>
#include <vlc_keys.h>
speedLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel );
nameLabel->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel);
+ pgBar = new QProgressBar;
+ pgBar->hide();
+
/* and adding those */
statusBar()->addWidget( nameLabel, 8 );
statusBar()->addPermanentWidget( speedLabel, 0 );
+ statusBar()->addPermanentWidget( pgBar, 0 );
statusBar()->addPermanentWidget( timeLabel, 0 );
/* timeLabel behaviour:
class QMenu;
class QSize;
class QDockWidet;
+class QProgressBar;
enum{
CONTROLS_HIDDEN = 0x0,
class MainInterface : public QVLCMW
{
Q_OBJECT;
+
+ friend class VolumeClickHandler;
+ friend class InteractionDialog;
+
public:
MainInterface( intf_thread_t *);
virtual ~MainInterface();
void dragLeaveEvent( QDragLeaveEvent * );
void closeEvent( QCloseEvent *);
- friend class VolumeClickHandler;
private:
QSettings *settings;
QSystemTrayIcon *sysTray;
ControlsWidget *controls;
QMenu *speedControlMenu;
SpeedControlWidget *speedControl;
+ QProgressBar *pgBar;
void handleMainUi( QSettings* );
void privacy();