Rosetta
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Friends | List of all members
ui::task::Project Class Referencefinal

#include <project.h>

Inheritance diagram for ui::task::Project:
Inheritance graph
[legend]

Public Member Functions

 Project ()
 
void add_task (TaskSP const &task)
 Add new Task. More...
 
bool erase (TaskSP const &task)
 
void assign_ownership (TaskSP const &t)
 
TaskSP task (int index)
 
bool operator== (Project const &r) const
 
bool operator!= (Project const &r) const
 
QString file_name () const
 
void file_name (QString const &file_name)
 
std::vector< TaskSP > const & tasks () const
 
ProjectTasksModelmodel ()
 

Private Slots

void changed ()
 
void tasks_changed ()
 

Private Member Functions

void assign_ownership ()
 assign ownership of all tasks (needed for serialization) More...
 

Private Attributes

std::vector< TaskSPtasks_
 
ProjectTasksModel task_model_
 
QString file_name_
 

Friends

QDataStream & operator<< (QDataStream &, Project const &)
 
QDataStream & operator>> (QDataStream &, Project &)
 

Detailed Description

Project is intended to hold all data relevant for current user session. In general saving and later restoring project should allow user to return to exactly the same configuration of tools (and possibly windows).

Note that this is not current configuration of windows (but it can store that as well) instead it should be seen as a bag for all relevant user data that was used/created during current session.

Constructor & Destructor Documentation

◆ Project()

ui::task::Project::Project ( )
explicit

Member Function Documentation

◆ add_task()

void ui::task::Project::add_task ( TaskSP const &  task)

◆ assign_ownership() [1/2]

void ui::task::Project::assign_ownership ( )
private

assign ownership of all tasks (needed for serialization)

Referenced by add_task().

◆ assign_ownership() [2/2]

void ui::task::Project::assign_ownership ( TaskSP const &  t)

◆ changed

void ui::task::Project::changed ( )
privateslot

Referenced by erase().

◆ erase()

bool ui::task::Project::erase ( TaskSP const &  task)

◆ file_name() [1/2]

QString ui::task::Project::file_name ( ) const
inline

References file_name_.

◆ file_name() [2/2]

void ui::task::Project::file_name ( QString const &  file_name)
inline

References file_name(), and file_name_.

Referenced by file_name().

◆ model()

ProjectTasksModel* ui::task::Project::model ( )
inline

◆ operator!=()

bool ui::task::Project::operator!= ( Project const &  r) const
inline

References create_a3b_hbs::r.

◆ operator==()

bool ui::task::Project::operator== ( Project const &  r) const

References tasks_.

◆ task()

TaskSP ui::task::Project::task ( int  index)

References tasks_.

Referenced by add_task(), assign_ownership(), and erase().

◆ tasks()

std::vector<TaskSP> const& ui::task::Project::tasks ( ) const
inline

◆ tasks_changed

void ui::task::Project::tasks_changed ( )
privateslot

Friends And Related Function Documentation

◆ operator<<

QDataStream& operator<< ( QDataStream &  out,
Project const &  p 
)
friend

◆ operator>>

QDataStream& operator>> ( QDataStream &  in,
Project p 
)
friend

Member Data Documentation

◆ file_name_

QString ui::task::Project::file_name_
private

Referenced by file_name().

◆ task_model_

ProjectTasksModel ui::task::Project::task_model_
private

Referenced by add_task(), model(), and tasks_changed().

◆ tasks_

std::vector<TaskSP> ui::task::Project::tasks_
private

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