CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxProfile.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2025 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
19#include "DDKERNEL.h"
20
21#include "FxString.h"
22#include "FxFavouriteFiles.h"
23
24#include "FxPragmaPush.h"
25
27class CFxSettings;
28class CFxSystemFiles;
29class CFxRecentFiles;
30class CFxPreferences;
31
38{
39public:
40 virtual ~CFxProfile() {};
41
42 virtual CFxString GetName() const = 0;
43
44 virtual CFxString GetDescription() const = 0;
45
50 virtual CFxSettings* GetSettings() = 0;
51
56 virtual CFxProfileStorage* GetStorage( bool bCreateIfNotExists ) = 0;
57
63
69
73 virtual CFxString ResolveAlias( const CFxString& strAlias ) const = 0;
74
78 virtual void LoadAliases() = 0;
79
85
89 virtual void Flush() = 0;
90
95};
96
103{
104public:
106
112 virtual void currentProfileWillChange( const CFxString& newProfile ) {};
113
119 virtual void currentProfileChanged( const CFxString& newProfile ) {};
120
126 virtual void currentProfileWillBeReset( const CFxString& currentProfile ) {};
127
132 virtual void currentProfileReset( const CFxString& currentProfile ) {};
133
141 virtual void currentProfileWillBeSaved( const CFxString& currentProfile, CFxSettings* pCurrentProfileSettings ) {};
142
145 virtual void currentProfileWillBeLoaded( const CFxString& currentProfile, CFxSettings* pCurrentProfileSettings ) {};
146
152 virtual void currentProfileSaved( const CFxString& currentProfile ) {};
153
156 virtual void currentProfileLoaded( const CFxString& currentProfile ) {};
157
163 virtual void profileWillReset( const CFxString& profileName ) {};
164
170 virtual void profileReset( const CFxString& profileName ) {};
171
180 virtual void profileWillBeSaved( const CFxString& profileName, CFxSettings* pProfileSettings ) {};
181
184 virtual void profileWillBeLoaded( const CFxString& profileName, CFxSettings* pProfileSettings ) {};
185
192 virtual void profileSaved( const CFxString& profileName ) {};
193
196 virtual void profileLoaded( const CFxString& profileName ) {};
197};
198
200
207{
208public:
216 virtual void ProfileRegistryKey( CFxString& strRegProfileKey, const CFxString& strProfileName ) = 0;
217
226 virtual int ProfileListNames( CFxProfileNameArray& nameList ) = 0;
227
243 virtual int ProfileExport( const CFxString& strProfileName, const CFxString& exportFileName ) = 0;
244
266 virtual int ProfileImport( const CFxString& strProfileName, const CFxString& importFileName, const CFxString& profileDescription, bool bImportPathInfo ) = 0;
267
279 virtual int ProfileDelete( const CFxString& strProfileName ) = 0;
280
291 virtual int ProfileReset( const CFxString& strProfileName ) = 0;
292
303 virtual int ProfileSetCurrent( const CFxString& strProfileName ) = 0;
304
306
308
309 virtual CFxProfile* ProfileGet( const CFxString& strProfileName ) = 0;
310
327 virtual int ProfileCopy( const CFxString& newProfileName, const CFxString& oldProfileName, const CFxString& newProfileDesc ) = 0;
328
343 virtual int ProfileRename( const CFxString& newProfileName, const CFxString& oldProfileName, const CFxString& newProfileDesc ) = 0;
344
352 virtual int ProfileSave( const CFxString& profileName ) = 0;
353
358
363};
364
365#define currProfile() GetFxSystemServices()->GetFxProfileManager()->ProfileGetCurrent()
366
367class QDomNode;
368
375{
376public:
377 virtual ~CFxProfileStorage() {};
378
385 virtual int CreateNode( const CFxString& pszNodePath, QDomNode*& pNode ) = 0;
386
395 virtual int GetNode( const CFxString& pszNodePath, QDomNode*& pNode ) = 0;
396
405 virtual int ReplaceNode( const CFxString& pszNodePath, QDomNode* pNode ) = 0;
406
413 virtual int DeleteNode( const CFxString& pszNodePath ) = 0;
414
421 virtual int GetStorageFile( CFxString& fileName ) = 0;
422
428 virtual int Save( void ) = 0;
429};
430
431#include "FxPragmaPop.h"
#define DDKERNEL_API
Definition DDKERNEL.h:32
OdArray< CFxString > CFxProfileNameArray
Definition FxProfile.h:199
virtual CFxFavouriteFiles * GetFavouriteFiles()=0
virtual CFxProfileStorage * GetStorage(bool bCreateIfNotExists)=0
virtual CFxSystemFiles * GetSystemFiles()=0
virtual CFxPreferences * GetPreferences()=0
virtual void LoadAliases()=0
virtual CFxString GetName() const =0
virtual CFxRecentFiles * GetRecentFiles()=0
virtual CFxSettings * GetSettings()=0
virtual ~CFxProfile()
Definition FxProfile.h:40
virtual CFxString GetDescription() const =0
virtual CFxString ResolveAlias(const CFxString &strAlias) const =0
virtual void Flush()=0
virtual int ProfileImport(const CFxString &strProfileName, const CFxString &importFileName, const CFxString &profileDescription, bool bImportPathInfo)=0
virtual int ProfileCopy(const CFxString &newProfileName, const CFxString &oldProfileName, const CFxString &newProfileDesc)=0
virtual CFxProfile * ProfileGet(const CFxString &strProfileName)=0
virtual int ProfileSave(const CFxString &profileName)=0
virtual CFxProfile * ProfileGetCurrent()=0
virtual void removeReactor(CFxProfileManagerReactor *)=0
virtual int ProfileDelete(const CFxString &strProfileName)=0
virtual CFxProfile * ProfileGetFixed()=0
virtual int ProfileRename(const CFxString &newProfileName, const CFxString &oldProfileName, const CFxString &newProfileDesc)=0
virtual int ProfileExport(const CFxString &strProfileName, const CFxString &exportFileName)=0
virtual int ProfileReset(const CFxString &strProfileName)=0
virtual int ProfileSetCurrent(const CFxString &strProfileName)=0
virtual int ProfileListNames(CFxProfileNameArray &nameList)=0
virtual void ProfileRegistryKey(CFxString &strRegProfileKey, const CFxString &strProfileName)=0
virtual void addReactor(CFxProfileManagerReactor *)=0
virtual void profileReset(const CFxString &profileName)
Definition FxProfile.h:170
virtual void currentProfileSaved(const CFxString &currentProfile)
Definition FxProfile.h:152
virtual void profileWillReset(const CFxString &profileName)
Definition FxProfile.h:163
virtual void profileSaved(const CFxString &profileName)
Definition FxProfile.h:192
virtual void currentProfileWillChange(const CFxString &newProfile)
Definition FxProfile.h:112
virtual void profileLoaded(const CFxString &profileName)
Definition FxProfile.h:196
virtual void currentProfileWillBeLoaded(const CFxString &currentProfile, CFxSettings *pCurrentProfileSettings)
Definition FxProfile.h:145
virtual void currentProfileReset(const CFxString &currentProfile)
Definition FxProfile.h:132
virtual void profileWillBeSaved(const CFxString &profileName, CFxSettings *pProfileSettings)
Definition FxProfile.h:180
virtual void currentProfileWillBeSaved(const CFxString &currentProfile, CFxSettings *pCurrentProfileSettings)
Definition FxProfile.h:141
virtual void currentProfileLoaded(const CFxString &currentProfile)
Definition FxProfile.h:156
virtual ~CFxProfileManagerReactor()
Definition FxProfile.h:105
virtual void profileWillBeLoaded(const CFxString &profileName, CFxSettings *pProfileSettings)
Definition FxProfile.h:184
virtual void currentProfileChanged(const CFxString &newProfile)
Definition FxProfile.h:119
virtual void currentProfileWillBeReset(const CFxString &currentProfile)
Definition FxProfile.h:126
virtual int CreateNode(const CFxString &pszNodePath, QDomNode *&pNode)=0
virtual int GetStorageFile(CFxString &fileName)=0
virtual int ReplaceNode(const CFxString &pszNodePath, QDomNode *pNode)=0
virtual int DeleteNode(const CFxString &pszNodePath)=0
virtual int GetNode(const CFxString &pszNodePath, QDomNode *&pNode)=0
virtual int Save(void)=0
virtual ~CFxProfileStorage()
Definition FxProfile.h:377