• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kdgantt2

  • KDGantt
  • View
Classes | Public Slots | Public Member Functions | Protected Member Functions | List of all members
KDGantt::View Class Reference

#include <KDGanttView>

Inheritance diagram for KDGantt::View:
Inheritance graph
[legend]

Classes

class  Private
 

Public Slots

void setConstraintModel (ConstraintModel *)
 
void setGrid (AbstractGrid *)
 
void setItemDelegate (ItemDelegate *)
 
void setModel (QAbstractItemModel *model)
 
void setRootIndex (const QModelIndex &idx)
 
void setSelectionModel (QItemSelectionModel *smodel)
 

Public Member Functions

 View (QWidget *parent=0)
 
virtual ~View ()
 
ConstraintModel * constraintModel () const
 
const QAbstractProxyModel * ganttProxyModel () const
 
QAbstractProxyModel * ganttProxyModel ()
 
const GraphicsView * graphicsView () const
 
GraphicsView * graphicsView ()
 
AbstractGrid * grid () const
 
QModelIndex indexAt (const QPoint &pos) const
 
ItemDelegate * itemDelegate () const
 
const QAbstractItemView * leftView () const
 
QAbstractItemView * leftView ()
 
QAbstractItemModel * model () const
 
void print (QPrinter *printer, bool drawRowLabels=true)
 
void print (QPrinter *printer, qreal start, qreal end, bool drawRowLabels=true)
 
void print (QPainter *painter, const QRectF &target=QRectF(), bool drawRowLabels=true)
 
void print (QPainter *painter, qreal start, qreal end, const QRectF &target=QRectF(), bool drawRowLabels=true)
 
QModelIndex rootIndex () const
 
AbstractRowController * rowController ()
 
const AbstractRowController * rowController () const
 
QItemSelectionModel * selectionModel () const
 
void setLeftView (QAbstractItemView *)
 
void setRowController (AbstractRowController *)
 
const QSplitter * splitter () const
 
QSplitter * splitter ()
 

Protected Member Functions

void resizeEvent (QResizeEvent *)
 

Detailed Description

This widget that consists of a QTreeView and a GraphicsView.

This is the easy to use, complete gantt chart widget. It consists of a QTreeView on the left and a KDGantt::GraphicsView on the right separated by a QSplitter. The two views share the same model.

Definition at line 47 of file kdganttview.h.

Constructor & Destructor Documentation

View::View ( QWidget *  parent = 0)
explicit

Constructor. Creates a View with parent parent, a DateTimeGrid as default grid implementaion and no model etc.

Definition at line 216 of file kdganttview.cpp.

View::~View ( )
virtual

Definition at line 226 of file kdganttview.cpp.

Member Function Documentation

ConstraintModel * View::constraintModel ( ) const
Returns
the KDGantt::ConstraintModel displayed by this view.

Definition at line 441 of file kdganttview.cpp.

const QAbstractProxyModel * View::ganttProxyModel ( ) const

Definition at line 446 of file kdganttview.cpp.

QAbstractProxyModel * View::ganttProxyModel ( )

Definition at line 451 of file kdganttview.cpp.

const GraphicsView * KDGantt::View::graphicsView ( ) const
Returns
a pointer to the GraphicsView

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 316 of file kdganttview.cpp.

GraphicsView * View::graphicsView ( )

Definition at line 324 of file kdganttview.cpp.

AbstractGrid * View::grid ( ) const
Returns
the AbstractGrid used by this view.

Definition at line 393 of file kdganttview.cpp.

QModelIndex View::indexAt ( const QPoint &  pos) const
Returns
The QModelIndex for the item located at position pos in the view or an invalid index if no item was present at that position.
See also
GraphicsView::indexAt

Definition at line 467 of file kdganttview.cpp.

ItemDelegate * View::itemDelegate ( ) const
Returns
the ItemDelegate used by this view to render items

Definition at line 416 of file kdganttview.cpp.

const QAbstractItemView * KDGantt::View::leftView ( ) const
Returns
a pointer to the QAbstractItemView in the left part of the widget.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 300 of file kdganttview.cpp.

QAbstractItemView * View::leftView ( )

Definition at line 308 of file kdganttview.cpp.

QAbstractItemModel * View::model ( ) const
Returns
the current model displayed by this view

Definition at line 348 of file kdganttview.cpp.

void View::print ( QPrinter *  printer,
bool  drawRowLabels = true 
)

Print the Gantt chart using printer. If drawRowLabels is true (the default), each row will have it's label printed on the left side.

