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

kdgantt2

  • KDGantt
  • Constraint
Classes | Public Types | Public Member Functions | List of all members
KDGantt::Constraint Class Reference

#include <kdganttconstraint.h>

Classes

class  Private
 

Public Types

enum  ConstraintDataRole { ValidConstraintPen = Qt::UserRole, InvalidConstraintPen }
 
enum  Type { TypeSoft = 0, TypeHard = 1 }
 

Public Member Functions

 Constraint (const QModelIndex &idx1, const QModelIndex &idx2, Type type=TypeSoft)
 
 Constraint (const Constraint &other)
 
 ~Constraint ()
 
QVariant data (int role) const
 
QDebug debug (QDebug dbg) const
 
QModelIndex endIndex () const
 
uint hash () const
 
bool operator!= (const Constraint &other) const
 
Constraint & operator= (const Constraint &other)
 
bool operator== (const Constraint &other) const
 
void setData (int role, const QVariant &value)
 
QModelIndex startIndex () const
 
Type type () const
 

Detailed Description

A class used to represent a dependency.

Instances of this class represent a dependency between the data items pointed to by a start-QModelIndex and an end-QModelIndex.

Definition at line 38 of file kdganttconstraint.h.

Member Enumeration Documentation

enum KDGantt::Constraint::ConstraintDataRole

Data roles used when specifying the pen to draw constraints with.

See also
setData
Enumerator
ValidConstraintPen 
InvalidConstraintPen 

Definition at line 47 of file kdganttconstraint.h.

enum KDGantt::Constraint::Type

This enum is unused for now.

Enumerator
TypeSoft 
TypeHard 

Definition at line 41 of file kdganttconstraint.h.

Constructor & Destructor Documentation

Constraint::Constraint ( const QModelIndex &  idx1,
const QModelIndex &  idx2,
Type  type = TypeSoft 
)

Constructor. Creates a dependency for idx2 on idx1.

Parameters
typecontrols if the constraint is a soft one that is allowed to be broken (ie, go backwards in time) or a hard constraint that will not allow the user to move an item so that the constraint would have to go backwards. The default is TypeSoft.

Actually enforcing hard constraints is the responsibility of the AbstractGrid subclass used in the view.

Definition at line 73 of file kdganttconstraint.cpp.

Constraint::Constraint ( const Constraint &  other)

Copy-Constructor.

Definition at line 83 of file kdganttconstraint.cpp.

Constraint::~Constraint ( )

Destructor

Definition at line 89 of file kdganttconstraint.cpp.

Member Function Documentation

QVariant Constraint::data ( int  role) const
Returns
The data associated with this index for the specified role.
Parameters
roleThe role to fetch the data for.
See also
ConstraintDataRole

Definition at line 122 of file kdganttconstraint.cpp.

QDebug Constraint::debug ( QDebug  dbg) const

Definition at line 159 of file kdganttconstraint.cpp.

QModelIndex Constraint::endIndex ( ) const
Returns
The constrained index

Definition at line 113 of file kdganttconstraint.cpp.

uint Constraint::hash ( ) const

Definition at line 147 of file kdganttconstraint.cpp.

bool KDGantt::Constraint::operator!= ( const Constraint &  other) const
inline

Definition at line 68 of file kdganttconstraint.h.

Constraint & Constraint::operator= ( const Constraint &  other)

Assignment operator.

Definition at line 94 of file kdganttconstraint.cpp.

bool Constraint::operator== ( const Constraint &  other) const

Compare two Constraint objects. Two Constraints are equal if the have the same start and end indexes

Definition at line 140 of file kdganttconstraint.cpp.

void Constraint::setData ( int  role,
const QVariant &  value 
)

Set data on this index for the specified role.

Parameters
roleThe role to set the data for.
valueThe data to set on the index.
See also
ConstraintDataRole

Definition at line 132 of file kdganttconstraint.cpp.

QModelIndex Constraint::startIndex ( ) const
Returns
The dependency index

Definition at line 107 of file kdganttconstraint.cpp.

Constraint::Type Constraint::type ( ) const

This is unused for now.

Definition at line 101 of file kdganttconstraint.cpp.


The documentation for this class was generated from the following files:
  • kdganttconstraint.h
  • kdganttconstraint.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