Logo Search packages:      
Sourcecode: qtiplot version File versions  Download package

MultiLayer Class Reference

#include <MultiLayer.h>

Inheritance diagram for MultiLayer:


List of all members.

Detailed Description

An MDI window (MyWidget) managing one or more Graph objects.

Note that several parts of the code, as well as the user interface, refer to MultiLayer as "graph" or "plot", practically guaranteeing confusion with the classes Graph and Plot.

Future Plans

Manage any QWidget instead of only Graph. This would allow 3D graphs to be added as well, so you could produce mixed 2D/3D arrangements. It would also allow text labels to be added directly instead of having to complicate things by wrapping them up in a Graph (see documentation of ImageMarker for details) (see documentation of ImageMarker for details).

The main problem to be figured out for this is how Graph would interface with the rest of the project. A possible solution is outlined in the documentation of ApplicationWindow: If MultiLayer exposes its parent Project to the widgets it manages, they could handle things like creating tables by calling methods of Project instead of sending signals.

Definition at line 65 of file MultiLayer.h.

Public Types

enum  CaptionPolicy { Name = 0, Label = 1, Both = 2 }
 Possible window captions. More...
enum  HorAlignement { HCenter, Left, Right }
enum  Status { Hidden = -1, Normal = 0, Minimized = 1, Maximized = 2 }
enum  VertAlignement { VCenter, Top, Bottom }

Public Slots

void activateGraph (LayerButton *button)
GraphactiveGraph ()
GraphaddLayer (int x=0, int y=0, int width=0, int height=0)
void adjustSize ()
void arrangeLayers (bool fit, bool userSize)
QSize arrangeLayers (bool userSize)
int bottomMargin ()
int colsSpacing ()
void confirmRemoveLayer ()
void connectLayer (Graph *g)
void findBestLayout (int &rows, int &cols)
int getCols ()
int getRows ()
int horizontalAlignement ()
bool isEmpty ()
QSize layerCanvasSize ()
int layers ()
int leftMargin ()
void removeLayer ()
int rightMargin ()
int rowsSpacing ()
QString saveAsTemplate (const QString &geometryInfo)
QString saveToString (const QString &geometry, bool=false)
void setActiveGraph (Graph *g)
void setAlignement (int ha, int va)
void setCols (int c)
void setFonts (const QFont &titleFnt, const QFont &scaleFnt, const QFont &numbersFnt, const QFont &legendFnt)
void setGraphGeometry (int x, int y, int w, int h)
void setLayerCanvasSize (int w, int h)
void setLayersNumber (int n)
void setMargins (int lm, int rm, int tm, int bm)
void setRows (int r)
void setSpacing (int rgap, int cgap)
bool swapLayers (int src, int dest)
int topMargin ()
int verticalAlignement ()
Print and Export
QPixmap canvasPixmap ()
void copyAllLayers ()
void exportImage (const QString &fileName, int quality=100, bool transparent=false)
void exportPDF (const QString &fname)
void exportSVG (const QString &fname)
void exportToFile (const QString &fileName)
void exportVector (const QString &fileName, int res=0, bool color=true, bool keepAspect=true, QPrinter::PageSize pageSize=QPrinter::Custom)
void print ()
void printActiveLayer ()
void printAllLayers (QPainter *painter)


void closedWindow (MyWidget *)
 Emitted when the window was closed.
void createTable (const QString &, int, int, const QString &)
void currentFontChanged (const QFont &)
void cursorInfo (const QString &)
void drawLineEnded (bool)
void drawTextOff ()
void enableTextEditor (Graph *)
void hiddenWindow (MyWidget *)
 Emitted when the window was hidden.
