------------------------------------------------------------------------
+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
// 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
}
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)) {
#ifndef MAIN_H
#define MAIN_H
+#if QT_VERSION >= 0x040200
#include "ui_maindialog.h"
+#else
+#include "ui_maindialog_old.h"
+#endif
// Types
// =====
--- /dev/null
+<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>
}
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)) {
}
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) {
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