[svn-upgrade] Integrating new upstream version, teleschorsch (0.1.8) upstream/0.1.8
authorgregor herrmann <gregoa@debian.org>
Thu, 29 Mar 2007 15:40:56 +0000 (15:40 -0000)
committergregor herrmann <gregoa@debian.org>
Thu, 29 Mar 2007 15:40:56 +0000 (15:40 -0000)
ChangeLog
main.cpp
main.h
maindialog.ui
maindialog_4.1.ui [new file with mode: 0644]
maindialog_old.ui [deleted file]
options.cpp
qteleschorsch.pro

index 53cb1b8..337e8a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,25 @@
 ------------------------------------------------------------------------
+r456 | philipp | 2007-03-28 23:14:56 +0200 (Wed, 28 Mar 2007) | 4 lines
+Changed paths:
+   M /teleschorsch/trunk/main.cpp
+   M /teleschorsch/trunk/main.h
+   M /teleschorsch/trunk/maindialog.ui
+   A /teleschorsch/trunk/maindialog_4.1.ui (from /teleschorsch/trunk/maindialog_old.ui:455)
+   D /teleschorsch/trunk/maindialog_old.ui
+   M /teleschorsch/trunk/options.cpp
+   M /teleschorsch/trunk/qteleschorsch.pro
+
+- renamed maindialog.ui to maindialog_4.1.ui
+- intended #ifdef
+- QTimeEdit property displayFormat specified
+
+------------------------------------------------------------------------
+r455 | gregoa | 2007-03-26 16:38:37 +0200 (Mon, 26 Mar 2007) | 1 line
+Changed paths:
+   M /teleschorsch/trunk/qteleschorsch.pro
+
+explicitly compile without debug stuff (needed for (dapper's?) qt 4.1
+------------------------------------------------------------------------
 r454 | gregoa | 2007-03-26 01:21:16 +0200 (Mon, 26 Mar 2007) | 1 line
 Changed paths:
    M /teleschorsch/trunk/options.cpp
index f6e223e..6db10c5 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -261,11 +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
+       #if QT_VERSION >= 0x040200
        calDate->setSelectedDate(dateTime.date());
-#else
+       #else
        calDateEdit->setDate(dateTime.date());
-#endif
+       #endif
 }
 
 
@@ -295,11 +295,11 @@ bool MainDialog::startAction() {
        int row = lwChannels->currentRow();
        if (row >= 0) {
                Channel channel = channelVec[row];
-#if QT_VERSION >= 0x040200
+               #if QT_VERSION >= 0x040200
                QDate date = calDate->selectedDate();
-#else
+               #else
                QDate date = calDateEdit->date();
-#endif
+               #endif
                QString substUrl;
                QString errorMsg;
                if (!evaluateStaticUrl(channel.staticUrl, date, substUrl, errorMsg)) {
diff --git a/main.h b/main.h
index 374bd9c..fc15b9c 100644 (file)
--- a/main.h
+++ b/main.h
@@ -3,7 +3,7 @@
 #if QT_VERSION >= 0x040200
 #include "ui_maindialog.h"
 #else
-#include "ui_maindialog_old.h"
+#include "ui_maindialog_4.1.h"
 #endif
 
 // Types
index a7e3eb7..8b688e4 100644 (file)
        </item>
        <item>
         <widget class="QTimeEdit" name="teOffset" >
+         <property name="displayFormat" >
+          <string>HH:mm:ss</string>
+         </property>
          <property name="calendarPopup" >
           <bool>false</bool>
          </property>
diff --git a/maindialog_4.1.ui b/maindialog_4.1.ui
new file mode 100644 (file)
index 0000000..901b906
--- /dev/null
@@ -0,0 +1,200 @@
+<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" >
+         <property name="displayFormat" >
+          <string>HH:mm:ss</string>
+         </property>
+        </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>
diff --git a/maindialog_old.ui b/maindialog_old.ui
deleted file mode 100644 (file)
index b5a6d3b..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-<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 99de0f9..6024de5 100644 (file)
@@ -25,13 +25,13 @@ bool OptionsDialog::exec(const QString& configFile) {
        }
        QFile configFileUser(configFile);
        if (!configFileUser.exists()) {
-#if QT_VERSION >= 0x040200
+               #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
+               #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
+               #endif
                teIni->clear();
        } else {
                if (!configFileUser.open(QIODevice::ReadOnly | QIODevice::Text)) {
@@ -40,11 +40,11 @@ bool OptionsDialog::exec(const QString& configFile) {
                }
                QTextStream in(&configFileUser);
                while (!in.atEnd()) teIni->append(in.readLine());
-#if QT_VERSION >= 0x040200
+               #if QT_VERSION >= 0x040200
                teIni->moveCursor(QTextCursor::Start);
-#else
+               #else
                // 
-#endif
+               #endif
        }
        configFileUser.close();
        if (QDialog::exec() == QDialog::Accepted) {
index 7e961e1..c2f8b9c 100644 (file)
@@ -4,13 +4,13 @@ TEMPLATE = app
 CONFIG += qt
 CONFIG -= debug
 
-FORMS += options.ui maindialog.ui maindialog_old.ui
+FORMS += options.ui maindialog.ui maindialog_4.1.ui
 
 # FORMS += options.ui
 # qt_version = $$[QT_VERSION]
 # lessThan (qt_version, 4.2) {
 #      message(Compiling for Qt < 4.2)
-#      FORMS += maindialog_old.ui
+#      FORMS += maindialog_4.1.ui
 # } else {
 #      message(Compiling for Qt = 4.2)
 #      FORMS += maindialog.ui