-
Notifications
You must be signed in to change notification settings - Fork 0
/
UtilsDBOperation.h
88 lines (67 loc) · 2.65 KB
/
UtilsDBOperation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#ifndef UTILSDBOPERATION_H
#define UTILSDBOPERATION_H
#include <ZConfig.h>
#include <RES_ICON_Reader.h>
#include <qstringlist.h>
#include <qpixmap.h>
#include <qfile.h>
#include <qdir.h>
#include "source.h"
#include "myDef.h"
class UtilsDBOperation
{
public :
UtilsDBOperation( const QString &file );
~UtilsDBOperation();
QStringList getRootObjectList();
QString getRootObjectStr();
QStringList getAllGroupList();
QStringList getMenuGroupList();
QStringList getMgxGroupList();
QStringList getJavaGroupList();
QStringList getNativeGroupList();
QStringList getSubObjectGroupList( const QString& gnameParent);
QString getSubObjectGroupStr( const QString& gnameParent);
QString getObjectName( const QString& gname);
QString getObjectResourceIdName( const QString& gname);
QString getObjectDir( const QString& gname);
QString getObjectExec( const QString& gname);
QString getObjectIconName( const QString& gname);
QString getObjectVendor( const QString& gname);
QString getObjectVersion( const QString& gname);
QString getObjectType( const QString& gname);
QString getObjectComment( const QString& gname);
bool isSDObject( const QString& gname);
QPixmap getObjectIconPixmap( const QString& gname, int w = 40, int h = 40);
QString readEntry( const QString& gname, const QString& key, const QString& deflt = QString::null );
//QString readBoolEntry( const QString& gname, const QString& key, bool deflt = false );
bool writeEntry( const QString& gname, const QString& key, const QString& value );
bool writeEntry( const QString& gname, const QString& key, bool value = false );
bool add2Menu( const QString& gnameObject, const QString& gnameMenu);
bool add2Menu( const QStringList& gnameObjectList, const QString& gnameMenu);
bool orderSubItemList( const QStringList& gnameObjectList, const QString& gnameMenu);
bool move2Root( const QString& gnameObject, const QString& gnameMenu);
bool move2Root( const QStringList& gnameObjectList, const QString& gnameMenu);
//bool deleteMenu( const QString& gnameMenu );
// bool move2Root( const QString& gnameObject );
// bool move2Root( const QStringList& gnameObjectList );
bool clearGroup( const QString& gname);
bool addMenu( const QString& menuName, const QString& iconName = "menuIcon.png");
bool flush();
void ChkMgxList();
protected :
void initObjectList();
private :
ZConfig *m_zConfig;
bool m_bFlushed;
QString m_sAppDir;
QString m_strExistsMgxListStr;
//QString m_strRootAppIds;
QStringList m_lsMenuGroupList;
QStringList m_lsMgxGroupList;
QStringList m_lsJavaGroupList;
QStringList m_lsNativeGroupList;
QValueListConstIterator<QString> m_it;
RES_ICON_Reader m_iconReader;
};
#endif