SciDAVis
1.D4
|
Base class of all MDI client windows. More...
#include <MyWidget.h>
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 | 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. | |
virtual QString | birthDate () |
Return the creation date. | |
virtual 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 &) |
Folder * | folder () |
Returns the pointer to the parent folder of the window. | |
MyWidget (const QString &label=QString(), QWidget *parent=0, const QString name=0, Qt::WFlags f=0) | |
Constructor. | |
virtual QString | name () |
Return the window name. | |
void | notifyChanges () |
Notifies the main application that the window has been modified. | |
virtual void | print () |
virtual void | restore (const QStringList &) |
Not implemented yet. | |
virtual QString | saveAsTemplate (const QString &) |
virtual QString | saveToString (const QString &) |
virtual void | setBirthDate (const QString &s) |
Set the creation date. | |
virtual 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 () |
virtual 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) | |
virtual void | setWindowLabel (const QString &s) |
Set the window label. | |
Status | status () |
Return the window status flag (hidden, normal, minimized or maximized) | |
virtual QString | windowLabel () |
Return the window label. |
Protected Slots | |
void | updateCaption () |
Set caption according to current CaptionPolicy, name and label. |
Protected Member Functions | |
virtual void | changeEvent (QEvent *event) |
Catches parent changes (in order to gain access to the title bar) |
Protected 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. | |
Folder * | parentFolder |
Pointer to the parent folder of the window. | |
QWidget * | titleBar |
Title bar of this MDI window if it currently belongs to a QWorkspace, NULL else. | |
QString | w_label |
The window label. | |
Status | w_status |
The window status. |
Base class of all MDI client windows.
These are the main objects of every SciDAVis project. All content (apart from the directory structure) is managed by subclasses of MyWidget.
Rename to Aspect.
enum MyWidget::Status |
MyWidget::MyWidget | ( | const QString & | label = QString() , |
QWidget * | parent = 0 , |
||
const QString | name = 0 , |
||
Qt::WFlags | f = 0 |
||
) |
Constructor.
label | window label |
parent | parent widget |
name | window name |
f | window flags |
References askOnClose, Both, caption_policy, Normal, titleBar, w_label, and w_status.
|
inline |
Toggle the "ask on close" flag.
References askOnClose.
Referenced by ApplicationWindow::connectMultilayerPlot(), ApplicationWindow::connectSurfacePlot(), ApplicationWindow::connectTable(), ApplicationWindow::deleteFitTables(), ApplicationWindow::initMatrix(), and ApplicationWindow::initNote().
QString MyWidget::aspect | ( | ) |
Return the window status as a string.
References Hidden, Maximized, Minimized, Normal, and w_status.
Referenced by ApplicationWindow::addListViewItem(), TableView::handleAspectAdded(), Table::handleAspectDescriptionAboutToChange(), Table::handleAspectDescriptionChange(), TableView::handleAspectDescriptionChanged(), MultiLayer::print(), and ApplicationWindow::updateWindowStatus().
|
inlinevirtual |
Return the creation date.
Reimplemented in Matrix.
References birthdate.
Referenced by ApplicationWindow::addListViewItem(), TableStatistics::saveToString(), Note::saveToString(), MultiLayer::saveToString(), Graph3D::saveToString(), and ApplicationWindow::windowProperties().
|
inlinevirtual |
Return the caption policy.
References caption_policy.
Referenced by RenameWindowDialog::accept(), ApplicationWindow::clone(), ApplicationWindow::convertMatrixToTable(), ApplicationWindow::convertTableToMatrix(), ApplicationWindow::renameWindow(), TableStatistics::saveToString(), Note::saveToString(), MultiLayer::saveToString(), Matrix::saveToString(), Graph3D::saveToString(), and RenameWindowDialog::setWidget().
|
protectedvirtual |
Catches parent changes (in order to gain access to the title bar)
Reimplemented in TableView, MatrixView, and MultiLayer.
References Maximized, Minimized, Normal, statusChanged(), titleBar, and w_status.
|
signal |
Emitted when the window was closed.
Referenced by closeEvent().
void MyWidget::closeEvent | ( | QCloseEvent * | e | ) |
Close event handler.
Ask the user "delete, hide, or cancel?" if the "ask on close" flag is set.
Reimplemented in Matrix, and Table.
References askOnClose, closedWindow(), and hiddenWindow().
bool MyWidget::eventFilter | ( | QObject * | object, |
QEvent * | e | ||
) |
Filters other object's events (customizes title bar's context menu)
Reimplemented in TableView, MatrixView, Graph3D, MultiLayer, and TableStatistics.
References showTitleBarMenu(), and titleBar.
|
inlinevirtual |
Reimplemented in Graph3D, MultiLayer, Table, Matrix, and Note.
|
inline |
Returns the pointer to the parent folder of the window.
References parentFolder.
Referenced by ApplicationWindow::closeWindow(), MuParserScript::resolveColumnPath(), ApplicationWindow::restoreWindowGeometry(), MuParserScript::tableColumn__Function(), and ApplicationWindow::windowGeometryInfo().
|
signal |
Emitted when the window was hidden.
Referenced by Table::closeEvent(), Matrix::closeEvent(), and closeEvent().
|
signal |
|
inlinevirtual |
Return the window name.
Reimplemented in Table, and Matrix.
Referenced by RenameWindowDialog::accept(), ApplicationWindow::addListViewItem(), ApplicationWindow::alreadyUsedName(), ApplicationWindow::appendProject(), ApplicationWindow::clone(), ApplicationWindow::closeWindow(), ApplicationWindow::depending3DPlots(), ApplicationWindow::dependingPlots(), ApplicationWindow::exportAllGraphs(), MultiLayer::exportVector(), Folder::findWindow(), ApplicationWindow::generateUniqueName(), Note::init(), ApplicationWindow::loadImage(), ApplicationWindow::openNote(), ApplicationWindow::openProject(), ApplicationWindow::openSurfacePlot(), Graph3D::print(), ApplicationWindow::removeWindowFromLists(), ApplicationWindow::renameWindow(), ApplicationWindow::restoreWindowGeometry(), ApplicationWindow::saveAsTemplate(), Note::saveToString(), MultiLayer::saveToString(), Graph3D::saveToString(), PlotDialog::setMultiLayer(), ApplicationWindow::setShowWindowsPolicy(), RenameWindowDialog::setWidget(), ApplicationWindow::showWindowMenu(), updateCaption(), Graph3D::updateData(), Graph3D::updateScales(), ApplicationWindow::updateWindowStatus(), Folder::window(), ApplicationWindow::window(), ApplicationWindow::windowProperties(), ApplicationWindow::windowsMenuAboutToShow(), and ApplicationWindow::windowsMenuActivated().
|
inline |
Notifies the main application that the window has been modified.
References modifiedWindow().
Referenced by ApplicationWindow::importASCII(), PlotDialog::pickBorderColor(), and PlotDialog::updateBorder().
|
inlinevirtual |
Reimplemented in Graph3D, MultiLayer, Table, Matrix, and Note.
|
signal |
Referenced by Graph3D::resizeEvent(), and MultiLayer::resizeLayers().
|
inlinevirtual |
Not implemented yet.
Reimplemented in Table, and Note.
Referenced by ApplicationWindow::openTemplate().
|
inlinevirtual |
Reimplemented in Table, Graph3D, Matrix, and MultiLayer.
Referenced by ApplicationWindow::saveAsTemplate().
|
inlinevirtual |
Reimplemented in Graph3D, Table, Matrix, MultiLayer, Note, and TableStatistics.
Referenced by ApplicationWindow::rawSaveFolder().
|
inlinevirtual |
Set the creation date.
Reimplemented in Table, and Matrix.
References birthdate.
Referenced by ApplicationWindow::appendProject(), Note::init(), Graph3D::initPlot(), MultiLayer::MultiLayer(), ApplicationWindow::openNote(), ApplicationWindow::openProject(), and ApplicationWindow::openSurfacePlot().
|
inlinevirtual |
Set the caption policy.
Reimplemented in Table, and Matrix.
References caption_policy, and updateCaption().
Referenced by RenameWindowDialog::accept(), ApplicationWindow::appendProject(), ApplicationWindow::clone(), ApplicationWindow::loadImage(), ApplicationWindow::openNote(), ApplicationWindow::openProject(), ApplicationWindow::openSurfacePlot(), and ApplicationWindow::renameWindow().
|
inline |
Initializes the pointer to the parent folder of the window.
References parentFolder.
Referenced by Folder::addWindow(), ApplicationWindow::initMatrix(), ApplicationWindow::initMultilayerPlot(), ApplicationWindow::initNote(), ApplicationWindow::initPlot3D(), ApplicationWindow::initTable(), and Folder::removeWindow().
|
virtual |
Notifies that a window was hidden by a direct user action.
Reimplemented in MultiLayer.
References Hidden, statusChanged(), and w_status.
Referenced by ApplicationWindow::hideWindow().
void MyWidget::setMaximized | ( | ) |
References Maximized, statusChanged(), and w_status.
Referenced by ApplicationWindow::maximizeWindow().
void MyWidget::setMinimized | ( | ) |
References Minimized, statusChanged(), and w_status.
Referenced by ApplicationWindow::minimizeWindow().
|
inlinevirtual |
Set the window name.
Reimplemented in Table, and Matrix.
References updateCaption().
Referenced by ApplicationWindow::dataPlot3D(), ApplicationWindow::dataPlotXYZ(), ApplicationWindow::initMultilayerPlot(), ApplicationWindow::initNote(), MultiLayer::MultiLayer(), ApplicationWindow::newPlot3D(), ApplicationWindow::openMatrixPlot3D(), ApplicationWindow::plot3DMatrix(), and ApplicationWindow::renameWindow().
void MyWidget::setNormal | ( | ) |
References Normal, statusChanged(), and w_status.
Referenced by ApplicationWindow::activateWindow().
void MyWidget::setStatus | ( | Status | s | ) |
Set the window status flag (hidden, normal, minimized or maximized)
References statusChanged(), and w_status.
Referenced by ApplicationWindow::changeFolder(), ApplicationWindow::restoreWindowGeometry(), and ApplicationWindow::updateWindowStatus().
|
inlinevirtual |
Set the window label.
Reimplemented in Table, and Matrix.
References updateCaption(), and w_label.
Referenced by RenameWindowDialog::accept(), ApplicationWindow::appendProject(), ApplicationWindow::clone(), ImportOPJ::importGraphs(), ImportOPJ::importNotes(), ApplicationWindow::loadImage(), ApplicationWindow::openNote(), ApplicationWindow::openProject(), and ApplicationWindow::openSurfacePlot().
|
signal |
Emitted when the title bar recieves a QContextMenuEvent.
Referenced by MultiLayer::eventFilter(), and eventFilter().
|
inline |
Return the window status flag (hidden, normal, minimized or maximized)
References w_status.
Referenced by ApplicationWindow::changeFolder(), ApplicationWindow::clone(), MultiLayer::setHidden(), ApplicationWindow::showAllFolderWindows(), ApplicationWindow::updateWindowStatus(), and ApplicationWindow::windowGeometryInfo().
|
signal |
Emitted when the window status changed.
Referenced by changeEvent(), setHidden(), setMaximized(), setMinimized(), setNormal(), and setStatus().
|
protectedslot |
Set caption according to current CaptionPolicy, name and label.
References Both, caption_policy, Label, Name, name(), and windowLabel().
Referenced by Table::handleAspectDescriptionChange(), Matrix::handleAspectDescriptionChange(), Matrix::setCaptionPolicy(), Table::setCaptionPolicy(), setCaptionPolicy(), setName(), Matrix::setWindowLabel(), Table::setWindowLabel(), and setWindowLabel().
|
inlinevirtual |
Return the window label.
Reimplemented in Table, and Matrix.
References w_label.
Referenced by RenameWindowDialog::accept(), ApplicationWindow::addListViewItem(), ApplicationWindow::clone(), Folder::findWindow(), Note::saveToString(), MultiLayer::saveToString(), Graph3D::saveToString(), RenameWindowDialog::setWidget(), and updateCaption().
|
protected |
Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event.
Referenced by askOnCloseEvent(), Table::closeEvent(), Matrix::closeEvent(), closeEvent(), and MyWidget().
|
protected |
The creation date.
Referenced by birthDate(), Table::init(), Matrix::init(), Matrix::setBirthDate(), Table::setBirthDate(), and setBirthDate().
|
protected |
The caption policy.
Referenced by captionPolicy(), MyWidget(), Matrix::setCaptionPolicy(), Table::setCaptionPolicy(), setCaptionPolicy(), and updateCaption().
|
protected |
Pointer to the parent folder of the window.
Referenced by folder(), and setFolder().
|
protected |
Title bar of this MDI window if it currently belongs to a QWorkspace, NULL else.
Referenced by changeEvent(), MultiLayer::eventFilter(), eventFilter(), and MyWidget().
|
protected |
The window label.
Referenced by MyWidget(), setWindowLabel(), and windowLabel().
|
protected |
The window status.
Referenced by aspect(), changeEvent(), MyWidget(), setHidden(), setMaximized(), setMinimized(), setNormal(), setStatus(), and status().