------------------------------------------------------------------------
+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
// 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
}
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)) {
#if QT_VERSION >= 0x040200
#include "ui_maindialog.h"
#else
-#include "ui_maindialog_old.h"
+#include "ui_maindialog_4.1.h"
#endif
// Types
</item>
<item>
<widget class="QTimeEdit" name="teOffset" >
+ <property name="displayFormat" >
+ <string>HH:mm:ss</string>
+ </property>
<property name="calendarPopup" >
<bool>false</bool>
</property>
--- /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" >
+ <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>
+++ /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
+ #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)) {
}
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) {
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