QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
fileelementcollectionitem.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2026 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef FILEELEMENTCOLLECTIONITEM2_H
19#define FILEELEMENTCOLLECTIONITEM2_H
20
22#include "elementslocation.h"
23
30{
31 public:
33
34 enum { Type = UserType+2 };
35 int type() const override { return Type;}
36
37 bool setRootPath(const QString& path,
38 bool set_data = true,
39 bool hide_element = false);
40 QString fileSystemPath() const;
41 QString dirPath() const;
42
43 bool isDir() const override;
44 bool isElement() const override;
45 QString localName() override;
46 QString localName(const ElementsLocation &location);
47 QString name() const override;
48 QString collectionPath() const override;
49 bool isCollectionRoot() const override;
50 bool isCommonCollection() const;
51 bool isCompanyCollection() const;
52 bool isCustomCollection() const;
53 bool isMacrosCollection() const;
54 void addChildAtPath(const QString &collection_name) override;
55
56 void setUpData() override;
57 void setUpIcon() override;
58
59 private:
60 void setPathName(const QString& path_name,
61 bool set_data = true,
62 bool hide_element = false);
63 void populate(bool set_data = true, bool hide_element = false);
64
65 private:
66 QString m_path;
72 bool m_icon_initialized = false;
73};
74
75#endif // FILEELEMENTCOLLECTIONITEM2_H
ElementCollectionItem()
ElementCollectionItem::ElementCollectionItem Constructor.
Definition elementcollectionitem.cpp:25
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition elementslocation.h:47
@ Type
Definition fileelementcollectionitem.h:34
bool isCommonCollection() const
FileElementCollectionItem::isCommonCollection.
Definition fileelementcollectionitem.cpp:312
QString collectionPath() const override
FileElementCollectionItem::collectionPath.
Definition fileelementcollectionitem.cpp:262
bool isElement() const override
FileElementCollectionItem::isElement.
Definition fileelementcollectionitem.cpp:139
bool m_icon_initialized
Definition fileelementcollectionitem.h:72
FileElementCollectionItem()
FileElementCollectionItem::FileElementCollectionItem Constructor.
Definition fileelementcollectionitem.cpp:63
bool isCompanyCollection() const
FileElementCollectionItem::isCompanyCollection.
Definition fileelementcollectionitem.cpp:321
void setUpData() override
FileElementCollectionItem::setUpData SetUp the data of this item.
Definition fileelementcollectionitem.cpp:358
QString dirPath() const
FileElementCollectionItem::dirPath.
Definition fileelementcollectionitem.cpp:112
bool m_qet_directory_unreadable
Definition fileelementcollectionitem.h:71
void populate(bool set_data=true, bool hide_element=false)
FileElementCollectionItem::populate Create the childs of this item.
Definition fileelementcollectionitem.cpp:510
bool isMacrosCollection() const
FileElementCollectionItem::isMacrosCollection.
Definition fileelementcollectionitem.cpp:545
QString fileSystemPath() const
FileElementCollectionItem::fileSystemPath.
Definition fileelementcollectionitem.cpp:94
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....
Definition fileelementcollectionitem.cpp:493
QString name() const override
FileElementCollectionItem::name.
Definition fileelementcollectionitem.cpp:250
bool isCustomCollection() const
FileElementCollectionItem::isCustomCollection.
Definition fileelementcollectionitem.cpp:330
bool isDir() const override
FileElementCollectionItem::isDir.
Definition fileelementcollectionitem.cpp:126
void addChildAtPath(const QString &collection_name) override
FileElementCollectionItem::addChildAtPath Ask to this item item to add a child with collection name c...
Definition fileelementcollectionitem.cpp:343
int type() const override
Definition fileelementcollectionitem.h:35
QString m_path
Definition fileelementcollectionitem.h:66
bool 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 o...
Definition fileelementcollectionitem.cpp:75
void setUpIcon() override
FileElementCollectionItem::setUpIcon SetUp the icon of this item. Because icon use several memory,...
Definition fileelementcollectionitem.cpp:431
bool isCollectionRoot() const override
FileElementCollectionItem::isCollectionRoot.
Definition fileelementcollectionitem.cpp:294
QString localName() override
FileElementCollectionItem::localName.
Definition fileelementcollectionitem.cpp:148