本文整理汇总了C++中Plugin::command方法的典型用法代码示例。如果您正苦于以下问题:C++ Plugin::command方法的具体用法?C++ Plugin::command怎么用?C++ Plugin::command使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin
的用法示例。
在下文中一共展示了Plugin::command方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: markerDialog
void Plot::markerDialog ()
{
if (! _plotSettings.selected)
return;
Entity *e = _plotSettings.selected->settings();
if (! e)
return;
QVariant *plugin = e->get(QString("plugin"));
if (! plugin)
return;
PluginFactory fac;
Plugin *plug = fac.load(plugin->toString());
if (! plug)
return;
PluginData pd;
pd.command = QString("dialog");
pd.dialogParent = this;
pd.settings = e;
if (! plug->command(&pd))
return;
connect(pd.dialog, SIGNAL(accepted()), this, SLOT(markerDialog2()));
pd.dialog->show();
}
示例2: QString
void
PlotWidget::editIndicator2 (QString name)
{
Entity *e = _settings.value(name);
if (! e)
return;
QVariant *plugin = e->get(QString("plugin"));
if (! plugin)
return;
PluginFactory fac;
Plugin *plug = fac.load(plugin->toString());
if (! plug)
return;
PluginData pd;
pd.command = QString("dialog");
pd.dialogParent = this;
pd.settings = e;
if (! plug->command(&pd))
return;
connect(pd.dialog, SIGNAL(accepted()), this, SLOT(refresh()));
pd.dialog->show();
}
示例3: db
void
PlotWidget::refresh ()
{
if (! _plots.size())
return;
// load fresh symbol data
if (! _cw->count())
return;
PluginFactory fac;
Plugin *qplug = fac.load(QString("DBSymbol"));
if (! qplug)
return;
DataBase db(g_session);
saveMarkers(db);
Bars sym = _cw->currentSymbol();
g_symbol->clear();
g_symbol->setSymbol(sym.symbol());
g_symbol->setLength(_cw->length());
g_symbol->setRange(_cw->range());
PluginData pd;
pd.command = QString("getBars");
pd.bars = g_symbol;
if (! qplug->command(&pd))
return;
else
emit signalClear();
// refresh dates
emit signalSetDates();
QHashIterator<QString, Plot *> it(_plots);
while (it.hasNext())
{
it.next();
Plot *plot = it.value();
Entity *e = _settings.value(it.key());
if (! e)
continue;
QVariant *plugin = e->get(QString("plugin"));
if (! plugin)
continue;
Plugin *iplug = fac.load(plugin->toString());
if (! iplug)
continue;
PluginData tpd;
tpd.command = QString("runIndicator");
tpd.settings = e;
if (! iplug->command(&tpd))
continue;
for (int tpos = 0; tpos < tpd.curves.size(); tpos++)
plot->setCurve(tpd.curves.at(tpos));
for (int tpos = 0; tpos < tpd.markers.size(); tpos++)
plot->setMarker(tpd.markers.at(tpos));
}
loadMarkers(db);
emit signalDraw();
setScrollBarSize();
QStringList tl;
tl << "OTA" << "-" << sym.symbol() << "(" + sym.name() + ")" << _cw->lengthText() << _cw->rangeText();
emit signalTitle(tl.join(" "));
}