Commit ea81f663 authored by Kavindra Devi Palaraja's avatar Kavindra Devi Palaraja
Browse files

Doc - Starting on Part 7

Reviewed-By: TrustMe
parent 43a957e6
......@@ -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
*/
#include "addressbook.h"
#include "ui_addressbook.h"
AddressBook::AddressBook(QWidget *parent)
: QWidget(parent), ui(new Ui::AddressBook)
{
ui->setupUi(this);
}
AddressBook::~AddressBook()
{
delete ui;
}
#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
<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>
#include <QtGui/QApplication>
#include "addressbook.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
AddressBook w;
w.show();
return a.exec();
}
#-------------------------------------------------
#
# Project created by QtCreator 2009-07-07T17:10:19
#
#-------------------------------------------------
TARGET = part7
TEMPLATE = app
SOURCES += main.cpp\
addressbook.cpp
HEADERS += addressbook.h
FORMS += addressbook.ui
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment