#include <foldertreemodel.h>

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 | |
| FolderTreeItem * | rootTreeItem |
| cool::IDatabasePtr | coolDBPtr |
| Qt::GlobalColor | modifiedColour |
| QSet< QModelIndex > | modifiedFolders |
Definition at line 17 of file foldertreemodel.h.
| FolderTreeModel::FolderTreeModel | ( | cool::IDatabasePtr | dbPtr, | |
| const QString | connectionString, | |||
| QObject * | parent = 0 | |||
| ) |
Definition at line 13 of file foldertreemodel.cpp.
References coolDBPtr, modifiedColour, and setupFolderTreeModelData().

| FolderTreeModel::~FolderTreeModel | ( | ) |
| 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().

| 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.

| 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.

| 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.

| 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().

| int FolderTreeModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
Definition at line 177 of file foldertreemodel.cpp.
References FolderTreeItem::childCount(), and rootTreeItem.

| int FolderTreeModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
Definition at line 31 of file foldertreemodel.cpp.
References FolderTreeItem::columnCount(), and rootTreeItem.

| 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().

| void FolderTreeModel::emitDataChanged | ( | const QModelIndex & | index, | |
| const bool | changed | |||
| ) |
Definition at line 240 of file foldertreemodel.cpp.
References setModifiedFolders().
Referenced by MainWindow::slotTableModified().

| 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.

| 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.

| QString FolderTreeModel::folderName | ( | const QModelIndex & | index | ) | const |
Definition at line 68 of file foldertreemodel.cpp.
References data(), and parent().
Referenced by MainWindow::slotCreateFolderTable().

| cool::IDatabasePtr FolderTreeModel::getCoolDBPtr | ( | ) | const |
Definition at line 81 of file foldertreemodel.cpp.
References coolDBPtr.
Referenced by MainWindow::slotCreateFolderTable().
| bool FolderTreeModel::isModified | ( | ) | const |
| QSet< QModelIndex > FolderTreeModel::getModifiedFolders | ( | ) | const |
| 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().

| void FolderTreeModel::setModifiedFolders | ( | const QModelIndex & | index, | |
| const bool | modified | |||
| ) | [private] |
Definition at line 96 of file foldertreemodel.cpp.
References modifiedFolders.
Referenced by emitDataChanged().
Definition at line 44 of file foldertreemodel.h.
FolderTreeItem* FolderTreeModel::rootTreeItem [private] |
Definition at line 67 of file foldertreemodel.h.
Referenced by columnCount(), headerData(), index(), insertRows(), parent(), removeRows(), rowCount(), setupFolderTreeModelData(), and ~FolderTreeModel().
cool::IDatabasePtr FolderTreeModel::coolDBPtr [private] |
Definition at line 68 of file foldertreemodel.h.
Referenced by FolderTreeModel(), and getCoolDBPtr().
Qt::GlobalColor FolderTreeModel::modifiedColour [private] |
QSet< QModelIndex > FolderTreeModel::modifiedFolders [private] |
Definition at line 70 of file foldertreemodel.h.
Referenced by data(), getModifiedFolders(), isModified(), and setModifiedFolders().
1.5.6