Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Jenirok
Summary Tracker SCM Files
authoreshe <jessehakanen@gmail.com>
Fri, 28 May 2010 19:45:34 +0000 (20:45 +0100)
committereshe <jessehakanen@gmail.com>
Fri, 28 May 2010 19:45:34 +0000 (20:45 +0100)
19 files changed:
Makefile
src/common/eniro.cpp
src/common/translations/fi_FI.qm
src/common/translations/fi_FI.ts
src/daemon/Makefile
src/gui/Makefile
src/gui/aboutdialog.cpp [new file with mode: 0644]
src/gui/aboutdialog.h [new file with mode: 0644]
src/gui/detailwindow.cpp
src/gui/detailwindow.h
src/gui/gui.pro
src/gui/icons.grc
src/gui/icons/icon.png [new file with mode: 0644]
src/gui/icons/start.png [changed mode: 0755->0644]
src/gui/icons/stop.png [changed mode: 0755->0644]
src/gui/mainwindow.cpp
src/gui/mainwindow.h
src/gui/searchdialog.cpp
src/gui/searchdialog.h

index d117851..e40eaf1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: jenirok
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri May 28 18:25:16 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri May 28 20:43:16 2010
 # Project:  jenirok.pro
 # Template: subdirs
 # Command: /usr/bin/qmake -unix -o Makefile jenirok.pro
index 63dc421..90d2493 100644 (file)
@@ -42,8 +42,8 @@ namespace
          "dk"
     };
 
-    static const QString INVALID_LOGIN_STRING = "Invalid login details";
-    static const QString TIMEOUT_STRING = "Request timed out";
+    static const QString INVALID_LOGIN_STRING = QObject::tr("Invalid login details");
+    static const QString TIMEOUT_STRING = QObject::tr("Request timed out");
     static const QString PERSON_REGEXP = "<td class=\"hTd2\">(.*)<b>(.*)</td>";
     static const QString YELLOW_REGEXP = "<td class=\"hTd2\">(.*)<span class=\"gray\"\\}>(.*)</td>";
     static const QString NUMBER_REGEXP = "<div class=\"callRow\">(.*)</div>";
index 5df0c8e..cd6dc7b 100644 (file)
Binary files a/src/common/translations/fi_FI.qm and b/src/common/translations/fi_FI.qm differ
index b610970..b7d12f5 100644 (file)
@@ -2,6 +2,14 @@
 <!DOCTYPE TS>
 <TS version="2.0" language="fi_FI">
 <context>
+    <name>AboutDialog</name>
+    <message>
+        <location filename="../../gui/aboutdialog.cpp" line="27"/>
+        <source>About</source>
+        <translation>Tietoa</translation>
+    </message>
+</context>
+<context>
     <name>CallListener</name>
     <message>
         <source>Searching...</source>
@@ -20,7 +28,7 @@
     <name>DetailWindow</name>
     <message>
         <location filename="../../gui/detailwindow.cpp" line="42"/>
-        <location filename="../../gui/detailwindow.cpp" line="120"/>
+        <location filename="../../gui/detailwindow.cpp" line="119"/>
         <source>Add to contacts</source>
         <translation>Lisää yhteistietoihin</translation>
     </message>
@@ -41,7 +49,7 @@
     </message>
     <message>
         <location filename="../../gui/detailwindow.cpp" line="53"/>
-        <location filename="../../gui/detailwindow.cpp" line="123"/>
+        <location filename="../../gui/detailwindow.cpp" line="122"/>
         <source>Name</source>
         <translation>Nimi</translation>
     </message>
         <translation>Puhelinnumero</translation>
     </message>
     <message>
-        <location filename="../../gui/detailwindow.cpp" line="110"/>
+        <location filename="../../gui/detailwindow.cpp" line="109"/>
         <source>Unable make call</source>
         <translation>Puhelun aloittaminen epäonnistui</translation>
     </message>
     <message>
