KPlato::Part Class Reference

#include <kptpart.h>

List of all members.

Public Member Functions

 Part (QWidget *parentWidget=0, QObject *parent=0, bool singleViewMode=false)
 ~Part ()
virtual void paintContent (QPainter &painter, const QRect &rect, bool transparent=FALSE, double zoomX=1.0, double zoomY=1.0)
void editProject ()
ProjectgetProject ()
const ProjectgetProject () const
virtual bool loadXML (QIODevice *, const QDomDocument &document)
virtual QDomDocument saveXML ()
bool saveOasis (KoStore *, KoXmlWriter *)
bool loadOasis (const QDomDocument &, KoOasisStyles &, const QDomDocument &, KoStore *)
void addCommand (KCommand *cmd, bool execute=true)
void setCommandType (int type)
Configconfig ()
void generateWBS ()
WBSDefinitionwbsDefinition ()
const XMLLoaderObjectxmlLoader () const

Protected Slots

void slotDocumentRestored ()
void slotCommandExecuted (KCommand *)
void slotCopyContextFromView ()
void slotViewDestroyed ()

Protected Member Functions

virtual KoView * createViewInstance (QWidget *parent)

Private Attributes

Projectm_project
MainProjectDialogm_projectDialog
QWidget * m_parentWidget
Viewm_view
GanttViewm_embeddedGanttView
Contextm_embeddedContext
bool m_embeddedContextInitialized
KCommandHistory * m_commandHistory
bool m_update
bool m_calculate
Config m_config
Contextm_context
WBSDefinition m_wbsDefinition
XMLLoaderObject m_xmlLoader


Detailed Description

Definition at line 47 of file kptpart.h.


Constructor & Destructor Documentation

KPlato::Part::Part ( QWidget *  parentWidget = 0,
QObject *  parent = 0,
bool  singleViewMode = false 
)

Definition at line 50 of file kptpart.cc.

References KPlato::Factory::global(), KPlato::Config::load(), m_calculate, m_commandHistory, m_config, m_project, m_update, KPlato::Config::setReadWrite(), slotCommandExecuted(), slotCopyContextFromView(), and slotDocumentRestored().

KPlato::Part::~Part (  ) 

Definition at line 79 of file kptpart.cc.

References m_commandHistory, m_config, m_embeddedContext, m_embeddedGanttView, m_project, m_projectDialog, and KPlato::Config::save().


Member Function Documentation

void KPlato::Part::paintContent ( QPainter &  painter,
const QRect &  rect,
bool  transparent = FALSE,
double  zoomX = 1.0,
double  zoomY = 1.0 
) [virtual]

Definition at line 254 of file kptpart.cc.

References KPlato::GanttView::clear(), KPlato::GanttView::draw(), KPlato::GanttView::drawOnPainter(), m_embeddedContext, m_embeddedGanttView, m_project, and KPlato::GanttView::setContext().

void KPlato::Part::editProject (  ) 

Edit the settings of the project

Definition at line 119 of file kptpart.cc.

References m_parentWidget, m_project, m_projectDialog, and m_view.

Project& KPlato::Part::getProject (  )  [inline]

Definition at line 66 of file kptpart.h.

References m_project.

Referenced by KPlato::AccountsPanel::buildCommand(), KPlato::CalendarAddDayCmd::CalendarAddDayCmd(), KPlato::CalendarDeleteCmd::CalendarDeleteCmd(), KPlato::CalendarModifyDayCmd::CalendarModifyDayCmd(), KPlato::CalendarModifyParentCmd::CalendarModifyParentCmd(), KPlato::CalendarModifyWeekdayCmd::CalendarModifyWeekdayCmd(), KPlato::CalendarRemoveDayCmd::CalendarRemoveDayCmd(), KPlato::View::getProject(), KPlato::ReportView::loadTemplate(), KPlato::NodeDeleteCmd::NodeDeleteCmd(), KPlato::View::slotPrintCalendarDebug(), and KPlato::View::slotPrintDebug().

const Project& KPlato::Part::getProject (  )  const [inline]

Definition at line 67 of file kptpart.h.

References m_project.

bool KPlato::Part::loadXML ( QIODevice *  ,
const QDomDocument &  document 
) [virtual]

Definition at line 134 of file kptpart.cc.

References KPlato::XMLLoaderObject::addMsg(), CURRENT_SYNTAX_VERSION, KPlato::XMLLoaderObject::Errors, KPlato::Context::load(), m_commandHistory, m_context, m_project, m_projectDialog, m_view, m_xmlLoader, KPlato::View::slotUpdate(), KPlato::XMLLoaderObject::startLoad(), and KPlato::XMLLoaderObject::stopLoad().

QDomDocument KPlato::Part::saveXML (  )  [virtual]

Definition at line 216 of file kptpart.cc.

References CURRENT_SYNTAX_VERSION, KPlato::View::getContext(), m_commandHistory, m_context, m_project, m_view, KPlato::Project::save(), and KPlato::Context::save().

bool KPlato::Part::saveOasis ( KoStore *  ,
KoXmlWriter *   
) [inline]

Definition at line 73 of file kptpart.h.

bool KPlato::Part::loadOasis ( const QDomDocument &  ,
KoOasisStyles &  ,
const QDomDocument &  ,
KoStore *   
) [inline]

Definition at line 74 of file kptpart.h.

void KPlato::Part::addCommand ( KCommand *  cmd,
bool  execute = true 
)

Definition at line 305 of file kptpart.cc.

References m_commandHistory.

