#include <kptpart.h>
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 () |
Project & | getProject () |
const Project & | getProject () 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) |
Config & | config () |
void | generateWBS () |
WBSDefinition & | wbsDefinition () |
const XMLLoaderObject & | xmlLoader () const |
Protected Slots | |
void | slotDocumentRestored () |
void | slotCommandExecuted (KCommand *) |
void | slotCopyContextFromView () |
void | slotViewDestroyed () |
Protected Member Functions | |
virtual KoView * | createViewInstance (QWidget *parent) |
Private Attributes | |
Project * | m_project |
MainProjectDialog * | m_projectDialog |
QWidget * | m_parentWidget |
View * | m_view |
GanttView * | m_embeddedGanttView |
Context * | m_embeddedContext |
bool | m_embeddedContextInitialized |
KCommandHistory * | m_commandHistory |
bool | m_update |
bool | m_calculate |
Config | m_config |
Context * | m_context |
WBSDefinition | m_wbsDefinition |
XMLLoaderObject | m_xmlLoader |
Definition at line 47 of file kptpart.h.
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().
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] |
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] |
bool KPlato::Part::loadOasis | ( | const QDomDocument & | , | |
KoOasisStyles & | , | |||
const QDomDocument & | , | |||
KoStore * | ||||
) | [inline] |
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] |
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] |
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] |
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] |
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] |
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.
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] |
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] |
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] |
XMLLoaderObject KPlato::Part::m_xmlLoader [private] |