KJS::Value KstBindPlot::topLabel(KJS::ExecState *exec) const { Q_UNUSED(exec) Kst2DPlotPtr d = makePlot(_d); if (d) { KstReadLocker rl(d); return KJS::String(d->topLabel()->text()); } return KJS::String(); }
void KstBindPlot::setTopLabel(KJS::ExecState *exec, const KJS::Value& value) { if (value.type() != KJS::StringType) { return createPropertyTypeError(exec); } Kst2DPlotPtr d = makePlot(_d); if (d) { KstWriteLocker wl(d); d->topLabel()->setText(value.toString(exec).qstring()); } }