QtiPlot  0.9.8.2
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
MdiSubWindow Class Reference

Base class of all MDI client windows. More...

#include <MdiSubWindow.h>

Inheritance diagram for MdiSubWindow:
Graph3D Matrix MultiLayer Note Table TableStatistics

Public Types

enum  CaptionPolicy { Name = 0, Label = 1, Both = 2 }
 Possible window captions. More...
 
enum  Status { Hidden = -1, Normal = 0, Minimized = 1, Maximized = 2 }
 

Public Slots

virtual void print ()
 

Signals

void closedWindow (MdiSubWindow *)
 Emitted when the window was closed. More...
 
void hiddenWindow (MdiSubWindow *)
 Emitted when the window was hidden. More...
 
void modifiedWindow (MdiSubWindow *)
 
void resizedWindow (MdiSubWindow *)
 
void showContextMenu ()
 Show the context menu. More...
 
void statusChanged (MdiSubWindow *)
 Emitted when the window status changed. More...
 

Public Member Functions

ApplicationWindowapplicationWindow ()
 Returns a pointer to the parent application. More...
 
void askOnCloseEvent (bool ask)
 Toggle the "ask on close" flag. More...
 
QString aspect ()
 Return the window status as a string. More...
 
QString birthDate ()
 Return the creation date. More...
 
CaptionPolicy captionPolicy ()
 Return the caption policy. More...
 
void closeEvent (QCloseEvent *)
 Close event handler. More...
 
bool eventFilter (QObject *object, QEvent *e)
 Filters other object's events (customizes title bar's context menu) More...
 
virtual void exportPDF (const QString &)
 
Folderfolder ()
 Returns the pointer to the parent folder of the window. More...
 
 MdiSubWindow (const QString &label=QString(), ApplicationWindow *app=0, const QString &name=QString(), Qt::WFlags f=0)
 Constructor. More...
 
QSize minRestoreSize ()
 Returns the size the window had before a change state event to minimized. More...
 
QString name ()
 Return the window name. More...
 
void notifyChanges ()
 Notifies the main application that the window has been modified. More...
 
virtual void print (QPrinter *)
 
void resizeEvent (QResizeEvent *)
 
virtual void restore (const QStringList &)
 Not implemented yet. More...
 
void restoreWindow ()
 Show window making sure that layers in MultiLayer windows are not resized. More...
 
virtual void save (const QString &, const QString &, bool=false)
 
void setBirthDate (const QString &s)
 Set the creation date. More...
 
void setCaptionPolicy (CaptionPolicy policy)
 Set the caption policy. More...
 
void setFolder (Folder *f)
 Initializes the pointer to the parent folder of the window. More...
 
virtual void setHidden ()
 Notifies that a window was hidden by a direct user action. More...
 
void setMaximized ()
 
void setMinimized ()
 
void setName (const QString &s)
 Set the window name. More...
 
void setNormal ()
 
void setStatus (Status s)
 Set the window status flag (hidden, normal, minimized or maximized) More...
 
void setWindowLabel (const QString &s)
 Set the window label. More...
 
virtual QString sizeToString ()
 Size of the widget as a string. More...
 
Status status ()
 Return the window status flag (hidden, normal, minimized or maximized) More...
 
QString windowLabel ()
 Return the window label. More...
 

Static Public Member Functions

static QString parseAsciiFile (const QString &fname, const QString &commentString, int endLine, int ignoreFirstLines, int maxRows, int &rows)
 Static function used as a workaround for ASCII files having end line char != '
'. More...
 

Protected Member Functions

virtual void changeEvent (QEvent *event)
 Catches status changes. More...
 

Private Member Functions

void updateCaption ()
 Set caption according to current CaptionPolicy, name and label. More...
 

Static Private Member Functions

static QString parseMacAsciiFile (const QString &fname, const QString &commentString, int ignoreFirstLines, int maxRows, int &rows)
 Used to parse ASCII files with carriage return ('') endline. More...
 

Private Attributes

ApplicationWindowd_app
 Pointer to the application window. More...
 
