Ejemplo n.º 1
0
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();
}
Ejemplo n.º 2
0
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());
  }
}