OSDN Git Service

Doc - Working on part 5
authorKavindra Devi Palaraja <kavindra.palaraja@nokia.com>
Wed, 10 Jun 2009 13:49:02 +0000 (15:49 +0200)
committerKavindra Devi Palaraja <kavindra.palaraja@nokia.com>
Wed, 10 Jun 2009 13:49:11 +0000 (15:49 +0200)
RevBy:    TrustMe

doc/examples/addressbook-sdk/part5/finddialog.cpp [new file with mode: 0644]
doc/examples/addressbook-sdk/part5/finddialog.h [new file with mode: 0644]
doc/examples/addressbook-sdk/part5/finddialog.ui
doc/examples/addressbook-sdk/part5/part5.pro

diff --git a/doc/examples/addressbook-sdk/part5/finddialog.cpp b/doc/examples/addressbook-sdk/part5/finddialog.cpp
new file mode 100644 (file)
index 0000000..15002d6
--- /dev/null
@@ -0,0 +1,22 @@
+#include "finddialog.h"
+#include "ui_finddialog.h"
+
+FindDialog::FindDialog(QWidget *parent) :
+    QDialog(parent),
+    m_ui(new Ui::FindDialog)
+{
+    m_ui->setupUi(this);
+}
+
+FindDialog::~FindDialog()
+{
+    delete m_ui;
+}
+
+void FindDialog::findClicked()
+{
+}
+
+QString FindDialog::getFindText()
+{
+}
diff --git a/doc/examples/addressbook-sdk/part5/finddialog.h b/doc/examples/addressbook-sdk/part5/finddialog.h
new file mode 100644 (file)
index 0000000..8a1b3d4
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef FINDDIALOG_H
+#define FINDDIALOG_H
+
+#include <QtGui/QDialog>
+#include <QLineEdit>
+#include <QPushButton>
+
+namespace Ui {
+    class FindDialog;
+}
+
+class FindDialog : public QDialog {
+    Q_OBJECT
+public:
+    FindDialog(QWidget *parent = 0);
+    ~FindDialog();
+    QString getFindText();
+
+public slots:
+    void findClicked();
+
+private:
+    Ui::FindDialog *m_ui;
+    QPushButton *findButton;
+    QLineEdit *lineEdit;
+    QString findText;
+};
+
+#endif // FINDDIALOG_H
index 500b70b..3f39d27 100644 (file)
@@ -1,18 +1,59 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>FindDialog</class>
- <widget class="QDialog" name="FindDialog" >
-  <property name="geometry" >
+ <widget class="QDialog" name="FindDialog">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>400</width>
-    <height>300</height>
+    <width>486</width>
+    <height>65</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Dialog</string>
   </property>
+  <layout class="QHBoxLayout" name="horizontalLayout_2">
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QLabel" name="label">
+       <property name="text">
+        <string>Enter the name of a contact:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="lineEdit"/>
+     </item>
+     <item>
+      <widget class="QPushButton" name="findButton">
+       <property name="text">
+        <string>Find</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
  </widget>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>findButton</sender>
+   <signal>clicked()</signal>
+   <receiver>FindDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>415</x>
+     <y>42</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>385</x>
+     <y>50</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>
index f41e5e8..a8618f0 100644 (file)
@@ -5,8 +5,10 @@ TARGET = part5
 TEMPLATE = app
 SOURCES += main.cpp \
     addressbook.cpp \
+    finddialog.cpp \
     finddialog.cpp
 HEADERS += addressbook.h \
+    finddialog.h \
     finddialog.h
 FORMS += addressbook.ui \
     finddialog.ui