summaryrefslogtreecommitdiffstats
path: root/tools/designer/examples/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/examples/addressbook')
-rw-r--r--tools/designer/examples/addressbook/addressbook.pro14
-rw-r--r--tools/designer/examples/addressbook/addressbook.ui324
-rw-r--r--tools/designer/examples/addressbook/addressbook.ui.h137
-rw-r--r--tools/designer/examples/addressbook/addressdetails.ui243
-rw-r--r--tools/designer/examples/addressbook/addressdetails.ui.h24
-rw-r--r--tools/designer/examples/addressbook/images/editcut.pngbin0 -> 163 bytes
-rw-r--r--tools/designer/examples/addressbook/images/filenew.pngbin0 -> 150 bytes
-rw-r--r--tools/designer/examples/addressbook/images/fileopen.pngbin0 -> 179 bytes
-rw-r--r--tools/designer/examples/addressbook/images/filesave.pngbin0 -> 157 bytes
-rw-r--r--tools/designer/examples/addressbook/images/searchfind.pngbin0 -> 587 bytes
-rw-r--r--tools/designer/examples/addressbook/main.cpp11
-rw-r--r--tools/designer/examples/addressbook/search.ui136
-rw-r--r--tools/designer/examples/addressbook/search.ui.h13
13 files changed, 902 insertions, 0 deletions
diff --git a/tools/designer/examples/addressbook/addressbook.pro b/tools/designer/examples/addressbook/addressbook.pro
new file mode 100644
index 000000000..70b805af7
--- /dev/null
+++ b/tools/designer/examples/addressbook/addressbook.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+LANGUAGE = C++
+
+CONFIG += qt warn_on release
+unix {
+ UI_DIR = .ui
+ MOC_DIR = .moc
+ OBJECTS_DIR = .obj
+}
+
+SOURCES += main.cpp
+FORMS = addressbook.ui addressdetails.ui search.ui
+IMAGES = images/filenew.png images/fileopen.png images/filesave.png images/searchfind.png images/editcut.png
+DBFILE = addressbook.db
diff --git a/tools/designer/examples/addressbook/addressbook.ui b/tools/designer/examples/addressbook/addressbook.ui
new file mode 100644
index 000000000..ecbefbf49
--- /dev/null
+++ b/tools/designer/examples/addressbook/addressbook.ui
@@ -0,0 +1,324 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>AddressBook</class>
+<widget class="TQMainWindow">
+ <property name="name">
+ <cstring>AddressBook</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Address Book</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="TQListView">
+ <column>
+ <property name="text">
+ <string>Last Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>First Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Phone Number</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Street </string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>City</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Country</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Zip Code</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizeable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>addressView</cstring>
+ </property>
+ <property name="selectionMode">
+ <enum>Extended</enum>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+</widget>
+<menubar>
+ <property name="name">
+ <cstring>menubar</cstring>
+ </property>
+ <item text="&amp;File" name="fileMenu">
+ <action name="fileNewAction"/>
+ <action name="fileOpenAction"/>
+ <action name="fileSaveAction"/>
+ <action name="fileSaveAsAction"/>
+ <separator/>
+ <action name="fileExitAction"/>
+ </item>
+ <item text="&amp;Edit" name="editMenu">
+ <action name="actionDeleteAddress"/>
+ <separator/>
+ <action name="editFindAction"/>
+ </item>
+</menubar>
+<toolbars>
+ <toolbar dock="2">
+ <property name="name">
+ <cstring>toolBar</cstring>
+ </property>
+ <property name="label">
+ <string>Tools</string>
+ </property>
+ <action name="fileNewAction"/>
+ <action name="fileOpenAction"/>
+ <action name="fileSaveAction"/>
+ <separator/>
+ <action name="actionDeleteAddress"/>
+ <action name="editFindAction"/>
+ </toolbar>
+</toolbars>
+<actions>
+ <action>
+ <property name="name">
+ <cstring>fileNewAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>filenew.png</iconset>
+ </property>
+ <property name="text">
+ <string>New</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;New</string>
+ </property>
+ <property name="accel">
+ <number>4194382</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileOpenAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>fileopen.png</iconset>
+ </property>
+ <property name="text">
+ <string>Open</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Open...</string>
+ </property>
+ <property name="accel">
+ <number>4194383</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileSaveAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>filesave.png</iconset>
+ </property>
+ <property name="text">
+ <string>Save</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Save</string>
+ </property>
+ <property name="accel">
+ <number>4194387</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileSaveAsAction</cstring>
+ </property>
+ <property name="text">
+ <string>Save As</string>
+ </property>
+ <property name="menuText">
+ <string>Save &amp;As...</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>fileExitAction</cstring>
+ </property>
+ <property name="text">
+ <string>Exit</string>
+ </property>
+ <property name="menuText">
+ <string>E&amp;xit</string>
+ </property>
+ <property name="accel">
+ <number>0</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>editFindAction</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>searchfind.png</iconset>
+ </property>
+ <property name="text">
+ <string>Find</string>
+ </property>
+ <property name="menuText">
+ <string>&amp;Find...</string>
+ </property>
+ <property name="accel">
+ <number>4194374</number>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>actionDeleteAddress</cstring>
+ </property>
+ <property name="iconSet">
+ <iconset>editcut.png</iconset>
+ </property>
+ <property name="text">
+ <string>Delete</string>
+ </property>
+ </action>
+</actions>
+<connections>
+ <connection>
+ <sender>fileNewAction</sender>
+ <signal>activated()</signal>
+ <receiver>AddressBook</receiver>
+ <slot>fileNew()</slot>
+ </connection>
+ <connection>
+ <sender>fileOpenAction</sender>
+ <signal>activated()</signal>
+ <receiver>AddressBook</receiver>
+ <slot>fileOpen()</slot>
+ </connection>
+ <connection>
+ <sender>fileSaveAction</sender>
+ <signal>activated()</signal>
+ <receiver>AddressBook</receiver>
+ <slot>fileSave()</slot>
+ </connection>
+ <connection>
+ <sender>fileSaveAsAction</sender>
+ <signal>activated()</signal>
+ <receiver>AddressBook</receiver>
+ <slot>fileSaveAs()</slot>
+ </connection>
+ <connection>
+ <sender>fileExitAction</sender>
+ <signal>activated()</signal>
+ <receiver>AddressBook</receiver>
+ <slot>fileExit()</slot>
+ </connection>
+ <connection>
+ <sender>editFindAction</sender>
+ <signal>activated()</signal>
+ <receiver>AddressBook</receiver>
+ <slot>editFind()</slot>
+ </connection>
+ <connection>
+ <sender>actionDeleteAddress</sender>
+ <signal>activated()</signal>
+ <receiver>AddressBook</receiver>
+ <slot>deleteAddress()</slot>
+ </connection>
+</connections>
+<includes>
+ <include location="local" impldecl="in implementation">addressbook.ui.h</include>
+</includes>
+<variables>
+ <variable>TQString currentFileName;</variable>
+</variables>
+<slots>
+ <slot>fileNew()</slot>
+ <slot>insertAddress( const TQString &amp; firstName, const TQString &amp; lastName, const TQString &amp; phoneNumber, const TQString &amp; street, const TQString &amp; city, const TQString &amp; country, const TQString &amp; zipCode )</slot>
+ <slot>deleteAddress()</slot>
+ <slot>fileOpen()</slot>
+ <slot>fileSave()</slot>
+ <slot>fileSaveAs()</slot>
+ <slot>fileExit()</slot>
+ <slot>editFind()</slot>
+ <slot>searchAddress( const TQString &amp; expr )</slot>
+</slots>
+<pixmapinproject/>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/tools/designer/examples/addressbook/addressbook.ui.h b/tools/designer/examples/addressbook/addressbook.ui.h
new file mode 100644
index 000000000..ef5fc8022
--- /dev/null
+++ b/tools/designer/examples/addressbook/addressbook.ui.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename slots use TQt Designer which will
+** update this file, preserving your code. Create an init() slot in place of
+** a constructor, and a destroy() slot in place of a destructor.
+*****************************************************************************/
+
+#include "addressdetails.h"
+#include "search.h"
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qfiledialog.h>
+#include <qapplication.h>
+
+void AddressBook::fileNew()
+{
+ AddressDetails dia( this, 0, TRUE );
+ connect( &dia, SIGNAL( newAddress( const TQString &,
+ const TQString &,
+ const TQString &,
+ const TQString &,
+ const TQString &,
+ const TQString &,
+ const TQString & ) ),
+ this, SLOT( insertAddress( const TQString &,
+ const TQString &,
+ const TQString &,
+ const TQString &,
+ const TQString &,
+ const TQString &,
+ const TQString & ) ) );
+ dia.exec();
+}
+
+void AddressBook::insertAddress( const TQString &firstName,
+ const TQString &lastName,
+ const TQString &phoneNumber,
+ const TQString &street,
+ const TQString &city,
+ const TQString &country,
+ const TQString &zipCode )
+{
+ TQListViewItem *i = new TQListViewItem( addressView );
+ i->setText( 0, firstName );
+ i->setText( 1, lastName );
+ i->setText( 2, phoneNumber );
+ i->setText( 3, street );
+ i->setText( 4, city );
+ i->setText( 5, country );
+ i->setText( 6, zipCode );
+}
+
+void AddressBook::deleteAddress()
+{
+ TQListViewItemIterator it( addressView );
+ while ( it.current() ) {
+ TQListViewItem *i = it.current();
+ ++it;
+ if ( i->isSelected() )
+ delete i;
+ }
+}
+
+void AddressBook::fileOpen()
+{
+ addressView->clear();
+ TQString fn = TQFileDialog::getOpenFileName();
+ if ( fn.isEmpty() )
+ return;
+ currentFileName = fn;
+ TQFile f( currentFileName );
+ if ( !f.open( IO_ReadOnly ) )
+ return;
+ TQTextStream ts( &f );
+
+ while ( !ts.eof() ) {
+ TQListViewItem *item = new TQListViewItem( addressView );
+ for ( int i = 0; i < 7; ++i )
+ item->setText( i, ts.readLine() );
+ }
+
+}
+
+void AddressBook::fileSave()
+{
+ if ( currentFileName.isEmpty() )
+ fileSaveAs();
+ TQFile f( currentFileName );
+ if ( !f.open( IO_WriteOnly ) )
+ return;
+ TQTextStream ts( &f );
+
+ TQListViewItemIterator it( addressView );
+ while ( it.current() ) {
+ for ( int i = 0; i < 7; ++i )
+ ts << it.current()->text( i ) << endl;
+ ++it;
+ }
+
+ f.close();
+}
+
+void AddressBook::fileSaveAs()
+{
+ TQString fn = TQFileDialog::getSaveFileName();
+ if ( fn.isEmpty() )
+ return;
+ currentFileName = fn;
+ fileSave();
+}
+
+void AddressBook::fileExit()
+{
+ qApp->exit();
+}
+
+void AddressBook::editFind()
+{
+ SearchDialog dia( this, 0, TRUE );
+ connect( &dia, SIGNAL( searchAddress( const TQString & ) ),
+ this, SLOT( searchAddress( const TQString & ) ) );
+ dia.exec();
+}
+
+void AddressBook::searchAddress( const TQString &expr )
+{
+ addressView->clearSelection();
+ TQListViewItemIterator it( addressView );
+ while ( it.current() ) {
+ for ( int i = 0; i < 7; ++i ) {
+ if ( it.current()->text( i ).find( expr ) != -1 )
+ addressView->setSelected( it.current(), TRUE );
+ }
+ ++it;
+ }
+} \ No newline at end of file
diff --git a/tools/designer/examples/addressbook/addressdetails.ui b/tools/designer/examples/addressbook/addressdetails.ui
new file mode 100644
index 000000000..4ee163e4a
--- /dev/null
+++ b/tools/designer/examples/addressbook/addressdetails.ui
@@ -0,0 +1,243 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>AddressDetails</class>
+<widget class="TQDialog">
+ <property name="name">
+ <cstring>AddressDetails</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>216</width>
+ <height>252</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Enter Address</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="TQLayoutWidget">
+ <property name="name">
+ <cstring>Layout2</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="TQLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel8</cstring>
+ </property>
+ <property name="text">
+ <string>Street</string>
+ </property>
+ </widget>
+ <widget class="TQLineEdit" row="3" column="1">
+ <property name="name">
+ <cstring>editStreet</cstring>
+ </property>
+ </widget>
+ <widget class="TQLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>editPhoneNumber</cstring>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="4" column="0">
+ <property name="name">
+ <cstring>TextLabel7</cstring>
+ </property>
+ <property name="text">
+ <string>City</string>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Last Name</string>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Phone Number</string>
+ </property>
+ </widget>
+ <widget class="TQLineEdit" row="5" column="1">
+ <property name="name">
+ <cstring>editCountry</cstring>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="6" column="0">
+ <property name="name">
+ <cstring>TextLabel10</cstring>
+ </property>
+ <property name="text">
+ <string>Zip Code</string>
+ </property>
+ </widget>
+ <widget class="TQLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>editLastName</cstring>
+ </property>
+ </widget>
+ <widget class="TQLineEdit" row="6" column="1">
+ <property name="name">
+ <cstring>editZipCode</cstring>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>First Name</string>
+ </property>
+ </widget>
+ <widget class="TQLineEdit" row="4" column="1">
+ <property name="name">
+ <cstring>editCity</cstring>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="5" column="0">
+ <property name="name">
+ <cstring>TextLabel9</cstring>
+ </property>
+ <property name="text">
+ <string>Country</string>
+ </property>
+ </widget>
+ <widget class="TQLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>editFirstName</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name" stdset="0">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLayoutWidget">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name" stdset="0">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>PushButton2</cstring>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>PushButton3</cstring>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>PushButton2</sender>
+ <signal>clicked()</signal>
+ <receiver>AddressDetails</receiver>
+ <slot>okClicked()</slot>
+ </connection>
+ <connection>
+ <sender>PushButton3</sender>
+ <signal>clicked()</signal>
+ <receiver>AddressDetails</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>editLastName</tabstop>
+ <tabstop>editFirstName</tabstop>
+ <tabstop>editPhoneNumber</tabstop>
+ <tabstop>editStreet</tabstop>
+ <tabstop>editCity</tabstop>
+ <tabstop>editCountry</tabstop>
+ <tabstop>editZipCode</tabstop>
+ <tabstop>PushButton2</tabstop>
+ <tabstop>PushButton3</tabstop>
+</tabstops>
+<includes>
+ <include location="local" impldecl="in implementation">addressdetails.ui.h</include>
+</includes>
+<signals>
+ <signal>newAddress( const TQString &amp;, const TQString &amp;, const TQString &amp;, const TQString &amp;, const TQString &amp;, const TQString &amp;, const TQString &amp; );</signal>
+</signals>
+<slots>
+ <slot>init()</slot>
+ <slot>okClicked()</slot>
+</slots>
+<pixmapinproject/>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/tools/designer/examples/addressbook/addressdetails.ui.h b/tools/designer/examples/addressbook/addressdetails.ui.h
new file mode 100644
index 000000000..60fe4ea25
--- /dev/null
+++ b/tools/designer/examples/addressbook/addressdetails.ui.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename slots use TQt Designer which will
+** update this file, preserving your code. Create an init() slot in place of
+** a constructor, and a destroy() slot in place of a destructor.
+*****************************************************************************/
+
+void AddressDetails::init()
+{
+ editLastName->setFocus();
+}
+
+void AddressDetails::okClicked()
+{
+ emit newAddress( editLastName->text(),
+ editFirstName->text(),
+ editPhoneNumber->text(),
+ editStreet->text(),
+ editCity->text(),
+ editCountry->text(),
+ editZipCode->text() );
+ close();
+} \ No newline at end of file
diff --git a/tools/designer/examples/addressbook/images/editcut.png b/tools/designer/examples/addressbook/images/editcut.png
new file mode 100644
index 000000000..9c7fb3c19
--- /dev/null
+++ b/tools/designer/examples/addressbook/images/editcut.png
Binary files differ
diff --git a/tools/designer/examples/addressbook/images/filenew.png b/tools/designer/examples/addressbook/images/filenew.png
new file mode 100644
index 000000000..d898107b0
--- /dev/null
+++ b/tools/designer/examples/addressbook/images/filenew.png
Binary files differ
diff --git a/tools/designer/examples/addressbook/images/fileopen.png b/tools/designer/examples/addressbook/images/fileopen.png
new file mode 100644
index 000000000..7e49adbba
--- /dev/null
+++ b/tools/designer/examples/addressbook/images/fileopen.png
Binary files differ
diff --git a/tools/designer/examples/addressbook/images/filesave.png b/tools/designer/examples/addressbook/images/filesave.png
new file mode 100644
index 000000000..77d9f506c
--- /dev/null
+++ b/tools/designer/examples/addressbook/images/filesave.png
Binary files differ
diff --git a/tools/designer/examples/addressbook/images/searchfind.png b/tools/designer/examples/addressbook/images/searchfind.png
new file mode 100644
index 000000000..f18b02962
--- /dev/null
+++ b/tools/designer/examples/addressbook/images/searchfind.png
Binary files differ
diff --git a/tools/designer/examples/addressbook/main.cpp b/tools/designer/examples/addressbook/main.cpp
new file mode 100644
index 000000000..76ad63219
--- /dev/null
+++ b/tools/designer/examples/addressbook/main.cpp
@@ -0,0 +1,11 @@
+#include <qapplication.h>
+#include "addressbook.h"
+
+int main( int argc, char ** argv )
+{
+ TQApplication a( argc, argv );
+ AddressBook *w = new AddressBook;
+ w->show();
+ a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( tquit() ) );
+ return a.exec();
+}
diff --git a/tools/designer/examples/addressbook/search.ui b/tools/designer/examples/addressbook/search.ui
new file mode 100644
index 000000000..a7e9042b1
--- /dev/null
+++ b/tools/designer/examples/addressbook/search.ui
@@ -0,0 +1,136 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>SearchDialog</class>
+<widget class="TQDialog">
+ <property name="name">
+ <cstring>SearchDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>216</width>
+ <height>76</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Search</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="TQLayoutWidget">
+ <property name="name">
+ <cstring>Layout3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="TQLabel">
+ <property name="name">
+ <cstring>TextLabel12</cstring>
+ </property>
+ <property name="text">
+ <string>Search</string>
+ </property>
+ </widget>
+ <widget class="TQLineEdit">
+ <property name="name">
+ <cstring>editSearch</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="TQLayoutWidget">
+ <property name="name">
+ <cstring>Layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name" stdset="0">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>PushButton4</cstring>
+ </property>
+ <property name="text">
+ <string>Search</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>PushButton5</cstring>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>PushButton5</sender>
+ <signal>clicked()</signal>
+ <receiver>SearchDialog</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>PushButton4</sender>
+ <signal>clicked()</signal>
+ <receiver>SearchDialog</receiver>
+ <slot>search()</slot>
+ </connection>
+</connections>
+<includes>
+ <include location="local" impldecl="in implementation">search.ui.h</include>
+</includes>
+<signals>
+ <signal>searchAddress( const TQString &amp; )</signal>
+</signals>
+<slots>
+ <slot>search()</slot>
+</slots>
+<pixmapinproject/>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/tools/designer/examples/addressbook/search.ui.h b/tools/designer/examples/addressbook/search.ui.h
new file mode 100644
index 000000000..b660726cc
--- /dev/null
+++ b/tools/designer/examples/addressbook/search.ui.h
@@ -0,0 +1,13 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename slots use TQt Designer which will
+** update this file, preserving your code. Create an init() slot in place of
+** a constructor, and a destroy() slot in place of a destructor.
+*****************************************************************************/
+
+void SearchDialog::search()
+{
+ emit searchAddress( editSearch->text() );
+ close();
+} \ No newline at end of file