fix for datebase skew
authorJohn Kern <johnk@symbian.org>
Thu, 01 Apr 2010 13:36:35 -0700
changeset 12 60c644f011c7
parent 11 f3dbeee07821
child 13 92f7e918c7b5
fix for datebase skew
Seafood/SeafoodTabbed.pro
Seafood/SeafoodTabbed.pro.user
Seafood/main.cpp
Seafood/mainwindow.ui
Seafood/seafood.db
Seafood/ui_mainwindow.h
--- a/Seafood/SeafoodTabbed.pro	Wed Mar 31 16:09:36 2010 -0700
+++ b/Seafood/SeafoodTabbed.pro	Thu Apr 01 13:36:35 2010 -0700
@@ -19,7 +19,7 @@
 
 FORMS    += mainwindow.ui
 
-databasefiles.sources = seafood.db
+databasefiles.sources = populateDB/seafood.db
 databasefiles.path = .
 
 DEPLOYMENT += databasefiles
--- a/Seafood/SeafoodTabbed.pro.user	Wed Mar 31 16:09:36 2010 -0700
+++ b/Seafood/SeafoodTabbed.pro.user	Thu Apr 01 13:36:35 2010 -0700
@@ -170,7 +170,7 @@
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString"></value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:\workspace\QtExamples\Seafood</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">5</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">6</value>
@@ -185,7 +185,7 @@
     <value key="Qt4ProjectManager.S60DeviceRunConfiguration.CustomKeyPath" type="QString"></value>
     <value key="Qt4ProjectManager.S60DeviceRunConfiguration.CustomSignaturePath" type="QString"></value>
     <value key="Qt4ProjectManager.S60DeviceRunConfiguration.ProFile" type="QString">SeafoodTabbed.pro</value>
-    <value key="Qt4ProjectManager.S60DeviceRunConfiguration.SerialPortName" type="QString">COM23</value>
+    <value key="Qt4ProjectManager.S60DeviceRunConfiguration.SerialPortName" type="QString"></value>
     <value key="Qt4ProjectManager.S60DeviceRunConfiguration.SigningMode" type="int">0</value>
    </valuemap>
    <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
--- a/Seafood/main.cpp	Wed Mar 31 16:09:36 2010 -0700
+++ b/Seafood/main.cpp	Thu Apr 01 13:36:35 2010 -0700
@@ -6,7 +6,7 @@
     QApplication a(argc, argv);
     MainWindow w;
     w.createMenus();
-    w.setWindowTitle("Seafood T");
+    w.setWindowTitle("Seafood");
     w.setStyleSheet("* { background-color:rgb(199,147,88); padding: 7px ; color:rgb(255,255,255)}");
 #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
     w.showMaximized();
--- a/Seafood/mainwindow.ui	Wed Mar 31 16:09:36 2010 -0700
+++ b/Seafood/mainwindow.ui	Thu Apr 01 13:36:35 2010 -0700
@@ -14,18 +14,18 @@
    <string>MainWindow</string>
   </property>
   <widget class="QWidget" name="centralWidget">
-   <widget class="QWidget" name="">
+   <widget class="QWidget" name="layoutWidget">
     <property name="geometry">
      <rect>
-      <x>60</x>
-      <y>80</y>
+      <x>0</x>
+      <y>0</y>
       <width>258</width>
       <height>242</height>
      </rect>
     </property>
     <layout class="QVBoxLayout" name="verticalLayout">
      <item>
-      <widget class="QLabel" name="label">
+      <widget class="QLabel" name="header">
        <property name="font">
         <font>
          <pointsize>14</pointsize>
@@ -37,10 +37,27 @@
       </widget>
      </item>
      <item>
+      <widget class="Line" name="line">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="amountServing">
+       <property name="text">
+        <string>	Amount per serving</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item>
       <widget class="QTableWidget" name="tableWidget"/>
      </item>
      <item>
-      <widget class="QLabel" name="label_2">
+      <widget class="QLabel" name="usda">
        <property name="text">
         <string>Source: USDA</string>
        </property>
Binary file Seafood/seafood.db has changed
--- a/Seafood/ui_mainwindow.h	Wed Mar 31 16:09:36 2010 -0700
+++ b/Seafood/ui_mainwindow.h	Thu Apr 01 13:36:35 2010 -0700
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading UI file 'mainwindow.ui'
 **
