--- a/phonebookui/phonebookservices/tsrc/qtpbkservicestestapp/main.cpp Fri Jun 11 13:29:23 2010 +0300
+++ b/phonebookui/phonebookservices/tsrc/qtpbkservicestestapp/main.cpp Wed Jun 23 18:02:44 2010 +0300
@@ -20,7 +20,8 @@
#include <hbmainwindow.h>
#include <qapplication.h>
#include <hbview.h>
-#include <QGraphicsLinearLayout>
+#include <hbscrollarea.h>
+#include <QGraphicsGridLayout>
#include "testpbkservices.h"
@@ -33,62 +34,151 @@
// Includes decorators such as signal strength and battery life indicator.
HbMainWindow mainWindow;
- testPbkServices *service=new testPbkServices(&mainWindow);
+ testPbkServices *service = new testPbkServices(&mainWindow);
HbView* view = new HbView();
view->setTitle("QtPhonebook Test Application");
- QGraphicsLinearLayout* mainLayout = new QGraphicsLinearLayout(Qt::Vertical);
+ QGraphicsGridLayout* mainLayout = new QGraphicsGridLayout();
+
+ HbPushButton* button = NULL;
+ int row = 0;
+
+ // FETCH =================================================================
+
+ button = new HbPushButton("Multi Fetch");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchMultiFetch()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchMultiFetch_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
- HbPushButton *button1 = new HbPushButton("Launch Fetch");
- QObject::connect(button1, SIGNAL(pressed()), service, SLOT(launchFetch()));
+ button = new HbPushButton("Multi fetch SMS");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchMultiFetch_sms()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchMultiFetch_sms_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ button = new HbPushButton("Multi fetch EMAIL");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchMultiFetch_email()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchMultiFetch_email_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
- HbPushButton *button2 = new HbPushButton("Launch SMS fetch");
- QObject::connect(button2, SIGNAL(pressed()), service, SLOT(launchSmsFilteredFetch()));
+ button = new HbPushButton("Single fetch");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchSingleFetch()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchSingleFetch_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ // EDIT - create new =====================================================
- HbPushButton *button3 = new HbPushButton("Launch EMAIL fetch");
- QObject::connect(button3, SIGNAL(pressed()), service, SLOT(launchEmailFilteredFetch()));
+ button = new HbPushButton("Edit create new - number");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditCreateNew_number()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditCreateNew_number_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ button = new HbPushButton("Edit create new - email");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditCreateNew_email()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditCreateNew_email_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ button = new HbPushButton("Edit create new - onlineAccount");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditCreateNew_onlineAccount()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditCreateNew_onlineAccount_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
- HbPushButton *button4 = new HbPushButton("Launch editor with number");
- QObject::connect(button4, SIGNAL(pressed()), service, SLOT(launchEditorNumber()));
-
- HbPushButton *button5 = new HbPushButton("Launch editor with email");
- QObject::connect(button5, SIGNAL(pressed()), service, SLOT(launchEditorEmail()));
-
- HbPushButton *button6 = new HbPushButton("Launch editor with online account");
- QObject::connect(button6, SIGNAL(pressed()), service, SLOT(launchEditorOnlineAccount()));
-
- HbPushButton *button7 = new HbPushButton("Update contact with number");
- QObject::connect(button7, SIGNAL(pressed()), service, SLOT(launchUpdateEditorNumber()));
-
- HbPushButton *button8 = new HbPushButton("Update contact with email");
- QObject::connect(button8, SIGNAL(pressed()), service, SLOT(launchUpdateEditorEmail()));
+ button = new HbPushButton("Launch editor with vCard");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditorVCard()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditorVCard_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ // EDIT - update existing ================================================
+
+ button = new HbPushButton("Edit/update existing - number");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditUpdateExisting_number()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditUpdateExisting_number_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ button = new HbPushButton("Edit/update existing - email");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditUpdateExisting_email()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditUpdateExisting_email_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ button = new HbPushButton("Edit/update existing - onlineAccount");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditUpdateExisting_onlineAccount()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchEditUpdateExisting_onlineAccount_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ // CONTACT CARD ==========================================================
+
+ button = new HbPushButton("Launch contact card");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchContactCard()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchContactCard_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ button = new HbPushButton("Launch contact card with number");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchContactCardNumber()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchContactCardNumber_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ button = new HbPushButton("Launch contact card with email");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchContactCardEmail()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchContactCardEmail_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
+
+ button = new HbPushButton("Launch contact card with online account");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchContactCardOnlineAccount()));
+ mainLayout->addItem(button, row, 0);
+ button = new HbPushButton("old");
+ QObject::connect(button, SIGNAL(pressed()), service, SLOT(launchContactCardOnlineAccount_old()));
+ mainLayout->addItem(button, row, 1);
+ row++;
- HbPushButton *button9 = new HbPushButton("Update contact with online account");
- QObject::connect(button9, SIGNAL(pressed()), service, SLOT(launchUpdateEditorOnlineAccount()));
-
- HbPushButton *button10 = new HbPushButton("Launch single fetch");
- QObject::connect(button10, SIGNAL(pressed()), service, SLOT(launchSingleFetch()));
-
- HbPushButton *button11 = new HbPushButton("Launch editor with vCard");
- QObject::connect(button11, SIGNAL(pressed()), service, SLOT(launchEditorVCard()));
-
- mainLayout->addItem(button1);
- mainLayout->addItem(button2);
- mainLayout->addItem(button3);
- mainLayout->addItem(button4);
- mainLayout->addItem(button5);
- mainLayout->addItem(button6);
- mainLayout->addItem(button7);
- mainLayout->addItem(button8);
- mainLayout->addItem(button9);
- mainLayout->addItem(button10);
- mainLayout->addItem(button11);
-
-
- view->setLayout(mainLayout);
-
+ QGraphicsWidget *graphicsWidget = new QGraphicsWidget();
+ graphicsWidget->setLayout(mainLayout);
+ HbScrollArea *scrollArea = new HbScrollArea();
+ scrollArea->setContentWidget(graphicsWidget);
+ view->setWidget(scrollArea);
mainWindow.addView(view);
+ row++;
// Show widget
mainWindow.show();