SciDAVis
1.D4
|
Represents a SciDAVis project. More...
#include <Project.h>
Classes | |
class | Private |
Public Types | |
enum | MdiWindowVisibility { folderOnly, folderAndSubfolders, allMdiWindows } |
MDI subwindow visibility setting. More... |
Public Member Functions | |
virtual QMenu * | createFolderContextMenu (const future::Folder *folder) const |
QString | fileName () const |
MdiWindowVisibility | mdiWindowVisibility () const |
Project () | |
AbstractScriptingEngine * | scriptingEngine () const |
void | setFileName (const QString &file_name) |
void | setMdiWindowVisibility (MdiWindowVisibility visibility) |
~Project () | |
Reimplemented from AbstractAspect | |
virtual const Project * | project () const |
Return the Project this Aspect belongs to, or 0 if it is currently not part of one. | |
virtual Project * | project () |
Return the Project this Aspect belongs to, or 0 if it is currently not part of one. | |
virtual QUndoStack * | undoStack () const |
Return the undo stack of the Project, or 0 if this Aspect is not part of a Project. | |
virtual QString | path () const |
Return the path that leads from the top-most Aspect (usually a Project) to me. | |
virtual ProjectWindow * | view () |
virtual QMenu * | createContextMenu () const |
Return a new context menu. | |
serialize/deserialize | |
virtual void | save (QXmlStreamWriter *) const |
Save as XML. | |
virtual bool | load (XmlStreamReader *) |
Load from XML. | |
Public Member Functions inherited from future::Folder | |
Folder (const QString &name) | |
virtual QIcon | icon () const |
Return an icon to be used for decorating my views. | |
virtual | ~Folder () |
Public Member Functions inherited from AbstractAspect | |
AbstractAspect (const QString &name) | |
void | addChild (AbstractAspect *child) |
Add the given Aspect to my list of children. | |
QString | caption () const |
QString | captionSpec () const |
Return the specification string used for constructing the caption(). | |
AbstractAspect * | child (int index) const |
Get a child by its position in my list of children. | |
int | childCount () const |
Return the number of child Aspects. | |
QString | comment () const |
QDateTime | creationTime () const |
QList< AbstractAspect * > | descendantsThatInherit (const char *class_name) |
Get all descendents that inherit the given class. | |
future::Folder * | folder () |
Return the folder the Aspect is contained in or 0 if not. | |
void | importV0x0001XXCreationTime (const QString &str) |
int | index () const |
Return my position in my parent's list of children. | |
int | indexOfChild (const AbstractAspect *child) const |
Return the position of child in my list of children. | |
void | insertChild (AbstractAspect *child, int index) |
Insert the given Aspect at a specific position in my list of children. | |
bool | isDescendantOf (AbstractAspect *other) |
Return whether the there is a path upwards to the given aspect. | |
void | moveChild (int from, int to) |
Change the positon of a child in my list of children. | |
QString | name () const |
AbstractAspect * | parentAspect () const |
Return my parent Aspect or 0 if I currently don't have one. | |
virtual void | removeAllChildAspects () |
Remove all child aspects. | |
void | removeChild (AbstractAspect *child, bool detach=false) |
Remove the given Aspect from my list of children. | |
void | removeChild (int index) |
Remove the Aspect at the given index from my list of children. | |
void | reparentChild (AbstractAspect *new_parent, AbstractAspect *child, int d_new_index) |
Move a child to another aspect and transfer ownership. | |
void | reparentChild (AbstractAspect *new_parent, AbstractAspect *child) |
Move a child to another aspect and transfer ownership. | |
virtual | ~AbstractAspect () |
void | exec (QUndoCommand *command) |
Execute the given command, pushing it on the undoStack() if available. | |
void | beginMacro (const QString &text) |
Begin an undo stack macro (series of commands) | |
void | endMacro () |
End the undo stack macro. |
Static Public Member Functions | |
static QString | configPageLabel () |
static ConfigPageWidget * | makeConfigPage () |
Private Attributes | |
Private * | d |
Friends | |
class | ProjectConfigPage |
Additional Inherited Members | |
bool | readChildAspectElement (XmlStreamReader *reader) |
Read child aspect from XML. | |
Protected Member Functions inherited from AbstractAspect | |
virtual void | completeAspectInsertion (AbstractAspect *aspect, int index) |
Called after a new child has been inserted or added. | |
void | info (const QString &text) |
Implementations should call this whenever status information should be given to the user. | |
virtual void | prepareAspectRemoval (AbstractAspect *aspect) |
Called before a child is removed. | |
void | setCreationTime (const QDateTime &time) |
Set the creation time. | |
bool | readBasicAttributes (XmlStreamReader *reader) |
Load name, creation time and caption spec from XML. | |
void | writeBasicAttributes (QXmlStreamWriter *writer) const |
Save name, creation time and caption spec to XML. | |
void | writeCommentElement (QXmlStreamWriter *writer) const |
Save the comment to XML. | |
bool | readCommentElement (XmlStreamReader *reader) |
Load comment from an XML element. |
Represents a SciDAVis project.
Project manages an undo stack and is responsible for creating ProjectWindow instances as views on itself.
Project::Project | ( | ) |
References d, and Project::Private::scripting_engine.
Project::~Project | ( | ) |
References d.
|
static |
|
virtual |
Return a new context menu.
The caller takes ownership of the menu.
Reimplemented from future::Folder.
References view().
|
virtual |
References view().
Referenced by future::Folder::createContextMenu().
QString Project::fileName | ( | ) | const |
References d, and Project::Private::file_name.
|
virtual |
Load from XML.
Reimplemented from future::Folder.
References future::Folder::load(), XmlStreamReader::raiseError(), XmlStreamReader::raiseWarning(), XmlStreamReader::readAttributeInt(), XmlStreamReader::skipToEndElement(), and XmlStreamReader::skipToNextTag().
|
static |
References ProjectConfigPage.
Project::MdiWindowVisibility Project::mdiWindowVisibility | ( | ) | const |
References d, and Project::Private::mdi_window_visibility.
|
inlinevirtual |
Return the path that leads from the top-most Aspect (usually a Project) to me.
Reimplemented from AbstractAspect.
|
inlinevirtual |
Return the Project this Aspect belongs to, or 0 if it is currently not part of one.
Reimplemented from AbstractAspect.
|
inlinevirtual |
Return the Project this Aspect belongs to, or 0 if it is currently not part of one.
Reimplemented from AbstractAspect.
|
virtual |
AbstractScriptingEngine * Project::scriptingEngine | ( | ) | const |
References d, and Project::Private::scripting_engine.
void Project::setFileName | ( | const QString & | file_name | ) |
References d, and Project::Private::file_name.
void Project::setMdiWindowVisibility | ( | MdiWindowVisibility | visibility | ) |
References d, Project::Private::mdi_window_visibility, and view().
|
virtual |
Return the undo stack of the Project, or 0 if this Aspect is not part of a Project.
It's also possible to construct undo-enabled Aspect trees without Project. The only requirement is that the root Aspect reimplements undoStack() to get the undo stack from somewhere (the default implementation just delegates to parentAspect()).
Reimplemented from AbstractAspect.
References d, and Project::Private::undo_stack.
Referenced by ApplicationWindow::init(), ApplicationWindow::readSettings(), ApplicationWindow::redo(), ApplicationWindow::savedProject(), ApplicationWindow::showHistory(), and ApplicationWindow::undo().
|
virtual |
References d, and Project::Private::primary_view.
Referenced by createContextMenu(), createFolderContextMenu(), and setMdiWindowVisibility().
|
friend |
Referenced by makeConfigPage().
|
private |
Referenced by fileName(), mdiWindowVisibility(), Project(), scriptingEngine(), setFileName(), setMdiWindowVisibility(), undoStack(), view(), and ~Project().