diff --git a/retroshare-gui/src/gui/plugins/smplayer_plugin/SMPlayerPlugin.cpp b/retroshare-gui/src/gui/plugins/smplayer_plugin/SMPlayerPlugin.cpp index a35e1bfcf..9339e6a40 100644 --- a/retroshare-gui/src/gui/plugins/smplayer_plugin/SMPlayerPlugin.cpp +++ b/retroshare-gui/src/gui/plugins/smplayer_plugin/SMPlayerPlugin.cpp @@ -1,10 +1,28 @@ //#include //#include -//#include +#include #include "SMPlayerPlugin.h" #include "smplayer.h" +SMPlayerPluginWidget::SMPlayerPluginWidget(QWidget* parent, + Qt::WindowFlags flags ) + :QFrame(parent) +{ + player = new SMPlayer(); + + lay = new QVBoxLayout(this); + lay->addWidget( player->gui() ); +} + +SMPlayerPluginWidget::~SMPlayerPluginWidget() +{ + delete player; +} + + +//============================================================================== + QString SMPlayerPlugin::pluginDescription() const { @@ -23,9 +41,8 @@ SMPlayerPlugin::pluginName() const QWidget* SMPlayerPlugin::pluginWidget(QWidget * parent ) { - SMPlayer *smplayer = new SMPlayer(); -// smplayer->start(); - return smplayer->gui(); + SMPlayerPluginWidget* wd = new SMPlayerPluginWidget(parent); + return wd ; } diff --git a/retroshare-gui/src/gui/plugins/smplayer_plugin/SMPlayerPlugin.h b/retroshare-gui/src/gui/plugins/smplayer_plugin/SMPlayerPlugin.h index 2132ce7fc..fbb9e278f 100644 --- a/retroshare-gui/src/gui/plugins/smplayer_plugin/SMPlayerPlugin.h +++ b/retroshare-gui/src/gui/plugins/smplayer_plugin/SMPlayerPlugin.h @@ -5,6 +5,8 @@ #include #include +#include +class QVBoxLayout; #include @@ -12,6 +14,18 @@ class SMPlayer; +class SMPlayerPluginWidget: public QFrame +{ + Q_OBJECT + + public: + SMPlayerPluginWidget(QWidget* parent, Qt::WindowFlags flags = 0 ); + ~SMPlayerPluginWidget(); + + protected: + SMPlayer* player; + QVBoxLayout* lay; +}; class SMPlayerPlugin: public QObject, public PluginInterface {