Referenced by KPlato::View::projectCalculate(), KPlato::NodeItemModel::setConstraint(), KPlato::NodeItemModel::setConstraintEndTime(), KPlato::NodeItemModel::setConstraintStartTime(), KPlato::NodeItemModel::setDescription(), KPlato::NodeItemModel::setEstimateType(), KPlato::NodeItemModel::setLeader(), KPlato::NodeItemModel::setName(), KPlato::View::slotAddMilestone(), KPlato::View::slotAddRelation(), KPlato::View::slotAddSubTask(), KPlato::View::slotAddTask(), KPlato::View::slotDeleteTask(), KPlato::View::slotEditResource(), KPlato::View::slotIndentTask(), KPlato::View::slotModifyRelation(), KPlato::View::slotMoveTaskDown(), KPlato::View::slotMoveTaskUp(), KPlato::View::slotOpenNode(), KPlato::View::slotProjectAccounts(), KPlato::View::slotProjectCalendar(), KPlato::View::slotProjectEdit(), KPlato::View::slotProjectResources(), KPlato::View::slotProjectWorktime(), KPlato::View::slotRenameNode(), KPlato::View::slotTaskProgress(), and KPlato::View::slotUnindentTask().

void KPlato::Part::setCommandType ( int  type  ) 

Definition at line 346 of file kptpart.cc.

References m_calculate, and m_update.

Referenced by KPlato::NamedCommand::setCommandType().

Config& KPlato::Part::config (  )  [inline]

Definition at line 80 of file kptpart.h.

References m_config.

void KPlato::Part::generateWBS (  ) 

Definition at line 355 of file kptpart.cc.

References KPlato::Project::generateWBS(), m_project, and m_wbsDefinition.

Referenced by KPlato::View::slotGenerateWBS().

WBSDefinition& KPlato::Part::wbsDefinition (  )  [inline]

Definition at line 83 of file kptpart.h.

References m_wbsDefinition.

const XMLLoaderObject& KPlato::Part::xmlLoader (  )  const [inline]

Definition at line 85 of file kptpart.h.

References m_xmlLoader.

Referenced by KPlato::View::slotPrintTestDebug().

KoView * KPlato::Part::createViewInstance ( QWidget *  parent  )  [protected, virtual]

Definition at line 92 of file kptpart.cc.

References m_context, m_embeddedContext, m_embeddedContextInitialized, m_projectDialog, m_view, KPlato::View::setContext(), KPlato::View::setTaskActionsEnabled(), and slotViewDestroyed().

void KPlato::Part::slotDocumentRestored (  )  [protected, slot]

Definition at line 247 of file kptpart.cc.

Referenced by Part().

void KPlato::Part::slotCommandExecuted ( KCommand *   )  [protected, slot]

Definition at line 310 of file kptpart.cc.

References m_calculate, m_update, m_view, and KPlato::View::slotUpdate().

Referenced by Part().

void KPlato::Part::slotCopyContextFromView (  )  [protected, slot]

Definition at line 326 of file kptpart.cc.

References KPlato::View::getContext(), m_embeddedContext, m_embeddedContextInitialized, and m_view.

Referenced by Part().

void KPlato::Part::slotViewDestroyed (  )  [protected, slot]

Definition at line 341 of file kptpart.cc.

References m_view.

Referenced by createViewInstance().


Member Data Documentation

Project* KPlato::Part::m_project [private]

Definition at line 96 of file kptpart.h.

Referenced by editProject(), generateWBS(), getProject(), loadXML(), paintContent(), Part(), saveXML(), and ~Part().

MainProjectDialog* KPlato::Part::m_projectDialog [private]

Definition at line 97 of file kptpart.h.

Referenced by createViewInstance(), editProject(), loadXML(), and ~Part().

QWidget* KPlato::Part::m_parentWidget [private]

Definition at line 98 of file kptpart.h.

Referenced by editProject().

View* KPlato::Part::m_view [private]

Definition at line 99 of file kptpart.h.

Referenced by createViewInstance(), editProject(), loadXML(), saveXML(), slotCommandExecuted(), slotCopyContextFromView(), and slotViewDestroyed().

GanttView* KPlato::Part::m_embeddedGanttView [private]

Used for drawing the project when embedded into another koffice app.

See also:
paintContent()

Definition at line 105 of file kptpart.h.

Referenced by paintContent(), and ~Part().

Context* KPlato::Part::m_embeddedContext [private]

Definition at line 106 of file kptpart.h.

Referenced by createViewInstance(), paintContent(), slotCopyContextFromView(), and ~Part().

bool KPlato::Part::m_embeddedContextInitialized [private]

Definition at line 107 of file kptpart.h.

Referenced by createViewInstance(), and slotCopyContextFromView().

KCommandHistory* KPlato::Part::m_commandHistory [private]

Definition at line 109 of file kptpart.h.

Referenced by addCommand(), loadXML(), Part(), saveXML(), and ~Part().

bool KPlato::Part::m_update [private]

Definition at line 110 of file kptpart.h.

Referenced by Part(), setCommandType(), and slotCommandExecuted().

bool KPlato::Part::m_calculate [private]

Definition at line 110 of file kptpart.h.

Referenced by Part(), setCommandType(), and slotCommandExecuted().

Config KPlato::Part::m_config [private]

Definition at line 112 of file kptpart.h.

Referenced by config(), Part(), and ~Part().

Context* KPlato::Part::m_context [private]

Definition at line 113 of file kptpart.h.

Referenced by createViewInstance(), loadXML(), and saveXML().

WBSDefinition KPlato::Part::m_wbsDefinition [private]

Definition at line 115 of file kptpart.h.

Referenced by generateWBS(), and wbsDefinition().

XMLLoaderObject KPlato::Part::m_xmlLoader [private]

Definition at line 117 of file kptpart.h.

Referenced by loadXML(), and xmlLoader().


The documentation for this class was generated from the following files:
Generated on Wed Nov 22 23:21:50 2006 for KPlato by  doxygen 1.5.1-p1