-        <location filename="../../gui/detailwindow.cpp" line="124"/>
+        <location filename="../../gui/detailwindow.cpp" line="123"/>
         <source>Add</source>
         <translation>Lisää</translation>
     </message>
     <message>
-        <location filename="../../gui/detailwindow.cpp" line="155"/>
+        <location filename="../../gui/detailwindow.cpp" line="154"/>
         <source>Contact was successfully added to contacts.</source>
         <translation>Yhteystieto lisättiin onnistuneesti.</translation>
     </message>
     <message>
-        <location filename="../../gui/detailwindow.cpp" line="191"/>
+        <location filename="../../gui/detailwindow.cpp" line="190"/>
         <source>Unable to open SMS application</source>
         <translation>SMS-sovelluksen käynnistäminen epäonnistui</translation>
     </message>
     <message>
-        <location filename="../../gui/detailwindow.cpp" line="110"/>
-        <location filename="../../gui/detailwindow.cpp" line="159"/>
-        <location filename="../../gui/detailwindow.cpp" line="191"/>
+        <location filename="../../gui/detailwindow.cpp" line="109"/>
+        <location filename="../../gui/detailwindow.cpp" line="158"/>
+        <location filename="../../gui/detailwindow.cpp" line="190"/>
         <source>Error</source>
         <translation>Virhe</translation>
     </message>
     <message>
-        <location filename="../../gui/detailwindow.cpp" line="159"/>
+        <location filename="../../gui/detailwindow.cpp" line="158"/>
         <source>Unable to add contact.</source>
         <translation>Yhteystiedon lisääminen epäonnistui,</translation>
     </message>
     <message>
-        <location filename="../../gui/detailwindow.cpp" line="167"/>
+        <location filename="../../gui/detailwindow.cpp" line="166"/>
         <source>Number was successfully copied to clipboard.</source>
         <translation>Numero kopioitiin onnistuneesti leikepöydälle.</translation>
     </message>
     </message>
     <message>
         <location filename="../../gui/mainwindow.cpp" line="50"/>
-        <location filename="../../gui/mainwindow.cpp" line="114"/>
+        <location filename="../../gui/mainwindow.cpp" line="115"/>
         <source>Stop daemon</source>
         <translation>Pysäytä</translation>
     </message>
     <message>
         <location filename="../../gui/mainwindow.cpp" line="56"/>
-        <location filename="../../gui/mainwindow.cpp" line="107"/>
+        <location filename="../../gui/mainwindow.cpp" line="108"/>
         <source>Start daemon</source>
         <translation>Käynnistä</translation>
     </message>
         <translation>Asetukset</translation>
     </message>
     <message>
-        <location filename="../../gui/mainwindow.cpp" line="105"/>
+        <location filename="../../gui/mainwindow.cpp" line="79"/>
+        <source>About</source>
+        <translation>Tietoa</translation>
+    </message>
+    <message>
+        <location filename="../../gui/mainwindow.cpp" line="106"/>
         <source>Daemon was successfully stopped.</source>
         <translation>Palvelu pysäytettiin onnistuneesti.</translation>
     </message>
     <message>
-        <location filename="../../gui/mainwindow.cpp" line="106"/>
+        <location filename="../../gui/mainwindow.cpp" line="107"/>
         <source>Unable to stop daemon.</source>
         <translation>Palvelun pysäyttäminen ei onnistunut.</translation>
     </message>
     <message>
-        <location filename="../../gui/mainwindow.cpp" line="112"/>
+        <location filename="../../gui/mainwindow.cpp" line="113"/>
         <source>Daemon was successfully started.</source>
         <translation>Palvelu käynnistettiin onnistuneesti.</translation>
     </message>
     <message>
-        <location filename="../../gui/mainwindow.cpp" line="113"/>
+        <location filename="../../gui/mainwindow.cpp" line="114"/>
         <source>Unable to start daemon.</source>
         <translation>Palvelun käynnistäminen ei onnistunut.</translation>
     </message>
     <message>
