Skip to content
Snippets Groups Projects
Commit 200a5a95 authored by Janik Zikovsky's avatar Janik Zikovsky
Browse files

Refs #3867: more wiki python fun

parent 74b49fb5
No related merge requests found
......@@ -51,6 +51,11 @@ def process_sip(filename):
# Copy to output
if not in_docstring:
outlines.append(lines[i])
if line.startswith("//*wiki*"):
# Manually add wiki markup
s = lines[i].strip()
s = s[8:].strip()
wikilines.append(s)
# Give back the generated lines
return (outlines, wikilines)
......
......@@ -159,21 +159,28 @@ SliceViewer
%End
public:
//*WIKI* ==== Basics ====
void setWorkspace(const QString & wsName) throw (std::runtime_error);
QString getWorkspaceName() const;
void showControls(bool visible);
void openFromXML(const QString & xml) throw (std::invalid_argument, std::runtime_error);
void saveImage(const QString & filename = QString());
void setFastRender(bool fast);
bool getFastRender() const;
//*WIKI* ==== X/Y Dimension ====
void setXYDim(int indexX, int indexY) throw (std::invalid_argument);
void setXYDim(const QString & dimX, const QString & dimY) throw (std::invalid_argument, std::runtime_error);
int getDimX() const;
int getDimY() const;
//*WIKI* ==== Slice Point ====
void setSlicePoint(int dim, double value) throw (std::invalid_argument);
void setSlicePoint(const QString & dim, double value) throw (std::invalid_argument, std::runtime_error);
double getSlicePoint(int dim) const throw (std::invalid_argument);
double getSlicePoint(const QString & dim) const throw (std::invalid_argument, std::runtime_error);
//*WIKI* ==== View Limits ====
void setXYLimits(double xleft, double xright, double ybottom, double ytop);
QwtDoubleInterval getXLimits() const;
QwtDoubleInterval getYLimits() const;
......@@ -181,6 +188,7 @@ public:
void setXYCenter(double x, double y);
void resetZoom();
//*WIKI* ==== Color Map and Scale ====
void loadColorMap(QString filename);
void setColorScale(double min, double max, bool log) throw (std::invalid_argument);
void setColorScaleMin(double min) throw (std::invalid_argument);
......@@ -192,9 +200,6 @@ public:
void setColorScaleAutoFull();
void setColorScaleAutoSlice() ;
void setFastRender(bool fast);
bool getFastRender() const;
};
......
......@@ -113,6 +113,7 @@ class SliceViewer : QWidget
public:
//*WIKI* ==== Basics ====
void setWorkspace(const QString & wsName) throw (std::runtime_error);
QString getWorkspaceName() const;
......@@ -122,7 +123,12 @@ public:
void openFromXML(const QString & xml) throw (std::invalid_argument, std::runtime_error);
void saveImage(const QString & filename = QString());
void setFastRender(bool fast);
bool getFastRender() const;
//*WIKI* ==== X/Y Dimension ====
void setXYDim(int indexX, int indexY) throw (std::invalid_argument);
void setXYDim(const QString & dimX, const QString & dimY) throw (std::invalid_argument, std::runtime_error);
......@@ -132,6 +138,7 @@ public:
int getDimY() const;
//*WIKI* ==== Slice Point ====
void setSlicePoint(int dim, double value) throw (std::invalid_argument);
void setSlicePoint(const QString & dim, double value) throw (std::invalid_argument, std::runtime_error);
......@@ -140,6 +147,8 @@ public:
double getSlicePoint(const QString & dim) const throw (std::invalid_argument, std::runtime_error);
//*WIKI* ==== View Limits ====
void setXYLimits(double xleft, double xright, double ybottom, double ytop);
QwtDoubleInterval getXLimits() const;
......@@ -153,6 +162,7 @@ public:
void resetZoom();
//*WIKI* ==== Color Map and Scale ====
void loadColorMap(QString filename);
void setColorScale(double min, double max, bool log) throw (std::invalid_argument);
......@@ -174,11 +184,6 @@ public:
void setColorScaleAutoSlice() ;
void setFastRender(bool fast);
bool getFastRender() const;
};
......
......@@ -181,6 +181,7 @@ SliceViewer
%End
public:
//*WIKI* ==== Basics ====
void setWorkspace(const QString & wsName) throw (std::runtime_error);
%Docstring
void SliceViewer::setWorkspace(const QString & wsName)
......@@ -226,7 +227,38 @@ void SliceViewer::openFromXML(const QString & xml)
%End
void saveImage(const QString & filename = QString());
void setFastRender(bool fast);
%Docstring
void SliceViewer::setFastRender(bool fast)
------------------------------------------
Sets whether the image should be rendered in "fast" mode, where
the workspace's resolution is used to guess how many pixels to render.
If false, each pixel on screen will be rendered. This is the most
accurate view but the slowest.
This redraws the screen.
@param fast :: true to use "fast" rendering mode.
%End
bool getFastRender() const;
%Docstring
bool SliceViewer::getFastRender()
---------------------------------
Return true if the image is in "fast" rendering mode.
In "fast" mode, the workspace's resolution is used to guess how many
pixels to render. If false, each pixel on screen will be rendered.
This is the most accurate view but the slowest.
@return True if the image is in "fast" rendering mode.
%End
//*WIKI* ==== X/Y Dimension ====
void setXYDim(int indexX, int indexY) throw (std::invalid_argument);
%Docstring
void SliceViewer::setXYDim(int indexX, int indexY)
......@@ -274,6 +306,7 @@ int SliceViewer::getDimY()
%End
//*WIKI* ==== Slice Point ====
void setSlicePoint(int dim, double value) throw (std::invalid_argument);
%Docstring
void SliceViewer::setSlicePoint(int dim, double value)
......@@ -322,6 +355,8 @@ double SliceViewer::getSlicePoint(const QString & dim)
%End
//*WIKI* ==== View Limits ====
void setXYLimits(double xleft, double xright, double ybottom, double ytop);
%Docstring
void SliceViewer::setXYLimits(double xleft, double xright, double ybottom, double ytop)
......@@ -392,6 +427,7 @@ void SliceViewer::resetZoom()
%End
//*WIKI* ==== Color Map and Scale ====
void loadColorMap(QString filename);
%Docstring
void SliceViewer::loadColorMap(QString filename)
......@@ -494,37 +530,6 @@ void SliceViewer::setColorScaleAutoSlice()
%End
void setFastRender(bool fast);
%Docstring
void SliceViewer::setFastRender(bool fast)
------------------------------------------
Sets whether the image should be rendered in "fast" mode, where
the workspace's resolution is used to guess how many pixels to render.
If false, each pixel on screen will be rendered. This is the most
accurate view but the slowest.
This redraws the screen.
@param fast :: true to use "fast" rendering mode.
%End
bool getFastRender() const;
%Docstring
bool SliceViewer::getFastRender()
---------------------------------
Return true if the image is in "fast" rendering mode.
In "fast" mode, the workspace's resolution is used to guess how many
pixels to render. If false, each pixel on screen will be rendered.
This is the most accurate view but the slowest.
@return True if the image is in "fast" rendering mode.
%End
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment