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