#include <kptresourceview.h>
Inherits KPlato::ViewBase.
Inheritance diagram for KPlato::ResourceView:
Public Slots | |
void | setShowAppointments (bool on) |
Signals | |
void | itemDoubleClicked () |
Public Member Functions | |
ResourceView (View *view, QWidget *parent) | |
void | zoom (double zoom) |
void | draw (Project &project) |
Resource * | currentResource () |
QList< int > | listOffsets (int pageHeight) const |
void | print (KPrinter &printer) |
Node * | currentNode () const |
virtual bool | setContext (Context::Resourceview &context) |
virtual void | getContext (Context::Resourceview &context) const |
virtual QSize | sizeHint () const |
Protected Slots | |
void | resSelectionChanged () |
void | resSelectionChanged (QTreeWidgetItem *item) |
void | slotItemActivated (QTreeWidgetItem *) |
void | popupMenuRequested (QTreeWidgetItem *item, const QPoint &pos, int) |
Private Member Functions | |
void | drawResources (const Project &proj, QTreeWidgetItem *parent, ResourceGroup *group) |
void | clearResList () |
Private Attributes | |
int | m_defaultFontSize |
QSplitter * | m_splitter |
Project * | m_project |
ResourceItemPrivate * | m_selectedItem |
ResListView * | m_resListView |
QTreeWidgetItem * | m_header |
ResourceAppointmentsView * | m_appview |
Node * | m_currentNode |
QDate | m_start |
QDate | m_end |
bool | m_showAppointments |
Definition at line 80 of file kptresourceview.h.
KPlato::ResourceView::ResourceView | ( | View * | view, | |
QWidget * | parent | |||
) |
Definition at line 403 of file kptresourceview.cc.
References KPlato::ViewBase::draw(), KPlato::View::getProject(), m_appview, m_resListView, m_showAppointments, m_splitter, popupMenuRequested(), resSelectionChanged(), and slotItemActivated().
void KPlato::ResourceView::zoom | ( | double | zoom | ) |
Definition at line 463 of file kptresourceview.cc.
void KPlato::ResourceView::draw | ( | Project & | project | ) | [virtual] |
Reimplemented from KPlato::ViewBase.
Definition at line 473 of file kptresourceview.cc.
References KPlato::ResourceAppointmentsView::clear(), drawResources(), m_appview, m_resListView, m_selectedItem, KPlato::ResourceGroup::name(), KPlato::Project::resourceGroups(), and resSelectionChanged().
Referenced by KPlato::View::updateView().
Resource * KPlato::ResourceView::currentResource | ( | ) |
Definition at line 466 of file kptresourceview.cc.
References m_selectedItem, and KPlato::ResourceItemPrivate::resource.
Referenced by KPlato::View::slotEditResource().
QList< int > KPlato::ResourceView::listOffsets | ( | int | pageHeight | ) | const |
Definition at line 601 of file kptresourceview.cc.
References KPlato::ResListView::calculateY(), KPlato::ResListView::headerHeight(), and m_resListView.
Referenced by print().
void KPlato::ResourceView::print | ( | KPrinter & | printer | ) |
Definition at line 620 of file kptresourceview.cc.
References KPlato::ResListView::headerHeight(), listOffsets(), m_resListView, and KPlato::ResListView::paintToPrinter().
Referenced by KPlato::View::print().
Node* KPlato::ResourceView::currentNode | ( | ) | const [inline] |
Definition at line 98 of file kptresourceview.h.
References m_currentNode.
Referenced by KPlato::View::currentTask().
bool KPlato::ResourceView::setContext | ( | Context::Resourceview & | context | ) | [virtual] |
void KPlato::ResourceView::getContext | ( | Context::Resourceview & | context | ) | const [virtual] |
QSize KPlato::ResourceView::sizeHint | ( | ) | const [virtual] |
Definition at line 396 of file kptresourceview.cc.
void KPlato::ResourceView::setShowAppointments | ( | bool | on | ) | [inline, slot] |
Definition at line 106 of file kptresourceview.h.
References m_showAppointments.
Referenced by KPlato::View::slotViewResourceAppointments().
void KPlato::ResourceView::itemDoubleClicked | ( | ) | [signal] |
Referenced by slotItemActivated().
void KPlato::ResourceView::resSelectionChanged | ( | ) | [protected, slot] |
Definition at line 552 of file kptresourceview.cc.
References m_resListView.
Referenced by draw(), popupMenuRequested(), and ResourceView().
void KPlato::ResourceView::resSelectionChanged | ( | QTreeWidgetItem * | item | ) | [protected, slot] |
Definition at line 562 of file kptresourceview.cc.
References KPlato::ResourceAppointmentsView::clear(), KPlato::ResourceAppointmentsView::draw(), KPlato::Project::endTime(), KPlato::View::getProject(), m_appview, KPlato::ViewBase::m_mainview, m_selectedItem, m_showAppointments, KPlato::ResourceItemPrivate::resource, and KPlato::Project::startTime().
void KPlato::ResourceView::slotItemActivated | ( | QTreeWidgetItem * | ) | [protected, slot] |
Definition at line 581 of file kptresourceview.cc.
References itemDoubleClicked().
Referenced by ResourceView().
void KPlato::ResourceView::popupMenuRequested | ( | QTreeWidgetItem * | item, | |
const QPoint & | pos, | |||
int | ||||
) | [protected, slot] |
Definition at line 586 of file kptresourceview.cc.
References KPlato::ViewBase::m_mainview, m_selectedItem, KPlato::View::popupMenu(), and resSelectionChanged().
Referenced by ResourceView().
void KPlato::ResourceView::drawResources | ( | const Project & | proj, | |
QTreeWidgetItem * | parent, | |||
ResourceGroup * | group | |||
) | [private] |
Definition at line 494 of file kptresourceview.cc.
References KPlato::Node::constraint(), m_selectedItem, KPlato::Node::mustFinishOn(), KPlato::Node::MustFinishOn, KPlato::Node::mustStartOn(), KPlato::ResourceGroup::resources(), KPlato::Resource::Type_Material, and KPlato::Resource::Type_Work.
Referenced by draw().
void KPlato::ResourceView::clearResList | ( | ) | [private] |
int KPlato::ResourceView::m_defaultFontSize [private] |
Definition at line 122 of file kptresourceview.h.
QSplitter* KPlato::ResourceView::m_splitter [private] |
Project* KPlato::ResourceView::m_project [private] |
Definition at line 125 of file kptresourceview.h.
Definition at line 126 of file kptresourceview.h.
Referenced by currentResource(), draw(), drawResources(), popupMenuRequested(), and resSelectionChanged().
ResListView* KPlato::ResourceView::m_resListView [private] |
Definition at line 127 of file kptresourceview.h.
Referenced by draw(), listOffsets(), print(), ResourceView(), and resSelectionChanged().
QTreeWidgetItem* KPlato::ResourceView::m_header [private] |
Definition at line 128 of file kptresourceview.h.
Definition at line 129 of file kptresourceview.h.
Referenced by draw(), ResourceView(), and resSelectionChanged().
Node* KPlato::ResourceView::m_currentNode [private] |
QDate KPlato::ResourceView::m_start [private] |
Definition at line 131 of file kptresourceview.h.
QDate KPlato::ResourceView::m_end [private] |
Definition at line 132 of file kptresourceview.h.
bool KPlato::ResourceView::m_showAppointments [private] |
Definition at line 134 of file kptresourceview.h.
Referenced by ResourceView(), resSelectionChanged(), and setShowAppointments().