-        <location filename="../../gui/mainwindow.cpp" line="120"/>
+        <location filename="../../gui/mainwindow.cpp" line="121"/>
         <source>Error</source>
         <translation>Virhe</translation>
     </message>
     <message>
-        <location filename="../../gui/mainwindow.cpp" line="143"/>
+        <location filename="../../gui/mainwindow.cpp" line="144"/>
         <source>Info</source>
         <translation>Info</translation>
     </message>
     <message>
-        <location filename="../../gui/mainwindow.cpp" line="143"/>
+        <location filename="../../gui/mainwindow.cpp" line="144"/>
         <source>You need to set Eniro login details in settings before using this feature.</source>
         <translation>Sinun täytyy asettaa Eniro-tunnus ja -salasana asetuksista ennen kuin voit käyttää tätä ominaisuutta.</translation>
     </message>
 </context>
 <context>
+    <name>QObject</name>
+    <message>
+        <location filename="../eniro.cpp" line="45"/>
+        <source>Invalid login details</source>
+        <translation>Virheellinen tunnus tai salasana</translation>
+    </message>
+    <message>
+        <location filename="../eniro.cpp" line="46"/>
+        <source>Request timed out</source>
+        <translation>Pyyntö aikakatkaistiin</translation>
+    </message>
+</context>
+<context>
     <name>ResultWindow</name>
     <message>
         <location filename="../../gui/resultwindow.cpp" line="34"/>
         <translation>Eniro-sivusto</translation>
     </message>
     <message>
-        <location filename="../../gui/settingsdialog.cpp" line="73"/>
+        <location filename="../../gui/settingsdialog.cpp" line="79"/>
         <source>Finnish</source>
         <translation>Suomi</translation>
     </message>
     <message>
-        <location filename="../../gui/settingsdialog.cpp" line="76"/>
+        <location filename="../../gui/settingsdialog.cpp" line="82"/>
         <source>Swedish</source>
         <translation>Ruotsi</translation>
     </message>
     <message>
-        <location filename="../../gui/settingsdialog.cpp" line="79"/>
+        <location filename="../../gui/settingsdialog.cpp" line="85"/>
         <source>Danish</source>
         <translation>Tanska</translation>
     </message>
     <message>
-        <location filename="../../gui/settingsdialog.cpp" line="96"/>
+        <location filename="../../gui/settingsdialog.cpp" line="102"/>
         <source>Autostart</source>
         <translation>Käynnistä automaattisesti</translation>
     </message>
     <message>
-        <location filename="../../gui/settingsdialog.cpp" line="98"/>
+        <location filename="../../gui/settingsdialog.cpp" line="104"/>
         <source>Enabled</source>
         <translation>Kyllä</translation>
     </message>
     <message>
-        <location filename="../../gui/settingsdialog.cpp" line="99"/>
+        <location filename="../../gui/settingsdialog.cpp" line="105"/>
         <source>Disabled</source>
         <translation>Ei</translation>
     </message>
     <message>
-        <location filename="../../gui/settingsdialog.cpp" line="102"/>
+        <location filename="../../gui/settingsdialog.cpp" line="108"/>
         <source>Save</source>
         <translation>Tallenna</translation>
     </message>
     <message>
-        <location filename="../../gui/settingsdialog.cpp" line="148"/>
+        <location filename="../../gui/settingsdialog.cpp" line="154"/>
         <source>Restarting daemon...</source>
         <translation>Käynnistetään palvelu uudelleen...</translation>
     </message>
     <message numerus="yes">
-        <location filename="../../gui/settingsdialog.cpp" line="185"/>
+        <location filename="../../gui/settingsdialog.cpp" line="178"/>
         <source>%n number(s) were deleted from cache</source>
         <translation>
             <numerusform>Poistettiin %n numero välimuistista</numerusform>
index 6ad019f..9382160 100644 (file)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: jenirokd
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri May 28 18:25:43 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri May 28 20:43:40 2010
 # Project:  daemon.pro
 # Template: app
 # Command: /usr/bin/qmake -unix -o Makefile daemon.pro
