1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

GCS/empty,map,scope: Small changes to IUAVGadget force update of gadgets.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@360 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
ephy 2010-03-21 16:53:08 +00:00 committed by ephy
parent bfdeb32fef
commit 29fef56372
13 changed files with 13 additions and 20 deletions

View File

@ -13,6 +13,7 @@ EmptyGadget::EmptyGadget(EmptyGadgetWidget *widget) :
m_widget(widget),
m_toolbar(new QToolBar())
{
m_gadgetKind = QString("EmptyGadget");
}
EmptyGadget::~EmptyGadget()

View File

@ -11,6 +11,8 @@
EmptyGadgetFactory::EmptyGadgetFactory(QObject *parent) : IUAVGadgetFactory(parent)
{
m_name = tr("Choose gadget...");
m_gadgetKind = QString("EmptyGadget");
}
EmptyGadgetFactory::~EmptyGadgetFactory()
@ -22,7 +24,3 @@ Core::IUAVGadget* EmptyGadgetFactory::createUAVGadget(QWidget *parent) {
EmptyGadgetWidget* gadgetWidget = new EmptyGadgetWidget(parent);
return new EmptyGadget(gadgetWidget);
}
QString EmptyGadgetFactory::name() {
return QString("EmptyGadget");
}

View File

@ -22,7 +22,6 @@ public:
~EmptyGadgetFactory();
Core::IUAVGadget *createUAVGadget(QWidget *parent);
QString name();
};
#endif // EMPTYGADGETFACTORY_H_

View File

@ -17,8 +17,10 @@ EmptyGadgetWidget::EmptyGadgetWidget(QWidget *parent) : QLabel(parent)
{
setMinimumSize(64,64);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setText(QString("Empty gadget"));
this->
setText(tr("Choose a gadget to display in this view.\n") +
tr("You can also split this view in two.\n\n") +
tr("Once you are done, choose Hide Toolbars in the Window menu."));
}
EmptyGadgetWidget::~EmptyGadgetWidget()

View File

@ -28,7 +28,6 @@ bool EmptyPlugin::initialize(const QStringList& args, QString *errMsg)
Q_UNUSED(errMsg);
mf = new EmptyGadgetFactory(this);
addAutoReleasedObject(mf);
qDebug() << "EmptyPlugin::initialize()";
return true;
}

View File

@ -13,6 +13,7 @@ MapGadget::MapGadget(MapGadgetWidget *widget) :
m_widget(widget),
m_toolbar(new QToolBar())
{
m_gadgetKind = QString("MapGadget");
}
MapGadget::~MapGadget()

View File

@ -11,6 +11,8 @@
MapGadgetFactory::MapGadgetFactory(QObject *parent) : IUAVGadgetFactory(parent)
{
m_name = tr("Map Gadget");
m_gadgetKind = QString("MapGadget");
}
MapGadgetFactory::~MapGadgetFactory()
@ -22,7 +24,3 @@ Core::IUAVGadget* MapGadgetFactory::createUAVGadget(QWidget *parent) {
MapGadgetWidget* gadgetWidget = new MapGadgetWidget(parent);
return new MapGadget(gadgetWidget);
}
QString MapGadgetFactory::name() {
return QString("MapGadget");
}

View File

@ -22,7 +22,6 @@ public:
~MapGadgetFactory();
Core::IUAVGadget *createUAVGadget(QWidget *parent);
QString name();
};
#endif // MAPGADGETFACTORY_H_

View File

@ -28,7 +28,6 @@ bool MapPlugin::initialize(const QStringList& args, QString *errMsg)
Q_UNUSED(errMsg);
mf = new MapGadgetFactory(this);
addAutoReleasedObject(mf);
qDebug() << "MapPlugin::initialize()";
return true;
}

View File

@ -13,6 +13,7 @@ ScopeGadget::ScopeGadget(ScopeGadgetWidget *widget) :
m_widget(widget),
m_toolbar(new QToolBar())
{
m_gadgetKind = QString("ScopeGadget");
}
ScopeGadget::~ScopeGadget()

View File

@ -11,6 +11,8 @@
ScopeGadgetFactory::ScopeGadgetFactory(QObject *parent) : IUAVGadgetFactory(parent)
{
m_name = tr("Scope Gadget");
m_gadgetKind = QString("ScopeGadget");
}
ScopeGadgetFactory::~ScopeGadgetFactory()
@ -22,7 +24,3 @@ Core::IUAVGadget* ScopeGadgetFactory::createUAVGadget(QWidget *parent) {
ScopeGadgetWidget* gadgetWidget = new ScopeGadgetWidget(parent);
return new ScopeGadget(gadgetWidget);
}
QString ScopeGadgetFactory::name() {
return QString("ScopeGadget");
}

View File

@ -22,7 +22,6 @@ public:
~ScopeGadgetFactory();
Core::IUAVGadget *createUAVGadget(QWidget *parent);
QString name();
};
#endif // SCOPEGADGETFACTORY_H_

View File

@ -28,7 +28,6 @@ bool ScopePlugin::initialize(const QStringList& args, QString *errMsg)
Q_UNUSED(errMsg);
mf = new ScopeGadgetFactory(this);
addAutoReleasedObject(mf);
qDebug() << "ScopePlugin::initialize()";
return true;
}