item.h
来自「压缩包里有教材<<C++模式设计-基于QT4开源跨平台开发框架>」· C头文件 代码 · 共 41 行
H
41 行
#ifndef ITEM_H#define ITEM_H#include <QTreeWidgetItem>#include <QDomElement>#include "dataobject.h"class QDomDocument;//startclass Item : public DataObject, public QTreeWidgetItem { Q_OBJECT Q_PROPERTY( QString Name READ name WRITE setName ); public: Item(); virtual ~Item() {} QTreeWidgetItem* parent() const { /* Required to disambiguate between the two base class versions */ return QTreeWidgetItem::parent(); } virtual void setName(QString name) ; /** @param doc a QDomDocument for creating new elements. @return a DOM element (tree) which corresponds to this item. Ignores children - Non-recursive. */ virtual QDomElement element( QDomDocument doc)=0; /** @return a widget which gives a detailed view of the information in this item. For a Bookmark, it retruns a QTextBrowser. For an ordinary Note, it returns a QTextEdit. */ virtual QWidget* detailView() =0; /** @return what is to be displayed in the treeview. */ virtual QString name() const ;};//end#endif // #ifndef ITEM_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?