MdiSubWindow Class Reference

#include <MdiSubWindow.h>

Inheritance diagram for MdiSubWindow:

Graph3D Matrix MultiLayer Note Table TableStatistics

List of all members.


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

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.
void hiddenWindow (MdiSubWindow *)
 Emitted when the window was hidden.
void modifiedWindow (MdiSubWindow *)
void resizedWindow (MdiSubWindow *)
void showContextMenu ()
 Show the context menu.
void statusChanged (MdiSubWindow *)
 Emitted when the window status changed.

Public Member Functions

ApplicationWindowapplicationWindow ()
 Returns a pointer to the parent application.
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.
bool eventFilter (QObject *object, QEvent *e)
 Filters other object's events (customizes title bar's context menu).
virtual void exportPDF (const QString &)
Folderfolder ()
 Returns the pointer to the parent folder of the window.
 MdiSubWindow (const QString &label=QString(), ApplicationWindow *app=0, const QString &name=QString(), Qt::WFlags f=0)
 Constructor.
QSize minRestoreSize ()
 Returns the size the window had before a change state event to minimized.
QString name ()
 Return the window name.
void notifyChanges ()
 Notifies the main application that the window has been modified.
void resizeEvent (QResizeEvent *)
virtual void restore (const QStringList &)
 Not implemented yet.
virtual QString saveAsTemplate (const QString &)
virtual QString saveToString (const QString &, bool=false)
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.
virtual void setHidden ()
 Notifies that a window was hidden by a direct user action.
void setMaximized ()
void setMinimized ()
void setName (const QString &s)
 Set the window name.
void setNormal ()
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.

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 != '
'.

Protected Member Functions

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

Private Member Functions

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

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.

Private Attributes

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

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:
label window label
parent parent widget
name window name
f window flags
See also:
setCaptionPolicy(), captionPolicy()

References Folder::addWindow(), d_folder, and ApplicationWindow::locale().


Member Function Documentation

ApplicationWindow* MdiSubWindow::applicationWindow (  )  [inline]

void MdiSubWindow::askOnCloseEvent ( bool  ask  )  [inline]

QString MdiSubWindow::aspect (  ) 

QString MdiSubWindow::birthDate (  )  [inline]

CaptionPolicy MdiSubWindow::captionPolicy (  )  [inline]

void MdiSubWindow::changeEvent ( QEvent *  event  )  [protected, virtual]

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 
)

Filters other object's events (customizes title bar's context menu).

Reimplemented in MultiLayer, Graph3D, and Table.

References ApplicationWindow::customWindowTitleBarMenu(), d_app, and showContextMenu().

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

virtual void MdiSubWindow::exportPDF ( const QString &   )  [inline, virtual]

Reimplemented in Matrix, Note, MultiLayer, Graph3D, and Table.

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]

QString MdiSubWindow::name (  )  [inline]

void MdiSubWindow::notifyChanges (  )  [inline]

Notifies the main application that the window has been modified.

Reimplemented in Table.

References modifiedWindow().

Referenced by PlotDialog::pickBorderColor(), MatrixEditCellCommand::redo(), MatrixModel::setData(), MatrixEditCellCommand::undo(), and PlotDialog::updateBorder().

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 Table::importASCII(), MatrixModel::importASCII(), and PreviewTable::importASCII().

QString MdiSubWindow::parseMacAsciiFile ( const QString &  fname,
const QString &  commentString,
int  ignoreFirstLines,
int  maxRows,
int &  rows 
) [static, private]

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

Referenced by parseAsciiFile().

virtual void MdiSubWindow::print (  )  [inline, virtual, slot]

Reimplemented in Matrix, Note, MultiLayer, Graph3D, and Table.

Referenced by ApplicationWindow::print().

void MdiSubWindow::resizedWindow ( MdiSubWindow  )  [signal]

void MdiSubWindow::resizeEvent ( QResizeEvent *  e  ) 

Reimplemented in Graph3D.

References resizedWindow().

virtual void MdiSubWindow::restore ( const QStringList &   )  [inline, virtual]

Not implemented yet.

Reimplemented in Matrix, Note, and Table.

Referenced by ApplicationWindow::openTemplate().

virtual QString MdiSubWindow::saveAsTemplate ( const QString &   )  [inline, virtual]

Reimplemented in Matrix, MultiLayer, Graph3D, and Table.

Referenced by ApplicationWindow::saveAsTemplate().

virtual QString MdiSubWindow::saveToString ( const QString &  ,
bool  = false 
) [inline, virtual]

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]

QString MdiSubWindow::sizeToString (  )  [virtual]

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

Pointer to the application window.

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

QString MdiSubWindow::d_birthdate [private]

The creation date.

Referenced by birthDate(), and setBirthDate().

The caption policy.

See also:
setCaptionPolicy(), captionPolicy()

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

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

Referenced by askOnCloseEvent(), and closeEvent().

Pointer to the parent folder of the window.

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

QString MdiSubWindow::d_label [private]

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

Referenced by changeEvent(), and minRestoreSize().


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

Generated on Sun Jun 15 21:32:24 2008 for QtiPlot by  doxygen 1.5.6