![]() |
Qt Project: Countdown timer
1 Attachment(s)
Here is a little project of mine which I did for two reasons. I wanted to learn C++/Qt and I needed a countdown timer. Initially I had no intentions to release this app, but now that it's almost ready, I thought someone else mind find it useful too. ;)
Basically it is a simple countdown timer with 1 second precision that can countdown all the way from 60 minutes (60 minutes and 59 seconds to be precise :D). It has 4 customisable buttons for preset times in addition to the normal + and - dials. I still have some issues and I would appreciate any help. :) 1. SOLVED Sound doesn't work. EDIT: Using Phonon instead of QSound now. 2. SOLVED EDIT: This issue is only present when doing a run with MADDE. Once the app is properly installed there is no issue. I can't access the /home/user/MyDocs/.sounds directory with native dialog. With the following setting it works, but that dialog is not very finger friendly: Code:
QFileDialog::DontUseNativeDialog 4. SOLVED How to optify this app. 5. DONE Thanks to Juxxxer! And finally, could someone please make an icon for this app. I absolutely stink with anything that requires even only very basic drawing skills. :D Countdwon Timer is now available in Extras-Devel. :) Here are the source files. |
Re: Qt Project: Countdown timer
OK, here is some more info about the sound problem:
I'm using QSound::play(fileName). This works fine in Windows, but I get no sound in N900. I'm also trying to test Phonon::MediaObject, but I don't seem to have the necessary libraries on my 64 bit Windows 7 for it to work. |
Re: Qt Project: Countdown timer
Hi,
Quote:
Quote:
Quote:
Quote:
Daniel |
Re: Qt Project: Countdown timer
Quote:
thats what Ive done at the moment for a QT app I created. Read about this debian/optify in the maemo mailing list as Daniel has mentioned, need to try it out. cheers |
Re: Qt Project: Countdown timer
1 Attachment(s)
Quote:
This is what I did now (with no success so far): I created the CountdownTimer.desktop file in the /src directory (I also tried without the Icon line, since I don't have any icons yet): Code:
[Desktop Entry] Code:
TARGET = timer Code:
mad dpkg-buildpackage |
Re: Qt Project: Countdown timer
Quote:
thats where it should be. And, Ive still not managed to add this as a widget, but I can add it as a shortcut to app on the home desktop. |
Re: Qt Project: Countdown timer
Quote:
|
Re: Qt Project: Countdown timer
Quote:
this can be configured in the .pro file. something like desktop.files = <<your .desktop file> desktop.path = /usr/share/applications/hildon INSTALLS += desktop EDIT:: oops I read between the lines. No the shortcut wont appear automatically after installing your app using dpkg. You need to manually create a shortcut from the home screen. This is the info I have with my limited knowledge. |
Re: Qt Project: Countdown timer
Quote:
Daniel |
Re: Qt Project: Countdown timer
Hi, do you know any information about the logo size (in pixels). I could be interested to do something :)
Edit: Or are those svg pics? Should I look Hildon documentation or QT documentation about what kind of format etc this logo needs to be? Are there any examples around? Jux |
Re: Qt Project: Countdown timer
Quote:
Cheers Daniel |
Re: Qt Project: Countdown timer
Quote:
Code:
TARGET = timer Code:
make: *** [configure-stamp] Error 1 |
Re: Qt Project: Countdown timer
Quote:
target.path =$$BINDIR desktop.path = $$DATADIR/applications/hildon desktop.files += $${TARGET}.desktop |
Re: Qt Project: Countdown timer
Quote:
|
Re: Qt Project: Countdown timer
Quote:
|
Re: Qt Project: Countdown timer
2 Attachment(s)
Hi,
ok, first try. I made first 64x64pix version and after that 48x48, but kind of cheated on 48x48 :) But do you think this 'sporty' clock tells what this counter is? is the functionality similar? So is my analogy correct? And of course all the other comments are welcome also (should I change the 'time' in a clock to something else?) Are there any restrictions how to use Maemo logo? (so can we use this minimalized version I made?). Or is it stupid idea to use this almost-Maemo-logo-text there? I'm happy to make changes... Cheers, Jux |
Re: Qt Project: Countdown timer
Quote:
I have no idea about the restrictions using the Maemo logo. Maybe someone else can answer that. :) Could the 48 x 48 version also show the entire "clock"... But it looks really cool. :) I just wonder if that icon would mislead people to think that it's also a normal timer and not just countdown timer? :confused: Hmm... Still, it's such a nice icon that maybe I should simply add the normal timer function. It shouldn't be that difficult. :D |
Re: Qt Project: Countdown timer
>Still, it's such a nice icon that maybe I should simply add the normal timer function.
Logo is creating new feature requests :D. >Could the 48 x 48 version also show the entire "clock". I can try. But the Maemo letters are so small already so not sure I can make them any more smaller. But maybe I'll just make the clock smaller and try to adjust the 'original' Maemo letters. |
Re: Qt Project: Countdown timer
1 Attachment(s)
Hi,
Is png ok? I think the transparency is better with png. But here is 48x48 version with full clock. I'll make 64x64 png version also when you know which size you need. |
Re: Qt Project: Countdown timer
Funny, I've made the same kind of app with Qt and I've managed to package it with the instructions described here:
http://wiki.forum.nokia.com/index.ph...plication_menu Now I would like to upload my package to the extras repository and I've found some instructions here: http://wiki.maemo.org/Uploading_to_Extras However it seems to require files I don't have (.changes and others). I've managed to have the sound working (although with a little hack) using Phonon, so if you still need help let me know. |
Re: Qt Project: Countdown timer
Quote:
Quote:
Quote:
|
Re: Qt Project: Countdown timer
Quote:
do you have your latest sources anywhere, that I could have a look, what's going wrong?!? Quote:
@marionegroponzi: Have a look in the maemo.org wiki. There is a guide how to make a debian package of a Qt application. Daniel |
Re: Qt Project: Countdown timer
1 Attachment(s)
Quote:
|
Re: Qt Project: Countdown timer
1 Attachment(s)
Hi,
New 64x64 version (sorry my way of working is quite iterative) - but some colors added (+ transparency for 64x64). Opinions? comments? I think it would be nice to see those in action in N900 when you are getting there. |
Re: Qt Project: Countdown timer
1 Attachment(s)
Quote:
|
Re: Qt Project: Countdown timer
For this shortcut issue, I wonder if I could manually edit the makefile? I noticed the following section in it:
Code:
install: $(TARGET) I also wonder if I could manually change the install path here to /opt? |
Re: Qt Project: Countdown timer
5 Attachment(s)
I got a strange new problem. After I install the Debian package, it looks like this and I get these errors. But when I reboot my device, it looks normal and I get no errors. Any idea why it's doing this? :confused:
I've attached the Debian package and the source files here. |
Re: Qt Project: Countdown timer
Quote:
1. create a folder <package-name>-<version-number> like countdowntimer-0.1 2. copy the sources into that folder 3. create in the folder a file named countdowntimer.pro with this content: Code:
TEMPLATE = subdirs Code:
TARGET = countdowntimer Code:
mad dh_make --createorig --single -e <your email> -c gpl 6. run: Code:
mad qmake Code:
mad dpkg-buildpackage hope this helped and sorry for the delay. Daniel |
Re: Qt Project: Countdown timer
1 Attachment(s)
Quote:
Now if I only would get the icon working too.. ;) Here is what I've done: Code:
QT += phonon Anyway, here is the Debian package with the shortcut: :) |
Re: Qt Project: Countdown timer
Quote:
Code:
INSTALLS += target desktop icon64 Daniel |
Re: Qt Project: Countdown timer
Quote:
Now I wonder if by changing the BINDIR and DATADIR I could optify this? After I've done this, I could try to upload this to Extras Devel. :) |
Re: Qt Project: Countdown timer
Quote:
the icons stay in /usr/share itself as u configured AFAIK |
Re: Qt Project: Countdown timer
Quote:
Daniel |
Re: Qt Project: Countdown timer
Now I have the issue of missing libqt4-phonon package when trying to install this Debain package. By doing the following the install succeeds:
apt-get install libqt4-phonon But does anyone know how it should be done so that it would install it automatically if missing? |
Re: Qt Project: Countdown timer
Quote:
in the depends option :) |
Re: Qt Project: Countdown timer
Quote:
Code:
Source: countdowntimer Code:
Depends: ${shlibs:Depends}, ${misc:Depends}, ${libqt4-phonon:Depends} |
Re: Qt Project: Countdown timer
Quote:
Code:
QT += phonon |
Re: Qt Project: Countdown timer
Quote:
|
Re: Qt Project: Countdown timer
Quote:
Code:
Source: countdowntimer Code:
dpkg-genchanges: warning: unknown information field 'Build-Depends' in input data in package's section of control info file |
Re: Qt Project: Countdown timer
Quote:
Build-Depends: debhelper (>= 5) exists on Source under the Maintener section just add your dependent packages there. |
All times are GMT. The time now is 21:13. |
vBulletin® Version 3.8.8