void modifiedPlot ()
void modifiedWindow (QWidget *)
void moved ()
void pasteMarker ()
void resizedWindow (QWidget *)
void setPointerCursor ()
void showAxisDialog (int)
void showCurveContextMenu (int)
void showCurvesDialog ()
void showGraphContextMenu ()
void showImageDialog ()
void showLineDialog ()
void showMarkerPopupMenu ()
void showPlotDialog (int)
void showRightAxisTitleDialog ()
void showScaleDialog (int)
void showTextDialog ()
void showTitleBarMenu ()
 Emitted when the title bar recieves a QContextMenuEvent.
void showTopAxisTitleDialog ()
void showWindowContextMenu ()
void showXAxisTitleDialog ()
void showYAxisTitleDialog ()
void statusChanged (MyWidget *)
 Emitted when the window status changed.
void viewTitleDialog ()

Public Member Functions

LayerButtonaddLayerButton ()
void askOnCloseEvent (bool ask)
 Toggle the "ask on close" flag.
QString aspect ()
 Return the window status as a string.
QString birthDate ()
 Return the creation date.
CaptionPolicy captionPolicy ()
 Return the caption policy.
void closeEvent (QCloseEvent *)
 Close event handler.
void copy (MultiLayer *ml)
Folderfolder ()
 Returns the pointer to the parent folder of the window.
QWidgetList graphPtrs ()
Graphlayer (int num)
QLocale locale ()
 MultiLayer (const QString &label, QWidget *parent=0, const char *name=0, Qt::WFlags f=0)
QString name ()
 Return the window name.
void notifyChanges ()
 Notifies the main application that the window has been modified.
void printCropmarks (bool on)
bool printCropmarksEnabled ()
void resizeEvent (QResizeEvent *)
virtual void restore (const QStringList &)
 Not implemented yet.
bool scaleLayersOnPrint ()
void setBirthDate (const QString &s)
 Set the creation date.
void setCaptionPolicy (CaptionPolicy policy)
 Set the caption policy.
void setFolder (Folder *f)
 Initializes the pointer to the parent folder of the window.
void setHidden ()
 Notifies that a window was hidden by a direct user action.
void setLocale (const QLocale &l)
void setMaximized ()
void setMinimized ()
void setName (const QString &s)
 Set the window name.
void setNormal ()
void setOpenMaximized ()
void setScaleLayersOnPrint (bool on)
void setStatus (Status s)
 Set the window status flag (hidden, normal, minimized or maximized).
void setWindowLabel (const QString &s)
 Set the window label.
virtual QString sizeToString ()
 Size of the widget as a string.
Status status ()
 Return the window status flag (hidden, normal, minimized or maximized).
QString windowLabel ()
 Return the window label.
Event Handlers
void changeEvent (QEvent *)
 Catches parent changes (in order to gain access to the title bar).
void contextMenuEvent (QContextMenuEvent *)
bool eventFilter (QObject *object, QEvent *)
 Filters other object's events (customizes title bar's context menu).
bool focusNextPrevChild (bool next)
void keyPressEvent (QKeyEvent *)
void mousePressEvent (QMouseEvent *)
void releaseLayer ()
void wheelEvent (QWheelEvent *)

Protected Attributes

QWidget * titleBar
 Title bar of this MDI window if it currently belongs to a QWorkspace, NULL else.

Private Member Functions

void resizeLayers (const QSize &size, const QSize &oldSize, bool scaleFonts)
void resizeLayers (const QResizeEvent *re)

Private Attributes

int bottom_margin
QWidgetList buttonsList
QWidget * canvas
int cols
int colsSpace
QPointer< SelectionMoveResizerd_layers_selector
QSize d_max_size
 Stores the size of the widget in the Qt::WindowMaximized state.
QSize d_normal_size
 Stores the size of the widget in Qt::WindowNoState (normal state).
int d_open_maximized
bool d_print_cropmarks
bool d_scale_on_print
int graph_height
int graph_width
int graphs
 Used for resizing of layers.
QWidgetList graphsList
int hor_align
int l_canvas_height
int l_canvas_width
QHBoxLayout * layerButtonsBox
int left_margin
int right_margin
int rows
int rowsSpace
int top_margin
int vert_align

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index