MyWidget Class Reference

#include <MyWidget.h>

Inheritance diagram for MyWidget:

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 MyWidget.

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 }

Signals

void closedWindow (MyWidget *)
 Emitted when the window was closed.
void hiddenWindow (MyWidget *)
 Emitted when the window was hidden.
void modifiedWindow (QWidget *)
void moved ()
void resizedWindow (QWidget *)
void showTitleBarMenu ()
 Emitted when the title bar recieves a QContextMenuEvent.
void statusChanged (MyWidget *)
 Emitted when the window status changed.

Public Member Functions

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.
QLocale locale ()
 MyWidget (const QString &label=QString(), QWidget *parent=0, const QString &name=QString(), Qt::WFlags f=0)
 Constructor.
QString name ()
 Return the window name.
void notifyChanges ()
 Notifies the main application that the window has been modified.
virtual void print ()
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 setLocale (const QLocale &l)
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.

Protected Member Functions

virtual void changeEvent (QEvent *event)
 Catches parent changes (in order to gain access to the title bar).

Protected Attributes

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

Private Member Functions

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

Private Attributes

bool askOnClose
 Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event.
QString birthdate
 The creation date.
CaptionPolicy caption_policy
 The caption policy.
QLocale d_locale
FolderparentFolder
 Pointer to the parent folder of the window.
QString w_label
 The window label.
Status w_status
 The window status.

Member Enumeration Documentation

enum MyWidget::CaptionPolicy

Possible window captions.

Enumerator:
Name  caption determined by the window name
Label  caption detemined by the window label
Both  caption = "name - label"

enum MyWidget::Status

Enumerator:
Hidden 
Normal 
Minimized 
Maximized 


Constructor & Destructor Documentation

MyWidget::MyWidget ( const QString &  label = QString(),
QWidget *  parent = 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()


Member Function Documentation

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

Toggle the "ask on close" flag.

QString MyWidget::aspect (  ) 

Return the window status as a string.

QString MyWidget::birthDate (  )  [inline]

Return the creation date.

CaptionPolicy MyWidget::captionPolicy (  )  [inline]

Return the caption policy.

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

Catches parent changes (in order to gain access to the title bar).

Reimplemented in MultiLayer.

void MyWidget::closedWindow ( MyWidget  )  [signal]

Emitted when the window was closed.

void MyWidget::closeEvent ( QCloseEvent *  e  ) 

Close event handler.

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

bool MyWidget::eventFilter ( QObject *  object,
QEvent *  e 
)

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

Reimplemented in Graph3D, Matrix, MultiLayer, and Table.

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

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

Folder* MyWidget::folder (  )  [inline]

Returns the pointer to the parent folder of the window.

void MyWidget::hiddenWindow ( MyWidget  )  [signal]

Emitted when the window was hidden.

QLocale MyWidget::locale (  )  [inline]

void MyWidget::modifiedWindow ( QWidget *   )  [signal]

void MyWidget::moved (  )  [signal]

QString MyWidget::name (  )  [inline]

Return the window name.

void MyWidget::notifyChanges (  )  [inline]

Notifies the main application that the window has been modified.

Reimplemented in Table.

virtual void MyWidget::print (  )  [inline, virtual]

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

void MyWidget::resizedWindow ( QWidget *   )  [signal]

void MyWidget::resizeEvent ( QResizeEvent *  e  ) 

Reimplemented in Graph3D.

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

Not implemented yet.

Reimplemented in Matrix, Note, and Table.

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

Reimplemented in Graph3D, Matrix, MultiLayer, and Table.

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

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

void MyWidget::setBirthDate ( const QString &  s  )  [inline]

Set the creation date.

void MyWidget::setCaptionPolicy ( CaptionPolicy  policy  )  [inline]

Set the caption policy.

void MyWidget::setFolder ( Folder f  )  [inline]

Initializes the pointer to the parent folder of the window.

void MyWidget::setHidden (  )  [virtual]

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

Reimplemented in MultiLayer.

void MyWidget::setLocale ( const QLocale &  l  )  [inline]

void MyWidget::setMaximized (  ) 

void MyWidget::setMinimized (  ) 

void MyWidget::setName ( const QString &  s  )  [inline]

Set the window name.

Reimplemented in Note.

void MyWidget::setNormal (  ) 

void MyWidget::setStatus ( Status  s  ) 

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

void MyWidget::setWindowLabel ( const QString &  s  )  [inline]

Set the window label.

void MyWidget::showTitleBarMenu (  )  [signal]

Emitted when the title bar recieves a QContextMenuEvent.

QString MyWidget::sizeToString (  )  [virtual]

Size of the widget as a string.

Status MyWidget::status (  )  [inline]

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

void MyWidget::statusChanged ( MyWidget  )  [signal]

Emitted when the window status changed.

void MyWidget::updateCaption (  )  [private]

Set caption according to current CaptionPolicy, name and label.

QString MyWidget::windowLabel (  )  [inline]

Return the window label.


Member Data Documentation

bool MyWidget::askOnClose [private]

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

QString MyWidget::birthdate [private]

The creation date.

CaptionPolicy MyWidget::caption_policy [private]

The caption policy.

See also:
setCaptionPolicy(), captionPolicy()

QLocale MyWidget::d_locale [private]

Folder* MyWidget::parentFolder [private]

Pointer to the parent folder of the window.

QWidget* MyWidget::titleBar [protected]

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

QString MyWidget::w_label [private]

The window label.

See also:
setWindowLabel(), windowLabel(), setCaptionPolicy()

Status MyWidget::w_status [private]

The window status.


The documentation for this class was generated from the following files:
Generated on Thu Feb 7 13:59:28 2008 for QtiPlot by  doxygen 1.5.4