index ce95e99..261cd8c 100644 (file)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: jenirok
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri May 28 18:25:18 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri May 28 20:43:25 2010
 # Project:  gui.pro
 # Template: app
 # Command: /usr/bin/qmake -unix -o Makefile gui.pro
@@ -49,6 +49,7 @@ SOURCES       = main.cpp \
                resultwindow.cpp \
                detailwindow.cpp \
                settingsdialog.cpp \
+               aboutdialog.cpp \
                buttonselector.cpp \
                daemon.cpp \
                ../common/eniro.cpp \
@@ -61,6 +62,7 @@ SOURCES       = main.cpp \
                moc_resultwindow.cpp \
                moc_detailwindow.cpp \
                moc_settingsdialog.cpp \
+               moc_aboutdialog.cpp \
                moc_eniro.cpp \
                moc_connectionmanager.cpp \
                qrc_icons.cpp \
@@ -71,6 +73,7 @@ OBJECTS       = main.o \
                resultwindow.o \
                detailwindow.o \
                settingsdialog.o \
+               aboutdialog.o \
                buttonselector.o \
                daemon.o \
                eniro.o \
@@ -84,6 +87,7 @@ OBJECTS       = main.o \
                moc_resultwindow.o \
                moc_detailwindow.o \
                moc_settingsdialog.o \
+               moc_aboutdialog.o \
                moc_eniro.o \
                moc_connectionmanager.o \
                qrc_icons.o \
@@ -200,7 +204,7 @@ qmake:  FORCE
 
 dist: 
        @$(CHK_DIR_EXISTS) .tmp/jenirok1.0.0 || $(MKDIR) .tmp/jenirok1.0.0 
-       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/jenirok1.0.0/ && $(COPY_FILE) --parents mainwindow.h searchdialog.h resultwindow.h detailwindow.h settingsdialog.h buttonselector.h daemon.h ../common/eniro.h ../common/contactmanager.h ../common/db.h ../common/settings.h ../common/connectionmanager.h ../common/cache.h .tmp/jenirok1.0.0/ && $(COPY_FILE) --parents icons.grc ../common/translations.grc .tmp/jenirok1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp searchdialog.cpp resultwindow.cpp detailwindow.cpp settingsdialog.cpp buttonselector.cpp daemon.cpp ../common/eniro.cpp ../common/contactmanager.cpp ../common/db.cpp ../common/settings.cpp ../common/connectionmanager.cpp ../common/cache.cpp .tmp/jenirok1.0.0/ && $(COPY_FILE) --parents ../common/translations/fi_FI.ts .tmp/jenirok1.0.0/ && (cd `dirname .tmp/jenirok1.0.0` && $(TAR) jenirok1.0.0.tar jenirok1.0.0 && $(COMPRESS) jenirok1.0.0.tar) && $(MOVE) `dirname .tmp/jenirok1.0.0`/jenirok1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/jenirok1.0.0
+       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/jenirok1.0.0/ && $(COPY_FILE) --parents mainwindow.h searchdialog.h resultwindow.h detailwindow.h settingsdialog.h aboutdialog.h buttonselector.h daemon.h ../common/eniro.h ../common/contactmanager.h ../common/db.h ../common/settings.h ../common/connectionmanager.h ../common/cache.h .tmp/jenirok1.0.0/ && $(COPY_FILE) --parents icons.grc ../common/translations.grc .tmp/jenirok1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp searchdialog.cpp resultwindow.cpp detailwindow.cpp settingsdialog.cpp aboutdialog.cpp buttonselector.cpp daemon.cpp ../common/eniro.cpp ../common/contactmanager.cpp ../common/db.cpp ../common/settings.cpp ../common/connectionmanager.cpp ../common/cache.cpp .tmp/jenirok1.0.0/ && $(COPY_FILE) --parents ../common/translations/fi_FI.ts .tmp/jenirok1.0.0/ && (cd `dirname .tmp/jenirok1.0.0` && $(TAR) jenirok1.0.0.tar jenirok1.0.0 && $(COMPRESS) jenirok1.0.0.tar) && $(MOVE) `dirname .tmp/jenirok1.0.0`/jenirok1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/jenirok1.0.0
 
 
 clean:compiler_clean 
