QElectroTech
0.70
|
The FileElementCollectionItem class This class specialise ElementCollectionItem for manage a collection in a file system. They represente a directory or an element. More...
#include <fileelementcollectionitem.h>
Public Types | |
enum | { Type = UserType+2 } |
Public Types inherited from ElementCollectionItem | |
enum | { Type = UserType+1 } |
Private Member Functions | |
void | setPathName (const QString &path_name, bool set_data=true, bool hide_element=false) |
FileElementCollectionItem::setPathName Set the name of this item in the file system path. This item must have a parent, because they should be a child item of another. For create a new file collection see setRootPath. More... | |
void | populate (bool set_data=true, bool hide_element=false) |
FileElementCollectionItem::populate Create the childs of this item. More... | |
Private Attributes | |
QString | m_path |
The FileElementCollectionItem class This class specialise ElementCollectionItem for manage a collection in a file system. They represente a directory or an element.
Definition at line 28 of file fileelementcollectionitem.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 33 of file fileelementcollectionitem.h.
FileElementCollectionItem::FileElementCollectionItem | ( | ) |
FileElementCollectionItem::FileElementCollectionItem Constructor.
Definition at line 30 of file fileelementcollectionitem.cpp.
Referenced by addChildAtPath(), and populate().
|
overridevirtual |
FileElementCollectionItem::addChildAtPath Ask to this item item to add a child with collection name .
collection_name |
Implements ElementCollectionItem.
Definition at line 220 of file fileelementcollectionitem.cpp.
References FileElementCollectionItem(), ElementCollectionItem::rowForInsertItem(), setPathName(), and setUpData().
Referenced by ElementsCollectionModel::dropMimeData().
|
overridevirtual |
FileElementCollectionItem::collectionPath.
Implements ElementCollectionItem.
Definition at line 166 of file fileelementcollectionitem.cpp.
References ElementCollectionItem::collectionPath(), QETApp::commonElementsDirN(), ElementCollectionItem::isCollectionRoot(), isCollectionRoot(), m_path, Type, and type().
Referenced by ElementsCollectionWidget::editDirectory(), localName(), ElementsCollectionWidget::newDirectory(), ElementsCollectionWidget::newElement(), setUpData(), and setUpIcon().
QString FileElementCollectionItem::dirPath | ( | ) | const |
FileElementCollectionItem::dirPath.
Definition at line 73 of file fileelementcollectionitem.cpp.
References fileSystemPath(), isDir(), Type, and type().
QString FileElementCollectionItem::fileSystemPath | ( | ) | const |
FileElementCollectionItem::fileSystemPath.
Definition at line 56 of file fileelementcollectionitem.cpp.
References fileSystemPath(), isCollectionRoot(), and m_path.
Referenced by dirPath(), ElementsCollectionModel::dropMimeData(), fileSystemPath(), isCommonCollection(), isCustomCollection(), localName(), and populate().
void FileElementCollectionItem::hire | ( | ) |
|
overridevirtual |
FileElementCollectionItem::isCollectionRoot.
Implements ElementCollectionItem.
Definition at line 189 of file fileelementcollectionitem.cpp.
References QETApp::commonElementsDirN(), QETApp::customElementsDirN(), and m_path.
Referenced by collectionPath(), ElementsCollectionWidget::customContextMenu(), fileSystemPath(), localName(), name(), and setUpIcon().
bool FileElementCollectionItem::isCommonCollection | ( | ) | const |
FileElementCollectionItem::isCommonCollection.
Definition at line 201 of file fileelementcollectionitem.cpp.
References QETApp::commonElementsDirN(), and fileSystemPath().
Referenced by ElementsCollectionWidget::customContextMenu(), ElementsCollectionModel::dropMimeData(), ElementsCollectionWidget::editDirectory(), ElementsCollectionWidget::newDirectory(), and ElementsCollectionWidget::newElement().
bool FileElementCollectionItem::isCustomCollection | ( | ) | const |
FileElementCollectionItem::isCustomCollection.
Definition at line 210 of file fileelementcollectionitem.cpp.
References QETApp::customElementsDirN(), and fileSystemPath().
Referenced by ElementsCollectionModel::addLocation().
|
overridevirtual |
FileElementCollectionItem::isDir.
Implements ElementCollectionItem.
Definition at line 87 of file fileelementcollectionitem.cpp.
References m_path.
Referenced by ElementsCollectionWidget::customContextMenu(), dirPath(), isElement(), localName(), setUpData(), and setUpIcon().
|
overridevirtual |
FileElementCollectionItem::isElement.
Implements ElementCollectionItem.
Definition at line 100 of file fileelementcollectionitem.cpp.
References isDir().
Referenced by ElementsCollectionModel::dropMimeData(), and localName().
|
overridevirtual |
FileElementCollectionItem::localName.
Implements ElementCollectionItem.
Definition at line 109 of file fileelementcollectionitem.cpp.
References collectionPath(), QETApp::commonElementsDirN(), QETApp::customElementsDirN(), fileSystemPath(), isCollectionRoot(), isDir(), isElement(), m_path, ElementsLocation::name(), QET::Icons::nl, and QET::Icons::tr.
Referenced by setUpData().
|
overridevirtual |
FileElementCollectionItem::name.
Implements ElementCollectionItem.
Definition at line 154 of file fileelementcollectionitem.cpp.
References isCollectionRoot(), and m_path.
|
private |
FileElementCollectionItem::populate Create the childs of this item.
set_data | : if true, call setUpData for every child of this item |
Definition at line 308 of file fileelementcollectionitem.cpp.
References FileElementCollectionItem(), fileSystemPath(), setPathName(), and setUpData().
Referenced by setPathName(), and setRootPath().
|
private |
FileElementCollectionItem::setPathName Set the name of this item in the file system path. This item must have a parent, because they should be a child item of another. For create a new file collection see setRootPath.
path_name |
Definition at line 294 of file fileelementcollectionitem.cpp.
References m_path, and populate().
Referenced by addChildAtPath(), and populate().
bool FileElementCollectionItem::setRootPath | ( | const QString & | path, |
bool | set_data = true , |
||
bool | hide_element = false |
||
) |
FileElementCollectionItem::setRootPath Set path has root path for this file item. Use this function only to set the beginning of a file collection.
path |
Definition at line 40 of file fileelementcollectionitem.cpp.
References m_path, and populate().
Referenced by ElementsCollectionModel::addCommonCollection(), and ElementsCollectionModel::addCustomCollection().
|
overridevirtual |
FileElementCollectionItem::setUpData SetUp the data of this item.
Implements ElementCollectionItem.
Definition at line 235 of file fileelementcollectionitem.cpp.
References collectionPath(), ElementsLocation::elementInformations(), isDir(), DiagramContext::keys(), localName(), and DiagramContext::value().
Referenced by addChildAtPath(), ElementsCollectionModel::addCommonCollection(), ElementsCollectionModel::addCustomCollection(), and populate().
|
overridevirtual |
FileElementCollectionItem::setUpIcon SetUp the icon of this item. Because icon use several memory, we use this method for setup icon instead setUpData.
Implements ElementCollectionItem.
Definition at line 266 of file fileelementcollectionitem.cpp.
References collectionPath(), QETApp::commonElementsDirN(), QET::Icons::Folder, ElementsLocation::icon(), isCollectionRoot(), isDir(), and m_path.
|
inlineoverride |
Definition at line 34 of file fileelementcollectionitem.h.
References Type.
Referenced by collectionPath(), dirPath(), and ElementsCollectionModel::dropMimeData().
|
private |
Definition at line 61 of file fileelementcollectionitem.h.
Referenced by collectionPath(), fileSystemPath(), isCollectionRoot(), isDir(), localName(), name(), setPathName(), setRootPath(), and setUpIcon().