QString d_birthdate
 The creation date. More...
 
CaptionPolicy d_caption_policy
 The caption policy. More...
 
bool d_confirm_close
 Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event. More...
 
Folderd_folder
 Pointer to the parent folder of the window. More...
 
QString d_label
 The window label. More...
 
QSize d_min_restore_size
 Stores the size the window had before a change state event to minimized. More...
 
Status d_status
 The window status. More...
 

Detailed Description

Base class of all MDI client windows.

These are the main objects of every Qtiplot project. All content (apart from the directory structure) is managed by subclasses of MdiSubWindow.

Future Plans

Rename to Aspect.

See also
Folder, ApplicationWindow

Member Enumeration Documentation

Possible window captions.

Enumerator
Name 

caption determined by the window name

Label 

caption detemined by the window label

Both 

caption = "name - label"

Enumerator
Hidden 
Normal 
Minimized 
Maximized 

Constructor & Destructor Documentation

MdiSubWindow::MdiSubWindow ( const QString &  label = QString(),
ApplicationWindow app = 0,
const QString &  name = QString(),
Qt::WFlags  f = 0 
)

Constructor.

Parameters
labelwindow label
parentparent widget
namewindow name
fwindow flags
See also
setCaptionPolicy(), captionPolicy()

References Folder::addWindow(), and d_folder.

Member Function Documentation

ApplicationWindow* MdiSubWindow::applicationWindow ( )
inline

Returns a pointer to the parent application.

References d_app.

Referenced by Graph3D::addCurve(), AddWidgetTool::addEquation(), MultiLayer::addLayer(), MultiLayer::addLayerButton(), Note::addTab(), AddWidgetTool::addText(), AddWidgetTool::AddWidgetTool(), Table::calculate(), MultiLayer::connectLayer(), RangeSelectorTool::copySelectedCurve(), Matrix::copySelection(), Table::copySelection(), Graph::createTable(), Matrix::determinant(), ArrowMarker::displayInfo(), Graph::dropEvent(), RangeSelectorTool::emitStatusText(), Graph::enableTextEditor(), CanvasPicker::eventFilter(), AddWidgetTool::eventFilter(), MultiLayer::eventFilter(), Matrix::exportASCII(), Table::exportASCII(), Matrix::exportEMF(), MultiLayer::exportEMF(), Graph::exportEMF(), Matrix::exportExcel(), Table::exportExcel(), Matrix::exportOdsSpreadsheet(), Table::exportOdsSpreadsheet(), Table::extractData(), Graph::guessUniqueCurveLayout(), Matrix::ignoreUndo(), Table::importASCII(), Table::init(), Graph::initCurveLayout(), Matrix::initGlobals(), Graph3D::initPlot(), Matrix::initWorkspace(), Matrix::invert(), DataPickerTool::keyEventFilter(), MultiLayer::keyPressEvent(), Graph::legendText(), MultiLayer::MultiLayer(), Table::muParserCalculate(), Graph::newLegend(), Table::notifyChanges(), ImageWidget::paintEvent(), LegendWidget::parse(), Table::pasteSelection(), Matrix::pasteSelection(), Graph::plotBox(), Table::print(), Matrix::print(), MultiLayer::print(), MultiLayer::resizeLayers(), Table::restore(), Graph3D::setBarStyle(), Spectrogram::setDefaultColorMap(), Matrix::setDefaultColorMap(), Graph::setIndexedColors(), LayerDialog::setMultiLayer(), PlotDialog::setMultiLayer(), Table::showComments(), LegendWidget::showTextEditor(), Table::sortColumns(), Table::sortColumnsDialog(), Table::sortTableDialog(), StudentTestDialog::StudentTestDialog(), LayerDialog::update(), AxesDialog::updateGrid(), MultiLayer::updateLayerAxes(), and AddWidgetTool::~AddWidgetTool().

void MdiSubWindow::askOnCloseEvent ( bool  ask)
inline
QString MdiSubWindow::aspect ( )
QString MdiSubWindow::birthDate ( )
inline
CaptionPolicy MdiSubWindow::captionPolicy ( )
inline
void MdiSubWindow::changeEvent ( QEvent *  event)
protectedvirtual

