* New upstream release.
authorgregor herrmann <gregoa@debian.org>
Mon, 26 Mar 2007 14:49:08 +0000 (14:49 -0000)
committergregor herrmann <gregoa@debian.org>
Mon, 26 Mar 2007 14:49:08 +0000 (14:49 -0000)
* First release that can be built under Qt 4.2 and Qt 4.1.

ChangeLog
debian/changelog
main.cpp
main.h
maindialog_old.ui [new file with mode: 0644]
options.cpp
qteleschorsch.pro

index a821c5ffc940d9c32524b7f4cf7c6f0a736a26d1..53cb1b88a2242ed546bd1cd3e94a60d067adf6ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,49 @@
 ------------------------------------------------------------------------
+r454 | gregoa | 2007-03-26 01:21:16 +0200 (Mon, 26 Mar 2007) | 1 line
+Changed paths:
+   M /teleschorsch/trunk/options.cpp
+
+qteleschorsch now compiles under Qt 4.1.2
+------------------------------------------------------------------------
+r453 | gregoa | 2007-03-25 23:50:47 +0200 (Sun, 25 Mar 2007) | 1 line
+Changed paths:
+   M /teleschorsch/trunk/qteleschorsch.pro
+
+reformat commented out stuff
+------------------------------------------------------------------------
+r452 | gregoa | 2007-03-22 00:07:28 +0100 (Thu, 22 Mar 2007) | 1 line
+Changed paths:
+   M /teleschorsch/trunk/maindialog_old.ui
+   M /teleschorsch/trunk/qteleschorsch.pro
+
+remove calendarPopup from teOffset (Qt 4.2) in maindialog_old.ui
+------------------------------------------------------------------------
+r451 | gregoa | 2007-03-21 23:45:43 +0100 (Wed, 21 Mar 2007) | 1 line
+Changed paths:
+   A /teleschorsch/trunk/maindialog_old.ui
+
+fix detection of qt 4.1/4.2 in .pro
+------------------------------------------------------------------------
+r450 | gregoa | 2007-03-21 23:43:00 +0100 (Wed, 21 Mar 2007) | 1 line
+Changed paths:
+   M /teleschorsch/trunk/qteleschorsch.pro
+
+fix detection of qt 4.1/4.2 in .pro
+------------------------------------------------------------------------
+r449 | gregoa | 2007-03-21 23:20:22 +0100 (Wed, 21 Mar 2007) | 1 line
+Changed paths:
+   M /teleschorsch/trunk/main.cpp
+   M /teleschorsch/trunk/main.h
+   M /teleschorsch/trunk/qteleschorsch.pro
+
+first step towards conditional compilation on Qt 4.1/Qt4.2
+------------------------------------------------------------------------
+r448 | gregoa | 2007-03-10 20:01:14 +0100 (Sat, 10 Mar 2007) | 1 line
+Changed paths:
+   M /teleschorsch/trunk/teleschorschrc
+
+added  heute to teleschorschrc
+------------------------------------------------------------------------
 r447 | philipp | 2007-03-09 23:42:31 +0100 (Fri, 09 Mar 2007) | 2 lines
 Changed paths:
    M /teleschorsch/trunk/main.cpp
index 5ad45d60eba00788cb5a96916e326e63a823439a..27050c919a9fc64dc6481365318d806c137cef2d 100644 (file)
@@ -1,3 +1,10 @@
+teleschorsch (0.1.7-1) unstable; urgency=low
+
+  * New upstream release.
+  * First release that can be built under Qt 4.2 and Qt 4.1.
+
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Mon, 26 Mar 2007 16:47:42 +0200
+
 teleschorsch (0.1.6-1) unstable; urgency=low
 
   * New upstream release.
index e277c6fbc59699cf39899d02efaf95a7187dc71f..f6e223ee8ccbbf0d68dc397d81fca9c27f0238c8 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -261,7 +261,11 @@ MainDialog::MainDialog(QWidget *parent): QDialog(parent) {
        // Default date
        QDateTime dateTime = QDateTime::currentDateTime(); // set the default date to today if it is past midday
        if (dateTime.time().hour() < 12) dateTime = dateTime.addDays(-1);
+#if QT_VERSION >= 0x040200
        calDate->setSelectedDate(dateTime.date());
+#else
+       calDateEdit->setDate(dateTime.date());
+#endif
 }
 
 
