FolderTreeModel Class Reference

#include <foldertreemodel.h>

Collaboration diagram for FolderTreeModel:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FolderTreeModel (cool::IDatabasePtr dbPtr, const QString connectionString, QObject *parent=0)
 ~FolderTreeModel ()
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
QVariant headerData (int section=0, Qt::Orientation orientation=Qt::Horizontal, int role=Qt::DisplayRole) const
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
QModelIndex index (const QString &fullFolderName) const
QModelIndex parent (const QModelIndex &index) const
int rowCount (const QModelIndex &parent=QModelIndex()) const
int columnCount (const QModelIndex &parent=QModelIndex()) const
Qt::ItemFlags flags (const QModelIndex &index) const
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
void emitDataChanged (const QModelIndex &index, const bool changed)
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
bool removeRows (int row, int count=1, const QModelIndex &parent=QModelIndex())
bool insertRows (int row, int count=1, const QModelIndex &parent=QModelIndex())
QString folderName (const QModelIndex &index) const
cool::IDatabasePtr getCoolDBPtr () const
bool isModified () const
QSet< QModelIndex > getModifiedFolders () const

Public Attributes

QString coolConnectionString

Private Member Functions

void setupFolderTreeModelData (std::vector< std::string > &nodeList)
void setModifiedFolders (const QModelIndex &index, const bool modified)

Private Attributes

FolderTreeItemrootTreeItem
cool::IDatabasePtr coolDBPtr
Qt::GlobalColor modifiedColour
QSet< QModelIndex > modifiedFolders


Detailed Description

Definition at line 17 of file foldertreemodel.h.


Constructor & Destructor Documentation

FolderTreeModel::FolderTreeModel ( cool::IDatabasePtr  dbPtr,
const QString  connectionString,
QObject *  parent = 0 
)

Definition at line 13 of file foldertreemodel.cpp.

References coolDBPtr, modifiedColour, and setupFolderTreeModelData().

Here is the call graph for this function:

FolderTreeModel::~FolderTreeModel (  ) 

Definition at line 26 of file foldertreemodel.cpp.

References rootTreeItem.


Member Function Documentation

QVariant FolderTreeModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

Definition at line 39 of file foldertreemodel.cpp.

References FolderTreeItem::data(), modifiedColour, and modifiedFolders.

Referenced by folderName().

Here is the call graph for this function:

QVariant FolderTreeModel::headerData ( int  section = 0,
Qt::Orientation  orientation = Qt::Horizontal,
int  role = Qt::DisplayRole 
) const

Definition at line 116 of file foldertreemodel.cpp.

References FolderTreeItem::data(), and rootTreeItem.

Here is the call graph for this function:

QModelIndex FolderTreeModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const

Definition at line 124 of file foldertreemodel.cpp.

References FolderTreeItem::child(), and rootTreeItem.

Here is the call graph for this function:

QModelIndex FolderTreeModel::index ( const QString &  fullFolderName  )  const

Definition at line 143 of file foldertreemodel.cpp.

References FolderTreeItem::child(), FolderTreeItem::data(), FolderTreeItem::parent(), FolderTreeItem::pos(), and rootTreeItem.

Here is the call graph for this function:

QModelIndex FolderTreeModel::parent ( const QModelIndex &  index  )  const

Definition at line 163 of file foldertreemodel.cpp.

References FolderTreeItem::parent(), rootTreeItem, and FolderTreeItem::row().

Referenced by folderName().

Here is the call graph for this function:

int FolderTreeModel::rowCount ( const QModelIndex &  parent = QModelIndex()  )  const

Definition at line 177 of file foldertreemodel.cpp.

References FolderTreeItem::childCount(), and rootTreeItem.

Here is the call graph for this function:

int FolderTreeModel::columnCount ( const QModelIndex &  parent = QModelIndex()  )  const

Definition at line 31 of file foldertreemodel.cpp.

References FolderTreeItem::columnCount(), and rootTreeItem.

Here is the call graph for this function:

Qt::ItemFlags FolderTreeModel::flags ( const QModelIndex &  index  )  const

Definition at line 108 of file foldertreemodel.cpp.

bool FolderTreeModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

Definition at line 228 of file foldertreemodel.cpp.

References FolderTreeItem::setData().

Here is the call graph for this function:

void FolderTreeModel::emitDataChanged ( const QModelIndex &  index,
const bool  changed 
)

Definition at line 240 of file foldertreemodel.cpp.

References setModifiedFolders().

Referenced by MainWindow::slotTableModified().

Here is the call graph for this function:

bool FolderTreeModel::setHeaderData ( int  section,
Qt::Orientation  orientation,
const QVariant &  value,
int  role = Qt::EditRole 
)

Definition at line 246 of file foldertreemodel.cpp.

bool FolderTreeModel::removeRows ( int  row,
int  count = 1,
const QModelIndex &  parent = QModelIndex() 
)

Definition at line 255 of file foldertreemodel.cpp.

References FolderTreeItem::child(), FolderTreeItem::removeChildAt(), and rootTreeItem.

Here is the call graph for this function:

bool FolderTreeModel::insertRows ( int  row,
int  count = 1,
const QModelIndex &  parent = QModelIndex() 
)

Definition at line 278 of file foldertreemodel.cpp.

References FolderTreeItem::data(), FolderTreeItem::insertChild(), and rootTreeItem.

Here is the call graph for this function:

QString FolderTreeModel::folderName ( const QModelIndex &  index  )  const

Definition at line 68 of file foldertreemodel.cpp.

References data(), and parent().

Referenced by MainWindow::slotCreateFolderTable().

Here is the call graph for this function:

cool::IDatabasePtr FolderTreeModel::getCoolDBPtr (  )  const

Definition at line 81 of file foldertreemodel.cpp.

References coolDBPtr.

Referenced by MainWindow::slotCreateFolderTable().

bool FolderTreeModel::isModified (  )  const

Definition at line 86 of file foldertreemodel.cpp.

References modifiedFolders.

QSet< QModelIndex > FolderTreeModel::getModifiedFolders (  )  const

Definition at line 91 of file foldertreemodel.cpp.

References modifiedFolders.

void FolderTreeModel::setupFolderTreeModelData ( std::vector< std::string > &  nodeList  )  [private]

Definition at line 191 of file foldertreemodel.cpp.

References FolderTreeItem::appendChild(), FolderTreeItem::child(), FolderTreeItem::pos(), and rootTreeItem.

Referenced by FolderTreeModel().

Here is the call graph for this function:

void FolderTreeModel::setModifiedFolders ( const QModelIndex &  index,
const bool  modified 
) [private]

Definition at line 96 of file foldertreemodel.cpp.

References modifiedFolders.

Referenced by emitDataChanged().


Member Data Documentation

Definition at line 44 of file foldertreemodel.h.

cool::IDatabasePtr FolderTreeModel::coolDBPtr [private]

Definition at line 68 of file foldertreemodel.h.

Referenced by FolderTreeModel(), and getCoolDBPtr().

Qt::GlobalColor FolderTreeModel::modifiedColour [private]

Definition at line 69 of file foldertreemodel.h.

Referenced by data(), and FolderTreeModel().

QSet< QModelIndex > FolderTreeModel::modifiedFolders [private]

Definition at line 70 of file foldertreemodel.h.

Referenced by data(), getModifiedFolders(), isModified(), and setModifiedFolders().


Generated on Wed Oct 8 14:59:48 2008 for ACE - A COOL Editor by  doxygen 1.5.6