-** Created: Mon Mar 29 16:27:58 2010
+** Created: Thu Apr 1 11:35:19 2010
 **      by: Qt User Interface Compiler version 4.6.2
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
@@ -14,6 +14,7 @@
 #include <QtGui/QAction>
 #include <QtGui/QApplication>
 #include <QtGui/QButtonGroup>
+#include <QtGui/QFrame>
 #include <QtGui/QHeaderView>
 #include <QtGui/QLabel>
 #include <QtGui/QMainWindow>
@@ -30,11 +31,13 @@
 {
 public:
     QWidget *centralWidget;
-    QWidget *widget;
+    QWidget *layoutWidget;
     QVBoxLayout *verticalLayout;
-    QLabel *label;
+    QLabel *header;
+    QFrame *line;
+    QLabel *amountServing;
     QTableWidget *tableWidget;
-    QLabel *label_2;
+    QLabel *usda;
     QMenuBar *menuBar;
     QToolBar *mainToolBar;
     QStatusBar *statusBar;
@@ -46,31 +49,44 @@
         MainWindow->resize(361, 640);
         centralWidget = new QWidget(MainWindow);
         centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
-        widget = new QWidget(centralWidget);
-        widget->setObjectName(QString::fromUtf8("widget"));
-        widget->setGeometry(QRect(60, 80, 258, 242));
-        verticalLayout = new QVBoxLayout(widget);
+        layoutWidget = new QWidget(centralWidget);
+        layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
+        layoutWidget->setGeometry(QRect(0, 0, 258, 242));
+        verticalLayout = new QVBoxLayout(layoutWidget);
         verticalLayout->setSpacing(6);
         verticalLayout->setContentsMargins(11, 11, 11, 11);
         verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
         verticalLayout->setContentsMargins(0, 0, 0, 0);
-        label = new QLabel(widget);
-        label->setObjectName(QString::fromUtf8("label"));
+        header = new QLabel(layoutWidget);
+        header->setObjectName(QString::fromUtf8("header"));
         QFont font;
         font.setPointSize(14);
-        label->setFont(font);
+        header->setFont(font);
+
+        verticalLayout->addWidget(header);
+
+        line = new QFrame(layoutWidget);
+        line->setObjectName(QString::fromUtf8("line"));
+        line->setFrameShape(QFrame::HLine);
+        line->setFrameShadow(QFrame::Sunken);
 
-        verticalLayout->addWidget(label);
+        verticalLayout->addWidget(line);
 
-        tableWidget = new QTableWidget(widget);
+        amountServing = new QLabel(layoutWidget);
+        amountServing->setObjectName(QString::fromUtf8("amountServing"));
+        amountServing->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
+
+        verticalLayout->addWidget(amountServing);
+
+        tableWidget = new QTableWidget(layoutWidget);
         tableWidget->setObjectName(QString::fromUtf8("tableWidget"));
 
         verticalLayout->addWidget(tableWidget);
 
-        label_2 = new QLabel(widget);
-        label_2->setObjectName(QString::fromUtf8("label_2"));
+        usda = new QLabel(layoutWidget);
+        usda->setObjectName(QString::fromUtf8("usda"));
 
-        verticalLayout->addWidget(label_2);
+        verticalLayout->addWidget(usda);
 
         MainWindow->setCentralWidget(centralWidget);
         menuBar = new QMenuBar(MainWindow);
@@ -92,8 +108,9 @@
     void retranslateUi(QMainWindow *MainWindow)
     {
         MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8));
-        label->setText(QApplication::translate("MainWindow", "Nutrition information", 0, QApplication::UnicodeUTF8));
-        label_2->setText(QApplication::translate("MainWindow", "Source: USDA", 0, QApplication::UnicodeUTF8));
+        header->setText(QApplication::translate("MainWindow", "Nutrition information", 0, QApplication::UnicodeUTF8));
+        amountServing->setText(QApplication::translate("MainWindow", "	Amount per serving", 0, QApplication::UnicodeUTF8));
+        usda->setText(QApplication::translate("MainWindow", "Source: USDA", 0, QApplication::UnicodeUTF8));
     } // retranslateUi
 
 };