@@ -291,7 +295,11 @@ bool MainDialog::startAction() {
        int row = lwChannels->currentRow();
        if (row >= 0) {
                Channel channel = channelVec[row];
+#if QT_VERSION >= 0x040200
                QDate date = calDate->selectedDate();
+#else
+               QDate date = calDateEdit->date();
+#endif
                QString substUrl;
                QString errorMsg;
                if (!evaluateStaticUrl(channel.staticUrl, date, substUrl, errorMsg)) {
diff --git a/main.h b/main.h
index e9d01c53a0bda21e5184d3fe050d3a3eba6e4790..374bd9cdac755f7646a44fda122aa225b821adf4 100644 (file)
--- a/main.h
+++ b/main.h
@@ -1,6 +1,10 @@
 #ifndef MAIN_H
 #define MAIN_H
+#if QT_VERSION >= 0x040200
 #include "ui_maindialog.h"
+#else
+#include "ui_maindialog_old.h"
+#endif
 
 // Types
 // =====
diff --git a/maindialog_old.ui b/maindialog_old.ui
new file mode 100644 (file)
index 0000000..b5a6d3b
--- /dev/null
@@ -0,0 +1,197 @@
+<ui version="4.0" >
+ <class>MainDialog</class>
+ <widget class="QDialog" name="MainDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>661</width>
+    <height>584</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>TeleSchorsch</string>
+  </property>
+  <property name="windowIcon" >
+   <iconset resource="qteleschorsch.qrc" >:/teleschorsch.png</iconset>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <widget class="QLabel" name="labChannels" >
+         <property name="text" >
+          <string>Channel</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QListWidget" name="lwChannels" >
+         <property name="minimumSize" >
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="baseSize" >
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <widget class="QLabel" name="labDate" >
+         <property name="text" >
+          <string>Date</string>
+         </property>
+        </widget>
+       </item>
+      <item>
+       <widget class="QDateEdit" name="calDateEdit" >
+        <property name="displayFormat" >
+         <string>dd MMM yyyy</string>
+        </property>
+       </widget>
+      </item>
+       <item>
+        <widget class="QLabel" name="labOffset" >
+         <property name="text" >
+          <string>Offset</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QTimeEdit" name="teOffset" >
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>20</width>
+           <height>1000</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QPushButton" name="btnOptions" >
+       <property name="text" >
+        <string>Options</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="btnStart" >
+       <property name="text" >
+        <string>Start</string>
+       </property>
+       <property name="default" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="btnQuit" >
+       <property name="text" >
+        <string>Quit</string>
+       </property>
+       <property name="shortcut" >
+        <string/>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>lwChannels</tabstop>
+  <tabstop>calDateEdit</tabstop>
+  <tabstop>teOffset</tabstop>
+  <tabstop>btnStart</tabstop>
+  <tabstop>btnQuit</tabstop>
+  <tabstop>btnOptions</tabstop>
+ </tabstops>
+ <resources>
+  <include location="qteleschorsch.qrc" />
+ </resources>
+ <connections>
+  <connection>
+   <sender>btnQuit</sender>
+   <signal>clicked()</signal>
+   <receiver>MainDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>352</x>
+     <y>308</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>199</x>
+     <y>169</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index eb3f4e685350a863acb44fd7029a6a9cc7bd5d0d..99de0f9ab18fabf05b976d888c311f6dc363cebd 100644 (file)
@@ -25,8 +25,13 @@ bool OptionsDialog::exec(const QString& configFile) {
        }
        QFile configFileUser(configFile);
        if (!configFileUser.exists()) {
+#if QT_VERSION >= 0x040200
                QMessageBox::StandardButton answer = QMessageBox::question(this, tr("Create user config file?"), tr("The user config file %1 does not exist. Do you want to create it?").arg(configFile), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::Yes);
                if (answer != QMessageBox::Yes) return false;
+#else
+               int answer = QMessageBox::question (this, tr("Create user config file?"), tr("The user config file %1 does not exist. Do you want to create it?").arg(configFile), QMessageBox::Ok, QMessageBox::Cancel);
+               if (answer != 1) return false;
+#endif
                teIni->clear();
        } else {
                if (!configFileUser.open(QIODevice::ReadOnly | QIODevice::Text)) {
@@ -35,7 +40,11 @@ bool OptionsDialog::exec(const QString& configFile) {
                }
                QTextStream in(&configFileUser);
                while (!in.atEnd()) teIni->append(in.readLine());
+#if QT_VERSION >= 0x040200
                teIni->moveCursor(QTextCursor::Start);
+#else
+               // 
+#endif
        }
        configFileUser.close();
        if (QDialog::exec() == QDialog::Accepted) {
index 70d3963a2a21b091864375eec59d3878234e8a96..7e961e13df8498ee02661c2b10a1a860387eb32d 100644 (file)
@@ -1,7 +1,21 @@
 TEMPLATE = app
 
 # Input
-FORMS += maindialog.ui options.ui
+CONFIG += qt
+CONFIG -= debug
+
+FORMS += options.ui maindialog.ui maindialog_old.ui
+
+# FORMS += options.ui
+# qt_version = $$[QT_VERSION]
+# lessThan (qt_version, 4.2) {
+#      message(Compiling for Qt < 4.2)
+#      FORMS += maindialog_old.ui
+# } else {
+#      message(Compiling for Qt = 4.2)
+#      FORMS += maindialog.ui
+# }
+
 HEADERS += main.h options.h
 SOURCES += main.cpp options.cpp
 TRANSLATIONS = qteleschorsch_de.ts qteleschorsch_fr.ts