--- a/qtmobility/examples/publish-subscribe/subscriberdialog.cpp Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/examples/publish-subscribe/subscriberdialog.cpp Mon May 03 13:18:40 2010 +0300
@@ -40,7 +40,11 @@
****************************************************************************/
#include "subscriberdialog.h"
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#include "ui_subscriberdialog_hor.h"
+#else
#include "ui_subscriberdialog.h"
+#endif
#include <qvaluespacesubscriber.h>
@@ -48,7 +52,7 @@
#include <QListWidget>
#include <QDesktopWidget>
-#ifdef QTM_SMALL_SCREEN
+#ifdef QTM_EXAMPLES_SMALL_SCREEN
#include <QPushButton>
#include <QSizePolicy>
#endif
@@ -63,12 +67,23 @@
{
ui->setupUi(this);
-#ifdef QTM_SMALL_SCREEN
+#ifdef QTM_EXAMPLES_SMALL_SCREEN
QPushButton *switchButton =
ui->buttonBox->addButton(tr("Switch"), QDialogButtonBox::ActionRole);
connect(switchButton, SIGNAL(clicked()), this, SIGNAL(switchRequested()));
#endif
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+ tableWidget = ui->tableWidget;
+ QStringList headerLabels;
+ headerLabels << tr("Key") << tr("Value") << tr("Type");
+ tableWidget->setColumnCount(3);
+ tableWidget->setHorizontalHeaderLabels(headerLabels);
+ tableWidget->horizontalHeader()->setStretchLastSection(true);
+ tableWidget->verticalHeader()->setVisible(false);
+ tableWidget->setColumnWidth(0, 200);
+ tableWidget->setColumnWidth(1, 400);
+#else
QDesktopWidget desktopWidget;
if (desktopWidget.availableGeometry().width() < 400) {
// Screen is too small to fit a table widget without scrolling, use a list widget instead.
@@ -86,7 +101,7 @@
ui->verticalLayout->insertWidget(2, tableWidget);
}
-
+#endif
connect(ui->connectButton, SIGNAL(clicked()), this, SLOT(changeSubscriberPath()));
changeSubscriberPath();
}