21 #if QT_VERSION < 0x040000
24 #include <QtGui/QMouseEvent>
29 #include <msdevstudio/MSconfig.h>
35 #if QT_VERSION < 0x040000
107 mutable std::vector < const ViewBase * >
m_views;
130 #if QT_VERSION < 0x040000
133 Q3CanvasRectangle * m_drag_rect;
141 #if QT_VERSION < 0x040000
144 Q3FileDialog * m_image_dialog;
151 bool fillPickedPoint(
QMouseEvent * e, std::vector<double> & picked);
155 void fillMouseData(
const std::vector<double> & picked);
157 void updatePickTable(
QtView * qtview, std::vector<double> & picked);
159 void setPlotZoom(
const std::vector<double> & start_picked,
160 const std::vector<double> & picked);
200 void initSettings ();
204 void saveSettings ()
const;
208 void initFitterDefault ();
212 void setFitterDefault (
const std::string & name );
220 static void createImageFilters ();
225 static bool isValidImageFormat (
const std::string & suffix );
230 #if QT_VERSION < 0x040000
233 Q3FileDialog * createImageDialog ();
237 void setChanged (
bool yes =
true );
241 void addView (
QtView * view,
bool select );
245 #if QT_VERSION < 0x040000
246 void placeItems (
const std::vector < QCanvasItem * > & items );
248 void placeItems (
const std::vector < Q3CanvasItem * > & items );
253 virtual void calcDefaultSize (
QtView * view,
double aspect_ratio = 0.0);
262 void sizeAndPlace (
QtView * view );
267 std::pair<double, double> moveToPlotterAt (
const PlotterBase * plotter,
269 double x,
double y );
274 void fillSelectedWithObservers ( std::vector < const ViewBase * > & );
283 virtual void contentsMouseMoveEvent (
QMouseEvent * );
284 virtual void contentsMousePressEvent (
QMouseEvent * );
289 virtual void controlMousePressEvent ();
294 virtual void contentsMouseReleaseEvent(
QMouseEvent*);
298 #if QT_VERSION < 0x040000
300 const char * name = 0, Qt::WFlags f = 0 );
303 const char * name = 0, Qt::WFlags f = 0 );
306 void initFrom (
const std::list < ViewBase * > & views );
309 void initFromFile (
const std::string & filename );
324 #if QT_VERSION < 0x040000
327 void initDockWindows ( Q3MainWindow *
mw );
335 void setFitterDefault (
const QString & name );
338 void copySelectedToPasteboard ();
342 void copyFromPasteboard ();
347 void addFromPasteboard ();
352 void deleteSelected (
bool paste );
356 void pasteViews (
const std::list < ViewBase * > & views );
359 void restoreFromSelectCopy ();
362 void setCurrentRange();
365 std::vector<double>& getCurrentRange() ;
369 void setInspector (
Inspector * inspector );
381 void notifyObservers ();
388 std::vector < PlotterBase * > getSelectedPlotters ()
const;
393 void addPlotDisplay (
PlotterBase * plotter,
bool select);
396 #if QT_VERSION < 0x040000
399 void autosaveSettings ( Q3MainWindow *
mw);
407 const std::string & s,
408 const std::string & text = std::string () );
414 std::pair<double, double> addTextDisplayAt (
PlotterBase * plotter,
415 const std::string &
type,
416 const std::string & text,
417 double xrel,
double yrel);
421 void addFuncDisplay (
PlotterBase * plotter,
const std::string & s );
430 const std::vector < const ViewBase * > & selectedViews ()
const;
436 const std::vector < const ViewBase * > & views ()
const;
441 void fillPlotterList ( std::vector < PlotterBase * > & plotter_list );
450 void previousView ();
454 virtual void print ();
458 virtual void print (
const std::string & filename );
470 void setIntervalEnabled (
bool yes =
true );
473 void removeSelected ();
476 void hideSelected ();
482 void saveSelectedImages ();
485 void saveSelectedImages (
const std::string & filename );
490 const std::string & filename )
const;
498 const std::string & filename )
const;
502 void saveAs (
const std::string & filename )
const;
506 static void saveAs (
const std::vector < const ViewBase * > & views,
507 const std::string & filename );
511 static void saveAs (
const std::vector < PlotterBase * > & plotters,
512 const std::string & filename );
518 void exportTextTuple (
const std::string & suffix );
522 void showInspector ();
525 void viewShowPickTable();
529 const std::vector<double> & mouseEventData();
534 void setPlotMatrix (
unsigned int columns,
unsigned int rows );
544 void setFonts(
const QFont & font );
551 const std::string & applicationName ()
const;
555 void setAddedSelected (
bool yes );
557 void setCutMode (
int mode );
577 bool existingFileWarning (
const std::string & filename );
581 void invalidImageFormatError (
const std::string & filename );
584 void saveSelectedAsEps (
const std::string & filename );
592 void saveSelectedAsFits (
const std::string & filename );
597 void showFitsError ()
const;
603 void setVisibleNonViews (
bool visible );
612 void saveSelectedImages (
const std::string & filename,
613 bool check_existing );
617 static void toLower ( std::string & upper );
635 void savePlotAsImage (
const PlotterBase * plotter,
636 const std::string & filename );
640 void swapOrientation ();
650 #endif // CanvasView_H
int m_edge
For cut mode 1, edge or corner selected.
static XmlController * s_xml_controller
The XML controller.
std::map< const QtView *, PickTable * > m_table_map
A map from a view to the PickTable.
std::vector< const ViewBase * > m_sel_views
Temporary list of selected QtView objects on the canvas.
std::list< QAction * > m_recent_list
List of menu items of recently opened files.
This class implements additional FigureEditor functionality particular to QtView objects.
#define MDL_QTHIPPOPLOT_API
int m_num_height
Number of default sized plots vertically.
std::vector< double > m_mouseData
3-vector of mouse event data
std::vector< const ViewBase * > m_views
Temporary list of QtView objects on the canvas.
static std::string s_image_filters
A QFileDialog filters string for supported image types.
bool m_add_selected
Set to true if displays should be selected when added.
static const std::string s_app_name
The application name.
The base class for the PlotterBase hierarchy.
int m_cut_mode
Cut mode: 1: normal; 2: click; 3: drag.
PyArray_TYPES type(numeric::array arr)
bool m_clicked
For cut mode 2, clicked or not.
int m_num_width
Number of default sized plots horizontally.
The class of derived from ViewBase and QCanvasRectangle for drawing on a QCanvas. ...
A DataSource class implemented with std::vector<double> to store the column data. ...
QCanvasRectangle * m_drag_rect
Rectangle showing the area which is to be magnified.
std::vector< double > m_current_range
Set to the current range of the selected plotter.
Inspector * m_inspector
The Inspector object.
QFileDialog * m_image_dialog
The QFileDialog for saving images.
A base class that is the interface between GUI and the XML serialization and deserialization.
hippodraw::FigureEditor class interface and nested class implementation
This class implements additional QCanvasView functionality.
A derived class of InspectorBase class which is generated by the Qt designer.