@@ -219,12 +223,13 @@ mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
 
-compiler_moc_header_make_all: moc_mainwindow.cpp moc_searchdialog.cpp moc_resultwindow.cpp moc_detailwindow.cpp moc_settingsdialog.cpp moc_eniro.cpp moc_connectionmanager.cpp
+compiler_moc_header_make_all: moc_mainwindow.cpp moc_searchdialog.cpp moc_resultwindow.cpp moc_detailwindow.cpp moc_settingsdialog.cpp moc_aboutdialog.cpp moc_eniro.cpp moc_connectionmanager.cpp
 compiler_moc_header_clean:
-       -$(DEL_FILE) moc_mainwindow.cpp moc_searchdialog.cpp moc_resultwindow.cpp moc_detailwindow.cpp moc_settingsdialog.cpp moc_eniro.cpp moc_connectionmanager.cpp
+       -$(DEL_FILE) moc_mainwindow.cpp moc_searchdialog.cpp moc_resultwindow.cpp moc_detailwindow.cpp moc_settingsdialog.cpp moc_aboutdialog.cpp moc_eniro.cpp moc_connectionmanager.cpp
 moc_mainwindow.cpp: searchdialog.h \
                buttonselector.h \
                settingsdialog.h \
+               aboutdialog.h \
                mainwindow.h
        /usr/bin/moc $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp
 
@@ -246,6 +251,9 @@ moc_settingsdialog.cpp: buttonselector.h \
                settingsdialog.h
        /usr/bin/moc $(DEFINES) $(INCPATH) settingsdialog.h -o moc_settingsdialog.cpp
 
+moc_aboutdialog.cpp: aboutdialog.h
+       /usr/bin/moc $(DEFINES) $(INCPATH) aboutdialog.h -o moc_aboutdialog.cpp
+
 moc_eniro.cpp: ../common/eniro.h
        /usr/bin/moc $(DEFINES) $(INCPATH) ../common/eniro.h -o moc_eniro.cpp
 
@@ -257,7 +265,8 @@ compiler_rcc_clean:
        -$(DEL_FILE) qrc_icons.cpp qrc_translations.cpp
 qrc_icons.cpp: icons.grc \
                icons/stop.png \
-               icons/start.png
+               icons/start.png \
+               icons/icon.png
        /usr/bin/rcc -name icons icons.grc -o qrc_icons.cpp
 
 qrc_translations.cpp: ../common/translations.grc \
@@ -285,6 +294,7 @@ main.o: main.cpp mainwindow.h \
                searchdialog.h \
                buttonselector.h \
                settingsdialog.h \
+               aboutdialog.h \
                resultwindow.h \
                detailwindow.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
@@ -293,6 +303,7 @@ mainwindow.o: mainwindow.cpp mainwindow.h \
                searchdialog.h \
                buttonselector.h \
                settingsdialog.h \
+               aboutdialog.h \
                daemon.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
 
@@ -315,6 +326,9 @@ settingsdialog.o: settingsdialog.cpp settingsdialog.h \
                daemon.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o settingsdialog.o settingsdialog.cpp
 
+aboutdialog.o: aboutdialog.cpp aboutdialog.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o aboutdialog.o aboutdialog.cpp
+
 buttonselector.o: buttonselector.cpp buttonselector.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o buttonselector.o buttonselector.cpp
 
@@ -358,6 +372,9 @@ moc_detailwindow.o: moc_detailwindow.cpp
 moc_settingsdialog.o: moc_settingsdialog.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_settingsdialog.o moc_settingsdialog.cpp
 
+moc_aboutdialog.o: moc_aboutdialog.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_aboutdialog.o moc_aboutdialog.cpp
+
 moc_eniro.o: moc_eniro.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_eniro.o moc_eniro.cpp
 
