mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 15:09:33 -05:00
plugin, made in this way, will not leave garbage
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1010 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2f82a962fc
commit
02378236e8
@ -1,10 +1,28 @@
|
||||
//#include <QApplication>
|
||||
//#include <QString>
|
||||
//#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#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 ;
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <QFrame>
|
||||
class QVBoxLayout;
|
||||
|
||||
#include <PluginInterface.h>
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user