Catches status changes.

References d_min_restore_size, d_status, Maximized, Minimized, Normal, and statusChanged().

void MdiSubWindow::closedWindow ( MdiSubWindow )
signal

Emitted when the window was closed.

Referenced by closeEvent().

void MdiSubWindow::closeEvent ( QCloseEvent *  e)

Close event handler.

Ask the user "delete, hide, or cancel?" if the "ask on close" flag is set.

References closedWindow(), d_confirm_close, and hiddenWindow().

bool MdiSubWindow::eventFilter ( QObject *  object,
QEvent *  e 
)
virtual void MdiSubWindow::exportPDF ( const QString &  )
inlinevirtual

Reimplemented in Graph3D, MultiLayer, Table, and Note.

Referenced by ApplicationWindow::exportPDF().

Folder* MdiSubWindow::folder ( )
inline
void MdiSubWindow::hiddenWindow ( MdiSubWindow )
signal

Emitted when the window was hidden.

Referenced by closeEvent().

QSize MdiSubWindow::minRestoreSize ( )
inline

Returns the size the window had before a change state event to minimized.

References d_min_restore_size.

Referenced by ApplicationWindow::windowGeometryInfo().

void MdiSubWindow::modifiedWindow ( MdiSubWindow )
signal

Referenced by Table::addCol(), Table::adjustColumnsWidth(), Matrix::calculate(), Table::calculate(), Table::cellEdited(), Table::clear(), Table::clearCell(), Matrix::clearSelection(), Table::clearSelection(), Table::colWidthModified(), Matrix::deleteSelectedColumns(), Matrix::deleteSelectedRows(), Table::eventFilter(), Matrix::fft(), Table::hideColumn(), Matrix::importASCII(), Matrix::importImage(), Table::insertCols(), Matrix::insertColumn(), Table::insertRow(), Matrix::insertRow(), Note::modifiedNote(), Table::moveColumnBy(), Table::moveRow(), Matrix::muParserCalculate(), Table::muParserCalculate(), Table::normalize(), Table::normalizeSelection(), notifyChanges(), Table::notifyChanges(), Table::pasteSelection(), Matrix::pasteSelection(), Table::removeCol(), MultiLayer::removeLayer(), Matrix::resample(), Table::resizeCols(), Table::resizeRows(), MultiLayer::reverseWaterfallOrder(), Table::setAscValues(), Table::setColComment(), Table::setColName(), Matrix::setColorMap(), Matrix::setColumnsWidth(), Table::setColumnWidth(), Matrix::setCoordinates(), Matrix::setDefaultColorMap(), Matrix::setDimensions(), Matrix::setGrayScale(), Matrix::setHeaderViewType(), Table::setNormalRandomValues(), Matrix::setNumericFormat(), MultiLayer::setNumLayers(), Table::setPlotDesignation(), Matrix::setRainbowColorMap(), Table::setRandomValues(), Table::setReadOnlyColumn(), Matrix::setViewType(), Table::showAllColumns(), Matrix::smooth(), Table::sortColumn(), Table::sortColumns(), and Table::swapColumns().

QString MdiSubWindow::name ( )
inline
void MdiSubWindow::notifyChanges ( )
inline
QString MdiSubWindow::parseAsciiFile ( const QString &  fname,
const QString &  commentString,
int  endLine,
int  ignoreFirstLines,
int  maxRows,
int &  rows 
)
static

Static function used as a workaround for ASCII files having end line char != '
'.

References ApplicationWindow::CR, and parseMacAsciiFile().

Referenced by PreviewTable::importASCII(), MatrixModel::importASCII(), and Table::importASCII().

QString MdiSubWindow::parseMacAsciiFile ( const QString &  fname,
const QString &  commentString,
int  ignoreFirstLines,
int  maxRows,
int &  rows 
)
staticprivate

Used to parse ASCII files with carriage return ('') endline.

Referenced by parseAsciiFile().