diff --git a/src/gui/aboutdialog.cpp b/src/gui/aboutdialog.cpp
new file mode 100644 (file)
index 0000000..e7eb716
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * This file is part of Jenirok.
+ *
+ * Jenirok is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Jenirok is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jenirok.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QLabel>
+#include <QtGui/QPixmap>
+#include "aboutdialog.h"
+
+AboutDialog::AboutDialog(QWidget* parent): QDialog(parent)
+{
+       setWindowTitle(tr("About"));
+
+       QHBoxLayout* mainLayout = new QHBoxLayout();
+       QPixmap pixmap(":/icons/icon.png");
+       QLabel* image = new QLabel;
+       image->setPixmap(pixmap);
+       mainLayout->addWidget(image, 0, Qt::AlignLeft);
+       mainLayout->addSpacing(20);
+       QLabel* text = new QLabel("<font size='4'><b>Jenirok</b></font><br>(c) 2010 Jesse Hakanen<br><a href='http://jenirok.garage.maemo.org'>http://jenirok.garage.maemo.org</a>");
+       mainLayout->addWidget(text, 10, Qt::AlignLeft);
+
+       setLayout(mainLayout);
+}
diff --git a/src/gui/aboutdialog.h b/src/gui/aboutdialog.h
new file mode 100644 (file)
index 0000000..fcc677f
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * This file is part of Jenirok.
+ *
+ * Jenirok is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Jenirok is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jenirok.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ABOUTDIALOG_H
+#define ABOUTDIALOG_H
+
+#include <QtGui/QDialog>
+#include <QtGui/QWidget>
+
+
+class AboutDialog : public QDialog
+{
+    Q_OBJECT
+
+public:
+
+    AboutDialog(QWidget* parent = 0);
+
+private:
+
+};
+
+#endif
index 8dc4349..23a591f 100644 (file)
@@ -32,7 +32,7 @@
 DetailWindow::DetailWindow(QWidget* parent): QMainWindow(parent), addDialog_(0)
 {
     setAttribute(Qt::WA_Maemo5StackedWindow);
-    area_ = new QScrollArea(this);
+    area_ = new QWidget(this);
     layout_ = new QVBoxLayout;
     QHBoxLayout* top = new QHBoxLayout;
     QHBoxLayout* bottom = new QHBoxLayout;
@@ -81,7 +81,6 @@ void DetailWindow::loadData(Eniro::Result const& details)
     streetButton_->setValueText(details.street);
     cityButton_->setValueText(details.city);
     numberButton_->setValueText(details.number);
-    layout_->update();
     show();
 }
 
index ff6b87a..73f8232 100644 (file)
@@ -21,9 +21,9 @@
 
 #include <QtGui/QMainWindow>
 #include <QtGui/QVBoxLayout>
-#include <QtGui/QScrollArea>
 #include <QtGui/QDialog>
 #include <QtGui/QLineEdit>
+#include <QtGui/QWidget>
 #include <QMaemo5ValueButton>
 #include "searchdialog.h"
 #include "eniro.h"
@@ -46,7 +46,7 @@ private slots:
     void sendSMS();
 
 private:
-    QScrollArea* area_;
+    QWidget* area_;
     QVBoxLayout* layout_;
     QMaemo5ValueButton* nameButton_;
     QMaemo5ValueButton* streetButton_;
index cd5c6b3..c0ea702 100644 (file)
@@ -1,8 +1,8 @@
 QT += network sql maemo5
 TARGET = jenirok
 TEMPLATE = app
