Commit 9c18c473 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Put the dialog you are not likely to use during playback as QDialogs,...

Qt4 - Put the dialog you are not likely to use during playback as QDialogs, meaning centered on MainInterface.
VLM, Preferences, Errors, Podcast_Conf, GotoTime, Help.

parent f1d202e5
......@@ -33,7 +33,8 @@
ErrorsDialog *ErrorsDialog::instance = NULL;
ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
ErrorsDialog::ErrorsDialog( QWidget *parent, intf_thread_t *_p_intf )
: QVLCDialog( parent, _p_intf )
{
setWindowTitle( qtr( "Errors" ) );
resize( 500 , 300 );
......
......@@ -31,14 +31,14 @@ class QCheckBox;
class QGridLayout;
class QTextEdit;
class ErrorsDialog : public QVLCFrame
class ErrorsDialog : public QVLCDialog
{
Q_OBJECT;
public:
static ErrorsDialog * getInstance( intf_thread_t *p_intf )
{
if( !instance)
instance = new ErrorsDialog( p_intf );
instance = new ErrorsDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
return instance;
}
virtual ~ErrorsDialog() {};
......@@ -46,7 +46,7 @@ public:
void addError( QString, QString );
void addWarning( QString, QString );
private:
ErrorsDialog( intf_thread_t * );
ErrorsDialog( QWidget *parent, intf_thread_t * );
static ErrorsDialog *instance;
void add( bool, QString, QString );
......
......@@ -36,7 +36,8 @@
GotoTimeDialog *GotoTimeDialog::instance = NULL;
GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
GotoTimeDialog::GotoTimeDialog( QWidget *parent, intf_thread_t *_p_intf)
: QVLCDialog( parent, _p_intf )
{
setWindowFlags( Qt::Tool );
setWindowTitle( qtr( "Go to time" ) );
......
......@@ -28,20 +28,20 @@
class QTimeEdit;
class GotoTimeDialog : public QVLCFrame
class GotoTimeDialog : public QVLCDialog
{
Q_OBJECT;
public:
static GotoTimeDialog * getInstance( intf_thread_t *p_intf )
{
if( !instance)
instance = new GotoTimeDialog( p_intf );
instance = new GotoTimeDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
return instance;
}
virtual ~GotoTimeDialog();
private:
GotoTimeDialog( intf_thread_t * );
GotoTimeDialog( QWidget *, intf_thread_t * );
static GotoTimeDialog *instance;
QTimeEdit *timeEdit;
private slots:
......
......@@ -48,7 +48,8 @@
HelpDialog *HelpDialog::instance = NULL;
HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
HelpDialog::HelpDialog( QWidget *parent, intf_thread_t *_p_intf )
: QVLCDialog( parent, _p_intf )
{
setWindowTitle( qtr( "Help" ) );
resize( 600, 560 );
......
......@@ -34,20 +34,20 @@ class QLabel;
class QEvent;
class QPushButton;
class HelpDialog : public QVLCFrame
class HelpDialog : public QVLCDialog
{
Q_OBJECT;
public:
static HelpDialog * getInstance( intf_thread_t *p_intf )
{
if( !instance)
instance = new HelpDialog( p_intf );
instance = new HelpDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
return instance;
}
virtual ~HelpDialog();
private:
HelpDialog( intf_thread_t * );
HelpDialog( QWidget *, intf_thread_t * );
static HelpDialog *instance;
public slots:
void close();
......
......@@ -25,8 +25,8 @@
PodcastConfigDialog *PodcastConfigDialog::instance = NULL;
PodcastConfigDialog::PodcastConfigDialog( intf_thread_t *_p_intf)
: QVLCFrame( _p_intf )
PodcastConfigDialog::PodcastConfigDialog( QWidget *parent, intf_thread_t *_p_intf)
: QVLCDialog( parent, _p_intf )
{
ui.setupUi( this );
......
......@@ -27,20 +27,21 @@
#include "util/qvlcframe.hpp"
#include "ui/podcast_configuration.h"
class PodcastConfigDialog : public QVLCFrame
class PodcastConfigDialog : public QVLCDialog
{
Q_OBJECT;
public:
static PodcastConfigDialog * getInstance( intf_thread_t *p_intf )
{
if( !instance )
instance = new PodcastConfigDialog( p_intf );
instance = new PodcastConfigDialog( (QWidget *)p_intf->p_sys->p_mi,
p_intf );
return instance;
}
virtual ~PodcastConfigDialog();
private:
PodcastConfigDialog( intf_thread_t * );
PodcastConfigDialog( QWidget *, intf_thread_t * );
static PodcastConfigDialog *instance;
Ui::PodcastConfiguration ui;
public slots:
......
......@@ -40,7 +40,8 @@
PrefsDialog *PrefsDialog::instance = NULL;
PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
PrefsDialog::PrefsDialog( QWidget *parent, intf_thread_t *_p_intf )
: QVLCDialog( parent, _p_intf )
{
QGridLayout *main_layout = new QGridLayout( this );
setWindowTitle( qtr( "Preferences" ) );
......
......@@ -43,14 +43,14 @@ class QListWidget;
class QListWidgetItem;
class QLabel;
class PrefsDialog : public QVLCFrame
class PrefsDialog : public QVLCDialog
{
Q_OBJECT;
public:
static PrefsDialog * getInstance( intf_thread_t *_p_intf )
static PrefsDialog * getInstance( intf_thread_t *p_intf )
{
if( !instance )
instance = new PrefsDialog( _p_intf );
instance = new PrefsDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
return instance;
}
virtual ~PrefsDialog() {};
......@@ -60,7 +60,7 @@ public:
#endif
private:
PrefsDialog( intf_thread_t * );
PrefsDialog( QWidget *, intf_thread_t * );
QGridLayout *main_layout;
QWidget *main_panel;
......
......@@ -51,7 +51,7 @@ static const char *psz_type[] = { "Broadcast", "Schedule", "VOD" };
VLMDialog *VLMDialog::instance = NULL;
VLMDialog::VLMDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
VLMDialog::VLMDialog( QWidget *parent, intf_thread_t *_p_intf ) : QVLCDialog( parent, _p_intf )
{
p_vlm = vlm_New( p_intf );
......
......@@ -63,22 +63,22 @@ class VLMAWidget;
class VLMWrapper;
class VLMDialog : public QVLCFrame
class VLMDialog : public QVLCDialog
{
Q_OBJECT;
public:
static VLMDialog * getInstance( intf_thread_t *p_intf )
{
if( !instance)
instance = new VLMDialog( p_intf );
instance = new VLMDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
return instance;
};
virtual ~VLMDialog();
VLMWrapper *vlmWrapper;
vlm_t *p_vlm;
vlm_t *p_vlm;
private:
VLMDialog( intf_thread_t * );
VLMDialog( QWidget *, intf_thread_t * );
static VLMDialog *instance;
Ui::Vlm ui;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment