forked from qt-creator/qt-creator
Doc - Starting on Part 7
Reviewed-By: TrustMe
This commit is contained in:
@@ -1002,4 +1002,14 @@
|
||||
\example examples/addressbook-sdk/part7
|
||||
\title Address Book 7 - Additional Features
|
||||
|
||||
Although our address book application is useful in its own right, it would
|
||||
be useful it we could exchange contact data with other applications. The
|
||||
vCard format is a popular file format that can be used for this purpose. In
|
||||
this chapter, we extend our address book client to allow contacts to be
|
||||
exported to vCard \c{.vcf} files.
|
||||
|
||||
\section1 Placing Widgets on The Form
|
||||
|
||||
\section1 The AddressBook Class
|
||||
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#include "addressbook.h"
|
||||
#include "ui_addressbook.h"
|
||||
|
||||
AddressBook::AddressBook(QWidget *parent)
|
||||
: QWidget(parent), ui(new Ui::AddressBook)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
AddressBook::~AddressBook()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef ADDRESSBOOK_H
|
||||
#define ADDRESSBOOK_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class AddressBook;
|
||||
}
|
||||
|
||||
class AddressBook : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AddressBook(QWidget *parent = 0);
|
||||
~AddressBook();
|
||||
|
||||
private:
|
||||
Ui::AddressBook *ui;
|
||||
};
|
||||
|
||||
#endif // ADDRESSBOOK_H
|
||||
@@ -0,0 +1,20 @@
|
||||
<ui version="4.0">
|
||||
<class>AddressBook</class>
|
||||
<widget class="QWidget" name="AddressBook" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>AddressBook</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <QtGui/QApplication>
|
||||
#include "addressbook.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
AddressBook w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2009-07-07T17:10:19
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
TARGET = part7
|
||||
TEMPLATE = app
|
||||
|
||||
|
||||
SOURCES += main.cpp\
|
||||
addressbook.cpp
|
||||
|
||||
HEADERS += addressbook.h
|
||||
|
||||
FORMS += addressbook.ui
|
||||
Reference in New Issue
Block a user