mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
update dict
This commit is contained in:
parent
708febed6c
commit
2851986339
@ -80,7 +80,8 @@ SUBDIRS += examples/qqtserverexample
|
||||
#SUBDIRS += test/treeviewtest
|
||||
#SUBDIRS += test/qqtdicttest
|
||||
#必开
|
||||
#SUBDIRS += test/qqtdicttest2
|
||||
#
|
||||
SUBDIRS += test/qqtdicttest2
|
||||
#SUBDIRS += test/bytearraytest
|
||||
#!contains(QKIT_PRIVATE, iOS|iOSSimulator){
|
||||
# SUBDIRS += test/cmdwidget
|
||||
|
@ -1,11 +1,15 @@
|
||||
#include "qqtdictionary.h"
|
||||
|
||||
QQtDictNode::QQtDictNode ( QObject* parent ) :
|
||||
QObject ( parent )
|
||||
QQtDictNode::QQtDictNode ()
|
||||
{
|
||||
m_type = DictMax;
|
||||
}
|
||||
|
||||
QQtDictNode::~QQtDictNode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool QQtDictNode::isValue() const
|
||||
{
|
||||
bool is = false;
|
||||
@ -248,14 +252,12 @@ void QQtDictNode::remove ( const QString& key )
|
||||
m_map.remove ( key );
|
||||
}
|
||||
|
||||
QQtDictNode::QQtDictNode ( const QQtDictNode& other, QObject* parent ) :
|
||||
QObject ( parent )
|
||||
QQtDictNode::QQtDictNode ( const QQtDictNode& other )
|
||||
{
|
||||
*this = other;
|
||||
}
|
||||
|
||||
QQtDictNode::QQtDictNode ( const QQtDictNode::EDictType type, QObject* parent ) :
|
||||
QObject ( parent )
|
||||
QQtDictNode::QQtDictNode ( const QQtDictNode::EDictType type )
|
||||
{
|
||||
m_type = type;
|
||||
}
|
||||
@ -270,8 +272,7 @@ const QQtDictNode& QQtDictNode::operator[] ( int index ) const
|
||||
return m_list[index];
|
||||
}
|
||||
|
||||
QQtDictNode::QQtDictNode ( const QVariant& value, QObject* parent ) :
|
||||
QObject ( parent )
|
||||
QQtDictNode::QQtDictNode ( const QVariant& value )
|
||||
{
|
||||
m_type = DictValue;
|
||||
*this = value;
|
||||
|
@ -33,9 +33,8 @@ typedef QMutableListIterator<QQtDictNode> QQtDictNodeMutableListIterator;
|
||||
* QVariant 不能直接获取到真实数据,改变必须使用临时变量。
|
||||
* 而且,接口设计也不够灵活,存入和取出都不太方便。
|
||||
*/
|
||||
class QQTSHARED_EXPORT QQtDictNode : public QObject
|
||||
class QQTSHARED_EXPORT QQtDictNode
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS ( EDictType )
|
||||
|
||||
public:
|
||||
@ -51,8 +50,8 @@ public:
|
||||
} EDictType;
|
||||
|
||||
/*explicit 函数只能作为构造函数,不能作为拷贝构造函数,拷贝构造函数不可加*/
|
||||
explicit QQtDictNode ( QObject* parent = 0 );
|
||||
virtual ~QQtDictNode() {}
|
||||
explicit QQtDictNode ();
|
||||
virtual ~QQtDictNode ();
|
||||
|
||||
bool isNull() const;
|
||||
bool isValid() const;
|
||||
@ -119,9 +118,9 @@ public:
|
||||
void remove ( const QString& key );
|
||||
|
||||
/*深拷贝*/
|
||||
QQtDictNode ( const QQtDictNode& other, QObject* parent = 0 );
|
||||
QQtDictNode ( const QVariant& value, QObject* parent = 0 );
|
||||
QQtDictNode ( const EDictType type, QObject* parent = 0 );
|
||||
QQtDictNode ( const QQtDictNode& other );
|
||||
QQtDictNode ( const QVariant& value );
|
||||
QQtDictNode ( const EDictType type );
|
||||
|
||||
/*操作符*/
|
||||
/*警告:可读、可写*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user