Line 4... |
Line 4... |
4 |
|
4 |
|
5 |
class C_File;
|
- |
|
- |
|
5 |
enum {PLUGIN_NORMAL, PLUGIN_STABLE, PLUGIN_EXPERIMENTAL, PLUGIN_CHEAT, PLUGIN_MOD}; // filters for browsing packages
|
6 |
|
6 |
|
7 |
namespace SPK {
|
7 |
namespace SPK {
|
8 |
namespace Package {
|
8 |
namespace Package {
|
- |
|
9 |
|
9 |
|
10 |
|
10 |
class CInstallText;
|
11 |
class CInstallText;
|
11 |
|
12 |
|
12 |
class SPKEXPORT CCorePackage
|
13 |
class SPKEXPORT CCorePackage
|
13 |
{
|
14 |
{
|
Line 19... |
Line 20... |
19 |
Utils::String _sWebAddress;
|
20 |
Utils::String _sWebAddress;
|
20 |
Utils::String _sEmail;
|
21 |
Utils::String _sEmail;
|
21 |
Utils::String _sDescription;
|
22 |
Utils::String _sDescription;
|
22 |
Utils::String _sCreationDate;
|
23 |
Utils::String _sCreationDate;
|
23 |
Utils::String _sForumLink;
|
24 |
Utils::String _sForumLink;
|
24 |
|
- |
|
25 |
C_File *_pIconFile;
|
- |
|
26 |
Utils::String _sIconExt;
|
- |
|
27 |
|
25 |
|
28 |
Utils::String _sFilename;
|
26 |
Utils::String _sFilename;
|
29 |
Utils::String _sExportFilename;
|
27 |
Utils::String _sExportFilename;
|
30 |
|
28 |
|
31 |
CInstallText *_pInstallText;
|
29 |
CInstallText *_pInstallText;
|
Line 50... |
Line 48... |
50 |
const Utils::String &suthor () const { return _sAuthor; }
|
48 |
const Utils::String &suthor () const { return _sAuthor; }
|
51 |
const Utils::String &webSite () const { return _sWebSite; }
|
49 |
const Utils::String &webSite () const { return _sWebSite; }
|
52 |
const Utils::String &webAddress () const { return _sWebAddress; }
|
50 |
const Utils::String &webAddress () const { return _sWebAddress; }
|
53 |
const Utils::String &email () const { return _sEmail; }
|
51 |
const Utils::String &email () const { return _sEmail; }
|
54 |
const Utils::String &creationDate () const { return _sCreationDate; }
|
52 |
const Utils::String &creationDate () const { return _sCreationDate; }
|
55 |
const Utils::String &cescription () const { return _sDescription; }
|
53 |
const Utils::String &description () const { return _sDescription; }
|
56 |
const Utils::String &forumLink () const { return _sForumLink; }
|
54 |
const Utils::String &forumLink () const { return _sForumLink; }
|
57 |
|
- |
|
58 |
C_File * icon () const { return _pIconFile; }
|
- |
|
59 |
const Utils::String &iconExt () const { return _sIconExt; }
|
- |
|
60 |
|
- |
|
61 |
int recommended () const { return _iRecommended; }
|
55 |
int recommended () const { return _iRecommended; }
|
62 |
int easeOfUse () const { return _iEaseOfUse; }
|
56 |
int easeOfUse () const { return _iEaseOfUse; }
|
63 |
int gameChanging () const { return _iGameChanging; }
|
57 |
int gameChanging () const { return _iGameChanging; }
|
64 |
|
- |
|
65 |
const Utils::String &filename () const { return _sFilename; }
|
58 |
const Utils::String &filename () const { return _sFilename; }
|
66 |
const Utils::String &exportFilename () const { return _sExportFilename; }
|
59 |
const Utils::String &exportFilename () const { return _sExportFilename; }
|
67 |
const CInstallText *installText () const { return _pInstallText; }
|
60 |
const CInstallText *installText () const { return _pInstallText; }
|
68 |
const CInstallText *uninstallText () const { return _pUninstallText; }
|
61 |
const CInstallText *uninstallText () const { return _pUninstallText; }
|
- |
|
62 |
int pluginType () const { return _iPluginType; }
|
69 |
|
63 |
|
70 |
//setters
|
64 |
//setters
|
71 |
void setName ( const Utils::String &str ) { _changed(); _sName = str.remove ( '|' ); }
|
65 |
void setName ( const Utils::String &str ) { _changed(); _sName = str.remove ( '|' ); }
|
72 |
void setVersion ( const Utils::String &str ) { _changed(); _sVersion = str; }
|
66 |
void setVersion ( const Utils::String &str ) { _changed(); _sVersion = str; }
|
73 |
void setAuthor ( const Utils::String &str ) { _changed(); _sAuthor = str.remove ( '|' ); }
|
67 |
void setAuthor ( const Utils::String &str ) { _changed(); _sAuthor = str.remove ( '|' ); }
|
74 |
void setWebAddress ( const Utils::String &str ) { _changed(); _sWebAddress = str; }
|
68 |
void setWebAddress ( const Utils::String &str ) { _changed(); _sWebAddress = str; }
|
75 |
void setWebSite ( const Utils::String &str ) { _changed(); _sWebSite = str; }
|
69 |
void setWebSite ( const Utils::String &str ) { _changed(); _sWebSite = str; }
|
76 |
void setEmail ( const Utils::String &str ) { _changed(); _sEmail = str; }
|
70 |
void setEmail ( const Utils::String &str ) { _changed(); _sEmail = str; }
|
77 |
void setCreationDate ( const Utils::String &str ) { _changed(); _sCreationDate = str; }
|
71 |
void setCreationDate ( const Utils::String &str ) { _changed(); _sCreationDate = str; }
|
78 |
void setDescription ( const Utils::String &str ) { _changed(); _sDescription = str; }
|
72 |
void setDescription ( const Utils::String &str ) { _changed(); _parseDescription(str); }
|
79 |
void setFilename ( const Utils::String &str ) { _sFilename = str; }
|
73 |
void setFilename ( const Utils::String &str ) { _sFilename = str; }
|
80 |
void setForumLink ( const Utils::String &str ) { _changed(); _sForumLink = str; }
|
74 |
void setForumLink ( const Utils::String &str ) { _changed(); _sForumLink = str; }
|
81 |
void setRecommended ( int i ) { _changed(); _iRecommended = i; }
|
75 |
void setRecommended ( int i ) { _changed(); _iRecommended = i; }
|
82 |
void setGameChanging ( int i ) { _changed(); _iGameChanging = i; }
|
76 |
void setGameChanging ( int i ) { _changed(); _iGameChanging = i; }
|
83 |
void setEaseOfUse ( int i ) { _changed(); _iEaseOfUse = i; }
|
77 |
void setEaseOfUse ( int i ) { _changed(); _iEaseOfUse = i; }
|
- |
|
78 |
void setPluginType ( int i ) { _changed(); _iPluginType = i; }
|
84 |
|
79 |
|
85 |
void setIcon(C_File *file, const Utils::String ext);
|
- |
|
86 |
|
- |
|
87 |
// install texts
|
80 |
// install texts
|
88 |
Utils::String installText(int iLang, bool bBefore, bool bIncludeDefault = true) const;
|
81 |
Utils::String installText(int iLang, bool bBefore, bool bIncludeDefault = true) const;
|
89 |
Utils::String uninstallText(int iLang, bool bBefore, bool bIncludeDefault = true) const;
|
82 |
Utils::String uninstallText(int iLang, bool bBefore, bool bIncludeDefault = true) const;
|
90 |
void addInstallText(int iLang, bool bBefore, const Utils::String &sText);
|
83 |
void addInstallText(int iLang, bool bBefore, const Utils::String &sText);
|
91 |
void addUninstallText(int iLang, bool bBefore, const Utils::String &sText);
|
84 |
void addUninstallText(int iLang, bool bBefore, const Utils::String &sText);
|
Line 93... |
Line 86... |
93 |
|
86 |
|
94 |
protected:
|
87 |
protected:
|
95 |
virtual void _changed() { _bChanged = true; }
|
88 |
virtual void _changed() { _bChanged = true; }
|
96 |
virtual void _setDefaults();
|
89 |
virtual void _setDefaults();
|
97 |
void _setRatings(int iEase, int iChanging, int iRec);
|
90 |
void _setRatings(int iEase, int iChanging, int iRec);
|
- |
|
91 |
void _parseDescription(const Utils::String &sDesc);
|
98 |
|
92 |
|
99 |
bool _noRatings() const { return (_iRecommended == -1 && _iEaseOfUse == -1 && _iGameChanging == -1) ? true : false; }
|
93 |
bool _noRatings() const { return (_iRecommended == -1 && _iEaseOfUse == -1 && _iGameChanging == -1) ? true : false; }
|
100 |
void _merge(CCorePackage *pPackage);
|
94 |
void _merge(CCorePackage *pPackage);
|
101 |
|
95 |
|
102 |
Utils::String _installText(int iLang, bool bBefore, bool bIncludeDefault, const CInstallText *pText) const;
|
96 |
Utils::String _installText(int iLang, bool bBefore, bool bIncludeDefault, const CInstallText *pText) const;
|