mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 08:35:16 -04:00
plugin system: plugin management features added (loading and unloading)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1008 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bb904ea8e8
commit
ba1befd560
7 changed files with 898 additions and 68 deletions
82
retroshare-gui/src/gui/PluginManagerWidget.h
Normal file
82
retroshare-gui/src/gui/PluginManagerWidget.h
Normal file
|
@ -0,0 +1,82 @@
|
|||
#ifndef _PLUGIN_MANAGER_WIDGET_
|
||||
#define _PLUGIN_MANAGER_WIDGET_
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
#include <QString>
|
||||
|
||||
class QWidget;
|
||||
class QLabel;
|
||||
class QHBoxLayout;
|
||||
class QVBoxLayout;
|
||||
class QPushButton;
|
||||
class QSpacerItem;
|
||||
|
||||
//=============================================================================
|
||||
|
||||
class PluginFrame : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PluginFrame(QWidget* parent , QString pluginName );
|
||||
virtual ~PluginFrame();
|
||||
|
||||
signals:
|
||||
void needToLoad(QString pluginName);
|
||||
void needToUnload(QString pluginName);
|
||||
void needToRemove(QString pluginName);
|
||||
|
||||
public slots:
|
||||
void successfulLoad(QString pluginName, QWidget* wd=0);
|
||||
|
||||
protected slots:
|
||||
void loadButtonClicked() ;
|
||||
void removeButtonClicked();
|
||||
|
||||
protected:
|
||||
QString plgName;
|
||||
|
||||
QPushButton* loadBtn;
|
||||
unsigned char loadBtnState;
|
||||
QPushButton* removeBtn;
|
||||
QVBoxLayout* buttonsLay;
|
||||
|
||||
QHBoxLayout* mainLay; // main layout for the frame
|
||||
|
||||
QVBoxLayout* labelsLay;
|
||||
QLabel* nameLabel;
|
||||
QLabel* descrLabel;
|
||||
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
class PluginManagerWidget: public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PluginManagerWidget(QWidget* parent);
|
||||
virtual ~PluginManagerWidget();
|
||||
|
||||
void addPluginWidget(PluginFrame* pf);
|
||||
|
||||
signals:
|
||||
void needToLoadFileWithPlugin(QString fileName) ;
|
||||
|
||||
protected:
|
||||
QVBoxLayout* vlay;
|
||||
|
||||
QPushButton* instPlgButton;
|
||||
QHBoxLayout* instPlgLay;
|
||||
QSpacerItem* instPlgSpacer;
|
||||
|
||||
protected slots:
|
||||
void instPlgButtonClicked();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue