#include <CanvasView.h>
Definition at line 96 of file CanvasView.h.
Public Slots | |
void | addPlotDisplay (PlotterBase *plotter) |
Creates a QtView object for the display and inserts it onto the canvas in the next available free place. | |
void | clear () |
Removes all the QCanvasItem objects from the canvas. | |
void | savePlotAsImage (const PlotterBase *plotter, const std::string &filename) |
Saves the plotter as image file filename. | |
void | swapOrientation () |
Swaps the canvas' orientation from portrait to landscape or visa verse. | |
static QtView * | wrapPlotter (PlotterBase *plotter) |
Wraps the plotter with a new QtView object. | |
Public Member Functions | |
void | add (QCanvasItem *item) |
Adds the item to the canvas. | |
void | addFromPasteboard () |
Adds from pasteboard. | |
void | addFuncDisplay (PlotterBase *plotter, const std::string &s) |
Add a text display which displays functions parameters. | |
void | addPage () |
Adds a page to the canvas. | |
void | addPlotDisplay (PlotterBase *plotter, bool select) |
Creates a QtView object for the display and inserts it onto the canvas in the next available free place. | |
void | addRecentFile (const QString &filename, QActionGroup *ag) |
Add recently opened files. | |
void | addSelectedItem (QCanvasItem *item) |
Add an item to the selected list. | |
void | addTextDisplay (PlotterBase *plotter, const std::string &s, const std::string &text=std::string()) |
Add a display of text Adds a display of text to that will be associated with plotter. | |
std::pair< double, double > | addTextDisplayAt (PlotterBase *plotter, const std::string &type, const std::string &text, double xrel, double yrel) |
Adds a text display at the relative position (xrel, yrel) in the selected item's coordinates. | |
const std::string & | applicationName () const |
Returns the name of the application. | |
void | autosaveSettings (QMainWindow *mw) |
Save the recently opened file list. | |
canvas () const | |
CanvasView (QCanvas *, QWidget *parent=0, const char *name=0, Qt::WFlags f=0) | |
void | copyFromPasteboard () |
Copies from the pasteboard. | |
void | copySelectedToPasteboard () |
Copies selected items to pasteboard. | |
void | createNTuple () |
Raise the create NTuple dialog. | |
void | deleteSelected (bool paste) |
Removes the selected items from canvas and copies them to the pasteboard. | |
drawContents (QPainter *p, int cx, int cy, int cw, int ch) | |
void | ensureVisible (const QCanvasItem *item) |
Scrolls the canvas, if needed, so the QCanvasItem item is visible. | |
void | enterEvent (QEvent *) |
Grabs the event when mouse cursor enters the widget. | |
void | exportTextTuple (const std::string &suffix) |
Saves the DataSource as a text NTuple. | |
void | fillPlotterList (std::vector< PlotterBase * > &plotter_list) |
Clears and fills plotter_list with all the PlotterBase objects on the canvas. | |
const QString & | getAppKey () const |
Returns a reference the application's QSettings key. | |
std::vector< double > & | getCurrentRange () |
Returns the current range of the selected plotter. | |
Inspector * | getInspector () |
Gets the inspector object. | |
NTuple * | getPickTable (const PlotterBase *plotter) |
Gets the pick table of a plotter. | |
NTuple * | getPickTable () |
Gets the pick table of selected plotter. | |
const QString & | getRegistry () const |
Returns a reference to the application's registry. | |
QCanvasItem * | getRightItem () |
Get the QCanvasItem clicked by right mouse button. | |
std::vector < QCanvasItem * > & | getSelectedItems () |
Return the vector of selected items. | |
std::vector < PlotterBase * > | getSelectedPlotters () const |
Returns a list of selected plotters. | |
QtView * | getViewFor (const PlotterBase *plotter) const |
Returns the QtView object that is the Observer of the plotter. | |
bool | getZoomMode () const |
Returns the bool indicating whether zoom mode is enabled or not. | |
void | groupView () |
Create a GroupView object containing selected views. | |
void | helpAbout () |
Brings up dialog version numbers and contributors. | |
void | hide (QCanvasItem *item) |
Removes the item from the canvas but not destroys it. | |
void | hideSelected () |
Removes the selected objects from the canvas without destroying in. | |
void | initDockWindows (QMainWindow *mw) |
Initializes the positions of dock windows. | |
void | initFitterSettings (QActionGroup *group) |
Initializes the fitter settings menu items. | |
void | initFrom (const std::list< ViewBase * > &views) |
void | initFromFile (const std::string &filename) |
Initializes canvas from data in file filename. | |
void | initRecentFiles (QActionGroup *ag) |
Initializes the recently opened files menu items. | |
inverseWorldMatrix () const | |
bool | isSingleItemSelected () const |
Returns true if just one item is selected, else returns false. | |
void | leaveEvent (QEvent *) |
Grabs the event when mouse cursor leaves the widget. | |
const std::vector < double > & | mouseEventData () |
Retrieve a vector of (x, y, z) points from the next mouse event. | |
void | notifyObservers () |
Notifies observers of a change in CanvasView. | |
void | paste (QCanvasItem *item) |
Adds the item to the canvas. | |
void | pasteViews (const std::list< ViewBase * > &views) |
Adds the views to the canvas. | |
void | placeGraph (QCanvasRectangle *) |
Moves the QCanvasRectangle object to place on the canvas where it will not collide with existing QCanvasItem object and not be off the usable page area. | |
void | previousView () |
Switches View to the previous view for the selected item on the canvas. | |
virtual void | print (const std::string &filename) |
Prints the view to Postscript file filename. | |
virtual void | print () |
Prints the canvas. | |
void | remove (QCanvasItem *item) |
Removes the item from the canvas and destroys it. | |
void | removeDisplay (PlotterBase *plotter) |
Removes the display from the canvas. | |
void | removeSelected () |
Removes the selected objects from the canvas. | |
void | removeSelectedItem (QCanvasItem *item) |
Removes an item from the selection list. | |
void | resizeEvent (QResizeEvent *e) |
Re-sizes the QCanvas in response to parent window receiving QResizeEvent. | |
void | restoreFromSelectCopy () |
Restores the selected views from the selection copy. | |
void | reTile () |
Re-tiles the canvas. | |
void | reTilePage () |
Re-tiles the current page. | |
void | saveAs (const std::string &filename) const |
Saves all the QtView canvas item to a XML file. | |
void | savePlotAsEps (const PlotterBase *plotter, const std::string &filename) const |
Saves the plotter as an EPS image file. | |
void | savePlotAsFits (const PlotterBase *plotter, const std::string &filename) const |
Saves the plotter as an FITS image file. | |
void | saveSelectedImages (const std::string &filename) |
Save the selected objects to an image file, overwriting the file. | |
void | saveSelectedImages () |
Saves the selected QCanvasItem objects to a image file. | |
void | scaleBy (double factor) |
Scales the size of the images by factor. | |
QCanvasItem * | selectedItem () const |
Returns the selected QCanvasItem. | |
PlotterBase * | selectedPlotter () const |
Returns the selected PlotterBase object. | |
const std::vector < const ViewBase * > & | selectedViews () const |
Returns temporary list of selected QtView objects on the canvas. | |
void | setAddedSelected (bool yes) |
Sets to flag to make plot in its selected state when added to the canvas. | |
void | setAllSelected (bool flag=true) |
Sets selection flag on all QCanvasItem objects. | |
setCanvas (QCanvas *canvas) | |
void | setCurrentRange () |
Saves the current range of the selected plotter. | |
void | setCutMode (int mode) |
void | setFitterDefault (const QString &name) |
Sets the default fitter setting and the FitterFactory default. | |
void | setFonts (const QFont &font) |
Sets the fonts for the views. | |
void | setInspector (Inspector *inspector) |
Sets the Inspector object. | |
void | setIntervalEnabled (bool yes=true) |
Sets the display interval feature of all views to enabled if yes is true , otherwise sets the feature to disable. | |
void | setLocked (bool flag) |
Sets the selected QCanvasItem to be locked in size and position. | |
void | setPlotMatrix (unsigned int columns, unsigned int rows) |
Sets the number of columns and rows of plots displayed on each page. | |
void | setPrinterSettings () |
Set the default printer settings. | |
void | setSelectedFlags () |
Set the selected flags. | |
void | setSelectedItem (QCanvasItem *) |
Set the selected QCanvasItem. | |
void | setup () |
Raises the settings dialog. | |
setWorldMatrix (const QWMatrix &wm) | |
void | setZoomMode (bool flag) |
Sets the zoom mode to flag. | |
void | showFitsError () const |
Raises a dialog box indicating that FITS support is not available. | |
void | showInspector () |
Show the Inspector window. | |
void | showPrinterMargins (bool on) |
Sets showing the printer margins on or off. | |
sizeHint () const | |
void | ungroupView () |
Ungroup the GroupView object to separated Views. | |
const std::vector < const ViewBase * > & | views () const |
Returns temporary list of all QtView objects on the canvas. | |
void | viewShowPickTable () |
Show the pick table. | |
void | viewZoomIn () |
Enlarges the view of the canvas. | |
void | viewZoomOut () |
Reduces the view of the canvas. | |
void | viewZoomReset () |
Returns the view to normal size. | |
worldMatrix () const | |
Static Public Member Functions | |
static void | saveAs (const std::vector< PlotterBase * > &plotters, const std::string &filename) |
Wraps the plotters with a QtView then saves them to XML file. | |
static void | saveAs (const std::vector< const ViewBase * > &views, const std::string &filename) |
Saves all the views to a XML file. | |
static void | setAppKey (const std::string &) |
Sets the QSettings application key. | |
Protected Types | |
enum | Location { none, invalid, upper_left, upper_middle, upper_right, middle_left, middle_right, lower_left, lower_middle, lower_right } |
Possible locations where on a QCanvasItem the mouse cursor was when clicked. More... | |
Protected Member Functions | |
void | addPageMargin (int x, int y) |
Adds page margin. | |
void | addToItemList (QCanvasItem *item) |
void | calcPrinterMetrics (QPaintDevice *) |
Calculate the size of a page by using the printer metrics. | |
void | clearSelectedList () |
De-selects all items, making the selection list empty. | |
void | contentsMouseMoveEvent (QMouseEvent *, double aspect) |
Moves or re-sizes the selected QCanvasItem object. | |
virtual void | contentsMouseMoveEvent (QMouseEvent *) |
Overrides the QScrollView event handler. | |
virtual void | contentsMousePressEvent (QMouseEvent *) |
virtual void | contentsMouseReleaseEvent (QMouseEvent *) |
Overrides inherited method to receive mouse released events. | |
virtual void | controlMousePressEvent () |
Overrides inherited method to receive mouse pressed events. | |
void | copySelectedToClipboard () |
Adds selected items to system clipboard. | |
QImage | createImage (const QRect &rectange) const |
Creates and returns a QImage from the area defined on the canvas. | |
QPixmap * | createPixmap (const QRect &rectangle) const |
Creates and returns a new QPixmap from the area defined on the canvas. | |
QRect | getSelectedBounds () const |
Returns a QRect that enclosed the selected QCanvasItem objects. | |
void | initPrinter () |
Initializes the printer settings from the saved settings. | |
void | makeVisible (const QCanvasItem *item) |
Scrolls the canvas, if needed, so the QCanvasItem item is visible. | |
double | maximumZ () const |
Returns the largest Z value of all the items on the canvas. | |
void | mouseMoveMultiItem (QMouseEvent *e) |
Move more than one items in the Canvas. | |
void | movePlotterWithText (QCanvasItem *item, float dx, float dy) |
Move a plotter with all its targetted text plotters. | |
void | placeGraphOnSelected (QCanvasRectangle *item) |
Adds the item on top of the currently selected item. | |
void | print (QPrinter *printer) |
Prints the view to the printer. | |
void | removeFromItemList (QCanvasItem *item) |
Removes the item from list of items on the canvas. | |
void | resizeCanvasToFit (QCanvasItem *item) |
Re-sizes the canvas if necessary so that the item is on the canvas. | |
void | saveAreaAsPixmap (const QRect &area, const std::string &filename) |
Saves the area area as pixmap to file filename. | |
void | savePrinterSettings () |
Saves the printer setting with QSettings. | |
void | saveSelectedAsPixmap (const std::string &filename) |
Save the selected objects as Pixmap image file filename. | |
void | setCollidingSelected (const QCanvasItem *target) |
Sets all QCanvasItems that collide with target to selected state. | |
void | setSelectedItems (bool state) |
Sets the selected items to selection state state. | |
void | setUnselectedVisible (bool yes) |
Sets the unselected items to visible or not. | |
void | whereClicked () |
Finds which knob on the selected item was clicked. | |
Protected Attributes | |
int | m_apage_h |
The actual Page height in Postscript points. | |
int | m_apage_w |
The actual Page width in Postscript points. | |
QCanvas * | m_canvas |
The canvas object. | |
bool | m_ignore_margin |
a flag set to true if the printer margins should be ignored when adding a plot to the canvas. | |
bool | m_isMouseDown |
The flag of mouse down or not, used when moving multiple plots. | |
std::vector < QCanvasItem * > | m_items |
The list of view items on the canvas. | |
QPoint | m_mouse_down |
The point of a mouse down, used when moving multiple plots. | |
QPoint | m_moving_start |
The starting point of a mouse drag. | |
QCanvasItem * | m_preSelected |
The view item which is preselected when left mouse button down. | |
bool | m_printer_bounds |
A flag to indicate if rectangle display usable printer boundary should be displayed or not. | |
QCanvasItem * | m_rightItem |
The view item which is clicked with right mouse button when contentsMousePressEvent() happens. | |
double | m_scale_factor |
The scale factor. | |
std::vector < QCanvasItem * > | m_selected_list |
The list of currently selected QCanvasItem objects. | |
int | m_upage_h |
The usable Page height in Postscript points. | |
int | m_upage_w |
The usable Page width in Postscript points. | |
Location | m_whereClicked |
Location where the mouse cursor clicked the object. | |
bool | m_zoom_mode |
Set to true if zoom Mode is enabled. | |
QPoint | m_zoom_start |
The starting point of a mouse drag.for zoom. | |
Static Protected Attributes | |
static QString | s_app_key |
The QSettings application key for searching for setting. | |
static QPrinter * | s_printer = 0 |
The single QPrinter instance. | |
static QString | s_registry |
The QSettings Windows registry key. | |
Private Member Functions | |
void | addView (QtView *view, bool select) |
Adds a QtView object to the CanvasView. | |
virtual void | calcDefaultSize (QtView *view, double aspect_ratio=0.0) |
Sets the default size and position for the view. | |
QFileDialog * | createImageDialog () |
Creates the QFileDialog with supported filters string for supported image types. | |
bool | existingFileWarning (const std::string &filename) |
Raises dialog to query over writing existing file. | |
void | fillMouseData (const std::vector< double > &picked) |
Fill m_mouseData with the data from fillPickedPoint. | |
bool | fillPickedPoint (QMouseEvent *e, std::vector< double > &picked) |
Fill the picked vector with the event data. | |
void | fillSelectedWithObservers (std::vector< const ViewBase * > &) |
Fills the input vector with selected items and their observers. | |
PlotterBase * | getRightClickedPlotter () |
void | initFitterDefault () |
Sets the default fitter. | |
void | initFitterMenu (QActionGroup *group) |
Initializes the fitter setting menu items. | |
void | initSettings () |
Initialize the settings save from previous session. | |
void | invalidImageFormatError (const std::string &filename) |
Raises dialog box for error in image format. | |
void | moveToPlotter (const PlotterBase *plotter, QtView *view) |
Moves the view to a nice position with respect to the plotter's QCanvasItem. | |
std::pair< double, double > | moveToPlotterAt (const PlotterBase *plotter, QtView *view, double x, double y) |
Moves the view to the specified position with respect to the currently view for plotter. | |
void | placeItems (const std::vector< QCanvasItem * > &items) |
Places each item in items on the canvas. | |
void | saveSelectedAsEps (const std::string &filename) |
Saves the selected objects as EPS image file filename. | |
void | saveSelectedAsFits (const std::string &filename) |
Saves the selected objects as FITS image file filename. | |
void | saveSelectedImages (const std::string &filename, bool check_existing) |
Saves the selected objects to image file filename. | |
void | saveSettings () const |
Saves the settings for use in future session. | |
void | setChanged (bool yes=true) |
Sets the canvas as being changed. | |
void | setFitterDefault (const std::string &name) |
Sets the default fitter in the FitterFactory. | |
void | setPlotZoom (const std::vector< double > &start_picked, const std::vector< double > &picked) |
void | setVisibleNonViews (bool visible) |
Sets visible state of QCanvasItem objects that are not also QtView objects to visible. | |
void | sizeAndPlace (QtView *view) |
Calculates the default size and position on the canvas. | |
void | updatePickTable (QtView *qtview, std::vector< double > &picked) |
Static Private Member Functions | |
static void | createImageFilters () |
Creates the image filters string. | |
static bool | isValidImageFormat (const std::string &suffix) |
Returns true if suffix string is one for valid image format. | |
static void | toLower (std::string &upper) |
Converts the string to lower case. | |
Private Attributes | |
bool | m_add_selected |
Set to true if displays should be selected when added. | |
bool | m_clicked |
For cut mode 2, clicked or not. | |
std::vector< double > | m_current_range |
Set to the current range of the selected plotter. | |
int | m_cut_mode |
Cut mode: 1: normal; 2: click; 3: drag. | |
QCanvasRectangle * | m_drag_rect |
Rectangle showing the area which is to be magnified. | |
int | m_edge |
For cut mode 1, edge or corner selected. | |
QFileDialog * | m_image_dialog |
The QFileDialog for saving images. | |
Inspector * | m_inspector |
The Inspector object. | |
std::vector< double > | m_mouseData |
3-vector of mouse event data | |
int | m_num_height |
Number of default sized plots vertically. | |
int | m_num_width |
Number of default sized plots horizontally. | |
std::list< QAction * > | m_recent_list |
List of menu items of recently opened files. | |
std::vector< const ViewBase * > | m_sel_views |
Temporary list of selected QtView objects on the canvas. | |
std::map< const QtView *, PickTable * > | m_table_map |
A map from a view to the PickTable. | |
std::vector< const ViewBase * > | m_views |
Temporary list of QtView objects on the canvas. | |
double | old_pos |
For cut mode 2, position of first click. | |
double | old_pos_x |
double | old_pos_y |
Static Private Attributes | |
static const std::string | s_app_name = "HippoDraw" |
The application name. | |
static std::string | s_image_filters |
A QFileDialog filters string for supported image types. | |
static XmlController * | s_xml_controller = 0 |
The XML controller. |
enum Location [protected, inherited] |
Possible locations where on a QCanvasItem the mouse cursor was when clicked.
none | |
invalid | |
upper_left | |
upper_middle | |
upper_right | |
middle_left | |
middle_right | |
lower_left | |
lower_middle | |
lower_right |
Definition at line 309 of file FigureEditor.h.
CanvasView | ( | QCanvas * | c, | |
QWidget * | parent = 0 , |
|||
const char * | name = 0 , |
|||
Qt::WFlags | f = 0 | |||
) |
Definition at line 127 of file CanvasView.cxx.
void add | ( | QCanvasItem * | item | ) | [inherited] |
Adds the item to the canvas.
Expands the canvas' size if necessary.
Definition at line 1381 of file FigureEditor.cxx.
References FigureEditor::m_canvas, FigureEditor::m_items, and FigureEditor::resizeCanvasToFit().
void addFromPasteboard | ( | ) |
Adds from pasteboard.
Copies from the pasteboard and adds the plot to next available space.
Definition at line 526 of file CanvasView.cxx.
References CanvasView::addView(), XmlController::getFromPasteboard(), QtViewFactory::instance(), FigureEditor::placeGraph(), CanvasView::s_xml_controller, and CanvasView::views().
void addFuncDisplay | ( | PlotterBase * | plotter, | |
const std::string & | s | |||
) |
Add a text display which displays functions parameters.
Definition at line 1107 of file CanvasView.cxx.
References CanvasView::addView(), FunctionController::createFuncView(), QtViewFactory::instance(), FunctionController::instance(), and CanvasView::moveToPlotter().
Referenced by CanvasWindow::addFuncDisplay().
void addPage | ( | ) | [inherited] |
Adds a page to the canvas.
Definition at line 1620 of file FigureEditor.cxx.
References FigureEditor::addPageMargin(), QCanvas::height(), FigureEditor::m_apage_h, FigureEditor::m_canvas, QCanvas::resize(), and QCanvas::width().
Referenced by CanvasWindow::viewAddPage().
void addPageMargin | ( | int | x, | |
int | y | |||
) | [protected, inherited] |
Adds page margin.
Adds an indication of the page's margin. Only the contents inside the margin is printable.
Definition at line 256 of file FigureEditor.cxx.
References FigureEditor::m_apage_h, FigureEditor::m_apage_w, FigureEditor::m_canvas, FigureEditor::m_printer_bounds, FigureEditor::m_upage_h, and FigureEditor::m_upage_w.
Referenced by FigureEditor::addPage(), FigureEditor::resizeCanvasToFit(), and FigureEditor::showPrinterMargins().
void addPlotDisplay | ( | PlotterBase * | plotter | ) | [slot] |
Creates a QtView object for the display and inserts it onto the canvas in the next available free place.
Selects the created view if the user settings for this is true
.
Definition at line 834 of file CanvasView.cxx.
References CanvasView::addPlotDisplay(), and CanvasView::m_add_selected.
void addPlotDisplay | ( | PlotterBase * | plotter, | |
bool | select | |||
) |
Creates a QtView object for the display and inserts it onto the canvas in the next available free place.
Selects the created view if select is true.
Definition at line 851 of file CanvasView.cxx.
References CanvasView::addView(), CanvasView::m_inspector, FigureEditor::m_upage_w, CanvasView::setInspector(), CanvasView::sizeAndPlace(), and CanvasView::wrapPlotter().
Referenced by CanvasWindow::addDisplay(), CanvasWindow::addPlotDisplay(), and CanvasView::addPlotDisplay().
void addRecentFile | ( | const QString & | filename, | |
QActionGroup * | ag | |||
) |
Add recently opened files.
Definition at line 3052 of file CanvasView.cxx.
References CanvasView::m_recent_list.
void addSelectedItem | ( | QCanvasItem * | item | ) | [inherited] |
Add an item to the selected list.
Definition at line 368 of file FigureEditor.cxx.
References FigureEditor::m_selected_list, and FigureEditor::setSelectedFlags().
Referenced by FigureEditor::contentsMousePressEvent(), CanvasView::groupView(), CanvasView::pasteViews(), FigureEditor::setSelectedItem(), and CanvasView::ungroupView().
void addTextDisplay | ( | PlotterBase * | plotter, | |
const std::string & | s, | |||
const std::string & | text = std::string () | |||
) |
Add a display of text Adds a display of text to that will be associated with plotter.
Uses the optional text if needed by the display.
Definition at line 1057 of file CanvasView.cxx.
References CanvasView::addView(), DisplayController::createTextView(), QtViewFactory::instance(), DisplayController::instance(), FigureEditor::maximumZ(), and CanvasView::moveToPlotter().
Referenced by CanvasWindow::addTextDisplay().
std::pair< double, double > addTextDisplayAt | ( | PlotterBase * | plotter, | |
const std::string & | type, | |||
const std::string & | text, | |||
double | xrel, | |||
double | yrel | |||
) |
Adds a text display at the relative position (xrel, yrel) in the selected item's coordinates.
This method returns the relative coordinates of the lower left corner as a pair of doubles.
Definition at line 1084 of file CanvasView.cxx.
References CanvasView::addView(), DisplayController::createTextView(), QtViewFactory::instance(), DisplayController::instance(), and CanvasView::moveToPlotterAt().
Referenced by CanvasWindow::addTextDisplayAt().
void addToItemList | ( | QCanvasItem * | item | ) | [protected, inherited] |
Definition at line 996 of file FigureEditor.cxx.
References FigureEditor::m_canvas, and FigureEditor::m_items.
void addView | ( | QtView * | view, | |
bool | select | |||
) | [private] |
Adds a QtView object to the CanvasView.
If select is true
, then sets added object as selected item.
Definition at line 706 of file CanvasView.cxx.
References FigureEditor::ensureVisible(), CanvasView::fillSelectedWithObservers(), CanvasView::notifyObservers(), CanvasView::s_xml_controller, and FigureEditor::setSelectedItem().
Referenced by CanvasView::addFromPasteboard(), CanvasView::addFuncDisplay(), CanvasView::addPlotDisplay(), CanvasView::addTextDisplay(), and CanvasView::addTextDisplayAt().
const std::string & applicationName | ( | ) | const |
Returns the name of the application.
Definition at line 2883 of file CanvasView.cxx.
References CanvasView::s_app_name.
Referenced by CanvasView::initFromFile().
void autosaveSettings | ( | QMainWindow * | mw | ) |
Save the recently opened file list.
Definition at line 3096 of file CanvasView.cxx.
References QSettings::insertSearchPath(), CanvasView::m_recent_list, QString::number(), FigureEditor::s_app_key, FigureEditor::s_registry, and QSettings::writeEntry().
void calcDefaultSize | ( | QtView * | view, | |
double | aspect_ratio = 0.0 | |||
) | [private, virtual] |
Sets the default size and position for the view.
Definition at line 818 of file CanvasView.cxx.
References CanvasView::m_num_height, CanvasView::m_num_width, FigureEditor::m_upage_h, and FigureEditor::m_upage_w.
Referenced by CanvasView::placeItems(), and CanvasView::sizeAndPlace().
void calcPrinterMetrics | ( | QPaintDevice * | device | ) | [protected, inherited] |
Calculate the size of a page by using the printer metrics.
The size of a printable page is calculated on the basis that one pixel will become one Postscript point. A QPaintDeviceMetrics object is created to find the actual and usable size of a page in millimeters which is then converted to Postscript Points.
Definition at line 286 of file FigureEditor.cxx.
References QSize::height(), QString::isNull(), FigureEditor::m_apage_h, FigureEditor::m_apage_w, FigureEditor::m_upage_h, FigureEditor::m_upage_w, QPrinter::printerName(), FigureEditor::s_printer, and QSize::width().
Referenced by FigureEditor::print().
void clear | ( | ) | [slot] |
Removes all the QCanvasItem objects from the canvas.
Reimplemented from FigureEditor.
Definition at line 584 of file CanvasView.cxx.
References FigureEditor::clear(), and CanvasView::notifyObservers().
Referenced by CanvasWindow::clear().
void clearSelectedList | ( | ) | [protected, inherited] |
De-selects all items, making the selection list empty.
Definition at line 542 of file FigureEditor.cxx.
References FigureEditor::m_selected_list, and FigureEditor::setSelectedItems().
Referenced by CanvasView::groupView(), CanvasView::pasteViews(), and CanvasView::ungroupView().
void contentsMouseMoveEvent | ( | QMouseEvent * | e, | |
double | aspect | |||
) | [protected, inherited] |
Moves or re-sizes the selected QCanvasItem object.
The is moved if one of its knobs was selected, otherwise, it is re-sized. If aspect is non zero, then keeps its aspect ratio is kept while resizing.
Definition at line 1062 of file FigureEditor.cxx.
References FigureEditor::getZoomMode(), FigureEditor::invalid, QCanvasView::inverseWorldMatrix(), FigureEditor::isSingleItemSelected(), FigureEditor::lower_left, FigureEditor::lower_middle, FigureEditor::lower_right, FigureEditor::m_canvas, FigureEditor::m_moving_start, FigureEditor::m_whereClicked, FigureEditor::middle_left, FigureEditor::middle_right, FigureEditor::movePlotterWithText(), FigureEditor::none, QMouseEvent::pos(), FigureEditor::selectedItem(), QCanvas::update(), FigureEditor::upper_left, FigureEditor::upper_middle, FigureEditor::upper_right, QPoint::x(), and QPoint::y().
Referenced by CanvasView::contentsMouseMoveEvent().
void contentsMouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Overrides the QScrollView event handler.
Definition at line 1547 of file CanvasView.cxx.
References QMouseEvent::button(), QCanvasView::canvas(), FigureEditor::contentsMouseMoveEvent(), QtView::fillPickedPoint(), CanvasView::fillPickedPoint(), ViewBase::getAspectRatio(), XyPlotter::getCutRange(), PlotterBase::getFitsTransform(), ViewBase::getPlotter(), PlotterBase::getRange(), XyPlotter::getRange(), FigureEditor::getRightItem(), GroupViewBase::getViews(), FigureEditor::getZoomMode(), PlotterBase::hasAxis(), QCanvasRectangle::height(), Range::high(), QMessageBox::information(), DisplayController::instance(), QCanvasView::inverseWorldMatrix(), FigureEditor::isSingleItemSelected(), Range::low(), CanvasView::m_clicked, CanvasView::m_cut_mode, CanvasView::m_drag_rect, CanvasView::m_edge, CanvasView::m_table_map, FigureEditor::m_zoom_start, FigureEditor::mouseMoveMultiItem(), CanvasView::notifyObservers(), CanvasView::old_pos, CanvasView::old_pos_x, CanvasView::old_pos_y, QMouseEvent::pos(), Range::Range(), CanvasView::s_app_name, FigureEditor::selectedItem(), CanvasView::selectedPlotter(), QtViewImp::setCrossX(), QtViewImp::setCrossY(), QApplication::setOverrideCursor(), QtView::setShowCrossHairs(), QPoint::setY(), num_util::size(), QMouseEvent::state(), QMainWindow::statusBar(), QtView::toViewX(), QtView::toViewY(), QtView::update(), CanvasView::views(), QCanvasRectangle::width(), QPoint::x(), hippodraw::Axes::X, QPoint::y(), hippodraw::Axes::Y, and hippodraw::Axes::Z.
Referenced by CanvasView::contentsMousePressEvent().
void contentsMousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
If RightButton is clicked, the selItem will not be added to the list, but will update the m_rightItem and call contentsMouseMoveEvent(e,0) function.
Reimplemented from FigureEditor.
Definition at line 1525 of file CanvasView.cxx.
References QMouseEvent::button(), CanvasView::contentsMouseMoveEvent(), FigureEditor::contentsMousePressEvent(), CanvasView::fillSelectedWithObservers(), CanvasView::notifyObservers(), CanvasView::s_xml_controller, XmlController::saveToSelectionCopy(), CanvasView::selectedViews(), and QMouseEvent::state().
void contentsMouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Overrides inherited method to receive mouse released events.
Reimplemented from FigureEditor.
Definition at line 2525 of file CanvasView.cxx.
References QMouseEvent::button(), QCanvasView::canvas(), FigureEditor::contentsMouseReleaseEvent(), CanvasView::fillMouseData(), QtView::fillPickedPoint(), CanvasView::fillPickedPoint(), FigureEditor::getRightItem(), GroupViewBase::getViews(), QCanvasRectangle::height(), FigureEditor::invalid, QCanvasView::inverseWorldMatrix(), CanvasView::m_clicked, CanvasView::m_cut_mode, CanvasView::m_drag_rect, CanvasView::m_edge, CanvasView::m_mouseData, FigureEditor::m_whereClicked, anonymous_namespace{CanvasView.cxx}::mouseEvent, CanvasView::notifyObservers(), QMouseEvent::pos(), QApplication::restoreOverrideCursor(), FigureEditor::selectedItem(), CanvasView::setPlotZoom(), QtView::setShowCrossHairs(), QMouseEvent::state(), QMainWindow::statusBar(), QtView::update(), CanvasView::updatePickTable(), CanvasView::views(), QWaitCondition::wakeAll(), QCanvasRectangle::width(), QPoint::x(), and QPoint::y().
void controlMousePressEvent | ( | ) | [protected, virtual] |
Overrides inherited method to receive mouse pressed events.
Implements FigureEditor.
Definition at line 1494 of file CanvasView.cxx.
References ViewBase::getPlotter(), and FigureEditor::m_selected_list.
void copyFromPasteboard | ( | ) |
Copies from the pasteboard.
Copies from pasteboard and pastes the views to the canvas.
Definition at line 514 of file CanvasView.cxx.
References XmlController::getFromPasteboard(), QtViewFactory::instance(), CanvasView::pasteViews(), CanvasView::s_xml_controller, and CanvasView::views().
Referenced by CanvasWindow::editPaste().
void copySelectedToClipboard | ( | ) | [protected, inherited] |
Adds selected items to system clipboard.
Definition at line 1684 of file FigureEditor.cxx.
References QApplication::clipboard(), FigureEditor::createImage(), and FigureEditor::getSelectedBounds().
Referenced by CanvasView::copySelectedToPasteboard().
void copySelectedToPasteboard | ( | ) |
Copies selected items to pasteboard.
Definition at line 500 of file CanvasView.cxx.
References FigureEditor::copySelectedToClipboard(), CanvasView::fillSelectedWithObservers(), CanvasView::s_xml_controller, XmlController::saveToPasteboard(), and CanvasView::selectedViews().
Referenced by CanvasWindow::editCopy().
Creates and returns a QImage from the area defined on the canvas.
Definition at line 1674 of file FigureEditor.cxx.
References FigureEditor::createPixmap().
Referenced by FigureEditor::copySelectedToClipboard().
QFileDialog * createImageDialog | ( | ) | [private] |
Creates the QFileDialog with supported filters string for supported image types.
Definition at line 1338 of file CanvasView.cxx.
References CanvasView::createImageFilters(), CanvasView::s_image_filters, QFileDialog::setFilters(), and QFileDialog::setMode().
void createImageFilters | ( | ) | [static, private] |
Creates the image filters string.
Definition at line 1263 of file CanvasView.cxx.
References QString::latin1(), QString::lower(), QImage::outputFormatList(), and CanvasView::s_image_filters.
Referenced by CanvasView::createImageDialog(), CanvasView::invalidImageFormatError(), CanvasView::isValidImageFormat(), and CanvasView::saveSelectedImages().
void createNTuple | ( | ) |
Raise the create NTuple dialog.
Definition at line 2916 of file CanvasView.cxx.
References DataSourceController::getNTupleNames(), QMessageBox::information(), DataSourceController::instance(), and CanvasView::s_app_name.
Creates and returns a new QPixmap from the area defined on the canvas.
Definition at line 1641 of file FigureEditor.cxx.
References QCanvas::drawArea(), QRect::height(), FigureEditor::m_canvas, QRect::width(), QRect::x(), and QRect::y().
Referenced by FigureEditor::createImage(), and FigureEditor::saveAreaAsPixmap().
void deleteSelected | ( | bool | paste | ) |
Removes the selected items from canvas and copies them to the pasteboard.
if paste is true
.
Definition at line 544 of file CanvasView.cxx.
References CanvasView::fillSelectedWithObservers(), DisplayController::instance(), CanvasView::notifyObservers(), DisplayController::removeTextObservers(), CanvasView::s_xml_controller, XmlController::saveToPasteboard(), and CanvasView::selectedViews().
Referenced by CanvasWindow::editCut(), and CanvasWindow::editDelete().
void ensureVisible | ( | const QCanvasItem * | item | ) | [inherited] |
Scrolls the canvas, if needed, so the QCanvasItem item is visible.
Definition at line 659 of file FigureEditor.cxx.
References FigureEditor::makeVisible().
Referenced by CanvasView::addView().
void enterEvent | ( | QEvent * | ) | [inherited] |
Grabs the event when mouse cursor enters the widget.
Definition at line 1725 of file FigureEditor.cxx.
References FigureEditor::m_zoom_mode, and QApplication::setOverrideCursor().
bool existingFileWarning | ( | const std::string & | filename | ) | [private] |
Raises dialog to query over writing existing file.
Definition at line 478 of file CanvasView.cxx.
References QMessageBox::warning().
Referenced by CanvasView::saveSelectedImages().
void exportTextTuple | ( | const std::string & | data_suffix | ) |
Saves the DataSource as a text NTuple.
Save the DataSource as a text NTuple. Saves the file with a file name suffix suffix.
One error condition is saving on top of existing file.
Definition at line 2451 of file CanvasView.cxx.
References QMessageBox::critical(), QString::endsWith(), DataSourceController::getNTupleNames(), QFileDialog::getSaveFileName(), QMessageBox::information(), NTupleController::instance(), DataSourceController::instance(), QString::latin1(), CanvasView::m_inspector, CanvasView::notifyObservers(), CanvasView::s_app_name, and NTupleController::writeNTupleToFile().
void fillMouseData | ( | const std::vector< double > & | picked | ) | [private] |
Fill m_mouseData with the data from fillPickedPoint.
Definition at line 2675 of file CanvasView.cxx.
References CanvasView::m_mouseData.
Referenced by CanvasView::contentsMouseReleaseEvent().
bool fillPickedPoint | ( | QMouseEvent * | e, | |
std::vector< double > & | picked | |||
) | [private] |
Fill the picked vector with the event data.
Definition at line 2646 of file CanvasView.cxx.
References QCanvasView::inverseWorldMatrix(), QMouseEvent::pos(), FigureEditor::selectedItem(), QPoint::x(), and QPoint::y().
Referenced by CanvasView::contentsMouseMoveEvent(), and CanvasView::contentsMouseReleaseEvent().
void fillPlotterList | ( | std::vector< PlotterBase * > & | plotter_list | ) |
Clears and fills plotter_list with all the PlotterBase objects on the canvas.
Definition at line 1224 of file CanvasView.cxx.
References ViewBase::getPlotter(), and CanvasView::views().
void fillSelectedWithObservers | ( | std::vector< const ViewBase * > & | view_list | ) | [private] |
Fills the input vector with selected items and their observers.
Definition at line 1512 of file CanvasView.cxx.
References DisplayController::instance(), CanvasView::selectedViews(), and CanvasView::views().
Referenced by CanvasView::addView(), CanvasView::contentsMousePressEvent(), CanvasView::copySelectedToPasteboard(), and CanvasView::deleteSelected().
const QString & getAppKey | ( | ) | const [inherited] |
Returns a reference the application's QSettings key.
Definition at line 1741 of file FigureEditor.cxx.
References FigureEditor::s_app_key.
std::vector< double > & getCurrentRange | ( | ) |
Returns the current range of the selected plotter.
Definition at line 2750 of file CanvasView.cxx.
References CanvasView::m_current_range.
Inspector * getInspector | ( | ) |
Gets the inspector object.
Definition at line 631 of file CanvasView.cxx.
References CanvasView::m_inspector.
NTuple * getPickTable | ( | const PlotterBase * | plotter | ) |
Gets the pick table of a plotter.
Definition at line 2961 of file CanvasView.cxx.
References PickTable::getPickTable(), CanvasView::getViewFor(), and CanvasView::m_table_map.
NTuple * getPickTable | ( | ) |
Gets the pick table of selected plotter.
Definition at line 2936 of file CanvasView.cxx.
References CanvasView::m_sel_views, and CanvasView::m_table_map.
const QString & getRegistry | ( | ) | const [inherited] |
Returns a reference to the application's registry.
Definition at line 1748 of file FigureEditor.cxx.
References FigureEditor::s_registry.
PlotterBase * getRightClickedPlotter | ( | ) | [private] |
QCanvasItem * getRightItem | ( | ) | [inherited] |
Get the QCanvasItem clicked by right mouse button.
Definition at line 1758 of file FigureEditor.cxx.
References FigureEditor::m_rightItem.
Referenced by CanvasView::contentsMouseMoveEvent(), CanvasView::contentsMouseReleaseEvent(), and CanvasView::getRightClickedPlotter().
QRect getSelectedBounds | ( | ) | const [protected, inherited] |
Returns a QRect that enclosed the selected QCanvasItem objects.
Definition at line 402 of file FigureEditor.cxx.
References QCanvasItem::boundingRect(), and FigureEditor::m_selected_list.
Referenced by FigureEditor::copySelectedToClipboard(), CanvasView::saveSelectedAsEps(), and FigureEditor::saveSelectedAsPixmap().
std::vector< QCanvasItem * > & getSelectedItems | ( | ) | [inherited] |
Return the vector of selected items.
Definition at line 360 of file FigureEditor.cxx.
References FigureEditor::m_selected_list.
Referenced by CanvasView::saveSelectedImages(), and FigureEditor::setLocked().
vector< PlotterBase * > getSelectedPlotters | ( | ) | const |
Returns a list of selected plotters.
Definition at line 661 of file CanvasView.cxx.
References CanvasView::groupView(), CanvasView::selectedViews(), and num_util::size().
Referenced by CanvasView::notifyObservers().
QtView * getViewFor | ( | const PlotterBase * | plotter | ) | const |
Returns the QtView object that is the Observer of the plotter.
Definition at line 1242 of file CanvasView.cxx.
References ViewBase::getPlotter(), and CanvasView::views().
Referenced by CanvasView::getPickTable(), CanvasWindow::getViewFor(), CanvasView::moveToPlotter(), CanvasView::moveToPlotterAt(), CanvasView::removeDisplay(), CanvasView::savePlotAsEps(), and CanvasView::savePlotAsImage().
bool getZoomMode | ( | ) | const [inherited] |
Returns the bool indicating whether zoom mode is enabled or not.
Definition at line 1734 of file FigureEditor.cxx.
References FigureEditor::m_zoom_mode.
Referenced by FigureEditor::contentsMouseMoveEvent(), CanvasView::contentsMouseMoveEvent(), FigureEditor::contentsMousePressEvent(), FigureEditor::mouseMoveMultiItem(), and CanvasView::setPlotZoom().
void groupView | ( | ) |
Create a GroupView object containing selected views.
Definition at line 2981 of file CanvasView.cxx.
References FigureEditor::addSelectedItem(), GroupViewBase::addView(), FigureEditor::clearSelectedList(), FigureEditor::removeFromItemList(), CanvasView::selectedViews(), QtGroupView::setDrawRect(), and QtGroupView::setPositions().
Referenced by CanvasView::getSelectedPlotters(), and CanvasView::ungroupView().
void helpAbout | ( | ) |
Brings up dialog version numbers and contributors.
Definition at line 2822 of file CanvasView.cxx.
References RootController::instance(), FitsController::instance(), QMessageBox::setButtonText(), and hippodraw::version().
void hide | ( | QCanvasItem * | item | ) | [inherited] |
Removes the item from the canvas but not destroys it.
Used in grouping several items together.
Definition at line 1025 of file FigureEditor.cxx.
References FigureEditor::m_selected_list, and FigureEditor::removeFromItemList().
Referenced by CanvasView::hideSelected().
void hideSelected | ( | ) |
Removes the selected objects from the canvas without destroying in.
Definition at line 3036 of file CanvasView.cxx.
References FigureEditor::hide(), CanvasView::selectedViews(), and CanvasView::views().
void initDockWindows | ( | QMainWindow * | mw | ) |
Initializes the positions of dock windows.
Definition at line 170 of file CanvasView.cxx.
References QSettings::insertSearchPath(), QSettings::readEntry(), FigureEditor::s_app_key, and FigureEditor::s_registry.
void initFitterDefault | ( | ) | [private] |
Sets the default fitter.
Definition at line 226 of file CanvasView.cxx.
References QSettings::insertSearchPath(), QString::latin1(), CanvasView::m_inspector, QSettings::readEntry(), FigureEditor::s_app_key, FigureEditor::s_registry, and CanvasView::setFitterDefault().
Referenced by CanvasView::initFitterSettings().
void initFitterMenu | ( | QActionGroup * | group | ) | [private] |
Initializes the fitter setting menu items.
Definition at line 276 of file CanvasView.cxx.
References FunctionController::instance().
Referenced by CanvasView::initFitterSettings().
void initFitterSettings | ( | QActionGroup * | group | ) |
Initializes the fitter settings menu items.
Initializes the fitter settings menu items by adding them to group. Looks in user's settings for fitter name. If found sets the FitterFactory default.
Definition at line 268 of file CanvasView.cxx.
References CanvasView::initFitterDefault(), and CanvasView::initFitterMenu().
void initFrom | ( | const std::list< ViewBase * > & | views | ) |
Definition at line 338 of file CanvasView.cxx.
References CanvasView::sizeAndPlace().
Referenced by CanvasView::initFromFile().
void initFromFile | ( | const std::string & | filename | ) |
Initializes canvas from data in file filename.
Definition at line 359 of file CanvasView.cxx.
References CanvasView::applicationName(), QString::arg(), QMessageBox::critical(), QFileDialog::getOpenFileName(), XmlController::getViews(), CanvasView::initFrom(), QtViewFactory::instance(), QString::latin1(), CanvasView::notifyObservers(), XmlController::NTupleError, XmlController::OpenError, XmlController::openFile(), XmlController::openUpdatedNTuples(), XmlController::ParseError, CanvasView::s_xml_controller, and XmlController::Success.
void initPrinter | ( | ) | [protected, inherited] |
Initializes the printer settings from the saved settings.
If setting have not been saved, set the default values.
Definition at line 152 of file FigureEditor.cxx.
References indexToColorMode, indexToOrientation, indexToPageSize, QSettings::insertSearchPath(), QSettings::readNumEntry(), FigureEditor::s_app_key, FigureEditor::s_printer, FigureEditor::s_registry, QPrinter::setColorMode(), QPrinter::setFullPage(), QPrinter::setOrientation(), QPrinter::setPageSize(), and num_util::size().
void initRecentFiles | ( | QActionGroup * | ag | ) |
Initializes the recently opened files menu items.
Definition at line 188 of file CanvasView.cxx.
References QSettings::insertSearchPath(), CanvasView::m_recent_list, QString::number(), QSettings::readEntry(), FigureEditor::s_app_key, and FigureEditor::s_registry.
void initSettings | ( | ) | [private] |
Initialize the settings save from previous session.
Definition at line 152 of file CanvasView.cxx.
References QSettings::insertSearchPath(), CanvasView::m_add_selected, FigureEditor::m_ignore_margin, CanvasView::m_num_height, CanvasView::m_num_width, QSettings::readBoolEntry(), QSettings::readNumEntry(), FigureEditor::s_app_key, and FigureEditor::s_registry.
void invalidImageFormatError | ( | const std::string & | filename | ) | [private] |
Raises dialog box for error in image format.
Definition at line 451 of file CanvasView.cxx.
References CanvasView::createImageFilters(), QMessageBox::critical(), CanvasView::s_image_filters, num_util::size(), and hippodraw::Symbol::types.
Referenced by CanvasView::saveSelectedImages().
bool isSingleItemSelected | ( | ) | const [inherited] |
Returns true if just one item is selected, else returns false.
Definition at line 331 of file FigureEditor.cxx.
References FigureEditor::m_selected_list.
Referenced by FigureEditor::contentsMouseMoveEvent(), CanvasView::contentsMouseMoveEvent(), FigureEditor::placeGraphOnSelected(), FigureEditor::selectedItem(), CanvasView::viewShowPickTable(), and FigureEditor::whereClicked().
bool isValidImageFormat | ( | const std::string & | suffix | ) | [static, private] |
Returns true
if suffix string is one for valid image format.
Definition at line 2197 of file CanvasView.cxx.
References CanvasView::createImageFilters(), CanvasView::s_image_filters, and CanvasView::toLower().
Referenced by CanvasView::saveSelectedImages().
void leaveEvent | ( | QEvent * | ) | [inherited] |
Grabs the event when mouse cursor leaves the widget.
Definition at line 1718 of file FigureEditor.cxx.
References QApplication::restoreOverrideCursor().
void makeVisible | ( | const QCanvasItem * | item | ) | [protected, inherited] |
Scrolls the canvas, if needed, so the QCanvasItem item is visible.
Definition at line 614 of file FigureEditor.cxx.
References QRect::rect().
Referenced by FigureEditor::customEvent(), and FigureEditor::ensureVisible().
double maximumZ | ( | ) | const [protected, inherited] |
Returns the largest Z value of all the items on the canvas.
If the item is a text plotter, take z()-100 instead of z(). This is to keep all text plotters on top of XyPlotters.
Definition at line 429 of file FigureEditor.cxx.
References QtView::isTextView(), FigureEditor::m_items, and FigureEditor::setUnselectedVisible().
Referenced by CanvasView::addTextDisplay(), FigureEditor::contentsMousePressEvent(), and FigureEditor::setSelectedItem().
const std::vector< double > & mouseEventData | ( | ) |
Retrieve a vector of (x, y, z) points from the next mouse event.
Definition at line 2810 of file CanvasView.cxx.
References CanvasView::m_mouseData, anonymous_namespace{CanvasView.cxx}::mouseEvent, and QWaitCondition::wait().
Referenced by CanvasWindow::mouseEventData().
void mouseMoveMultiItem | ( | QMouseEvent * | e | ) | [protected, inherited] |
Move more than one items in the Canvas.
Definition at line 1765 of file FigureEditor.cxx.
References FigureEditor::getZoomMode(), QCanvasView::inverseWorldMatrix(), FigureEditor::m_canvas, FigureEditor::m_moving_start, FigureEditor::m_selected_list, FigureEditor::movePlotterWithText(), QMouseEvent::pos(), QCanvas::update(), QPoint::x(), and QPoint::y().
Referenced by CanvasView::contentsMouseMoveEvent().
void movePlotterWithText | ( | QCanvasItem * | item, | |
float | dx, | |||
float | dy | |||
) | [protected, inherited] |
Move a plotter with all its targetted text plotters.
Definition at line 1790 of file FigureEditor.cxx.
References QCanvas::allItems(), PlotterBase::getParentPlotter(), ViewBase::getPlotter(), PlotterBase::isTextPlotter(), and FigureEditor::m_canvas.
Referenced by FigureEditor::contentsMouseMoveEvent(), and FigureEditor::mouseMoveMultiItem().
void moveToPlotter | ( | const PlotterBase * | plotter, | |
QtView * | view | |||
) | [private] |
Moves the view to a nice position with respect to the plotter's QCanvasItem.
Definition at line 1016 of file CanvasView.cxx.
References CanvasView::getViewFor(), QRect::height(), and QRect::width().
Referenced by CanvasView::addFuncDisplay(), CanvasView::addTextDisplay(), and CanvasView::placeItems().
std::pair< double, double > moveToPlotterAt | ( | const PlotterBase * | plotter, | |
QtView * | view, | |||
double | x, | |||
double | y | |||
) | [private] |
Moves the view to the specified position with respect to the currently view for plotter.
Definition at line 1030 of file CanvasView.cxx.
References CanvasView::getViewFor(), QRect::height(), and QRect::width().
Referenced by CanvasView::addTextDisplayAt().
void notifyObservers | ( | ) | [virtual] |
Notifies observers of a change in CanvasView.
Implements FigureEditor.
Definition at line 645 of file CanvasView.cxx.
References CanvasView::getSelectedPlotters(), WindowController::instance(), CanvasView::m_inspector, QApplication::postEvent(), and CanvasView::setChanged().
Referenced by CanvasView::addView(), CanvasView::clear(), CanvasView::contentsMouseMoveEvent(), CanvasView::contentsMousePressEvent(), CanvasView::contentsMouseReleaseEvent(), CanvasView::deleteSelected(), CanvasWindow::editUndo(), CanvasView::exportTextTuple(), CanvasView::initFromFile(), and CanvasView::restoreFromSelectCopy().
void paste | ( | QCanvasItem * | item | ) | [inherited] |
Adds the item to the canvas.
This method differs from add in that it displaces the item by a fixed amount before adding.
Definition at line 1403 of file FigureEditor.cxx.
Referenced by CanvasView::pasteViews().
void pasteViews | ( | const std::list< ViewBase * > & | views | ) |
Adds the views to the canvas.
Adds the views slightly displayed from their original position.
Definition at line 612 of file CanvasView.cxx.
References FigureEditor::addSelectedItem(), FigureEditor::clearSelectedList(), FigureEditor::paste(), and CanvasView::setChanged().
Referenced by CanvasView::copyFromPasteboard(), and CanvasView::restoreFromSelectCopy().
void placeGraph | ( | QCanvasRectangle * | item | ) | [inherited] |
Moves the QCanvasRectangle object to place on the canvas where it will not collide with existing QCanvasItem object and not be off the usable page area.
Definition at line 1310 of file FigureEditor.cxx.
References QRect::bottom(), FigureEditor::m_apage_h, FigureEditor::m_apage_w, FigureEditor::m_canvas, FigureEditor::m_ignore_margin, FigureEditor::m_items, FigureEditor::m_upage_h, FigureEditor::m_upage_w, and QRect::top().
Referenced by CanvasView::addFromPasteboard(), CanvasView::placeItems(), and CanvasView::sizeAndPlace().
void placeGraphOnSelected | ( | QCanvasRectangle * | view | ) | [protected, inherited] |
Adds the item on top of the currently selected item.
Definition at line 727 of file FigureEditor.cxx.
References QRect::height(), FigureEditor::isSingleItemSelected(), FigureEditor::m_canvas, FigureEditor::m_items, FigureEditor::selectedItem(), QRect::width(), QRect::x(), and QRect::y().
void placeItems | ( | const std::vector< QCanvasItem * > & | items | ) | [private] |
Places each item in items on the canvas.
Definition at line 941 of file CanvasView.cxx.
References CanvasView::calcDefaultSize(), PlotterBase::getParentPlotter(), ViewBase::getPlotter(), CanvasView::moveToPlotter(), FigureEditor::placeGraph(), and CanvasView::reTilePage().
Referenced by CanvasView::reTile(), and CanvasView::reTilePage().
void previousView | ( | ) |
Switches View to the previous view for the selected item on the canvas.
void print | ( | QPrinter * | printer | ) | [protected, inherited] |
Prints the view to the printer.
Definition at line 1563 of file FigureEditor.cxx.
References QPainter::begin(), FigureEditor::calcPrinterMetrics(), QCanvas::collisions(), QPainter::device(), QCanvas::drawArea(), QPainter::end(), FigureEditor::m_apage_h, FigureEditor::m_apage_w, FigureEditor::m_canvas, FigureEditor::m_scale_factor, QPrinter::newPage(), QPainter::scale(), FigureEditor::setSelectedItems(), and QPainter::translate().
void print | ( | const std::string & | filename | ) | [virtual] |
Prints the view to Postscript file filename.
Reimplemented from FigureEditor.
Definition at line 1165 of file CanvasView.cxx.
References FigureEditor::print(), and CanvasView::setVisibleNonViews().
void print | ( | ) | [virtual] |
Prints the canvas.
Prints the QtView items on the canvas.
Reimplemented from FigureEditor.
Definition at line 1156 of file CanvasView.cxx.
References FigureEditor::print(), and CanvasView::setVisibleNonViews().
Referenced by CanvasWindow::filePrint(), and CanvasView::setVisibleNonViews().
void remove | ( | QCanvasItem * | item | ) | [inherited] |
Removes the item from the canvas and destroys it.
Definition at line 1008 of file FigureEditor.cxx.
References FigureEditor::removeFromItemList(), and FigureEditor::removeSelectedItem().
void removeDisplay | ( | PlotterBase * | plotter | ) |
Removes the display from the canvas.
Definition at line 1125 of file CanvasView.cxx.
References CanvasView::getViewFor().
Referenced by CanvasWindow::removeDisplay().
void removeFromItemList | ( | QCanvasItem * | item | ) | [protected, inherited] |
Removes the item from list of items on the canvas.
Definition at line 981 of file FigureEditor.cxx.
References FigureEditor::m_items.
Referenced by CanvasView::groupView(), FigureEditor::hide(), FigureEditor::remove(), and CanvasView::reTilePage().
void removeSelected | ( | ) |
Removes the selected objects from the canvas.
Definition at line 595 of file CanvasView.cxx.
References CanvasView::selectedViews(), and CanvasView::views().
Referenced by CanvasView::restoreFromSelectCopy().
void removeSelectedItem | ( | QCanvasItem * | item | ) | [inherited] |
Removes an item from the selection list.
Definition at line 385 of file FigureEditor.cxx.
References QCanvasItem::isSelected(), FigureEditor::m_selected_list, and FigureEditor::setSelectedFlags().
Referenced by FigureEditor::contentsMousePressEvent(), and FigureEditor::remove().
void resizeCanvasToFit | ( | QCanvasItem * | item | ) | [protected, inherited] |
Re-sizes the canvas if necessary so that the item is on the canvas.
Changes the height by one page size while keeping the width constant.
Definition at line 1424 of file FigureEditor.cxx.
References FigureEditor::addPageMargin(), QRect::bottomRight(), QCanvas::height(), FigureEditor::m_apage_h, FigureEditor::m_canvas, QCanvas::onCanvas(), QCanvas::resize(), and QCanvas::width().
Referenced by FigureEditor::add().
void resizeEvent | ( | QResizeEvent * | e | ) | [inherited] |
Re-sizes the QCanvas in response to parent window receiving QResizeEvent.
The QCanvas may grow in size, but is never made smaller by this method.
Definition at line 1605 of file FigureEditor.cxx.
References QCanvas::height(), QSize::height(), FigureEditor::m_canvas, QCanvas::resize(), QResizeEvent::size(), QCanvas::width(), and QSize::width().
Referenced by CanvasWindow::resizeEvent().
void restoreFromSelectCopy | ( | ) |
Restores the selected views from the selection copy.
Definition at line 1477 of file CanvasView.cxx.
References XmlController::getFromSelectionCopy(), QtViewFactory::instance(), CanvasView::notifyObservers(), CanvasView::pasteViews(), CanvasView::removeSelected(), CanvasView::s_xml_controller, and CanvasView::views().
Referenced by CanvasWindow::editUndo().
void reTile | ( | ) |
Re-tiles the canvas.
Removes all items from the canvas and adding them back with the default size and positions.
Definition at line 902 of file CanvasView.cxx.
References FigureEditor::m_items, CanvasView::placeItems(), QCanvasItem::setCanvas(), and sortViews().
Referenced by CanvasWindow::editReTile(), and CanvasView::setup().
void reTilePage | ( | ) |
Re-tiles the current page.
Definition at line 983 of file CanvasView.cxx.
References FigureEditor::m_apage_h, FigureEditor::m_apage_w, FigureEditor::m_canvas, CanvasView::placeItems(), and FigureEditor::removeFromItemList().
Referenced by CanvasWindow::editReTilePage(), and CanvasView::placeItems().
void saveAreaAsPixmap | ( | const QRect & | area, | |
const std::string & | filename | |||
) | [protected, inherited] |
Saves the area area as pixmap to file filename.
Definition at line 1656 of file FigureEditor.cxx.
References FigureEditor::createPixmap().
Referenced by CanvasView::savePlotAsImage(), and FigureEditor::saveSelectedAsPixmap().
void saveAs | ( | const std::vector< PlotterBase * > & | plotters, | |
const std::string & | filename | |||
) | [static] |
Wraps the plotters with a QtView then saves them to XML file.
Definition at line 2416 of file CanvasView.cxx.
References CanvasView::saveAs(), num_util::size(), CanvasView::views(), and CanvasView::wrapPlotter().
void saveAs | ( | const std::vector< const ViewBase * > & | views, | |
const std::string & | filename | |||
) | [static] |
Saves all the views to a XML file.
Definition at line 2432 of file CanvasView.cxx.
References QtXMLController::instance(), CanvasView::s_xml_controller, XmlController::saveToFile(), and XmlController::Success.
void saveAs | ( | const std::string & | filename | ) | const |
Saves all the QtView canvas item to a XML file.
Definition at line 2408 of file CanvasView.cxx.
References CanvasView::views().
Referenced by PyCanvas::saveAs(), and CanvasView::saveAs().
void savePlotAsEps | ( | const PlotterBase * | plotter, | |
const std::string & | filename | |||
) | const |
Saves the plotter as an EPS image file.
Definition at line 2345 of file CanvasView.cxx.
References CanvasView::getViewFor(), QRect::height(), QRect::width(), QRect::x(), and QRect::y().
Referenced by CanvasView::savePlotAsImage().
void savePlotAsFits | ( | const PlotterBase * | plotter, | |
const std::string & | filename | |||
) | const |
Saves the plotter as an FITS image file.
Definition at line 2295 of file CanvasView.cxx.
References PlotterBase::getShape(), PlotterBase::getZValues(), QMessageBox::information(), FitsController::instance(), CanvasView::s_app_name, CanvasView::showFitsError(), and FitsController::writeImageToFile().
Referenced by CanvasView::saveSelectedAsFits().
void savePlotAsImage | ( | const PlotterBase * | plotter, | |
const std::string & | filename | |||
) | [slot] |
Saves the plotter as image file filename.
If filename has a suffix, then use the suffix to select the image format. If no suffix is given, use the last selected suffix, or "jpg" if one had not previously been selected.
Definition at line 2163 of file CanvasView.cxx.
References CanvasView::getViewFor(), FigureEditor::saveAreaAsPixmap(), and CanvasView::savePlotAsEps().
void savePrinterSettings | ( | ) | [protected, inherited] |
Saves the printer setting with QSettings.
Definition at line 1509 of file FigureEditor.cxx.
References QSettings::insertSearchPath(), FigureEditor::s_app_key, FigureEditor::s_printer, FigureEditor::s_registry, and QSettings::writeEntry().
Referenced by FigureEditor::setPrinterSettings().
void saveSelectedAsEps | ( | const std::string & | filename | ) | [private] |
Saves the selected objects as EPS image file filename.
Definition at line 2371 of file CanvasView.cxx.
References ViewBase::getPlotter(), FigureEditor::getSelectedBounds(), QRect::height(), QCanvasRectangle::rect(), CanvasView::selectedViews(), QRect::width(), QRect::x(), and QRect::y().
Referenced by CanvasView::saveSelectedImages().
void saveSelectedAsFits | ( | const std::string & | filename | ) | [private] |
Saves the selected objects as FITS image file filename.
Definition at line 2324 of file CanvasView.cxx.
References QMessageBox::information(), CanvasView::s_app_name, CanvasView::savePlotAsFits(), and CanvasView::selectedPlotter().
Referenced by CanvasView::saveSelectedImages().
void saveSelectedAsPixmap | ( | const std::string & | filename | ) | [protected, inherited] |
Save the selected objects as Pixmap image file filename.
Definition at line 1631 of file FigureEditor.cxx.
References FigureEditor::getSelectedBounds(), FigureEditor::saveAreaAsPixmap(), and FigureEditor::setSelectedItems().
Referenced by CanvasView::saveSelectedImages().
void saveSelectedImages | ( | const std::string & | filename, | |
bool | check_existing | |||
) | [private] |
Saves the selected objects to image file filename.
If filename has a suffix, then use the suffix to select the image format. If no suffix is given, use the last selected suffix, or "jpg" if one had not previously been selected. If check_existing is is
true, then raise dialog if file already exists, otherwise over-write any existing file.
Definition at line 2228 of file CanvasView.cxx.
References CanvasView::existingFileWarning(), QFile::exists(), CanvasView::invalidImageFormatError(), CanvasView::isValidImageFormat(), QString::latin1(), CanvasView::m_image_dialog, CanvasView::saveSelectedAsEps(), CanvasView::saveSelectedAsFits(), FigureEditor::saveSelectedAsPixmap(), QFileDialog::selectedFilter(), FigureEditor::setUnselectedVisible(), CanvasView::setVisibleNonViews(), and CanvasView::showFitsError().
void saveSelectedImages | ( | const std::string & | filename | ) |
Save the selected objects to an image file, overwriting the file.
Definition at line 1431 of file CanvasView.cxx.
References FigureEditor::getSelectedItems(), FigureEditor::m_selected_list, CanvasView::saveSelectedImages(), FigureEditor::setCollidingSelected(), FigureEditor::setSelectedFlags(), CanvasView::setVisibleNonViews(), and CanvasView::views().
void saveSelectedImages | ( | ) |
Saves the selected QCanvasItem objects to a image file.
Definition at line 1363 of file CanvasView.cxx.
References CanvasView::createImageFilters(), QFileDialog::getSaveFileName(), FigureEditor::getSelectedItems(), QString::latin1(), FigureEditor::m_selected_list, CanvasView::s_image_filters, FigureEditor::setCollidingSelected(), FigureEditor::setSelectedFlags(), CanvasView::setVisibleNonViews(), QString::stripWhiteSpace(), and CanvasView::views().
Referenced by CanvasWindow::fileSaveSelectedImages(), and CanvasView::saveSelectedImages().
void saveSettings | ( | ) | const [private] |
Saves the settings for use in future session.
Definition at line 308 of file CanvasView.cxx.
References QSettings::insertSearchPath(), CanvasView::m_add_selected, FigureEditor::m_ignore_margin, CanvasView::m_num_height, CanvasView::m_num_width, FigureEditor::m_printer_bounds, FigureEditor::s_app_key, FigureEditor::s_printer, FigureEditor::s_registry, and QSettings::writeEntry().
Referenced by CanvasView::setup().
void scaleBy | ( | double | factor | ) | [inherited] |
Scales the size of the images by factor.
The factor might be modified to ensure we see at least a page in single glance of the canvas.
Definition at line 1443 of file FigureEditor.cxx.
References FigureEditor::m_apage_h, FigureEditor::m_apage_w, FigureEditor::m_canvas, FigureEditor::m_printer_bounds, FigureEditor::m_scale_factor, FigureEditor::m_upage_h, FigureEditor::m_upage_w, and FigureEditor::showPrinterMargins().
QCanvasItem * selectedItem | ( | ) | const [inherited] |
Returns the selected QCanvasItem.
Definition at line 342 of file FigureEditor.cxx.
References FigureEditor::isSingleItemSelected(), and FigureEditor::m_selected_list.
Referenced by FigureEditor::contentsMouseMoveEvent(), CanvasView::contentsMouseMoveEvent(), CanvasView::contentsMouseReleaseEvent(), CanvasView::fillPickedPoint(), FigureEditor::placeGraphOnSelected(), CanvasView::viewShowPickTable(), and FigureEditor::whereClicked().
PlotterBase * selectedPlotter | ( | ) | const |
Returns the selected PlotterBase object.
Definition at line 689 of file CanvasView.cxx.
References CanvasView::selectedViews().
Referenced by CanvasView::contentsMouseMoveEvent(), CanvasView::saveSelectedAsFits(), CanvasWindow::selectedPlotter(), CanvasView::setCurrentRange(), and CanvasView::setPlotZoom().
const vector< const ViewBase * > & selectedViews | ( | ) | const |
Returns temporary list of selected QtView objects on the canvas.
The list is valid until the next time this function or views is called.
Definition at line 1175 of file CanvasView.cxx.
References CanvasView::m_sel_views, and FigureEditor::m_selected_list.
Referenced by CanvasView::contentsMousePressEvent(), CanvasView::copySelectedToPasteboard(), CanvasView::deleteSelected(), CanvasView::fillSelectedWithObservers(), CanvasView::getSelectedPlotters(), CanvasView::groupView(), CanvasView::hideSelected(), CanvasView::removeSelected(), CanvasView::saveSelectedAsEps(), CanvasView::selectedPlotter(), CanvasView::ungroupView(), and CanvasWindow::updateActions().
void setAddedSelected | ( | bool | yes | ) |
Sets to flag to make plot in its selected state when added to the canvas.
Definition at line 333 of file CanvasView.cxx.
References CanvasView::m_add_selected.
void setAllSelected | ( | bool | flag = true |
) | [inherited] |
Sets selection flag on all QCanvasItem objects.
Definition at line 553 of file FigureEditor.cxx.
References FigureEditor::m_items, FigureEditor::m_selected_list, and QCanvasItem::setSelected().
Referenced by CanvasWindow::editSelectAll(), CanvasWindow::setAllSelected(), and FigureEditor::setSelectedFlags().
void setAppKey | ( | const std::string & | appkey | ) | [static, inherited] |
Sets the QSettings application key.
Definition at line 185 of file FigureEditor.cxx.
References FigureEditor::s_app_key.
void setChanged | ( | bool | yes = true |
) | [private] |
Sets the canvas as being changed.
Definition at line 636 of file CanvasView.cxx.
References QApplication::postEvent().
Referenced by CanvasView::notifyObservers(), and CanvasView::pasteViews().
void setCollidingSelected | ( | const QCanvasItem * | target | ) | [protected, inherited] |
Sets all QCanvasItems that collide with target to selected state.
Definition at line 499 of file FigureEditor.cxx.
References FigureEditor::m_items, FigureEditor::m_selected_list, and FigureEditor::setSelectedItems().
Referenced by CanvasView::saveSelectedImages().
void setCurrentRange | ( | ) |
Saves the current range of the selected plotter.
Definition at line 2731 of file CanvasView.cxx.
References CanvasView::m_current_range, CanvasView::selectedPlotter(), hippodraw::Axes::X, and hippodraw::Axes::Y.
Referenced by CanvasWindow::nextView(), and CanvasView::setPlotZoom().
void setCutMode | ( | int | mode | ) |
void setFitterDefault | ( | const QString & | name | ) |
Sets the default fitter setting and the FitterFactory default.
Definition at line 249 of file CanvasView.cxx.
References QSettings::insertSearchPath(), QString::latin1(), FigureEditor::s_app_key, FigureEditor::s_registry, CanvasView::setFitterDefault(), and QSettings::writeEntry().
void setFitterDefault | ( | const std::string & | name | ) | [private] |
Sets the default fitter in the FitterFactory.
Definition at line 260 of file CanvasView.cxx.
References FunctionController::instance().
Referenced by CanvasView::initFitterDefault(), and CanvasView::setFitterDefault().
void setFonts | ( | const QFont & | font | ) |
Sets the fonts for the views.
Definition at line 802 of file CanvasView.cxx.
References CanvasView::views().
void setInspector | ( | Inspector * | inspector | ) |
Sets the Inspector object.
The Inspector object will receive notification of changes to the canvas.
Definition at line 625 of file CanvasView.cxx.
References Inspector::enableNewPlotBox(), and CanvasView::m_inspector.
Referenced by CanvasView::addPlotDisplay(), and WindowController::newWindow().
void setIntervalEnabled | ( | bool | yes = true |
) |
Sets the display interval feature of all views to enabled if yes is true
, otherwise sets the feature to disable.
Definition at line 1462 of file CanvasView.cxx.
References ViewBase::getPlotter(), DisplayController::instance(), and CanvasView::views().
Referenced by CanvasWindow::setIntervalEnabled().
void setLocked | ( | bool | flag | ) | [inherited] |
Sets the selected QCanvasItem to be locked in size and position.
Definition at line 674 of file FigureEditor.cxx.
References FigureEditor::getSelectedItems(), and QCanvasItem::setActive().
Referenced by CanvasWindow::viewLock(), and CanvasWindow::viewUnlock().
void setPlotMatrix | ( | unsigned int | columns, | |
unsigned int | rows | |||
) |
Sets the number of columns and rows of plots displayed on each page.
Definition at line 721 of file CanvasView.cxx.
References CanvasView::m_num_height, and CanvasView::m_num_width.
Referenced by CanvasView::setup().
void setPlotZoom | ( | const std::vector< double > & | start_picked, | |
const std::vector< double > & | picked | |||
) | [private] |
Definition at line 2710 of file CanvasView.cxx.
References FigureEditor::getZoomMode(), PlotterBase::hasAxis(), PlotterBase::hasZoomY(), CanvasView::selectedPlotter(), CanvasView::setCurrentRange(), PlotterBase::setRange(), and hippodraw::Axes::Z.
Referenced by CanvasView::contentsMouseReleaseEvent().
void setPrinterSettings | ( | ) | [inherited] |
Set the default printer settings.
Definition at line 1521 of file FigureEditor.cxx.
References FigureEditor::s_printer, and FigureEditor::savePrinterSettings().
void setSelectedFlags | ( | ) | [inherited] |
Set the selected flags.
Definition at line 577 of file FigureEditor.cxx.
References FigureEditor::customEvent(), FigureEditor::m_selected_list, FigureEditor::setAllSelected(), and QCanvasItem::setSelected().
Referenced by FigureEditor::addSelectedItem(), FigureEditor::contentsMousePressEvent(), FigureEditor::removeSelectedItem(), CanvasView::saveSelectedImages(), and FigureEditor::setSelectedItem().
void setSelectedItem | ( | QCanvasItem * | item | ) | [inherited] |
Set the selected QCanvasItem.
This is called only when just one item is selected.
Definition at line 634 of file FigureEditor.cxx.
References FigureEditor::addSelectedItem(), QtView::isTextView(), FigureEditor::m_selected_list, FigureEditor::maximumZ(), FigureEditor::notifyObservers(), and FigureEditor::setSelectedFlags().
Referenced by CanvasView::addView(), FigureEditor::contentsMousePressEvent(), FigureEditor::contentsMouseReleaseEvent(), and CanvasWindow::setSelected().
void setSelectedItems | ( | bool | state | ) | [protected, inherited] |
Sets the selected items to selection state state.
For each QCanvasItem in the selection list, set their selection state to state. Does not alter the selection list.
Definition at line 524 of file FigureEditor.cxx.
References FigureEditor::m_selected_list, and QCanvasItem::setSelected().
Referenced by FigureEditor::clearSelectedList(), FigureEditor::print(), FigureEditor::saveSelectedAsPixmap(), and FigureEditor::setCollidingSelected().
void setUnselectedVisible | ( | bool | yes | ) | [protected, inherited] |
Sets the unselected items to visible or not.
Definition at line 480 of file FigureEditor.cxx.
References FigureEditor::m_items, and QCanvasItem::setVisible().
Referenced by FigureEditor::maximumZ(), and CanvasView::saveSelectedImages().
void setup | ( | ) |
Raises the settings dialog.
Definition at line 750 of file CanvasView.cxx.
References CanvasSettings::AcceptedAndRetile, CanvasView::m_add_selected, FigureEditor::m_ignore_margin, CanvasView::m_num_height, CanvasView::m_num_width, FigureEditor::m_printer_bounds, CanvasView::reTile(), CanvasSettings::Retile, FigureEditor::s_printer, CanvasView::saveSettings(), CanvasView::setPlotMatrix(), FigureEditor::showPrinterMargins(), and CanvasView::swapOrientation().
void setVisibleNonViews | ( | bool | visible | ) | [private] |
Sets visible state of QCanvasItem objects that are not also QtView objects to visible.
Definition at line 1134 of file CanvasView.cxx.
References QCanvas::allItems(), FigureEditor::m_canvas, and CanvasView::print().
Referenced by CanvasView::print(), and CanvasView::saveSelectedImages().
void setZoomMode | ( | bool | flag | ) | [inherited] |
Sets the zoom mode to flag.
Definition at line 1701 of file FigureEditor.cxx.
References FigureEditor::m_zoom_mode, QApplication::restoreOverrideCursor(), and QApplication::setOverrideCursor().
void showFitsError | ( | ) | const |
Raises a dialog box indicating that FITS support is not available.
Definition at line 2215 of file CanvasView.cxx.
References QMessageBox::information(), and CanvasView::s_app_name.
Referenced by CanvasView::savePlotAsFits(), and CanvasView::saveSelectedImages().
void showInspector | ( | ) |
Show the Inspector window.
Definition at line 2757 of file CanvasView.cxx.
References CanvasView::m_inspector.
void showPrinterMargins | ( | bool | on | ) | [inherited] |
Sets showing the printer margins on or off.
Definition at line 192 of file FigureEditor.cxx.
References FigureEditor::addPageMargin(), FigureEditor::m_apage_h, FigureEditor::m_canvas, and FigureEditor::m_printer_bounds.
Referenced by FigureEditor::scaleBy(), CanvasView::setup(), and CanvasView::swapOrientation().
void sizeAndPlace | ( | QtView * | view | ) | [private] |
Calculates the default size and position on the canvas.
Definition at line 863 of file CanvasView.cxx.
References CanvasView::calcDefaultSize(), and FigureEditor::placeGraph().
Referenced by CanvasView::addPlotDisplay(), and CanvasView::initFrom().
void swapOrientation | ( | ) | [slot] |
Swaps the canvas' orientation from portrait to landscape or visa verse.
Definition at line 729 of file CanvasView.cxx.
References QCanvasView::canvas(), FigureEditor::m_apage_h, FigureEditor::m_apage_w, FigureEditor::m_upage_h, FigureEditor::m_upage_w, and FigureEditor::showPrinterMargins().
Referenced by CanvasView::setup().
void toLower | ( | std::string & | upper | ) | [static, private] |
Converts the string to lower case.
Definition at line 2187 of file CanvasView.cxx.
References num_util::size().
Referenced by CanvasView::isValidImageFormat().
void ungroupView | ( | ) |
Ungroup the GroupView object to separated Views.
Definition at line 3012 of file CanvasView.cxx.
References FigureEditor::addSelectedItem(), FigureEditor::clearSelectedList(), GroupViewBase::getViews(), CanvasView::groupView(), GroupViewBase::removeView(), CanvasView::selectedViews(), and CanvasView::views().
void updatePickTable | ( | QtView * | qtview, | |
std::vector< double > & | picked | |||
) | [private] |
Definition at line 2691 of file CanvasView.cxx.
References CanvasView::m_cut_mode, and CanvasView::m_table_map.
Referenced by CanvasView::contentsMouseReleaseEvent().
const vector< const ViewBase * > & views | ( | ) | const |
Returns temporary list of all QtView objects on the canvas.
The list is valid until the next time this function or selectedViews is called.
Definition at line 1201 of file CanvasView.cxx.
References QCanvas::allItems(), FigureEditor::m_canvas, and CanvasView::m_views.
Referenced by CanvasView::addFromPasteboard(), CanvasWindow::areDataSourcesSaved(), CanvasView::contentsMouseMoveEvent(), CanvasView::contentsMouseReleaseEvent(), CanvasView::copyFromPasteboard(), CanvasView::fillPlotterList(), CanvasView::fillSelectedWithObservers(), CanvasView::getViewFor(), CanvasView::hideSelected(), PlotTable::initialize(), CanvasView::removeSelected(), CanvasView::restoreFromSelectCopy(), CanvasView::saveAs(), CanvasView::saveSelectedImages(), CanvasView::setFonts(), CanvasView::setIntervalEnabled(), CanvasView::ungroupView(), and CanvasWindow::views().
void viewShowPickTable | ( | ) | [virtual] |
Show the pick table.
Implements FigureEditor.
Definition at line 2764 of file CanvasView.cxx.
References ViewBase::getPlotter(), QMessageBox::information(), FigureEditor::isSingleItemSelected(), CanvasView::m_table_map, CanvasView::s_app_name, FigureEditor::selectedItem(), and QDialog::show().
Referenced by CanvasWindow::viewShowPickTable().
void viewZoomIn | ( | ) | [inherited] |
Enlarges the view of the canvas.
Definition at line 1464 of file FigureEditor.cxx.
References QCanvasView::setWorldMatrix(), and QCanvasView::worldMatrix().
Referenced by CanvasWindow::viewZoomIn().
void viewZoomOut | ( | ) | [inherited] |
Reduces the view of the canvas.
Definition at line 1481 of file FigureEditor.cxx.
References QCanvasView::setWorldMatrix(), and QCanvasView::worldMatrix().
Referenced by CanvasWindow::viewZoomOut().
void viewZoomReset | ( | ) | [inherited] |
Returns the view to normal size.
Definition at line 1495 of file FigureEditor.cxx.
References QCanvasView::setWorldMatrix(), and QCanvasView::worldMatrix().
void whereClicked | ( | ) | [protected, inherited] |
Finds which knob on the selected item was clicked.
Definition at line 902 of file FigureEditor.cxx.
References FigureEditor::invalid, FigureEditor::isSingleItemSelected(), FigureEditor::lower_left, FigureEditor::lower_middle, FigureEditor::lower_right, FigureEditor::m_moving_start, FigureEditor::m_whereClicked, FigureEditor::middle_left, FigureEditor::middle_right, FigureEditor::none, FigureEditor::selectedItem(), FigureEditor::upper_left, FigureEditor::upper_middle, FigureEditor::upper_right, QPoint::x(), and QPoint::y().
Referenced by FigureEditor::contentsMousePressEvent().
QtView * wrapPlotter | ( | PlotterBase * | plotter | ) | [static, slot] |
Wraps the plotter with a new QtView object.
Definition at line 841 of file CanvasView.cxx.
References QtViewFactory::instance().
Referenced by CanvasView::addPlotDisplay(), and CanvasView::saveAs().
bool m_add_selected [private] |
Set to true
if displays should be selected when added.
Definition at line 172 of file CanvasView.h.
Referenced by CanvasView::addPlotDisplay(), CanvasView::initSettings(), CanvasView::saveSettings(), CanvasView::setAddedSelected(), and CanvasView::setup().
int m_apage_h [protected, inherited] |
The actual Page height in Postscript points.
Definition at line 130 of file FigureEditor.h.
Referenced by FigureEditor::addPage(), FigureEditor::addPageMargin(), FigureEditor::calcPrinterMetrics(), FigureEditor::placeGraph(), FigureEditor::print(), FigureEditor::resizeCanvasToFit(), CanvasView::reTilePage(), FigureEditor::scaleBy(), FigureEditor::showPrinterMargins(), and CanvasView::swapOrientation().
int m_apage_w [protected, inherited] |
The actual Page width in Postscript points.
Definition at line 127 of file FigureEditor.h.
Referenced by FigureEditor::addPageMargin(), FigureEditor::calcPrinterMetrics(), FigureEditor::placeGraph(), FigureEditor::print(), CanvasView::reTilePage(), FigureEditor::scaleBy(), and CanvasView::swapOrientation().
The canvas object.
Although one can always retrieve the canvas object by calling the canvas() member function, it is convenient to have this as a data member.
Definition at line 283 of file FigureEditor.h.
Referenced by FigureEditor::add(), FigureEditor::addPage(), FigureEditor::addPageMargin(), FigureEditor::addToItemList(), FigureEditor::contentsMouseMoveEvent(), FigureEditor::contentsMousePressEvent(), FigureEditor::createPixmap(), FigureEditor::mouseMoveMultiItem(), FigureEditor::movePlotterWithText(), FigureEditor::placeGraph(), FigureEditor::placeGraphOnSelected(), FigureEditor::print(), FigureEditor::resizeCanvasToFit(), FigureEditor::resizeEvent(), CanvasView::reTilePage(), FigureEditor::scaleBy(), CanvasView::setVisibleNonViews(), FigureEditor::showPrinterMargins(), and CanvasView::views().
bool m_clicked [private] |
For cut mode 2, clicked or not.
Definition at line 187 of file CanvasView.h.
Referenced by CanvasView::contentsMouseMoveEvent(), and CanvasView::contentsMouseReleaseEvent().
std::vector<double> m_current_range [private] |
Set to the current range of the selected plotter.
Definition at line 196 of file CanvasView.h.
Referenced by CanvasView::getCurrentRange(), and CanvasView::setCurrentRange().
int m_cut_mode [private] |
Cut mode: 1: normal; 2: click; 3: drag.
Definition at line 176 of file CanvasView.h.
Referenced by CanvasView::contentsMouseMoveEvent(), CanvasView::contentsMouseReleaseEvent(), CanvasView::setCutMode(), and CanvasView::updatePickTable().
QCanvasRectangle* m_drag_rect [private] |
Rectangle showing the area which is to be magnified.
Definition at line 131 of file CanvasView.h.
Referenced by CanvasView::contentsMouseMoveEvent(), and CanvasView::contentsMouseReleaseEvent().
int m_edge [private] |
For cut mode 1, edge or corner selected.
0: Not selected; 1: Left-bottom; 2: Left-top; 3: Right-bottom; 4: Right-top; 5: Left; 6: Right; 7: Bottom; 8: Top.
Definition at line 183 of file CanvasView.h.
Referenced by CanvasView::contentsMouseMoveEvent(), and CanvasView::contentsMouseReleaseEvent().
bool m_ignore_margin [protected, inherited] |
a flag set to true
if the printer margins should be ignored when adding a plot to the canvas.
Definition at line 153 of file FigureEditor.h.
Referenced by CanvasView::initSettings(), FigureEditor::placeGraph(), CanvasView::saveSettings(), and CanvasView::setup().
QFileDialog* m_image_dialog [private] |
The QFileDialog for saving images.
The file dialog for saving images. It contains the supported image format file filters. each CanvasView has its own, if needed, because the dialog must have a parent widget.
Definition at line 142 of file CanvasView.h.
Referenced by CanvasView::saveSelectedImages().
Inspector* m_inspector [private] |
The Inspector object.
Definition at line 119 of file CanvasView.h.
Referenced by CanvasView::addPlotDisplay(), CanvasView::exportTextTuple(), CanvasView::getInspector(), CanvasView::initFitterDefault(), CanvasView::notifyObservers(), CanvasView::setInspector(), and CanvasView::showInspector().
bool m_isMouseDown [protected, inherited] |
The flag of mouse down or not, used when moving multiple plots.
Definition at line 305 of file FigureEditor.h.
Referenced by FigureEditor::contentsMousePressEvent(), and FigureEditor::contentsMouseReleaseEvent().
std::vector< QCanvasItem * > m_items [protected, inherited] |
The list of view items on the canvas.
This list is a subset of the one kept by the QCanvas object,That one doesn't seem to maintain the order that items were inserted while this one does. Also, only application items are added to this list, not page decorations.
Definition at line 238 of file FigureEditor.h.
Referenced by FigureEditor::add(), FigureEditor::addToItemList(), FigureEditor::clear(), FigureEditor::contentsMousePressEvent(), FigureEditor::maximumZ(), FigureEditor::placeGraph(), FigureEditor::placeGraphOnSelected(), FigureEditor::removeFromItemList(), CanvasView::reTile(), FigureEditor::setAllSelected(), FigureEditor::setCollidingSelected(), and FigureEditor::setUnselectedVisible().
QPoint m_mouse_down [protected, inherited] |
The point of a mouse down, used when moving multiple plots.
Definition at line 302 of file FigureEditor.h.
Referenced by FigureEditor::contentsMousePressEvent(), and FigureEditor::contentsMouseReleaseEvent().
std::vector<double> m_mouseData [private] |
3-vector of mouse event data
Definition at line 148 of file CanvasView.h.
Referenced by CanvasView::contentsMouseReleaseEvent(), CanvasView::fillMouseData(), and CanvasView::mouseEventData().
QPoint m_moving_start [protected, inherited] |
The starting point of a mouse drag.
Definition at line 296 of file FigureEditor.h.
Referenced by FigureEditor::contentsMouseMoveEvent(), FigureEditor::contentsMousePressEvent(), FigureEditor::mouseMoveMultiItem(), and FigureEditor::whereClicked().
int m_num_height [private] |
Number of default sized plots vertically.
Definition at line 168 of file CanvasView.h.
Referenced by CanvasView::calcDefaultSize(), CanvasView::initSettings(), CanvasView::saveSettings(), CanvasView::setPlotMatrix(), and CanvasView::setup().
int m_num_width [private] |
Number of default sized plots horizontally.
Definition at line 164 of file CanvasView.h.
Referenced by CanvasView::calcDefaultSize(), CanvasView::initSettings(), CanvasView::saveSettings(), CanvasView::setPlotMatrix(), and CanvasView::setup().
QCanvasItem* m_preSelected [protected, inherited] |
The view item which is preselected when left mouse button down.
Useful only when multiple items are selected and one of them is pressed. Need to decide whether to select or to move all plots.
Definition at line 263 of file FigureEditor.h.
Referenced by FigureEditor::contentsMousePressEvent(), and FigureEditor::contentsMouseReleaseEvent().
bool m_printer_bounds [protected, inherited] |
A flag to indicate if rectangle display usable printer boundary should be displayed or not.
Definition at line 148 of file FigureEditor.h.
Referenced by FigureEditor::addPageMargin(), CanvasView::saveSettings(), FigureEditor::scaleBy(), CanvasView::setup(), and FigureEditor::showPrinterMargins().
std::list<QAction *> m_recent_list [private] |
List of menu items of recently opened files.
Definition at line 104 of file CanvasView.h.
Referenced by CanvasView::addRecentFile(), CanvasView::autosaveSettings(), and CanvasView::initRecentFiles().
QCanvasItem* m_rightItem [protected, inherited] |
The view item which is clicked with right mouse button when contentsMousePressEvent() happens.
When contentsMoveMouseEvent() happens, get to this member, get the position of the cursor. When contentsReleaseMouseEvent() happens, reset the mouse cursor to arrow.
Definition at line 252 of file FigureEditor.h.
Referenced by FigureEditor::contentsMousePressEvent(), and FigureEditor::getRightItem().
double m_scale_factor [protected, inherited] |
The scale factor.
The factor by which drawing has been reduced so that a canvas page fits in the window. This factor should be applied in inverse before printing.
Definition at line 136 of file FigureEditor.h.
Referenced by FigureEditor::print(), and FigureEditor::scaleBy().
std::vector< const ViewBase * > m_sel_views [mutable, private] |
Temporary list of selected QtView objects on the canvas.
Definition at line 110 of file CanvasView.h.
Referenced by CanvasView::getPickTable(), and CanvasView::selectedViews().
std::vector< QCanvasItem * > m_selected_list [protected, inherited] |
The list of currently selected QCanvasItem objects.
Definition at line 290 of file FigureEditor.h.
Referenced by FigureEditor::addSelectedItem(), FigureEditor::clear(), FigureEditor::clearSelectedList(), FigureEditor::contentsMousePressEvent(), CanvasView::controlMousePressEvent(), FigureEditor::getSelectedBounds(), FigureEditor::getSelectedItems(), FigureEditor::hide(), FigureEditor::isSingleItemSelected(), FigureEditor::mouseMoveMultiItem(), FigureEditor::removeSelectedItem(), CanvasView::saveSelectedImages(), FigureEditor::selectedItem(), CanvasView::selectedViews(), FigureEditor::setAllSelected(), FigureEditor::setCollidingSelected(), FigureEditor::setSelectedFlags(), FigureEditor::setSelectedItem(), and FigureEditor::setSelectedItems().
std::map< const QtView *, PickTable * > m_table_map [private] |
A map from a view to the PickTable.
Definition at line 113 of file CanvasView.h.
Referenced by CanvasView::contentsMouseMoveEvent(), CanvasView::getPickTable(), CanvasView::updatePickTable(), and CanvasView::viewShowPickTable().
int m_upage_h [protected, inherited] |
The usable Page height in Postscript points.
Definition at line 225 of file FigureEditor.h.
Referenced by FigureEditor::addPageMargin(), CanvasView::calcDefaultSize(), FigureEditor::calcPrinterMetrics(), FigureEditor::placeGraph(), FigureEditor::scaleBy(), and CanvasView::swapOrientation().
int m_upage_w [protected, inherited] |
The usable Page width in Postscript points.
Definition at line 222 of file FigureEditor.h.
Referenced by FigureEditor::addPageMargin(), CanvasView::addPlotDisplay(), CanvasView::calcDefaultSize(), FigureEditor::calcPrinterMetrics(), FigureEditor::placeGraph(), FigureEditor::scaleBy(), and CanvasView::swapOrientation().
Temporary list of QtView objects on the canvas.
Definition at line 107 of file CanvasView.h.
Referenced by CanvasView::views().
Location m_whereClicked [protected, inherited] |
Location where the mouse cursor clicked the object.
Definition at line 315 of file FigureEditor.h.
Referenced by FigureEditor::contentsMouseMoveEvent(), CanvasView::contentsMouseReleaseEvent(), and FigureEditor::whereClicked().
bool m_zoom_mode [protected, inherited] |
Set to true
if zoom Mode is enabled.
Definition at line 140 of file FigureEditor.h.
Referenced by FigureEditor::enterEvent(), FigureEditor::getZoomMode(), and FigureEditor::setZoomMode().
QPoint m_zoom_start [protected, inherited] |
The starting point of a mouse drag.for zoom.
Definition at line 299 of file FigureEditor.h.
Referenced by CanvasView::contentsMouseMoveEvent(), and FigureEditor::contentsMousePressEvent().
double old_pos [private] |
For cut mode 2, position of first click.
Definition at line 191 of file CanvasView.h.
Referenced by CanvasView::contentsMouseMoveEvent().
double old_pos_x [private] |
double old_pos_y [private] |
The QSettings application key for searching for setting.
The initial value is "HippoDraw", but may be changed by Starkey.
Definition at line 272 of file FigureEditor.h.
Referenced by CanvasView::autosaveSettings(), FigureEditor::getAppKey(), CanvasView::initDockWindows(), CanvasView::initFitterDefault(), FigureEditor::initPrinter(), CanvasView::initRecentFiles(), CanvasView::initSettings(), FigureEditor::savePrinterSettings(), CanvasView::saveSettings(), FigureEditor::setAppKey(), and CanvasView::setFitterDefault().
const string s_app_name = "HippoDraw" [static, private] |
The application name.
Definition at line 123 of file CanvasView.h.
Referenced by CanvasView::applicationName(), CanvasView::contentsMouseMoveEvent(), CanvasView::createNTuple(), CanvasView::exportTextTuple(), CanvasView::savePlotAsFits(), CanvasView::saveSelectedAsFits(), CanvasView::showFitsError(), and CanvasView::viewShowPickTable().
string s_image_filters [static, private] |
A QFileDialog filters string for supported image types.
Definition at line 126 of file CanvasView.h.
Referenced by CanvasView::createImageDialog(), CanvasView::createImageFilters(), CanvasView::invalidImageFormatError(), CanvasView::isValidImageFormat(), and CanvasView::saveSelectedImages().
The single QPrinter instance.
Definition at line 143 of file FigureEditor.h.
Referenced by FigureEditor::calcPrinterMetrics(), FigureEditor::initPrinter(), FigureEditor::print(), FigureEditor::savePrinterSettings(), CanvasView::saveSettings(), FigureEditor::setPrinterSettings(), and CanvasView::setup().
QString s_registry [static, protected, inherited] |
The QSettings Windows registry key.
The key is the same as used for by Trolltech for their Qt applications
Definition at line 277 of file FigureEditor.h.
Referenced by CanvasView::autosaveSettings(), FigureEditor::getRegistry(), CanvasView::initDockWindows(), CanvasView::initFitterDefault(), FigureEditor::initPrinter(), CanvasView::initRecentFiles(), CanvasView::initSettings(), FigureEditor::savePrinterSettings(), CanvasView::saveSettings(), and CanvasView::setFitterDefault().
XmlController * s_xml_controller = 0 [static, private] |
The XML controller.
Definition at line 116 of file CanvasView.h.
Referenced by CanvasView::addFromPasteboard(), CanvasView::addView(), CanvasView::contentsMousePressEvent(), CanvasView::copyFromPasteboard(), CanvasView::copySelectedToPasteboard(), CanvasView::deleteSelected(), CanvasView::initFromFile(), CanvasView::restoreFromSelectCopy(), and CanvasView::saveAs().