Add QGraphicView Objects
authorElias Woods <EliasWoods@gmail.com>
Fri, 16 Jul 2010 15:35:53 +0000 (11:35 -0400)
committerElias Woods <EliasWoods@gmail.com>
Fri, 16 Jul 2010 15:35:53 +0000 (11:35 -0400)
Groove.pro
Groove.pro.user
bottombar.cpp
bottombar.h
bottombar.ui
groove.cpp
gscom.cpp
searchresults.cpp [new file with mode: 0644]
searchresults.h [new file with mode: 0644]
searchresults.ui [new file with mode: 0644]

index 8e01027..474be90 100644 (file)
@@ -32,7 +32,8 @@ SOURCES += main.cpp \
     grooveprogressbar.cpp \
     topbar.cpp \
     bottombar.cpp \
-    vkb.cpp
+    vkb.cpp \
+    searchresults.cpp
 
 HEADERS += \
     groove.h \
@@ -44,7 +45,8 @@ HEADERS += \
     grooveprogressbar.h \
     topbar.h \
     bottombar.h \
-    vkb.h
+    vkb.h \
+    searchresults.h
 
 maemo5 {
 SOURCES += qmaemo5rotator.cpp
@@ -93,4 +95,5 @@ RESOURCES += \
 FORMS += \
     topbar.ui \
     bottombar.ui \
-    vkb.ui
+    vkb.ui \
+    searchresults.ui
index 7cbcb35..4190cf1 100644 (file)
     <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">1</value>
     <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap">
      <value key="192.168.1.3" type="QDateTime">2010-07-07T05:24:28</value>
+     <value key="192.168.1.5" type="QDateTime">2010-07-15T08:53:48</value>
     </valuemap>
     <value key="Qt4ProjectManager.MaemoRunConfiguration.Simulator" type="QString"></value>
    </valuemap>
index 9ae4ea5..09faf6c 100644 (file)
@@ -6,6 +6,14 @@ bottomBar::bottomBar(QWidget *parent) :
     ui(new Ui::bottomBar)
 {
     ui->setupUi(this);
+    QRect screenGeometry = QApplication::desktop()->screenGeometry();
+    QGraphicsScene *main = new QGraphicsScene(0,0,screenGeometry.width(),15);
+    ui->graphicsView->setScene(main);
+    ui->graphicsView->setSceneRect(0,0,screenGeometry.width(),15);
+    ui->graphicsView->setTransformationAnchor(QGraphicsView::NoAnchor);
+    main->setBackgroundBrush(this->palette().window());
+    main->setSceneRect(0,0,screenGeometry.width(),15);
+    main->addRect(0,0,screenGeometry.width()/2,15,QPen(Qt::white),QBrush(Qt::white));
 }
 
 bottomBar::~bottomBar()
index 69c145f..cb80599 100644 (file)
@@ -2,6 +2,7 @@
 #define BOTTOMBAR_H
 
 #include <QWidget>
+#include <QDesktopWidget>
 
 namespace Ui {
     class bottomBar;
index a8cc04b..83c3a93 100644 (file)
      <property name="autoFillBackground">
       <bool>false</bool>
      </property>
-     <property name="backgroundBrush">
-      <brush brushstyle="SolidPattern">
-       <color alpha="255">
-        <red>51</red>
-        <green>154</green>
-        <blue>249</blue>
-       </color>
-      </brush>
-     </property>
-     <property name="foregroundBrush">
-      <brush brushstyle="SolidPattern">
-       <color alpha="255">
-        <red>0</red>
-        <green>0</green>
-        <blue>0</blue>
-       </color>
-      </brush>
-     </property>
      <property name="interactive">
       <bool>false</bool>
      </property>
-     <property name="sceneRect">
-      <rectf>
-       <x>0.000000000000000</x>
-       <y>0.000000000000000</y>
-       <width>0.000000000000000</width>
-       <height>0.000000000000000</height>
-      </rectf>
-     </property>
     </widget>
    </item>
    <item>
index f763ae2..ced6f4e 100644 (file)
@@ -54,6 +54,7 @@ groove::groove(QWidget *parent) :
     resultView->setColumnHidden(2,true);
     resultView->setColumnHidden(3,true);
     resultView->setAutoScroll(false);
+    resultView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
     /*QPalette pal = resultView->palette();
     pal.setBrush(QPalette::Highlight,QBrush(Qt::transparent,Qt::NoBrush));
     resultView->setPalette(pal);*/
index 7777127..9506ed8 100644 (file)
--- a/gscom.cpp
+++ b/gscom.cpp
@@ -174,6 +174,8 @@ void gscom::replyFinished(QNetworkReply *reply)
                 if(cookie.name() == "PHPSESSID")
                 {
                     phpSession = new QString(cookie.value());
+                    qDebug() << QDateTime::currentDateTime();
+                    qDebug() << cookie.expirationDate();
                 }
             }
             reply->readAll();
@@ -197,6 +199,7 @@ void gscom::replyFinished(QNetworkReply *reply)
                 sessionKey = new QString(result["result"].toString());
                 qDebug() << sessionKey->toAscii();
             }
+            qDebug() << result;
             currentaction = none;
             reply->close();
             emit finishedSearch();
@@ -216,6 +219,7 @@ void gscom::replyFinished(QNetworkReply *reply)
                 currentaction = getPHP;
                 manager->get(QNetworkRequest(QUrl(QString("http://") + GS_LISTEN)));
                 qDebug() << reply->readAll();
+                qDebug() << result;
                 reply->close();
                 return;
             }
diff --git a/searchresults.cpp b/searchresults.cpp
new file mode 100644 (file)
index 0000000..10a6883
--- /dev/null
@@ -0,0 +1,26 @@
+#include "searchresults.h"
+#include "ui_searchresults.h"
+
+SearchResults::SearchResults(QWidget *parent) :
+    QWidget(parent),
+    ui(new Ui::SearchResults)
+{
+    ui->setupUi(this);
+}
+
+SearchResults::~SearchResults()
+{
+    delete ui;
+}
+
+void SearchResults::changeEvent(QEvent *e)
+{
+    QWidget::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
diff --git a/searchresults.h b/searchresults.h
new file mode 100644 (file)
index 0000000..8c8eca4
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef SEARCHRESULTS_H
+#define SEARCHRESULTS_H
+
+#include <QWidget>
+
+namespace Ui {
+    class SearchResults;
+}
+
+class SearchResults : public QWidget
+{
+    Q_OBJECT
+
+public:
+    explicit SearchResults(QWidget *parent = 0);
+    ~SearchResults();
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::SearchResults *ui;
+};
+
+#endif // SEARCHRESULTS_H
diff --git a/searchresults.ui b/searchresults.ui
new file mode 100644 (file)
index 0000000..2fa1dc4
--- /dev/null
@@ -0,0 +1,21 @@
+<ui version="4.0">
+ <author/>
+ <comment/>
+ <exportmacro/>
+ <class>SearchResults</class>
+ <widget class="QWidget" name="SearchResults">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+ </widget>
+ <pixmapfunction/>
+ <connections/>
+</ui>