ChunkStream add(int, Chunk)
Graphic save() and load() version 2 git-svn-id: svn://db.shs.com.ru/libs@346 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -83,7 +83,7 @@ class Graphic: public QFrame
|
||||
Q_PROPERTY(QRectF visualRect READ visualRect WRITE setVisualRect)
|
||||
Q_PROPERTY(QRectF defaultRect READ defaultRect WRITE setDefaultRect)
|
||||
Q_PROPERTY(int minimumRepaintInterval READ minimumRepaintInterval WRITE setMinimumRepaintInterval)
|
||||
|
||||
|
||||
Q_PROPERTY(double gridNumbersMultiplierX READ gridNumbersMultiplierX WRITE setGridNumbersMultiplierX)
|
||||
Q_PROPERTY(double gridNumbersMultiplierY READ gridNumbersMultiplierY WRITE setGridNumbersMultiplierY)
|
||||
Q_PROPERTY(Graduation graduationX READ graduationX WRITE setGraduationX)
|
||||
@@ -95,7 +95,7 @@ class Graphic: public QFrame
|
||||
Q_PROPERTY(int histogramMinIntervals READ histogramMinIntervals WRITE setHistogramMinIntervals)
|
||||
Q_PROPERTY(int histogramMaxIntervals READ histogramMaxIntervals WRITE setHistogramMaxIntervals)
|
||||
Q_PROPERTY(double histogramMinDeltaMultiplier READ histogramMinDeltaMultiplier WRITE setHistogramMinDeltaMultiplier)
|
||||
|
||||
|
||||
Q_PROPERTY(Graphic::GraphicsData graphicsData READ graphicsData WRITE setGraphicsData)
|
||||
|
||||
public:
|
||||
@@ -191,13 +191,13 @@ public:
|
||||
|
||||
///void reset() {mutex.lock(); clear(); mutex.unlock();}
|
||||
void reset() {clear();}
|
||||
|
||||
|
||||
GraphicType graphic(int arg) {if (arg < 0 || arg >= graphics.size()) return GraphicType(); return graphics[arg];}
|
||||
const QVector<GraphicType> & allGraphics() const {return graphics;}
|
||||
void setAllGraphics(const QVector<GraphicType> & g, bool update = true) {graphics = g; if (update) updateLegend();}
|
||||
void setHistogramData(const QVector<float> & g, int graphic);
|
||||
void setHistogramData(const QVector<float> & g) {setHistogramData(g, curGraphic);}
|
||||
|
||||
|
||||
double canvas2realX(double px) const;
|
||||
double canvas2realY(double py) const;
|
||||
double real2canvasX(double px) const;
|
||||
@@ -270,7 +270,7 @@ public slots:
|
||||
void setHistogramMaxIntervals(int value) {max_int = value; updateGraphics();}
|
||||
void setHistogramMinDeltaMultiplier(double value) {mdm = value; updateGraphics();}
|
||||
void setGraphicsData(const GraphicsData & gd);
|
||||
|
||||
|
||||
void setGridNumbersMultiplierX(double value) {grid_numbers_x = value; updateGraphics();}
|
||||
void setGridNumbersMultiplierY(double value) {grid_numbers_y = value; updateGraphics();}
|
||||
void setGraduationX(Graduation value) {grad_x = value; if (aupdate) update();;}
|
||||
@@ -301,7 +301,7 @@ public slots:
|
||||
void updateGraphics() {findGraphicsRect(); update();}
|
||||
void setCurrentGraphic(int arg) {if (arg < 0 || arg >= graphics.size()) return; curGraphic = arg;}
|
||||
void setGraphicsCount(int arg, bool update = true);
|
||||
|
||||
|
||||
void zoom(float factor);
|
||||
void zoomIn() {zoom(1. / 1.2);}
|
||||
void zoomOut() {zoom(1.2);}
|
||||
@@ -420,8 +420,8 @@ Q_DECLARE_METATYPE(Graphic::GraphicsData)
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(Graphic::Buttons)
|
||||
|
||||
//inline QDataStream & operator <<(QDataStream & s, const Graphic::GraphicsData & v) {s << v; return s;}
|
||||
//inline QDataStream & operator >>(QDataStream & s, Graphic::GraphicsData & v) {s >> v; return s;}
|
||||
inline QDataStream & operator <<(QDataStream & s, const Graphic::Graduation & v) {s << (int)v; return s;}
|
||||
inline QDataStream & operator >>(QDataStream & s, Graphic::Graduation & v) {s >> *((int*)(&v)); return s;}
|
||||
|
||||
class __GraphicRegistrator__ {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user