[Kst] FWD: DCOP Suggested functions

Andrew Walker arwalker at sumusltd.com
Thu Jun 10 01:45:30 CEST 2004


I asked Rick to put together a proposal for the new DCOP API,
which is attached. It looks like a great point to start, and
we can discuss and/or make changes as necessary.

Andrew

---------- Original Message ----------------------------------
From: Rick Chern <rickchern at shaw.ca>
Date:  Wed, 09 Jun 2004 15:54:34 -0700

=================================================================================
Suggested Functions
=================================================================================

  //Sets the window MDI mode
  virtual bool setMDIMode(const int mode) = 0;

  //Dock/undock windows in childframe or toplevel mode
  virtual bool dockWindow(const QString& windowname) = 0;
  virtual bool undockWindow(const QString& windowname) = 0;

  //set tile mode in childframe mode
  virtual bool setTileMode(const int mode) = 0;

  //position/resize window (relative to kst window)
  virtual bool positionWindow(const int topleftX,
                    const int topleftY,
                  const int bottomrightX,
                  const int bottomrightY) = 0;

  //close window
  virtual bool closeWindow(const QString& windowname) = 0;

  //make window active
  virtual bool activateWindow(const QString& windowname) = 0;

  //install plugin
  virtual bool installPlugin(const QString& xmlfilename) = 0;

  //create plugin
  virtual bool createPlugin(const QString& pluginName,
                 const QStringList& inputVectors,
               const QStringList& inputScalars) = 0;

  //zoom plot axes
  virtual bool setPlotAxes(const QString& plotName,
                 const int XLower,
                 const int XUpper,
               const int YLower,
               const int YUpper) = 0;

  //position plot
  virtual bool positionPlot (const QString& plotName,
                   const int topleftX,
                   const int topleftY,
                 const int bottomrightX,
                 const int bottomrightY) = 0;

  //cleanup plot layout
  virtual bool cleanupLayout(const QString& windowName) = 0;

  //zoom (maximize) plot
  virtual bool maximizePlot(const QString& plotName) = 0;

  //edit->Copy
  virtual bool copy() = 0;

  //labels
  virtual bool createLabel(const QString& text,
                  const int size,
               const QString& font,
               const QString& plotName,
               const int xPosition,
               const int yPosition) = 0;





=================================================================================
Existing Functions
=================================================================================

  virtual void showDataManager() = 0;

  virtual QStringList scalarList() = 0;
  virtual QStringList vectorList() = 0;
  virtual QStringList objectList() = 0;
  virtual QStringList curveList() = 0;
  virtual QString activeWindow() = 0;
  virtual QStringList windowList() = 0;
  virtual QStringList plotList() = 0;
  virtual QStringList plotList(const QString& window) = 0;
  virtual QStringList pluginList() = 0;
  virtual QStringList filterList() = 0;
  virtual QStringList filterSetList() = 0;
  virtual QStringList filterSetContents(const QString& filter) = 0;

  virtual QStringList inputVectors(const QString& objectName) = 0;
  virtual QStringList inputScalars(const QString& objectName) = 0;
  virtual QStringList outputVectors(const QString& objectName) = 0;
  virtual QStringList outputScalars(const QString& objectName) = 0;

  virtual double scalar(const QString& name) = 0;
  virtual bool setScalar(const QString& name, double value) = 0;

  virtual double vector(const QString& name, int index) = 0;
  virtual bool setVector(const QString& name, int index, double value) = 0;
  virtual bool resizeVector(const QString& name, int newSize) = 0;
  virtual bool clearVector(const QString& name) = 0;
  virtual int vectorSize(const QString& name) = 0;

  // FIXME: might want to remove this.  it generates an orphan vector, but
  //        it's useful for testing purposes
  virtual const QString& generateVector(const QString& name, double from, double to, int points) = 0;

  virtual const QString& generateScalar(const QString& name, double value) = 0;


  virtual bool plotEquation(const QString& xvector, const QString& equation, const QString& plotName, const QColor& color) = 0;
  virtual bool plotEquation(const QString& xvector, const QString& equation, const QString& plotName) = 0;
  virtual bool plotEquation(double start, double end, int numSamples, const QString& equation, const QString& plotName, const QColor& color) = 0;
  virtual bool plotEquation(double start, double end, int numSamples, const QString& equation, const QString& plotName) = 0;

  virtual bool saveVector(const QString& vector, const QString& filename) = 0;
  virtual bool printImage(const QString& filename) = 0;
  virtual bool printPostScript(const QString& filename) = 0;

  virtual const QString& createWindow(const QString& name) = 0;
  virtual const QString& createPlot(const QString& name) = 0;
  virtual bool deletePlot(const QString& name) = 0;
  virtual bool deletePlot(const QString& window, const QString& name) = 0;
  virtual QStringList plotContents(const QString& name) = 0;
  virtual bool addCurveToPlot(const QString& plot, const QString& curve) = 0;
  virtual bool removeCurveFromPlot(const QString& plot, const QString& curve) = 0;

  virtual const QString& createCurve(const QString& name, const QString& xVector, const QString& yVector, const QString& xErrorVector, const QString& yErrorVector, const QColor& color) = 0;
  virtual const QString& createCurve(const QString& name, const QString& xVector, const QString& yVector, const QString& xErrorVector, const QString& yErrorVector) = 0;

  virtual void reloadVectors() = 0;
  virtual void reloadVector(const QString& vector) = 0;

  virtual const QString& loadVector(const QString& file, const QString& field) = 0;

  virtual const QString& fileName() = 0;
  virtual bool save() = 0;
  virtual bool saveAs(const QString& fileName) = 0;
  virtual void newFile() = 0;
  virtual bool open(const QString& fileName) = 0;




________________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Data Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Get It Now At www.doteasy.com






More information about the Kst mailing list