-SOURCES += main.cpp mainwindow.cpp searchdialog.cpp resultwindow.cpp detailwindow.cpp settingsdialog.cpp buttonselector.cpp daemon.cpp ../common/eniro.cpp ../common/contactmanager.cpp ../common/db.cpp ../common/settings.cpp ../common/connectionmanager.cpp ../common/cache.cpp
-HEADERS += mainwindow.h searchdialog.h resultwindow.h detailwindow.h settingsdialog.h buttonselector.h daemon.h ../common/eniro.h ../common/contactmanager.h ../common/db.h ../common/settings.h ../common/connectionmanager.h ../common/cache.h
+SOURCES += main.cpp mainwindow.cpp searchdialog.cpp resultwindow.cpp detailwindow.cpp settingsdialog.cpp aboutdialog.cpp buttonselector.cpp daemon.cpp ../common/eniro.cpp ../common/contactmanager.cpp ../common/db.cpp ../common/settings.cpp ../common/connectionmanager.cpp ../common/cache.cpp
+HEADERS += mainwindow.h searchdialog.h resultwindow.h detailwindow.h settingsdialog.h aboutdialog.h buttonselector.h daemon.h ../common/eniro.h ../common/contactmanager.h ../common/db.h ../common/settings.h ../common/connectionmanager.h ../common/cache.h
 TRANSLATIONS = ../common/translations/fi_FI.ts
 RESOURCES = icons.grc ../common/translations.grc
 INCLUDEPATH += ../common
index 4ac0e8f..68f3e89 100644 (file)
@@ -2,5 +2,6 @@
 <qresource>
     <file>icons/start.png</file>
     <file>icons/stop.png</file>
+    <file>icons/icon.png</file>
 </qresource>
 </RCC>
diff --git a/src/gui/icons/icon.png b/src/gui/icons/icon.png
new file mode 100644 (file)
index 0000000..4f40c0c
Binary files /dev/null and b/src/gui/icons/icon.png differ
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index cec7517..9b0f459 100644 (file)
@@ -39,7 +39,7 @@ namespace
 
 MainWindow::MainWindow(QWidget* parent): QMainWindow(parent),
 searchResults_(0), settingsDialog_(0), running_(false),
-toggleButton_(0), searchDialog_(0)
+toggleButton_(0), searchDialog_(0), aboutDialog_(0)
 {
     setWindowTitle(tr("Jenirok"));
     setAttribute(Qt::WA_Maemo5StackedWindow);
@@ -76,6 +76,7 @@ toggleButton_(0), searchDialog_(0)
 
     setCentralWidget(mainWidget);
     menuBar()->addAction(tr("Settings"), this, SLOT(showSettings()));
+    menuBar()->addAction(tr("About"), this, SLOT(showAbout()));
 }
 
 MainWindow::~MainWindow()
@@ -165,3 +166,14 @@ void MainWindow::handleSearch(SearchDialog::SearchDetails& details)
 {
     emit search(details);
 }
+
+void MainWindow::showAbout()
+{
+       if(!aboutDialog_)
+       {
+               aboutDialog_ = new AboutDialog(this);
+       }
+
+       aboutDialog_->show();
+
+}
index fc7f12e..43d71b7 100644 (file)
@@ -25,6 +25,7 @@
 #include <QtGui/QListWidget>
 #include "searchdialog.h"
 #include "settingsdialog.h"
+#include "aboutdialog.h"
 
 class MainWindow : public QMainWindow
 {
@@ -39,6 +40,7 @@ signals:
 
 public slots:
     void showSettings();
+    void showAbout();
     void toggleDaemon();
     void openSearch();
     void handleSearch(SearchDialog::SearchDetails& details);
@@ -50,6 +52,7 @@ private:
     bool running_;
     QToolButton* toggleButton_;
     SearchDialog* searchDialog_;
+    AboutDialog* aboutDialog_;
 
 };
 
index 16636c1..702075c 100644 (file)
@@ -79,3 +79,9 @@ void SearchDialog::searchPressed()
     emit search(details);
     hide();
 }
+
+void SearchDialog::setVisible(bool visible)
+{
+       QDialog::setVisible(visible);
+       numberInput_->setFocus();
+}
index 3364c1a..193ee83 100644 (file)
@@ -40,6 +40,7 @@ public:
     };
 
     SearchDialog(QWidget* parent = 0);
+    virtual void setVisible(bool visible);
 
 signals:
     void search(SearchDialog::SearchDetails& details);

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment