~valavanisalex/ubuntu/maverick/scidavis/fix-604811

« back to all changes in this revision

Viewing changes to scidavis/src/future/core/Project.h

  • Committer: Bazaar Package Importer
  • Author(s): Ruben Molina
  • Date: 2009-09-06 11:34:04 UTC
  • Revision ID: james.westby@ubuntu.com-20090906113404-4awaey82l3686w4q
Tags: upstream-0.2.3
ImportĀ upstreamĀ versionĀ 0.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
    File                 : Project.h
 
3
    Project              : SciDAVis
 
4
    Description          : Represents a SciDAVis project.
 
5
    --------------------------------------------------------------------
 
6
    Copyright            : (C) 2007 Tilman Benkert (thzs*gmx.net)
 
7
    Copyright            : (C) 2007 Knut Franke (knut.franke*gmx.de)
 
8
                           (replace * with @ in the email addresses) 
 
9
 
 
10
 ***************************************************************************/
 
11
 
 
12
/***************************************************************************
 
13
 *                                                                         *
 
14
 *  This program is free software; you can redistribute it and/or modify   *
 
15
 *  it under the terms of the GNU General Public License as published by   *
 
16
 *  the Free Software Foundation; either version 2 of the License, or      *
 
17
 *  (at your option) any later version.                                    *
 
18
 *                                                                         *
 
19
 *  This program is distributed in the hope that it will be useful,        *
 
20
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
 
21
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
 
22
 *  GNU General Public License for more details.                           *
 
23
 *                                                                         *
 
24
 *   You should have received a copy of the GNU General Public License     *
 
25
 *   along with this program; if not, write to the Free Software           *
 
26
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
 
27
 *   Boston, MA  02110-1301  USA                                           *
 
28
 *                                                                         *
 
29
 ***************************************************************************/
 
30
#ifndef PROJECT_H
 
31
#define PROJECT_H
 
32
 
 
33
#include "core/future_Folder.h"
 
34
#include "core/interfaces.h"
 
35
 
 
36
class QString;
 
37
class ProjectWindow;
 
38
class QAction;
 
39
class AbstractScriptingEngine;
 
40
 
 
41
//! Represents a SciDAVis project.
 
42
/**
 
43
 * Project manages an undo stack and is responsible for creating ProjectWindow instances
 
44
 * as views on itself.
 
45
 */
 
46
class Project : public future::Folder
 
47
{
 
48
        Q_OBJECT
 
49
 
 
50
        public:
 
51
                //! MDI subwindow visibility setting
 
52
                enum MdiWindowVisibility
 
53
                {
 
54
                        folderOnly,
 
55
                        folderAndSubfolders,
 
56
                        allMdiWindows
 
57
                };
 
58
 
 
59
        public:
 
60
                Project();
 
61
                ~Project();
 
62
 
 
63
                //!\name Reimplemented from AbstractAspect
 
64
                //@{
 
65
                virtual const Project *project() const { return this; }
 
66
                virtual Project *project() { return this; }
 
67
                virtual QUndoStack *undoStack() const;
 
68
                virtual QString path() const { return ""; }
 
69
#ifndef LEGACY_CODE_0_2_x
 
70
                virtual ProjectWindow *view();
 
71
#else
 
72
                virtual void *view();
 
73
#endif
 
74
                virtual QMenu *createContextMenu() const;
 
75
                //@}
 
76
                virtual QMenu *createFolderContextMenu(const future::Folder * folder) const;
 
77
 
 
78
                AbstractScriptingEngine * scriptingEngine() const;
 
79
 
 
80
                void setMdiWindowVisibility(MdiWindowVisibility visibility);
 
81
                MdiWindowVisibility mdiWindowVisibility() const;
 
82
                void setFileName(const QString & file_name);
 
83
                QString fileName() const;
 
84
        
 
85
                static ConfigPageWidget * makeConfigPage();
 
86
                static QString configPageLabel();
 
87
        
 
88
                //! \name serialize/deserialize
 
89
                //@{
 
90
                //! Save as XML
 
91
                virtual void save(QXmlStreamWriter *) const;
 
92
                //! Load from XML
 
93
                virtual bool load(XmlStreamReader *);
 
94
                //@}
 
95
 
 
96
        private:
 
97
                class Private;
 
98
                Private *d;
 
99
 
 
100
                friend class ProjectConfigPage;
 
101
};
 
102
 
 
103
#endif // ifndef PROJECT_H