Cppcheck
Public Member Functions | Private Attributes
Project Class Reference

A class that contains project data and manages projects. More...

#include <project.h>

List of all members.

Public Member Functions

 Project (QWidget *parent=0)
 Project (const QString &filename, QWidget *parent=0)
 ~Project ()
QString Filename () const
 Return the filename of the project.
void SetFilename (const QString &filename)
 Set filename for the project file.
bool IsOpen () const
 Is the project open? The project is considered to be open if it has an opened project file.
bool Open ()
 Open existing project file.
bool Edit ()
 Edit the project file.
void Create ()
 Create new project file.
ProjectFileGetProjectFile () const
 Return current project file.

Private Attributes

QString mFilename
ProjectFilemPFile
QWidget * mParentWidget

Detailed Description

A class that contains project data and manages projects.

Currently only project file creation and editing is implemented.

Definition at line 35 of file project.h.


Constructor & Destructor Documentation

Project::Project ( QWidget *  parent = 0)

Definition at line 30 of file project.cpp.

Project::Project ( const QString &  filename,
QWidget *  parent = 0 
)

Definition at line 37 of file project.cpp.

Definition at line 45 of file project.cpp.

References mPFile.


Member Function Documentation

void Project::Create ( )

Create new project file.

Definition at line 126 of file project.cpp.

References mFilename, and mPFile.

Referenced by MainWindow::NewProjectFile().

bool Project::Edit ( )
QString Project::Filename ( ) const

Return the filename of the project.

Returns:
Project's filename.

Definition at line 50 of file project.cpp.

References mFilename.

Referenced by MainWindow::CheckProject().

ProjectFile* Project::GetProjectFile ( ) const [inline]

Return current project file.

Returns:
project file.

Definition at line 82 of file project.h.

References mPFile.

Referenced by MainWindow::CheckProject(), MainWindow::DoCheckFiles(), MainWindow::GetCppcheckSettings(), MainWindow::ReCheck(), and StatsDialog::setProject().

bool Project::IsOpen ( ) const

Is the project open? The project is considered to be open if it has an opened project file.

Returns:
true if the project is open, false otherwise.

Definition at line 60 of file project.cpp.

References mPFile.

Referenced by MainWindow::CheckProject().

bool Project::Open ( )

Open existing project file.

Definition at line 65 of file project.cpp.

References mFilename, mParentWidget, mPFile, ProjectFile::Read(), and ProjectFile::SetFilename().

Referenced by MainWindow::CheckProject().

void Project::SetFilename ( const QString &  filename)

Set filename for the project file.

Parameters:
filenameFilename.

Definition at line 55 of file project.cpp.

References mFilename.


Member Data Documentation

QString Project::mFilename [private]

Definition at line 88 of file project.h.

Referenced by Create(), Edit(), Filename(), Open(), and SetFilename().

QWidget* Project::mParentWidget [private]

Definition at line 90 of file project.h.

Referenced by Edit(), and Open().

Definition at line 89 of file project.h.

Referenced by Create(), Edit(), GetProjectFile(), IsOpen(), Open(), and ~Project().


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