This version of print() will print multiple pages.

Definition at line 478 of file kdganttview.cpp.

void View::print ( QPrinter *  printer,
qreal  start,
qreal  end,
bool  drawRowLabels = true 
)

Print part of the Gantt chart from start to end using printer. If drawRowLabels is true (the default), each row will have it's label printed on the left side.

This version of print() will print multiple pages.

To print a certain range of a chart with a DateTimeGrid, use qreal DateTimeGrid::mapFromDateTime( const QDateTime& dt) const to figure out the values for start and end.

Definition at line 493 of file kdganttview.cpp.

void View::print ( QPainter *  painter,
const QRectF &  target = QRectF(),
bool  drawRowLabels = true 
)

Render the GanttView inside the rectangle target using the painter painter. If drawRowLabels is true (the default), each row will have it's label printed on the left side.

Definition at line 502 of file kdganttview.cpp.

void View::print ( QPainter *  painter,
qreal  start,
qreal  end,
const QRectF &  target = QRectF(),
bool  drawRowLabels = true 
)

Render the GanttView inside the rectangle target using the painter painter. If drawRowLabels is true (the default), each row will have it's label printed on the left side.

To print a certain range of a chart with a DateTimeGrid, use qreal DateTimeGrid::mapFromDateTime( const QDateTime& dt) const to figure out the values for start and end.

Definition at line 517 of file kdganttview.cpp.

void View::resizeEvent ( QResizeEvent *  ev)
protected

Definition at line 456 of file kdganttview.cpp.

QModelIndex View::rootIndex ( ) const
Returns
the rootindex for this view.

Definition at line 400 of file kdganttview.cpp.

AbstractRowController * KDGantt::View::rowController ( )
Returns
a pointer to the current rowcontroller.
See also
AbstractRowController

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 284 of file kdganttview.cpp.

const AbstractRowController * View::rowController ( ) const

Definition at line 291 of file kdganttview.cpp.

QItemSelectionModel * View::selectionModel ( ) const
Returns
the QItemSelectionModel used by this view

Definition at line 367 of file kdganttview.cpp.

void View::setConstraintModel ( ConstraintModel *  cm)
slot

Sets the constraintmodel displayed by this view.

See also
KDGantt::ConstraintModel.

Definition at line 433 of file kdganttview.cpp.

void View::setGrid ( AbstractGrid *  grid)
slot

Sets the AbstractGrid for this view. The grid is an object that controls how QModelIndexes are mapped to and from the view and how the background and header is rendered.

See also
AbstractGrid and DateTimeGrid.

Definition at line 386 of file kdganttview.cpp.

void View::setItemDelegate ( ItemDelegate *  delegate)
slot

Sets the KDGantt::ItemDelegate used for rendering items on this view.

See also
ItemDelegate and QAbstractItemDelegate.

Definition at line 424 of file kdganttview.cpp.

void View::setLeftView ( QAbstractItemView *  aiv)

Replaces the left widget with a custom QAbstractItemView.

Parameters
aivThe view to be used to the left, instead of the default tree view
See also
setRowController()

Definition at line 238 of file kdganttview.cpp.

void View::setModel ( QAbstractItemModel *  model)
slot

Sets the QAbstractItemModel to be displayed in this view to model.

See also
GraphicsView::setModel

Definition at line 358 of file kdganttview.cpp.

void View::setRootIndex ( const QModelIndex &  idx)
slot

Sets the root index of the model displayed by this view. Similar to QAbstractItemView::setRootIndex, default is QModelIndex().

Definition at line 408 of file kdganttview.cpp.

void View::setRowController ( AbstractRowController *  ctrl)

Sets ctrl to be the rowcontroller used by this View. The default rowcontroller is owned by KDGantt::View and is suitable for the default treeview in the left part of the view. You probably only want to change this if you replace the treeview.

Definition at line 274 of file kdganttview.cpp.

void View::setSelectionModel ( QItemSelectionModel *  smodel)
slot

Sets the QItemSelectionModel used by this view to manage selections. Similar to QAbstractItemView::setSelectionModel

Definition at line 375 of file kdganttview.cpp.

const QSplitter * KDGantt::View::splitter ( ) const
Returns
a pointer to the QSplitter that manages the left view and graphicsView

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 332 of file kdganttview.cpp.

QSplitter * View::splitter ( )

Definition at line 340 of file kdganttview.cpp.


The documentation for this class was generated from the following files:
  • kdganttview.h
  • kdganttview.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdgantt2

Skip menu "kdgantt2"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal