SciDAVis  1.D4
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends
Project Class Reference

Represents a SciDAVis project. More...

#include <Project.h>

Inheritance diagram for Project:
future::Folder AbstractAspect

List of all members.

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 Projectproject () const
 Return the Project this Aspect belongs to, or 0 if it is currently not part of one.
virtual Projectproject ()
 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().
AbstractAspectchild (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::Folderfolder ()
 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
AbstractAspectparentAspect () 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 ConfigPageWidgetmakeConfigPage ()

Private Attributes

Privated

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.

Detailed Description

Represents a SciDAVis project.

Project manages an undo stack and is responsible for creating ProjectWindow instances as views on itself.


Member Enumeration Documentation

MDI subwindow visibility setting.

Enumerator:
folderOnly 
folderAndSubfolders 
allMdiWindows 

Constructor & Destructor Documentation

Project::Project ( )
Project::~Project ( )

References d.


Member Function Documentation

QString Project::configPageLabel ( )
static
QMenu * Project::createContextMenu ( ) const
virtual

Return a new context menu.

The caller takes ownership of the menu.

Reimplemented from future::Folder.

References view().

QMenu * Project::createFolderContextMenu ( const future::Folder folder) const
virtual

References view().

Referenced by future::Folder::createContextMenu().

QString Project::fileName ( ) const

References d, and Project::Private::file_name.

bool Project::load ( XmlStreamReader reader)
virtual
ConfigPageWidget * Project::makeConfigPage ( )
static

References ProjectConfigPage.

Project::MdiWindowVisibility Project::mdiWindowVisibility ( ) const
virtual QString Project::path ( ) const
inlinevirtual

Return the path that leads from the top-most Aspect (usually a Project) to me.

Reimplemented from AbstractAspect.

virtual const Project* Project::project ( ) const
inlinevirtual

Return the Project this Aspect belongs to, or 0 if it is currently not part of one.

Reimplemented from AbstractAspect.

virtual Project* Project::project ( )
inlinevirtual

Return the Project this Aspect belongs to, or 0 if it is currently not part of one.

Reimplemented from AbstractAspect.

void Project::save ( QXmlStreamWriter *  writer) const
virtual

Save as XML.

Reimplemented from future::Folder.

References SciDAVis::version().

AbstractScriptingEngine * Project::scriptingEngine ( ) const
void Project::setFileName ( const QString &  file_name)

References d, and Project::Private::file_name.

void Project::setMdiWindowVisibility ( MdiWindowVisibility  visibility)
QUndoStack * Project::undoStack ( ) const
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().

ProjectWindow * Project::view ( )
virtual

Friends And Related Function Documentation

friend class ProjectConfigPage
friend

Referenced by makeConfigPage().


Member Data Documentation

Private* Project::d
private

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