00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef QTDISPLAYPANEL_H
00029 #define QTDISPLAYPANEL_H
00030
00031 #include <casa/aips.h>
00032 #include <display/Display/Colormap.h>
00033 #include <casa/Containers/List.h>
00034 #include <display/QtViewer/QtPixelCanvas.qo.h>
00035 #include <display/QtViewer/QtMouseTools.qo.h>
00036 #include <display/QtViewer/QtOldMouseTools.qo.h>
00037 #include <display/QtViewer/DisplayDataHolder.h>
00038 #include <display/QtViewer/ImageManager/ImageTracker.h>
00039 #include <display/Display/PanelDisplay.h>
00040 #include <images/Regions/ImageRegion.h>
00041 #include <display/DisplayEvents/MWCRTZoomer.h>
00042 #include <display/DisplayEvents/PCPositionEH.h>
00043 #include <display/QtPlotter/QtMWCTools.qo.h>
00044 #include <display/QtPlotter/QtOldMWCTools.qo.h>
00045 #include <display/region/QtRegionSourceFactory.h>
00046 #include <display/Display/Position.h>
00047
00048 #include <stack>
00049
00050 #include <graphics/X11/X_enter.h>
00051 # include <QtCore>
00052 # include <QtGui>
00053 # include <QTimer>
00054 # include <QDebug>
00055 # include <QtXml>
00056 #include <graphics/X11/X_exit.h>
00057
00058
00059 namespace casa {
00060
00061
00062 class QtDisplayPanelGui;
00063 class QtDisplayData;
00064 class DisplayData;
00065 class PCITFiddler;
00066
00067 class MWCPannerTool;
00068 class MWCPolylineTool;
00069 class MWCRulerlineTool;
00070 class MWCPositionVelocityTool;
00071
00072 class DParameterChoice;
00073 class RegionShape;
00074 class QtRegionShapeManager;
00075
00076 namespace viewer {
00077 class RegionToolManager;
00078 class Region;
00079 }
00080
00081 class QtDisplayPanel : public QWidget,
00082 public WCMotionEH, public PCPositionEH, public ImageDisplayer {
00083
00084 Q_OBJECT
00085
00086
00087
00088 public:
00089
00090
00091 enum CursorBoundaryCondition { ENTER, LEAVE };
00092
00093 class panel_state {
00094 public:
00095
00096 class colormap_state {
00097 public:
00098 colormap_state( const std::string &n, const Vector<Float> &s, const Vector<Float> &b ) : name_(n), shift_(s), brightness_(b) { }
00099 colormap_state( const colormap_state &other ) : name_(other.name_), shift_(other.shift_), brightness_(other.brightness_) { }
00100 const std::string &name( ) const {
00101 return name_;
00102 }
00103 const Vector<Float> &shift( ) const {
00104 return shift_;
00105 }
00106 const Vector<Float> &brightness( ) const {
00107 return brightness_;
00108 }
00109 const std::string &colormap( ) const {
00110 return name_;
00111 }
00112 private:
00113 std::string name_;
00114 Vector<Float> shift_;
00115 Vector<Float> brightness_;
00116 };
00117
00118 typedef std::pair<Vector<Double>,Vector<Double> > zoom_state;
00119 typedef std::map<std::string,colormap_state> colormap_map;
00120
00121 panel_state( const panel_state &other ) : zoom_(other.zoom_) { }
00122 const Vector<Double> &blc( ) const {
00123 return zoom_.first;
00124 }
00125 const Vector<Double> &trc( ) const {
00126 return zoom_.second;
00127 }
00128 const colormap_state *colormap( const std::string &s ) const;
00129
00130 private:
00131 panel_state( const zoom_state &z_, const colormap_map &cm ) : zoom_(z_), colormaps_(cm) { }
00132
00133 zoom_state zoom_;
00134 colormap_map colormaps_;
00135
00136 friend class QtDisplayPanel;
00137 };
00138
00139 QtDisplayPanel( QtDisplayPanelGui *panel, const QtDisplayPanel *other, QWidget* parent=0,
00140 const std::list<std::string> &args = std::list<std::string>( ) );
00141 QtDisplayPanel( QtDisplayPanelGui *panel, QWidget* parent=0,
00142 const std::list<std::string> &args = std::list<std::string>( ) );
00143
00144 ~QtDisplayPanel();
00145
00146 Bool isEmptyRegistered() const;
00147 int getRegisteredCount() const;
00148
00149 DisplayDataHolder::DisplayDataIterator beginRegistered() const;
00150 DisplayDataHolder::DisplayDataIterator endRegistered() const;
00151 QtDisplayData* getRegistered( int index );
00152 QtDisplayData* getDD( const std::string& name ) const;
00153 QtDisplayData* getDD( const DisplayData *dd ) const;
00154 DisplayDataHolder* getDataHolder() const;
00155 bool isCoordinateMaster( QtDisplayData* displayData ) const;
00156 void setControllingDD( QtDisplayData* controllingDD );
00157
00158
00159
00160
00161 virtual Bool isRegistered(QtDisplayData*);
00162
00163 QtDisplayData* getControllingDD() const;
00164
00165
00166
00167
00168 QtDisplayData* getChannelDD( int index ) const;
00169
00170
00171 void registrationOrderChanged();
00172
00173
00174
00175
00176
00177 virtual Record getOptions();
00178
00179
00180
00181
00182
00183
00184 virtual QPixmap* contents() {
00185 return pc_->contents();
00186 }
00187 virtual QPixmap* getBackBuffer() {
00188 return pc_->getBackBuffer();
00189 }
00190
00191
00192
00193
00194 virtual PanelDisplay *panelDisplay() {
00195 return pd_;
00196 }
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206 virtual void hold();
00207 virtual void release();
00208
00209
00210
00211
00212 virtual Vector<String> mouseToolNames() {
00213 return mouseToolNames_;
00214 }
00215
00216
00217
00218
00219
00220
00221
00222
00223 virtual void operator()(const WCMotionEvent &ev);
00224
00225
00226
00227
00228 void operator()(const PCPositionEvent &pev) {
00229
00230
00231 if(pev.key()==Display::K_space) tracking_ = !tracking_;
00232 }
00233
00234
00235
00236 Int nPanels() {
00237 return pd_->nWCHs();
00238 }
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249 virtual Bool modeZ() {
00250 return modeZ_;
00251 }
00252 virtual String mode() {
00253 return modeZ()? "Normal" : "Blink";
00254 }
00255
00256 virtual Int nFrames() {
00257 return modeZ()? nZFrames() : nBFrames();
00258 }
00259 virtual Int nZFrames() {
00260 return zLen_;
00261 }
00262 virtual Int nBFrames() {
00263 return bLen_;
00264 }
00265
00266 virtual Int frame() {
00267 return index();
00268 }
00269 virtual Int index() {
00270 return modeZ()? zIndex() : bIndex();
00271 }
00272 virtual Int zIndex() {
00273 return zIndex_;
00274 }
00275 virtual Int bIndex() {
00276 return bIndex_;
00277 }
00278
00279 virtual Int startFrame() {
00280 return modeZ()? zStart() : bStart();
00281 }
00282 virtual Int zStart() {
00283 return zStart_;
00284 }
00285 virtual Int bStart() {
00286 return bStart_;
00287 }
00288
00289 virtual Int lastFrame() {
00290 return endFrame()-1;
00291 }
00292 virtual Int endFrame() {
00293 return modeZ()? zEnd() : bEnd();
00294 }
00295 virtual Int zEnd() {
00296 return zEnd_;
00297 }
00298 virtual Int bEnd() {
00299 return bEnd_;
00300 }
00301
00302
00303
00304 virtual Int step() {
00305 return modeZ()? zStep() : bStep();
00306 }
00307 virtual Int zStep() {
00308 return zStep_;
00309 }
00310 virtual Int bStep() {
00311 return bStep_;
00312 }
00313
00314 virtual Int animRate() {
00315 return animRate_;
00316 }
00317 virtual Int minRate() {
00318 return minRate_;
00319 }
00320 virtual Int maxRate() {
00321 return maxRate_;
00322 }
00323 virtual Int animating() {
00324 return animating_;
00325 }
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335 static String regionPathname(String origPath);
00336
00337
00338
00339
00340 Bool saveLastRegion(String path);
00341
00342
00343
00344 String saveRegionInImage(String regname, const ImageRegion& imreg);
00345
00346
00347
00348 void removeRegionInImage(String regname);
00349
00350
00351
00352 String listRegions();
00353
00354 Vector<String> listRegionsInImage();
00355
00356 ImageRegion getRegion(const String& name);
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367 void setRegionExtent(Int ext) {
00368 rgnExtent_ = max(0, min(2, ext ));
00369 }
00370
00371
00372 ImageRegion lastRegion() {
00373 return lastRgn_;
00374 }
00375
00376 Bool hasRegion() {
00377 return hasRgn_;
00378 }
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388 void setShapeManager(QtRegionShapeManager* manager);
00389
00390
00391 void registerRegionShape(RegionShape* rs);
00392
00393
00394 void unregisterRegionShape(RegionShape* rs);
00395
00396
00397
00398 Bool isRegistered(RegionShape* rs);
00399
00400
00401
00402
00403
00404
00405
00406
00407 String suggestedRestoreFilename();
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417 String dpState(String restorefilename="");
00418
00419
00420
00421
00422 virtual Bool savePanelState(String filename="", Bool overwrite=True);
00423
00424
00425 virtual Bool restorePanelState(String filename="");
00426
00427
00428 virtual Bool setPanelState(String xmlState="");
00429
00430
00431 virtual Bool setPanelState(QDomDocument& restoredoc,
00432 QString restorefiledir="");
00433
00434 panel_state getPanelState( ) const;
00435 void setPanelState( const panel_state & );
00436
00437
00438 void loadRegions( const std::string &path, const std::string &type );
00439
00440 void revokeRegion( viewer::Region *r );
00441
00442
00443 void activate( bool );
00444
00445
00446 public slots:
00447
00448
00449 void extendRegion(String, String);
00450
00451
00452
00453 virtual void registerDD(QtDisplayData*, int postion = -1);
00454 virtual void unregisterDD(QtDisplayData*);
00455 virtual void unregisterAll();
00456 virtual void registerAll(List<QtDisplayData*> registerDatas);
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467 virtual void setOptions(Record opts, Bool emitAll=False);
00468
00469
00470
00471
00472
00473 virtual void setMode(bool modez, bool channelCubes = false);
00474 virtual void setMode(String mode) {
00475 setMode(downcase(mode)=="normal");
00476 }
00477
00478 void toChannelMovieStart( ) { goTo( zStart( ) ); }
00479 void toImageMovieStart( ) { goTo( bStart( ) ); }
00480
00481 virtual void toChannelMovieEnd() {
00482 setMode(true);
00483 goTo(lastFrame());
00484 }
00485 virtual void toImageMovieEnd() {
00486 setMode(false);
00487 goTo(lastFrame());
00488 }
00489 virtual void revStepChannelMovie( ) {
00490 stop_();
00491 setMode(true);
00492 prev_();
00493 }
00494 virtual void revStepImageMovie( ) {
00495 stop_();
00496 setMode(false);
00497 prev_();
00498 }
00499 virtual void fwdStepChannelMovie( ) {
00500 stop_();
00501 setMode(true);
00502 next_();
00503 }
00504 virtual void fwdStepImageMovie( ) {
00505 stop_();
00506 setMode(false);
00507 next_();
00508 }
00509 virtual void revPlayChannelMovie( );
00510 virtual void revPlayImageMovie( );
00511 virtual void fwdPlayChannelMovie( );
00512 virtual void fwdPlayImageMovie( );
00513 virtual void stopChannelMovie( );
00514 virtual void stopImageMovie( );
00515
00517 void setChannelMovieRate(int);
00518 void setImageMovieRate(int);
00519
00520 void lowerBoundAnimatorImageChanged( int );
00521 void upperBoundAnimatorImageChanged(int);
00522 void stepSizeAnimatorImageChanged(int);
00523 void lowerBoundAnimatorChannelChanged( int );
00524 void upperBoundAnimatorChannelChanged(int);
00525 void stepSizeAnimatorChannelChanged(int);
00526
00527
00528 void goToChannel( int channel ) { goToZ(channel); }
00529 void goToImage( int image ) { goToB(image); }
00530
00531 virtual void goTo(int frm, bool channelFrame=false) {
00532 if(modeZ() || channelFrame ) goToZ(frm);
00533 else goToB(frm);
00534 }
00535
00536
00537
00538
00539
00540 virtual void goToZ(int frm);
00541 virtual void goToB(int frm);
00542
00543 virtual void emitAnimState() {
00544 emit animatorChange();
00545 }
00546
00547
00548
00549
00550
00551
00552
00553 virtual void resetRTRegion();
00554 virtual void resetPTRegion();
00555 virtual void resetETRegion();
00556 virtual void resetZoomer();
00557 virtual void resetCrosshair();
00558 virtual void resetPolyline();
00559 virtual void resetPanner();
00560
00561 virtual void resetRegionTools();
00562 virtual void resetSelectionTools();
00563
00564 virtual void resetTool(String toolname);
00565 virtual void resetTools();
00566
00567
00568
00569
00570
00571 virtual void zoomIn (Double fctr=2.) {
00572 if(zoom_!=0) zoom_->zoomIn (fctr);
00573 }
00574 virtual void zoomOut(Double fctr=2.) {
00575 if(zoom_!=0) zoom_->zoomOut(fctr);
00576 }
00577 virtual void zoom (const Vector<Double> &blc, const Vector<Double> &trc ) {
00578 if ( zoom_ != 0 ) zoom_->zoom( blc, trc );
00579 }
00580 virtual void unzoom() {
00581 if(zoom_!=0) zoom_->unzoom();
00582 }
00583
00584
00585
00586 Bool worldToLin(Vector<Double> &lin, const Vector<Double> &world);
00587
00588
00589 QSize canvasSize() {
00590 return pc_->size();
00591 }
00592
00593
00594
00595
00596 virtual void refresh() {
00597 pd_->refresh();
00598 refreshCBPanels_();
00599 }
00600 virtual void setBlen_(Int len);
00601
00602 viewer::RegionToolManager *toolMgr( ) { return toolmgr; }
00603
00604 signals:
00605
00606
00607
00608 void animatorChange();
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632 void oldDDRegistered(QtDisplayData*);
00633 void oldDDUnregistered(QtDisplayData*);
00634 void newRegisteredDD(QtDisplayData*);
00635 void newUnregisteredDD(QtDisplayData*);
00636 void RegisteredDDRemoved(QtDisplayData*);
00637 void UnregisteredDDRemoved(QtDisplayData*);
00638 void allDDsRegistered();
00639 void allDDsUnregistered();
00640
00641 void registrationChange();
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651 void mouseRegionReady(Record mouseRegion, WorldCanvasHolder*);
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663 void imageRegionReady(ImageRegion imgRegion, String ddName);
00664
00665
00666
00667
00668
00669
00670
00671 void trackingInfo(Record trackingRec);
00672
00673
00674
00675
00676 void optionsChanged(Record chgOpt);
00677
00678
00679 void dpHidden(QtDisplayPanel* dp);
00680
00681
00682
00683
00684 void newRegion(String imagePath);
00685
00686
00687
00688 void resized(QSize panelSize, QSize canvasSize);
00689
00690
00691
00692
00693 void creatingRstrDoc(QDomDocument* restoredoc);
00694
00695
00696
00697
00698 void restoring(QDomDocument* restoredoc);
00699
00700 void activate(Record);
00701
00702
00703 void cursorBoundary( QtDisplayPanel::CursorBoundaryCondition );
00704 void cursorPosition( viewer::Position );
00705
00706 protected slots:
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722 virtual void ddCreated_(QtDisplayData*, Bool autoRegister, int position=-1, Bool csMaster = False);
00723 virtual void ddRemoved_(QtDisplayData*);
00724
00725
00726
00727
00728
00729 virtual void setAnimatorOptions_(Record opts);
00730 virtual void setAnimator_(Record sarec);
00731
00732 virtual void setLen_(Int len) {
00733 if(modeZ()) setZlen_(len);
00734 else setBlen_(len);
00735 }
00736 virtual void setZlen_(Int len);
00737
00738
00739 virtual void stop_();
00740 virtual void goTo_(Int frm) {
00741 if(modeZ()) goToZ_(frm);
00742 else goToB_(frm);
00743 }
00744 virtual void goToZ_(Int frm);
00745 virtual void goToB_(Int frm);
00746
00747 virtual void playStep_() {
00748 if(animating_<0) prev_();
00749 else if(animating_>0) next_();
00750 }
00751 virtual void prev_();
00752 virtual void next_();
00753
00754
00755
00756
00757
00758
00759
00760 virtual void chgMouseBtn_(std::string tool, Int button);
00761
00762
00763
00764
00765
00766 virtual void mouseRegionReady_(Record mouseRegion, WorldCanvasHolder*);
00767
00768
00769
00770
00771
00772 virtual void reorientColorBars_() {
00773 arrangeColorBars_(True);
00774 }
00775 virtual void checkColorBars_() {
00776 arrangeColorBars_(False);
00777 }
00778 virtual void pcResizing_() {
00779 arrangeColorBars_(False, True);
00780 }
00781
00782
00783
00784
00785
00786
00787
00788 virtual void refreshTracking_(QtDisplayData* qdd=0);
00789
00790 void clicked(Record);
00791
00792 protected:
00793
00794
00795 virtual void setupMouseTools_( bool new_region_tools );
00796
00797
00798
00799
00800
00801
00802 virtual void registerDD_(QtDisplayData* qdd, int position = -1);
00803 virtual void unregisterDD_(QtDisplayData* qdd);
00804
00805
00806
00807
00808
00809 virtual void installEventHandlers_();
00810 virtual void removeEventHandlers_();
00811
00812
00813
00814 virtual Bool myWC_(const WorldCanvas* wc);
00815
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827 virtual void arrangeColorBars_(Bool reorient=False, Bool resizing=False);
00828
00829
00830
00831
00832
00833 virtual void updateColorBarDDLists_();
00834
00835
00836
00837
00838
00839
00840
00841
00842 virtual Int marginb_(QtDisplayData* dd, Float shrink=1.);
00843
00844
00845
00846
00847
00848
00849
00850 virtual Float cbPanelSpace_(QtDisplayData* dd);
00851
00852
00853
00854
00855 virtual void refreshCBPanels_();
00856
00857
00858
00859
00860
00861
00862
00863
00864
00865
00866
00867
00868
00869
00870 virtual Bool ddFileMatch_( const std::string &path, const std::string &dataType, const std::string &displayType,
00871 QtDisplayData*& dd, QString origrestorefile, QString restoredir);
00872
00873
00874
00875
00876
00877 void hideEvent(QHideEvent* ev) {
00878 QWidget::hideEvent(ev);
00879 emit dpHidden(this);
00880 }
00881
00882
00883
00884 void resizeEvent(QResizeEvent* ev);
00885
00886
00887
00888 QtDisplayPanelGui *panel_;
00889
00890
00891 PanelDisplay* pd_;
00892
00893
00894
00895 QtPixelCanvas* pc_;
00896
00897
00898
00899
00900
00901
00902
00903 DisplayDataHolder* displayDataHolder;
00904
00905
00906 viewer::RegionToolManager *toolmgr;
00907
00908
00909 MWCRTZoomer* zoom_;
00910 MWCPannerTool* panner_;
00911
00912 QtOldCrossTool* ocrosshair_;
00913 QtOldRectTool* ortregion_;
00914 QtOldEllipseTool *oelregion_;
00915 QtOldPolyTool* optregion_;
00916
00917 viewer::QtRegionSourceFactory *region_source_factory;
00918
00919 MWCPolylineTool* polyline_;
00920
00921 MWCRulerlineTool* rulerline_;
00922 MWCPositionVelocityTool *pvtool_;
00923
00924 PCITFiddler* snsFidd_;
00925 PCITFiddler* bncFidd_;
00926
00927
00928 Vector<String> mouseToolNames_;
00929
00930
00931
00932 QTimer tmr_;
00933
00934 Bool tracking_;
00935
00936
00937
00938
00939 Bool modeZ_;
00940 Int zLen_, bLen_;
00941 Int zIndex_, bIndex_;
00942
00943 Int animRate_;
00944 Int minRate_, maxRate_;
00945
00946 Int animating_;
00947
00948
00949
00950
00951
00952
00953
00954 List<QtDisplayData*> allColorBarDDs_;
00955
00956
00957
00958
00959
00960
00961 List<QtDisplayData*> colorBarDDsToDisplay_;
00962
00963
00964
00965
00966 List<PanelDisplay*> colorBarPanels_;
00967
00968
00969
00970 PanelDisplay* blankCBPanel_;
00971
00972
00973
00974
00975
00976 Vector<Float> colorBarPanelSizes_;
00977
00978
00979
00980 Float mainPanelSize_;
00981
00982
00983
00984
00985
00986
00987
00988
00989
00990
00991
00992 Int pcthsz_, pclnsz_;
00993 Float marginUnit_;
00994 Int mrgna_, mrgnb_, lnmrgna_, lnmrgnb_;
00995
00996
00997
00998
00999
01000
01001 ImageRegion lastRgn_;
01002
01003
01004 String rgnImgPath_;
01005
01006
01007 Bool hasRgn_;
01008
01009
01010
01011
01012
01013
01014
01015 Int rgnExtent_;
01016
01017
01018
01019
01020
01021
01022
01023 List<RegionShape*> rshapes_;
01024
01025
01026
01027 QtRegionShapeManager* qsm_;
01028
01029
01030
01031
01032
01033
01034
01035
01036 String lastSavedState_;
01037
01038
01039
01040
01041
01042
01043
01044
01045 WCMotionEvent* lastMotionEvent_;
01046
01047
01048
01049
01050
01051
01052
01053
01054 DParameterChoice* bkgdClrOpt_;
01055
01056
01057
01058
01059 String extChan_;
01060 String extPol_;
01061
01062
01063 enum CursorBoundaryState { INSIDE_PLOT, OUTSIDE_PLOT };
01064 CursorBoundaryState cursorBoundaryState;
01065
01066 public:
01067
01068
01069
01070 Bool printStats;
01071
01072 Bool useRegion;
01073
01074
01075
01076 void setAllowBackToFront(Bool allowed=True) {
01077 if (pc_) pc_->setAllowBackToFront(allowed);
01078 }
01079
01080 void setUpdateAllowed(Bool allowed=True) {
01081 if (pc_) pc_->setUpdateAllowed(allowed);
01082 }
01083
01084 void pushCurrentDrawingState( );
01085 void popCurrentDrawingState( );
01086
01087 float getLabelLineWidth( );
01088 void setLabelLineWidth( float value );
01089 float getTickLength( );
01090 void setTickLength( float value );
01091
01092 void setLineWidthPS(Float &w);
01093 void setBackgroundPS(String &w, String &c);
01094
01095 void beginLabelAndAxisCaching( ) {
01096 pc_->beginLabelAndAxisCaching( );
01097 }
01098 void endLabelAndAxisCaching( QPainter &qp ) {
01099 pc_->endLabelAndAxisCaching( qp );
01100 }
01101
01102
01103 private:
01107 void construct_( QtPixelCanvas *canvas, const std::list<std::string> &args );
01108
01113 void processTracking( const Record& trackingRec, const WCMotionEvent& ev );
01114
01124 void setColorBarMargins( bool vertical, float plotPercentage, PanelDisplay* cbp, bool resizing );
01125
01132 void setPanelGeometry( PanelDisplay* pd, float orgn, float siz );
01133
01141 void setPanelMargins( PanelDisplay* pd, int marginA =LEFT_MARGIN_SPACE_DEFAULT,
01142 int marginB = RIGHT_MARGIN_SPACE_DEFAULT,
01143 int lengthMarginA = BOTTOM_MARGIN_SPACE_DEFAULT,
01144 int lengthMarginB = TOP_MARGIN_SPACE_DEFAULT);
01145
01146
01147
01148
01149 void setLabelFontSize( );
01150
01155 void setMarginSize( );
01156
01157
01158
01159
01160 const int PGP_MARGIN_UNIT;
01161 enum ColorBarIndex {ORIGIN, SIZE, LENGTH_SIDE_ORIGIN, LENGTH_SIDE_SIZE, MARGIN_A,
01162 MARGIN_B, LENGTH_SIDE_MARGIN_A, LENGTH_SIDE_MARGIN_B
01163 };
01164
01165 std::map<ColorBarIndex,String> settingsMap;
01166
01171 void initializeSettingsMap( bool vertical );
01172
01177 void plotCountChangeAdjustment();
01178
01179
01180
01181 float oldPlotPercentage;
01182 int oldPixelCanvasHeight;
01183 int oldPixelCanvasWidth;
01184 int oldRowCount;
01185 int oldColumnCount;
01186
01187
01188 static const int LEFT_MARGIN_SPACE_DEFAULT;
01189 static const int BOTTOM_MARGIN_SPACE_DEFAULT;
01190 static const int TOP_MARGIN_SPACE_DEFAULT;
01191 static const int RIGHT_MARGIN_SPACE_DEFAULT;
01192
01193
01194
01195
01196 Int zStart_, zEnd_, zStep_;
01197 Int bStart_, bEnd_, bStep_;
01198
01199 std::stack<Record*> drawing_state;
01200
01201 };
01202
01203
01204
01205 }
01206
01207 #endif