General Purpose Geodetic Library
SgGuiPlotter.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of Space Geodetic Library. The library is used by
4  * nuSolve, a part of CALC/SOLVE system, and designed to make analysis of
5  * geodetic VLBI observations.
6  * Copyright (C) 2010-2020 Sergei Bolotin.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef SG_GUI_PLOTTER_H
24 #define SG_GUI_PLOTTER_H
25 
26 #ifdef HAVE_CONFIG_H
27 # include <config.h>
28 #endif
29 
30 #include <QtCore/QMap>
31 #include <QtCore/QList>
32 #include <QtCore/QVector>
33 
34 #if QT_VERSION >= 0x050000
35 # include <QtWidgets/QAction>
36 # include <QtWidgets/QCheckBox>
37 # include <QtWidgets/QComboBox>
38 # include <QtWidgets/QPlainTextEdit>
39 # include <QtWidgets/QPushButton>
40 # include <QtWidgets/QScrollArea>
41 # include <QtWidgets/QScrollBar>
42 #else
43 # include <QtGui/QAction>
44 # include <QtGui/QCheckBox>
45 # include <QtGui/QComboBox>
46 # include <QtGui/QPlainTextEdit>
47 # include <QtGui/QPushButton>
48 # include <QtGui/QScrollArea>
49 # include <QtGui/QScrollBar>
50 #endif
51 
52 
53 #include <QtGui/QPen>
54 #include <QtGui/QCursor>
55 #include <QtGui/QTextCharFormat>
56 
57 
58 #include <SgLogger.h>
59 #include <SgMatrix.h>
60 
61 
62 class QButtonGroup;
63 
64 
65 /***===================================================================================================*/
72 {
73 public:
76  SgPlotBranch(unsigned int, unsigned int, unsigned int, const QString&, bool hasExtKeys=false);
80  ~SgPlotBranch();
81 
82  inline unsigned int numOfRows() const {return numOfRows_;};
83  inline SgMatrix* data() {return data_;};
84  inline void setIsBrowsable(bool is) {isBrowsable_ = is;};
85  void setDataAttr(unsigned int, unsigned int);
86  void addDataAttr(unsigned int, unsigned int);
87  void delDataAttr(unsigned int, unsigned int);
88  void xorDataAttr(unsigned int, unsigned int);
89  inline void setName(const QString& name) {name_=name;};
90  inline bool getIsBrowsable() const {return isBrowsable_;};
91  unsigned int getDataAttr(unsigned int) const;
92  inline const QString& getName() const {return name_;};
93  inline QString& getAlternativeTitleName(int idx=-1)
94  {return alternativeTitleName_.contains(idx)?alternativeTitleName_[idx]:alternativeTitleName_[-1];};
95  inline void setAlternativeTitleName(const QString& aName, int idx=-1)
96  {alternativeTitleName_[idx] = aName;};
97 
98  bool isPointVisible(int idx, unsigned int limits) const;
99  bool isPointInRanges(int idx, unsigned int limits) const;
100  bool hasExtKeys() const {return hasExtKeys_;};
101  void setExtKey(int idx, const QString& key)
102  {if (hasExtKeys_) extKeys_[idx]=key;};
103 // const QString& getExtKey(int idx) {return hasExtKeys_?extKeys_.at(idx):QString("");};
104  const QString& getExtKey(int idx) {return extKeys_.at(idx);};
105  void flagExtKey(const QString& eKey, bool on);
106 
107 private:
108  QString name_;
109  QMap<int, QString> alternativeTitleName_;
111  unsigned int numOfRows_; //<! Number of rows
114  QVector<QString> extKeys_;
115  QVector<bool> extKeysVisible_;
116 };
117 /*=====================================================================================================*/
118 
119 
120 
121 
122 
123 
124 /***===================================================================================================*/
131 {
132 public:
133  enum AxisType
134  {
136  AxisType_MJD = 1
137  };
138 
139  enum DataAttr
140  {
141  DA_NONUSABLE = 1<<0,
142  DA_REJECTED = 1<<1,
143  DA_BAR = 1<<2,
144  DA_SELECTED = 1<<3,
145  };
146 
147  //
148  // constructors/destructors:
149  //
152  SgPlotCarrier(unsigned int, unsigned int, const QString&);
153 
157  ~SgPlotCarrier();
158 
159  //
160  // Interfaces:
161  //
162  // access:
164  inline QVector<QString*>* columnNames() {return &columnNames_;};
165  inline unsigned int numOfValuesColumns() const {return numOfValuesColumns_;};
166  inline unsigned int numOfSigmasColumns() const {return numOfSigmasColumns_;};
167  inline bool isOK() const {return isOK_;};
168  // gets:
169  inline AxisType getAxisType(int columnIdx) const;
170  inline int getStdVarIdx(int columnIdx) const;
171  inline QString& getName(int idx=-1) {return name_.contains(idx)?name_[idx]:name_[-1];};
172 
173  inline const QString& getFile2SaveBaseName() const {return file2SaveBaseName_;};
174  // sets:
175  inline void setAxisType(int columnIdx, AxisType axisType);
176  inline void setStdVarIdx(int columnIdx, int sigmaColumnIdx);
177  inline void setName(const QString& name, int idx=-1) {name_[idx]=name;};
178  inline void setFile2SaveBaseName(const QString& name) {file2SaveBaseName_=name;};
179  //
180  // Functions:
181  //
182  inline QString className() const {return "SgPlotCarrier";};
183  inline int numOfColumns() const;
184  void createBranch(unsigned int numberOfRows, const QString& branchName,
185  bool hasExtKeys=false);
186  bool selfCheck();
187  void setNameOfColumn(unsigned int, const QString&);
188 
189 private:
190  QMap<int, QString> name_; //<! name of the plot (title), could vary
191  QList<SgPlotBranch*> listOfBranches_; //<! container for plot branches
192  bool isOK_;
194 
195  // branch format descriptor:
196  unsigned int numOfValuesColumns_; //<! Number of values columns
197  unsigned int numOfSigmasColumns_; //<! Number of std errors columns
198  QVector<QString*> columnNames_; //<! Vector of column names
199  int* dataTypes_; //<! Types of data per each column
200  int* dataStdVarIdx_; //<! Indexes of std. var. columns
201 };
202 /*=====================================================================================================*/
203 
204 
205 
206 //
207 inline void SgPlotCarrier::setAxisType(int columnIdx, AxisType axisType)
208 {
209  if (0<=columnIdx && columnIdx<numOfColumns()-1)
210  *(dataTypes_ + columnIdx) = axisType;
211 };
212 
213 
214 
215 //
216 inline void SgPlotCarrier::setStdVarIdx(int columnIdx, int sigmaColumnIdx)
217 {
218  if (0<=columnIdx && columnIdx<numOfColumns()-1 && sigmaColumnIdx<numOfColumns()-1)
219  *(dataStdVarIdx_ + columnIdx) = sigmaColumnIdx;
220 };
221 
222 
223 
224 //
226 {
227  return (0<=columnIdx && columnIdx<numOfColumns()-1) ?
228  (AxisType)(*(dataTypes_+columnIdx)) : AxisType_DATA;
229 };
230 
231 
232 
233 //
234 inline int SgPlotCarrier::getStdVarIdx(int columnIdx) const
235 {
236  return (0<=columnIdx && columnIdx<numOfColumns()-1) ? *(dataStdVarIdx_ + columnIdx) : -1;
237 };
238 
239 
240 
241 //
242 inline int SgPlotCarrier::numOfColumns() const
243 {
245 };
246 /*=====================================================================================================*/
247 
248 
249 
250 
251 
252 /***===================================================================================================*/
258 class SgPlotArea : public QWidget
259 {
260  Q_OBJECT
261 
262 friend class SgPlot;
263 public:
264  enum UserMode
265  {
274  };
276  {
277  SOD_ALL = 0,
280  };
281 
282  //
283  // constructors/destructors:
284  //
287  SgPlotArea(SgPlotCarrier*, QWidget* parent=0, Qt::WindowFlags f=0);
288 
292  virtual ~SgPlotArea();
293 
294 
295  //
296  // Interfaces:
297  //
298  void setXColumn(unsigned int xColumn);
299  void setYColumn(unsigned int yColumn);
300  inline unsigned int getXColumn() const {return xColumn_;};
301  inline unsigned int getYColumn() const {return yColumn_;};
302  inline UserMode getUserMode() const {return userMode_;};
303  inline const QPoint& getRulerFromPoint() const {return rulerFromPoint_;};
304  inline const QPoint& getRulerToPoint() const {return rulerToPoint_;};
305  inline const QPoint& getRulerToPointPrev() const {return rulerToPointPrev_;};
306  inline bool isXTicsMJD() const {return isXTicsMJD_;};
307  inline SetsOfData getRangeLimits() const {return rangeLimits_;};
308  inline SetsOfData getSets2plot() const {return sets2plot_;};
309 
310  inline int width() const {return width_;};
311  inline int height() const {return height_;};
312 
313 
314  void setBPHuePhase(int);
315  void setBPSaturation(int);
316  void setBPValue(int);
317  inline void setIsPlotPoints(bool is) {isPlotPoints_=is;};
318  inline void setIsPlotLines(bool is) {isPlotLines_=is;};
319  inline void setIsPlotErrBars(bool is){isPlotErrBars_=is;};
320  inline void setIsPlotImpulses(bool is){isPlotImpulses_=is;};
321  void setUserMode(UserMode mode);
322  inline void setRulerFromPoint(QPoint point) {rulerFromPoint_=point;};
323  inline void setRulerToPoint(QPoint point)
326  inline void setVisibleHeight(int height)
328 
329  // modes:
330  inline void setHave2HasZero(bool is) {have2HasZero_=is;};
331  inline void setIsLimitsOnVisible(bool is) {isLimitsOnVisible_=is;};
332  inline void setIsStdVar(bool is) {isStdVar_=is;};
333  inline void setIsRangeSymmetrical(bool is) {isRangeSymmetrical_=is;};
334  inline void setRangeLimits(SetsOfData rl) {rangeLimits_=rl;};
335  inline void setSets2plot(SetsOfData sod) {sets2plot_=sod;};
336 
337 
338  //
339  // Functions:
340  //
341  inline virtual QString className() const {return "SgPlotArea";};
342  void output4Print(QPainter*, int, int, int, int, int);
343  void output4Files(const QString& path);
345  void setUserDefinedRanges(double, double, double, double);
346  void unsetUserDefinedRanges();
347  void queryPoint(const QPoint&, SgPlotBranch*&, int&);
348 
349 protected:
350 
351  // areas:
352  int width_;
353  int height_;
358  // labels & tics:
365  // frame area:
370  // data area:
375  // Title:
377  // X Tics:
379  int xStepP_;
380  double xTicsStep_;
381  double xTicsBias_;
385  // Y Tics:
387  int yStepP_;
388  double yTicsStep_;
389  double yTicsBias_;
391  // labels:
392  QString *xLabel_;
393  QString *yLabel_;
394  static QString xLabel4Unknown_;
395  static QString yLabel4Unknown_;
396  // points:
397  int radius_;
398  int ddr_;
399 
400 
401  //
402  unsigned int xColumn_;
403  unsigned int yColumn_;
404  // natural ranges:
405  double maxX_;
406  double maxY_;
407  double minX_;
408  double minY_;
409  // user defined ranges:
417 
418  // transform parameters:
419  double f_Ax_;
420  double f_Bx_;
421  double f_Ay_;
422  double f_By_;
423 
424  // pens:
425  QPen *framePen_;
426  QPen *branchPens_;
427  QBrush *branchBrushes_;
428  QPen *zeroPen_;
429  QPen *barPen_;
431  QPen *rulerPen_;
432  QBrush *rulerBrush_;
435  QPen *ignoredPen_;
436  QBrush *ignoredBrush_;
439  int bpValue_;
440 
441  // draw mode:
446 
447  // options:
449  bool isStdVar_;
453 
454  // browsables:
456 
457  // misc
459 
460  // user modes (just to browse cursor):
462  QCursor cursorDefault_;
465 
466  // ruler:
470 
471 
472  void drawWholePlot(QPainter*, const QRect&);
473  void drawPointInfo(QPainter*);
474  void drawRuler(QPainter*);
475  void drawRangeSelector(QPainter*);
476  void drawPointSelector(QPainter*);
477  void drawFrames(QPainter*);
478  void drawYTics(QPainter*);
479  void drawXTics(QPainter*);
480  void drawXmjdTics(QPainter*);
481  void drawData(QPainter*, const QRect&);
482  void calcLimits();
483  void calcTransforms();
484  void defineAreas(QPainter*);
485  inline int calcX(double x) const;
486  inline int calcY(double y) const;
487  inline double reverseCalcX(int x) const;
488  inline double reverseCalcY(int y) const;
489  void setBranchColors();
490  void initBranchPens();
491 
492  virtual void paintEvent(QPaintEvent*);
493  virtual void resizeEvent(QResizeEvent*);
494 };
495 /*=====================================================================================================*/
496 
497 
498 
499 inline int SgPlotArea::calcX(double x) const
500 {
501  double f = f_Ax_ + f_Bx_*x;
502 
503  if (f < 0.0)
504  return 0;
505  if (f > width_)
506  return width_ - 1;
507 
508  return (int)f;
509 };
510 
511 
512 
513 inline int SgPlotArea::calcY(double y) const
514 {
515  double f = f_Ay_ + f_By_*y;
516 
517  if (f < 0.0)
518  return 0;
519  if (f > height_)
520  return height_ - 1;
521 
522  return (int)f;
523 };
524 
525 
526 
527 inline double SgPlotArea::reverseCalcX(int x) const
528 {
529  return ((double)x - f_Ax_)/f_Bx_;
530 };
531 
532 
533 
534 inline double SgPlotArea::reverseCalcY(int y) const
535 {
536  return ((double)y - f_Ay_)/f_By_;
537 };
538 /*=====================================================================================================*/
539 
540 
541 
542 
543 
544 /***===================================================================================================*/
551 {
552  Q_OBJECT
553 
554 public:
555  SgPlotScroller(QWidget *parent=NULL) : QScrollArea(parent) {};
556 
557 signals:
558  void mouseWheelRotated(QWheelEvent *);
559  void mousePressed(QMouseEvent *);
560  void mouseMoved(QMouseEvent *);
561  void mouseReleased(QMouseEvent *);
562  void mouseDoubleClicked(QMouseEvent *);
563  void keyPressed(QKeyEvent *);
564  void keyReleased(QKeyEvent *);
565 
566 protected:
567  virtual void wheelEvent(QWheelEvent *e) {emit mouseWheelRotated(e); e->accept();};
568  virtual void mousePressEvent(QMouseEvent *e) {emit mousePressed(e); e->accept();};
569  virtual void mouseMoveEvent(QMouseEvent *e) {emit mouseMoved(e); e->accept();};
570  virtual void mouseReleaseEvent(QMouseEvent *e) {emit mouseReleased(e); e->accept();};
571  virtual void mouseDoubleClickEvent(QMouseEvent *e) {emit mouseDoubleClicked(e); e->accept();};
572  // virtual void keyPressEvent(QKeyEvent *e) {emit keyPressed(e); e->accept();};
573  // virtual void keyReleaseEvent(QKeyEvent *e) {emit keyReleased(e); e->accept();};
574 };
575 /*=====================================================================================================*/
576 
577 
578 
579 
580 class QListView;
581 /***===================================================================================================*/
587 class SgPlot : public QWidget
588 {
589  Q_OBJECT
590 
591 public:
592  enum PlotMode
593  {
595  PM_IMPULSE = 1<<1,
598  PM_WO_DOTS = 1<<4,
599  PM_LINES = 1<<5,
600  PM_ERRBARS = 1<<6,
601  PM_Q_PNT_EXT_PROC = 1<<7, // external point info display
603  PM_EXT_KEY_SELECT = 1<<9, // extended key selector
604  };
606  {
607  OF_PS = 0,
608  OF_PDF = 1,
609  OF_JPG = 2,
610  OF_PNG = 3,
611  OF_PPM = 4,
612  };
613 
614  SgPlot(SgPlotCarrier*, const QString&, QWidget* =0, unsigned int =0);
615 
616  virtual ~SgPlot();
617 
619 
620  int getNumOfXColumn() const {return area_->getXColumn();};
621  int getNumOfYColumn() const {return area_->getYColumn();};
623  const QString& getPath2Outputs() const {return path2Outputs_;};
624 
626  void setPath2Outputs(const QString& pth) {path2Outputs_ = pth;};
627 
628  void setFilterNames(const QList<QString>&);
629  void setFilterAuxNames(const QList<QString>&);
630  void setFilterExtNames(const QList<QString>&);
631 
632  // some values of the plots are changed:
633  void dataContentChanged();
634 
635  // the format of the plot is changed:
636  void dataStructureChanged();
637 
638  // communication with a user
639 signals:
640  void userPressedAKey(SgPlot*, Qt::KeyboardModifiers, int);
641  void xAxisChanged(int);
642  void yAxisChanged(int);
643  void pointInfoRequested(SgPlot*, SgPlotBranch*, int, int, int);
644 
645 
646 public slots:
647  void changeXaxis(int);
648  void changeYaxis(int);
649  void changeXaxisTemp2(int);
650  void changeYaxisTemp2(int);
651 
652 
653 
654 protected:
655  virtual QString className() const {return "SgPlot";};
656  virtual void resizeEvent(QResizeEvent*);
657  // virtual void keyPressEvent(QKeyEvent *e) {emit keyPressed(e); e->accept();};
658  // virtual void keyReleaseEvent(QKeyEvent *e) {emit keyReleased(e); e->accept();};
659  virtual void keyPressEvent (QKeyEvent *e) {processKeyPressEvent(e);};
660  virtual void keyReleaseEvent(QKeyEvent *e) {processKeyReleaseEvent(e);};
661  QWidget* control();
662  void fillAxisNames();
663  void fillBranchesNames();
664  void adjustScrollBar(QScrollBar*, double, double, double);
665  void rescaleArea(double, double, int=-1, int=-1);
666 
667  // user actions:
668  // scrolling:
669  void startScrollViewport(const QPoint&);
670  void doScrollViewport(const QPoint&);
671  void stopScrollViewport();
672  // inquiring:
673  void startInquire(const QPoint&);
674  void doInquire(const QPoint&);
675  void stopInquire();
676  // measuring:
677  void startMeasuring(const QPoint&);
678  void doMeasuring(const QPoint&);
679  void stopMeasuring();
680  // changing ranges:
681  void startReRanging(const QPoint&);
682  void doReRanging(const QPoint&);
683  void stopReRanging(bool);
684  // querying data:
685  void queryData(const QPoint&);
686  // selecting points:
687  void startSelecting(const QPoint&, bool=false);
688  void doSelecting(const QPoint&, bool=false);
689  void stopSelecting(const QPoint&, bool=false);
690 
692 
693 
694 
695 protected slots:
696  void changeXaxisTemp(int);
697  void changeYaxisTemp(int);
698  void colorHChanged(int);
699  void colorSChanged(int);
700  void colorVChanged(int);
701  void branchChanged();
702  void extKeyChanged();
703  void dmPointsChanged(bool);
704  void dmLinesChanged(bool);
705  void dmErrBarsChanged(bool);
706  void dmImpulsesChanged(bool);
707 
708  void oUserDefinedChanged(bool);
709  void modifySets2plot(int);
710  void setRangeSymmetrical(bool);
711  void modifyRangeLimits(int);
712 
713  void oVisRang(bool);
714  void oWStdVar(bool);
715 
716  // zooming:
717  void zoomIn();
718  void zoomOut();
719  void zoomXIn();
720  void zoomXOut();
721  void zoomYIn();
722  void zoomYOut();
723  void zoomNormalView();
724  // interaction with a user:
725  void processWheelEvent(QWheelEvent*);
726  void processMousePressEvent(QMouseEvent*);
727  void processMouseMoveEvent(QMouseEvent*);
728  void processMouseReleaseEvent(QMouseEvent*);
729  void processMouseDoubleClickEvent(QMouseEvent*);
730  void processKeyPressEvent(QKeyEvent*);
731  void processKeyReleaseEvent(QKeyEvent*);
736  void markPrevBranch();
737  void markNextBranch();
738  void markPrevExtKey();
739  void markNextExtKey();
740  //
741  void processFilterMinus();
742  void processFilterPlus ();
743  void processFilterAuxMinus(const QPoint&);
744  void processFilterAuxPlus (const QPoint&);
745  void processFilterExtMinus();
746  void processFilterExtPlus ();
747 
748  // saving:
749  void save2File();
750 // void save2PS();
751  void save2Image();
752 
753 
754 private:
755  static const double scaleFactor_;
758  QFrame *controls_;
759  double scaleX_;
760  double scaleY_;
762  QString path2Outputs_;
763 
764  unsigned int modes_;
766 
767  double maxZoomX_;
768  double minZoomX_;
769  double maxZoomY_;
770  double minZoomY_;
771 
772  // user actions:
773  // scroll viewport:
775  QPoint refPoint_;
776 
777  // controls:
778  QComboBox *cbXAxis_;
779  QComboBox *cbYAxis_;
780  QButtonGroup *bgSets2plot_;
781  QListView *lvBranches_;
786 
787  QCheckBox *cbPoints_;
788  QCheckBox *cbLines_;
789  QCheckBox *cbErrBars_;
790  QCheckBox *cbImpulses_;
791 
792  QCheckBox *cbUserDefined_;
793  QCheckBox *cbRangeVisible_;
794  QCheckBox *cbWStdVar_;
795  QCheckBox *cbSymmetrical_;
796  QButtonGroup *bgRangeLimits_;
797 
798  QPushButton *pbZommIn_;
799  QPushButton *pbZommOut_;
800  QPushButton *pbZommXIn_;
801  QPushButton *pbZommXOut_;
802  QPushButton *pbZommYIn_;
803  QPushButton *pbZommYOut_;
804 
805 
806  QAction *zoomInAction_;
807  QAction *zoomXInAction_;
808  QAction *zoomYInAction_;
809  QAction *zoomOutAction_;
810  QAction *zoomXOutAction_;
811  QAction *zoomYOutAction_;
813  //
814  unsigned int currentKeyModifier_;
815 
816  //
818  QListView *lvExtKeys_;
820 };
821 /*=====================================================================================================*/
822 /*=====================================================================================================*/
823 
824 
825 
826 /*=====================================================================================================*/
827 #endif // SG_GUI_PLOTTER_H
SetsOfData sets2plot_
Definition: SgGuiPlotter.h:452
double maxY_
Definition: SgGuiPlotter.h:406
bool isPlotPoints_
Definition: SgGuiPlotter.h:442
QPen * rulerPen_
Definition: SgGuiPlotter.h:431
bool isRangeSymmetrical_
Definition: SgGuiPlotter.h:450
int visibleHeight_
Definition: SgGuiPlotter.h:357
void setSets2plot(SetsOfData sod)
Definition: SgGuiPlotter.h:335
@ UserMode_INQUIRING
Definition: SgGuiPlotter.h:268
@ UserMode_DESELECTING
Definition: SgGuiPlotter.h:273
@ UserMode_MEASURING
Definition: SgGuiPlotter.h:269
@ UserMode_SELECTING
Definition: SgGuiPlotter.h:272
@ UserMode_RERANGING
Definition: SgGuiPlotter.h:270
@ UserMode_SCROLLING
Definition: SgGuiPlotter.h:267
QString * yLabel_
Definition: SgGuiPlotter.h:393
static QString yLabel4Unknown_
Definition: SgGuiPlotter.h:395
void defineAreas(QPainter *)
void setUserMode(UserMode mode)
void setRulerFromPoint(QPoint point)
Definition: SgGuiPlotter.h:322
double userDefinedMinX_
Definition: SgGuiPlotter.h:412
QPoint rulerToPointPrev_
Definition: SgGuiPlotter.h:469
bool isPlotImpulses_
Definition: SgGuiPlotter.h:445
bool isXTicsMJD_
Definition: SgGuiPlotter.h:383
const QPoint & getRulerFromPoint() const
Definition: SgGuiPlotter.h:303
int yFrameBegin_
Definition: SgGuiPlotter.h:368
void setBPSaturation(int)
double f_Ay_
Definition: SgGuiPlotter.h:421
void setIsPlotPoints(bool is)
Definition: SgGuiPlotter.h:317
int height() const
Definition: SgGuiPlotter.h:311
void drawFrames(QPainter *)
QCursor cursorScrolling_
Definition: SgGuiPlotter.h:463
void drawRangeSelector(QPainter *)
double xTicsStep_
Definition: SgGuiPlotter.h:380
void output4Print(QPainter *, int, int, int, int, int)
QCursor cursorMeasuring_
Definition: SgGuiPlotter.h:464
void setIsPlotErrBars(bool is)
Definition: SgGuiPlotter.h:319
QBrush * branchSelectedBrushes_
Definition: SgGuiPlotter.h:434
SetsOfData rangeLimits_
Definition: SgGuiPlotter.h:451
QPen * framePen_
Definition: SgGuiPlotter.h:425
void setIsRangeSymmetrical(bool is)
Definition: SgGuiPlotter.h:333
void setUserDefinedRanges(double, double, double, double)
QPoint rulerFromPoint_
Definition: SgGuiPlotter.h:467
virtual void resizeEvent(QResizeEvent *)
QPen * zeroPen_
Definition: SgGuiPlotter.h:428
SetsOfData getRangeLimits() const
Definition: SgGuiPlotter.h:307
void drawPointInfo(QPainter *)
void drawXmjdTics(QPainter *)
int yLabelHeight_
Definition: SgGuiPlotter.h:362
double minY_
Definition: SgGuiPlotter.h:408
bool isXTicsBiased_
Definition: SgGuiPlotter.h:382
double userDefinedMaxY_
Definition: SgGuiPlotter.h:411
void output4Files(const QString &path)
bool isYTicsBiased_
Definition: SgGuiPlotter.h:390
int yLabelWidth_
Definition: SgGuiPlotter.h:361
int xLabelWidth_
Definition: SgGuiPlotter.h:359
void setIsPlotImpulses(bool is)
Definition: SgGuiPlotter.h:320
int labelsHeight_
Definition: SgGuiPlotter.h:360
void setXColumn(unsigned int xColumn)
int rightMargin_
Definition: SgGuiPlotter.h:355
double reverseCalcY(int y) const
Definition: SgGuiPlotter.h:534
static QString xLabel4Unknown_
Definition: SgGuiPlotter.h:394
void drawData(QPainter *, const QRect &)
double f_By_
Definition: SgGuiPlotter.h:422
void setHave2HasZero(bool is)
Definition: SgGuiPlotter.h:330
QPen * branchSelectedPens_
Definition: SgGuiPlotter.h:433
double f_Ax_
Definition: SgGuiPlotter.h:419
unsigned int xColumn_
Definition: SgGuiPlotter.h:402
void setBPValue(int)
const QPoint & getRulerToPoint() const
Definition: SgGuiPlotter.h:304
int xFrameBegin_
Definition: SgGuiPlotter.h:366
QBrush * rulerBrush_
Definition: SgGuiPlotter.h:432
void setYColumn(unsigned int yColumn)
QCursor cursorDefault_
Definition: SgGuiPlotter.h:462
double yTicsBias_
Definition: SgGuiPlotter.h:389
QPoint rulerToPoint_
Definition: SgGuiPlotter.h:468
bool isPlotLines_
Definition: SgGuiPlotter.h:443
void dataChanged()
Definition: SgGuiPlotter.h:344
void initBranchPens()
void drawYTics(QPainter *)
unsigned int getXColumn() const
Definition: SgGuiPlotter.h:300
QPen * branchPens_
Definition: SgGuiPlotter.h:426
QString * xLabel_
Definition: SgGuiPlotter.h:392
virtual ~SgPlotArea()
void unsetUserDefinedRanges()
double xTicsBias_
Definition: SgGuiPlotter.h:381
void setIsPlotLines(bool is)
Definition: SgGuiPlotter.h:318
void setBPHuePhase(int)
double maxX_
Definition: SgGuiPlotter.h:405
QPen * ignoredPen_
Definition: SgGuiPlotter.h:435
const QPoint & getRulerToPointPrev() const
Definition: SgGuiPlotter.h:305
void setVisibleWidth(int width)
Definition: SgGuiPlotter.h:325
UserMode getUserMode() const
Definition: SgGuiPlotter.h:302
void drawXTics(QPainter *)
bool isStdVar_
Definition: SgGuiPlotter.h:449
SetsOfData getSets2plot() const
Definition: SgGuiPlotter.h:308
void setIsLimitsOnVisible(bool is)
Definition: SgGuiPlotter.h:331
double userDefinedMinY_
Definition: SgGuiPlotter.h:413
void drawRuler(QPainter *)
void calcTransforms()
int bpSaturation_
Definition: SgGuiPlotter.h:438
void queryPoint(const QPoint &, SgPlotBranch *&, int &)
double yTicsStep_
Definition: SgGuiPlotter.h:388
int calcY(double y) const
Definition: SgGuiPlotter.h:513
unsigned int yColumn_
Definition: SgGuiPlotter.h:403
unsigned int getYColumn() const
Definition: SgGuiPlotter.h:301
SgPlotCarrier * plotCarrier_
Definition: SgGuiPlotter.h:455
virtual QString className() const
Definition: SgGuiPlotter.h:341
void setRulerToPoint(QPoint point)
Definition: SgGuiPlotter.h:323
void drawPointSelector(QPainter *)
int calcX(double x) const
Definition: SgGuiPlotter.h:499
bool useUserDefinedRanges_
Definition: SgGuiPlotter.h:414
QPen * ticLinesPen_
Definition: SgGuiPlotter.h:430
virtual void paintEvent(QPaintEvent *)
int visibleWidth_
Definition: SgGuiPlotter.h:356
void setRangeLimits(SetsOfData rl)
Definition: SgGuiPlotter.h:334
void drawWholePlot(QPainter *, const QRect &)
bool isLimitsOnVisible_
Definition: SgGuiPlotter.h:448
void setIsStdVar(bool is)
Definition: SgGuiPlotter.h:332
double f_Bx_
Definition: SgGuiPlotter.h:420
bool have2HasZero_
Definition: SgGuiPlotter.h:458
SgPlotArea(SgPlotCarrier *, QWidget *parent=0, Qt::WindowFlags f=0)
void calcLimits()
void setBranchColors()
void setVisibleHeight(int height)
Definition: SgGuiPlotter.h:326
bool isPlotErrBars_
Definition: SgGuiPlotter.h:444
double userDefinedMaxX_
Definition: SgGuiPlotter.h:410
double minX_
Definition: SgGuiPlotter.h:407
QBrush * ignoredBrush_
Definition: SgGuiPlotter.h:436
int width() const
Definition: SgGuiPlotter.h:310
UserMode userMode_
Definition: SgGuiPlotter.h:461
QPen * barPen_
Definition: SgGuiPlotter.h:429
bool isXTicsMJD() const
Definition: SgGuiPlotter.h:306
double reverseCalcX(int x) const
Definition: SgGuiPlotter.h:527
QBrush * branchBrushes_
Definition: SgGuiPlotter.h:427
const QString & getName() const
Definition: SgGuiPlotter.h:92
QVector< QString > extKeys_
Definition: SgGuiPlotter.h:114
void flagExtKey(const QString &eKey, bool on)
unsigned int getDataAttr(unsigned int) const
bool isPointInRanges(int idx, unsigned int limits) const
SgMatrix * data_
Definition: SgGuiPlotter.h:110
const QString & getExtKey(int idx)
Definition: SgGuiPlotter.h:104
QVector< bool > extKeysVisible_
Definition: SgGuiPlotter.h:115
unsigned int numOfRows_
Definition: SgGuiPlotter.h:111
QMap< int, QString > alternativeTitleName_
Definition: SgGuiPlotter.h:109
unsigned int numOfRows() const
Definition: SgGuiPlotter.h:82
void xorDataAttr(unsigned int, unsigned int)
void addDataAttr(unsigned int, unsigned int)
void setExtKey(int idx, const QString &key)
Definition: SgGuiPlotter.h:101
void setAlternativeTitleName(const QString &aName, int idx=-1)
Definition: SgGuiPlotter.h:95
SgMatrix * data()
Definition: SgGuiPlotter.h:83
bool getIsBrowsable() const
Definition: SgGuiPlotter.h:90
bool hasExtKeys() const
Definition: SgGuiPlotter.h:100
QString name_
Definition: SgGuiPlotter.h:108
void setIsBrowsable(bool is)
Definition: SgGuiPlotter.h:84
void setName(const QString &name)
Definition: SgGuiPlotter.h:89
void setDataAttr(unsigned int, unsigned int)
void delDataAttr(unsigned int, unsigned int)
SgPlotBranch(unsigned int, unsigned int, unsigned int, const QString &, bool hasExtKeys=false)
QString & getAlternativeTitleName(int idx=-1)
Definition: SgGuiPlotter.h:93
bool isPointVisible(int idx, unsigned int limits) const
QVector< QString * > * columnNames()
Definition: SgGuiPlotter.h:164
void createBranch(unsigned int numberOfRows, const QString &branchName, bool hasExtKeys=false)
int getStdVarIdx(int columnIdx) const
Definition: SgGuiPlotter.h:234
QList< SgPlotBranch * > * listOfBranches()
Definition: SgGuiPlotter.h:163
void setFile2SaveBaseName(const QString &name)
Definition: SgGuiPlotter.h:178
QList< SgPlotBranch * > listOfBranches_
Definition: SgGuiPlotter.h:191
unsigned int numOfValuesColumns() const
Definition: SgGuiPlotter.h:165
void setNameOfColumn(unsigned int, const QString &)
void setAxisType(int columnIdx, AxisType axisType)
Definition: SgGuiPlotter.h:207
SgPlotCarrier(unsigned int, unsigned int, const QString &)
AxisType getAxisType(int columnIdx) const
Definition: SgGuiPlotter.h:225
void setStdVarIdx(int columnIdx, int sigmaColumnIdx)
Definition: SgGuiPlotter.h:216
QVector< QString * > columnNames_
Definition: SgGuiPlotter.h:198
QString & getName(int idx=-1)
Definition: SgGuiPlotter.h:171
int * dataStdVarIdx_
Definition: SgGuiPlotter.h:200
unsigned int numOfSigmasColumns_
Definition: SgGuiPlotter.h:197
QString file2SaveBaseName_
Definition: SgGuiPlotter.h:193
QMap< int, QString > name_
Definition: SgGuiPlotter.h:190
const QString & getFile2SaveBaseName() const
Definition: SgGuiPlotter.h:173
unsigned int numOfValuesColumns_
Definition: SgGuiPlotter.h:196
unsigned int numOfSigmasColumns() const
Definition: SgGuiPlotter.h:166
QString className() const
Definition: SgGuiPlotter.h:182
bool isOK() const
Definition: SgGuiPlotter.h:167
void setName(const QString &name, int idx=-1)
Definition: SgGuiPlotter.h:177
int numOfColumns() const
Definition: SgGuiPlotter.h:242
virtual void wheelEvent(QWheelEvent *e)
Definition: SgGuiPlotter.h:567
virtual void mousePressEvent(QMouseEvent *e)
Definition: SgGuiPlotter.h:568
virtual void mouseDoubleClickEvent(QMouseEvent *e)
Definition: SgGuiPlotter.h:571
void mouseMoved(QMouseEvent *)
virtual void mouseReleaseEvent(QMouseEvent *e)
Definition: SgGuiPlotter.h:570
SgPlotScroller(QWidget *parent=NULL)
Definition: SgGuiPlotter.h:555
virtual void mouseMoveEvent(QMouseEvent *e)
Definition: SgGuiPlotter.h:569
void keyPressed(QKeyEvent *)
void mouseDoubleClicked(QMouseEvent *)
void mouseWheelRotated(QWheelEvent *)
void mousePressed(QMouseEvent *)
void mouseReleased(QMouseEvent *)
void keyReleased(QKeyEvent *)
void startInquire(const QPoint &)
QAction * normalSizeAction_
Definition: SgGuiPlotter.h:812
void zoomXOut()
void setPath2Outputs(const QString &pth)
Definition: SgGuiPlotter.h:626
QButtonGroup * bgSets2plot_
Definition: SgGuiPlotter.h:780
void doInquire(const QPoint &)
virtual void resizeEvent(QResizeEvent *)
void dataStructureChanged()
QWidget * branchesWidget()
void pointInfoRequested(SgPlot *, SgPlotBranch *, int, int, int)
void startMeasuring(const QPoint &)
double scaleX_
Definition: SgGuiPlotter.h:759
void rescaleArea(double, double, int=-1, int=-1)
void processKeyReleaseEvent(QKeyEvent *)
void oUserDefinedChanged(bool)
void setOutputFormat(OutputFormat fmt)
Definition: SgGuiPlotter.h:625
void processMouseReleaseEvent(QMouseEvent *)
virtual void keyReleaseEvent(QKeyEvent *e)
Definition: SgGuiPlotter.h:660
int getNumOfYColumn() const
Definition: SgGuiPlotter.h:621
void dmPointsChanged(bool)
void xAxisChanged(int)
void markNextExtKey()
void setFilterNames(const QList< QString > &)
QCheckBox * cbWStdVar_
Definition: SgGuiPlotter.h:794
QAction * zoomInAction_
Definition: SgGuiPlotter.h:806
void modifyRangeLimits(int)
QList< QAction * > filterAuxActions_
Definition: SgGuiPlotter.h:784
void save2Image()
QAction * zoomYOutAction_
Definition: SgGuiPlotter.h:811
QPushButton * pbZommIn_
Definition: SgGuiPlotter.h:798
void stopMeasuring()
QCheckBox * cbLines_
Definition: SgGuiPlotter.h:788
void adjustScrollBar(QScrollBar *, double, double, double)
int getNumOfXColumn() const
Definition: SgGuiPlotter.h:620
void changeYaxis(int)
OutputFormat getOutputFormat() const
Definition: SgGuiPlotter.h:622
void fillBranchesNames()
void markPrevBranch()
QListView * lvBranches_
Definition: SgGuiPlotter.h:781
void branchChanged()
void zoomYOut()
virtual QString className() const
Definition: SgGuiPlotter.h:655
QPushButton * pbZommOut_
Definition: SgGuiPlotter.h:799
QPushButton * pbZommXIn_
Definition: SgGuiPlotter.h:800
void processMouseDoubleClickEvent(QMouseEvent *)
void markAllExtKeysAsSelected()
QList< QAction * > filterActions_
Definition: SgGuiPlotter.h:783
QCheckBox * cbPoints_
Definition: SgGuiPlotter.h:787
SgPlot(SgPlotCarrier *, const QString &, QWidget *=0, unsigned int=0)
QPushButton * pbZommYIn_
Definition: SgGuiPlotter.h:802
QComboBox * cbYAxis_
Definition: SgGuiPlotter.h:779
void dataContentChanged()
QWidget * control()
void zoomXIn()
void processWheelEvent(QWheelEvent *)
void fillAxisNames()
virtual void keyPressEvent(QKeyEvent *e)
Definition: SgGuiPlotter.h:659
void oWStdVar(bool)
QAction * zoomXInAction_
Definition: SgGuiPlotter.h:807
QPoint oldCursorPosition_
Definition: SgGuiPlotter.h:774
OutputFormat outputFormat_
Definition: SgGuiPlotter.h:761
void startReRanging(const QPoint &)
virtual ~SgPlot()
QAction * zoomXOutAction_
Definition: SgGuiPlotter.h:810
void changeXaxisTemp2(int)
void stopReRanging(bool)
void markAllBranchesAsDeselected()
QPushButton * pbZommXOut_
Definition: SgGuiPlotter.h:801
QCheckBox * cbErrBars_
Definition: SgGuiPlotter.h:789
double scaleY_
Definition: SgGuiPlotter.h:760
void queryData(const QPoint &)
void stopScrollViewport()
QComboBox * cbXAxis_
Definition: SgGuiPlotter.h:778
double minZoomX_
Definition: SgGuiPlotter.h:768
static const double scaleFactor_
Definition: SgGuiPlotter.h:755
SgPlotArea * area_
Definition: SgGuiPlotter.h:757
void doMeasuring(const QPoint &)
void startSelecting(const QPoint &, bool=false)
void modifySets2plot(int)
void colorVChanged(int)
void yAxisChanged(int)
void zoomNormalView()
SgPlotCarrier * carrier()
Definition: SgGuiPlotter.h:618
void changeXaxisTemp(int)
SgPlotScroller * plotScroller_
Definition: SgGuiPlotter.h:756
void setFilterExtNames(const QList< QString > &)
void dmLinesChanged(bool)
void stopSelecting(const QPoint &, bool=false)
QPushButton * pbZommYOut_
Definition: SgGuiPlotter.h:803
void doReRanging(const QPoint &)
void save2File()
void processFilterExtMinus()
QAction * zoomYInAction_
Definition: SgGuiPlotter.h:808
void changeXaxis(int)
void processFilterAuxMinus(const QPoint &)
void doScrollViewport(const QPoint &)
bool isExtKeyViewInSpecialMode_
Definition: SgGuiPlotter.h:819
QCheckBox * cbImpulses_
Definition: SgGuiPlotter.h:790
const QString & getPath2Outputs() const
Definition: SgGuiPlotter.h:623
QFrame * controls_
Definition: SgGuiPlotter.h:758
QPoint refPoint_
Definition: SgGuiPlotter.h:775
void processFilterMinus()
void changeYaxisTemp2(int)
void processMousePressEvent(QMouseEvent *)
void setFilterAuxNames(const QList< QString > &)
void markAllExtKeysAsDeselected()
void dmImpulsesChanged(bool)
unsigned int modes_
Definition: SgGuiPlotter.h:764
void processFilterAuxPlus(const QPoint &)
void doSelecting(const QPoint &, bool=false)
double maxZoomY_
Definition: SgGuiPlotter.h:769
void processKeyPressEvent(QKeyEvent *)
double minZoomY_
Definition: SgGuiPlotter.h:770
QCheckBox * cbRangeVisible_
Definition: SgGuiPlotter.h:793
void processFilterPlus()
QCheckBox * cbSymmetrical_
Definition: SgGuiPlotter.h:795
void colorHChanged(int)
void changeYaxisTemp(int)
void processFilterExtPlus()
unsigned int currentKeyModifier_
Definition: SgGuiPlotter.h:814
QAction * zoomOutAction_
Definition: SgGuiPlotter.h:809
QButtonGroup * bgRangeLimits_
Definition: SgGuiPlotter.h:796
void userPressedAKey(SgPlot *, Qt::KeyboardModifiers, int)
void zoomYIn()
QList< QAction * > filterExtActions_
Definition: SgGuiPlotter.h:785
bool isBranchViewInSpecialMode_
Definition: SgGuiPlotter.h:782
void dmErrBarsChanged(bool)
void startScrollViewport(const QPoint &)
void zoomOut()
void markPrevExtKey()
QCheckBox * cbUserDefined_
Definition: SgGuiPlotter.h:792
@ PM_Q_PNT_EXT_PROC
Definition: SgGuiPlotter.h:601
@ PM_WO_AXIS_NAMES
Definition: SgGuiPlotter.h:597
@ PM_HAS_HAVE_ZERO
Definition: SgGuiPlotter.h:594
@ PM_WO_DOTS
Definition: SgGuiPlotter.h:598
@ PM_ERRBARS
Definition: SgGuiPlotter.h:600
@ PM_IMPULSE
Definition: SgGuiPlotter.h:595
@ PM_FILTERS_ENABLED
Definition: SgGuiPlotter.h:602
@ PM_WO_BRANCH_NAMES
Definition: SgGuiPlotter.h:596
@ PM_EXT_KEY_SELECT
Definition: SgGuiPlotter.h:603
void extKeyChanged()
void markAllBranchesAsSelected()
void stopInquire()
SgPlotCarrier * plotCarrier_
Definition: SgGuiPlotter.h:765
QList< QString > extKeys_
Definition: SgGuiPlotter.h:817
void processMouseMoveEvent(QMouseEvent *)
void oVisRang(bool)
void zoomIn()
void colorSChanged(int)
QListView * lvExtKeys_
Definition: SgGuiPlotter.h:818
void setRangeSymmetrical(bool)
void markNextBranch()
double maxZoomX_
Definition: SgGuiPlotter.h:767
QString path2Outputs_
Definition: SgGuiPlotter.h:762