摘要: 把QString视为一Stream使用。 QTextStream的相关函数 QTextStream ( QString * string, QIODevice::OpenMode openMode = QIODevice::ReadWrite ) void setString ( QString * string, QIODevice::OpenMode openMode = QIODevice:... 阅读全文
posted @ 2010-12-07 21:32 justin_s 阅读(3731) 评论(0) 推荐(0) 编辑
摘要: enum是一个好东西。 In C and C++, enum types can be used to set up collections of named integer constants. (The keyword enum is short for ``enumerated''.) syntax:The enum keyword is used to create an enumerat... 阅读全文
posted @ 2010-12-07 15:38 justin_s 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 今天看实验室一个项目的源码,其中设计模式随处可见。。 这是一个Mesh类,其中有一个friend class : MeshDelegate, 显然是一个delegate模式了。 参考Wiki上的条目: 一个简单的用法:instead of performing one of its stated tasks, delegates that task to an associated helper ... 阅读全文
posted @ 2010-12-07 13:21 justin_s 阅读(808) 评论(0) 推荐(1) 编辑