Ejemplo n.º 1
0
static void CreatePlots(InType &in, KstTopLevelViewPtr tlv) {
    KstApp *kst = KstApp::inst();
    QString creatingPlots = i18n("Creating plots");

    kst->slotUpdateProgress( 0, 0, creatingPlots );
    int count = in.n_plots;
    int handled = 0;

    for (int i_plot = 0; i_plot < in.n_plots; ++i_plot) {
        Kst2DPlotPtr plot = new Kst2DPlot(KST::suggestPlotName());
        tlv->appendChild(plot.data());

        plot->resizeFromAspect(double(i_plot%in.n_cols)/double(in.n_cols),
                               double(i_plot/in.n_cols)/double(in.n_rows),
                               1.0/double(in.n_cols), 1.0/double(in.n_rows));

        ++handled;
        kst->slotUpdateProgress( count, handled, creatingPlots );
    }

    tlv->setColumns(in.n_cols);
    tlv->setOnGrid(true);

    kst->slotUpdateProgress( 0, 0, QString::null );
}
Ejemplo n.º 2
0
KstBindPlotLabel::KstBindPlotLabel(KJS::ExecState *exec, Kst2DPlotPtr d)
: QObject(), KstBinding("PlotLabel", false), _d(d.data()) {
  KJS::Object o(this);
  addBindings(exec, o);
}
Ejemplo n.º 3
0
KstBindAxis::KstBindAxis(KJS::ExecState *exec, Kst2DPlotPtr d, bool isX)
: QObject(), KstBinding("Axis", false), _d(d.data()), _xAxis(isX) {
  KJS::Object o(this);
  addBindings(exec, o);
}
Ejemplo n.º 4
0
KstBindPlot::KstBindPlot(KJS::ExecState *exec, Kst2DPlotPtr d)
: KstBindBorderedViewObject(exec, d.data(), "Plot") {
  KJS::Object o(this);
  addBindings(exec, o);
}