实现一个简单的地址薄,功能包括:地址的添加、浏览、编辑、查找、输出文件等。
1 界面和元素
整个地址薄界面,可视为一个 AddressBook 类。其中的 Name、Address 以及两个编辑栏,视为 AddressBook 中的元素,也即 “包含” 关系 (has-a)。因此,可以将它们声明为 AddressBook 的成员数据。

Name 和 Address 不涉及与用户的交互,只显示文本,因此,可用 QLabel 来实现,其描述为 ”QLabel is used for displaying text or an image. No user interaction functionality is provided“
单行编辑框,可用 QLineEdit 来实现,其描述为 ”The QLineEdit widget is a one-line text editor“
多行编辑框,可用 QTextEdit 来实现,其描述