virtual void MdiSubWindow::print ( )
inlinevirtualslot

Reimplemented in Graph3D, MultiLayer, Table, and Note.

Referenced by ApplicationWindow::print().

virtual void MdiSubWindow::print ( QPrinter *  )
inlinevirtual

Reimplemented in Graph3D, MultiLayer, Table, and Note.

void MdiSubWindow::resizedWindow ( MdiSubWindow )
signal
void MdiSubWindow::resizeEvent ( QResizeEvent *  e)

References resizedWindow().

virtual void MdiSubWindow::restore ( const QStringList &  )
inlinevirtual

Not implemented yet.

Reimplemented in Table, Matrix, and Note.

Referenced by ApplicationWindow::openTemplate().

void MdiSubWindow::restoreWindow ( )
virtual void MdiSubWindow::save ( const QString &  ,
const QString &  ,
bool  = false 
)
inlinevirtual
void MdiSubWindow::setBirthDate ( const QString &  s)
inline
void MdiSubWindow::setCaptionPolicy ( CaptionPolicy  policy)
inline
void MdiSubWindow::setFolder ( Folder f)
inline

Initializes the pointer to the parent folder of the window.

References d_folder.

Referenced by Folder::addWindow().

void MdiSubWindow::setHidden ( )
virtual

Notifies that a window was hidden by a direct user action.

References d_status, Hidden, and statusChanged().

Referenced by ApplicationWindow::hideWindow().

void MdiSubWindow::setMaximized ( )
void MdiSubWindow::setMinimized ( )
void MdiSubWindow::setName ( const QString &  s)
inline
void MdiSubWindow::setNormal ( )
void MdiSubWindow::setStatus ( Status  s)

Set the window status flag (hidden, normal, minimized or maximized)

References d_status, and statusChanged().

Referenced by ApplicationWindow::changeFolder(), ApplicationWindow::restoreWindowGeometry(), and ApplicationWindow::updateWindowStatus().

void MdiSubWindow::setWindowLabel ( const QString &  s)
inline
void MdiSubWindow::showContextMenu ( )
signal

Show the context menu.

Referenced by MultiLayer::connectLayer(), eventFilter(), and Table::eventFilter().

QString MdiSubWindow::sizeToString ( )
virtual

Size of the widget as a string.

Reimplemented in Matrix, MultiLayer, and Table.

Status MdiSubWindow::status ( )
inline
void MdiSubWindow::statusChanged ( MdiSubWindow )
signal

Emitted when the window status changed.

Referenced by changeEvent(), setHidden(), setMaximized(), setMinimized(), setNormal(), and setStatus().

void MdiSubWindow::updateCaption ( )
private

Set caption according to current CaptionPolicy, name and label.

References Both, d_app, d_caption_policy, d_label, Label, Name, and ApplicationWindow::setListViewLabel().

Referenced by setCaptionPolicy(), setName(), and setWindowLabel().

QString MdiSubWindow::windowLabel ( )
inline

Member Data Documentation

ApplicationWindow* MdiSubWindow::d_app
private

Pointer to the application window.

Referenced by applicationWindow(), eventFilter(), and updateCaption().

QString MdiSubWindow::d_birthdate
private

The creation date.

Referenced by birthDate(), and setBirthDate().

CaptionPolicy MdiSubWindow::d_caption_policy
private

The caption policy.

See also
setCaptionPolicy(), captionPolicy()

Referenced by captionPolicy(), setCaptionPolicy(), and updateCaption().

bool MdiSubWindow::d_confirm_close
private

Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event.

Referenced by askOnCloseEvent(), and closeEvent().

Folder* MdiSubWindow::d_folder
private

Pointer to the parent folder of the window.

Referenced by eventFilter(), folder(), MdiSubWindow(), setFolder(), and setMaximized().

QString MdiSubWindow::d_label
private
QSize MdiSubWindow::d_min_restore_size
private

Stores the size the window had before a change state event to minimized.

Referenced by changeEvent(), and minRestoreSize().

Status MdiSubWindow::d_status
private

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