ACF $AcfVersion:0$
CFileNameParamComp.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
8
9
10namespace ifile
11{
12
13
25 public CFileNameParam
26{
27public:
30
31 I_BEGIN_COMPONENT(CFileNameParamComp);
32 I_REGISTER_INTERFACE(iser::ISerializable);
33 I_REGISTER_INTERFACE(IFileNameParam);
34 I_ASSIGN(m_defaultDirAttrPtr, "DefaultPath", "Default path of file or directory", false, ".");
35 I_ASSIGN(m_pathTypeAttrPtr, "PathType", "Type of path: 0 - unknown, 1 - PT_FILE, 2 - PT_DIRECTORY, 3 - PT_URL", true, PT_UNKNOWN);
36 I_ASSIGN(m_initialPathCompPtr, "InitialPath", "If set, the current path will be initialized using specified file name component", false, "InitalPath");
37 I_END_COMPONENT;
38
39 // reimplemented (ifile::IFileNameParam)
40 virtual int GetPathType() const override;
41
42protected:
43 // reimplemented (icomp::CComponentBase)
44 virtual void OnComponentCreated() override;
45
46private:
47 I_ATTR(QString, m_defaultDirAttrPtr);
48 I_ATTR(int, m_pathTypeAttrPtr);
49 I_REF(ifile::IFileNameParam, m_initialPathCompPtr);
50
51 static QString s_tempPathVariable;
52 static QString s_appNameVariable;
53 static QString s_companyNameVariable;
54 static QString s_publicSharedPathVariable;
55 static QString s_userHomePathVariable;
56};
57
58
59} // namespace ifile
60
61
Base class for component implementation.
Basic implementation of interface ifile::IFileNameParam as component.
virtual void OnComponentCreated() override
icomp::CComponentBase BaseClass
virtual int GetPathType() const override
Get intended type of the path.
Basic implementation of interface ifile::IFileNameParam.
Common interface for any file system item name (e.g directory, file or URL path)
Common class for all classes which objects can be archived or restored from archive.
Contains interfaces and implementations of file system related components.